2008 December 2 / jjddaavviiss@@ccaarrlleettoonn..eedduu

# Mathematics Of Computer Science

Carleton College CS 202, Fall 2008, Prof. Joshua R. Davis

## Introduction

This course is intended to give you basic mathematical knowledge and skills needed by every computer science major. In content it is primarily elementary combinatorics, probability, graph theory, and number theory — broadly, discrete mathematics. However, the most important aspect of the course is learning how to construct logical, rigorous proofs of mathematical statements. Proof is the bottom line in mathematics and computer science; it is how we create new facts and how we know that they are true. By rigorously devising and proving statements, you become a creator of mathematics and computer science, not just a user. In its goals this course is similar to Math 236 (Mathematical Structures), but with more emphasis on algorithms and computational applications.

The official prerequisites are CS 111 (Introduction to Computer Science) and Math 111 (Introduction to Calculus). More generally, this course is appropriate for students who are comfortable with math and programming, including recursion. Talk to me if you are concerned about your background.

Our class meets in CMC 319 during period 4A (MW 12:30PM-1:40PM, F 1:10PM-2:10PM). The basic materials are

• Discrete Mathematics and Its Applications, 6th edition, by Kenneth H. Rosen. This text has been used in recent terms at Carleton. The 5th edition is also acceptable, but students using it should check the 6th edition for changes in section numbering, etc.
• Exam 1 (Percentiles: 75th = 66, 50th = 52, 25th = 43)
• Final Exam (Percentiles: 75th = 73, 50th = 65, 25th = 48)

Here's how you get in contact with me:

Dr. Joshua R. Davis (most people call me Josh)
E-mail: jjddaavviiss@@ccaarrlleettoonn..eedduu
Office: CMC 327, x4482
Office hours: M 5A (1:40-2:30), T 2C (10:00-11:00), W 3A (11:00-12:00). You can also make an appointment; simply pick a free time from my weekly schedule and e-mail me. You can also talk to me after class.

## Responsibilities

Final grades (A, B, C, etc.) are assigned according to an approximate curving process. By this I mean that there are no predetermined percentages (90%, 80%, 70%, etc.) required for specific grades. The following elements contribute to the final grade.

• Participation (5%): This is a measure of how engaged with the course you are. You are expected to attend every class meeting (promptly) and participate in the discussion and group work. You are expected to have read the relevant textbook sections before class; you will then get much more out of the discussion. You are also required to visit me in my office at least once during the first two weeks. You can make up for a deficiency in class participation by talking with me frequently in office hours, demonstrating exceptional effort and interest, etc.
• Homework (35%): In this course, most of your learning takes place while doing homework. Most homework consists of written solutions to problems, but there are occasional programming assignments. To give you some flexibility, homework is collected once per week rather than at every meeting.
• Midterm Exam (30%): There is one midterm exam, given in class sometime around Day 14.
• Final Exam (30%): The final exam is cumulative. It is scheduled for Monday November 24, 8:30AM-11:00AM. Self-scheduled final exams are not allowed.

You are expected to spend at least 10 hours per week on this course outside class. Some students need to spend more than 10 hours. If you spend less, then your education is suboptimal; we should discuss ways to enrich it.

## Working With Others

You are strongly encouraged to work with others on all homework. Work together to figure out the problems/programs, but write/type them up separately, in your own words. You may not copy someone else's work or allow them to copy yours. Presenting someone else's work as your own is an act of academic dishonesty.

## Writing

Writing is not just for English majors. Written and oral communication skills are essential to every academic discipline; they are also highly prized by employers. It is in this course that you (begin to) learn to communicate like a computer scientist. Your written work is evaluated both for correctness and for presentation.

I strongly encourage you to adopt the following operating procedure. Work with others to figure out the problems on scratch paper. Then, on your own, think about how each problem's solution should be presented, and write that solution on its own sheet of paper. You may need to make revisions. Using separate sheets makes it easy to write and revise your solutions independently of each other.

Editing is even easier if you type, rather than write, your solutions. Unfortunately, most word processors are terrible at mathematical notation. For this reason many computer scientists (and mathematicians and physicists) use the typesetting system LaTeX. I'm happy to help you get started with it; just ask. Once you overcome the learning curve, which is not high, typing can be much more efficient than writing — just as it is for an English paper.

How much work should you show? The answer is simple: Compose your solutions as if the intended audience is your fellow students. By doing so, you show enough detail that your grader can ascertain whether you yourself understand the material. Your solutions should also be self-explanatory. In short, if a classmate were to read one of your solutions, then she or he should be able to understand what the problem was and how you solved it.

Staple your solutions into a single packet, in the order they were assigned. Packets that are not stapled are unacceptable. I will not accept packets that are not stapled. Staple your packet. Your packet? Staple it.

Depending on time constraints in any given week, perhaps not all of your homework is graded; in order to ensure full credit, do all of the assigned problems.

## Special Accommodations

During the term, you have one free pass to hand in an assignment late. Here is how you activate it. Instead of handing in the assignment, send me e-mail (by the due date) declaring that you are using your late pass and proposing a new due date. If the due date is extended by only one class meeting, then no explanation is necessary; if you need longer, then convince me. Use your free pass wisely; once you have used it, no late assignments are accepted, except in extreme circumstances that are truly beyond your control.

If some medical condition affects your participation in class or your taking of exams, let me know in the first week of class. You may need to make official arrangements with the Office of Disability Services.

## Schedule

M 09/15011.1propositional logicHomework 1 (due Tue 09/16, 5:00PM)
W 09/17021.2, 1.3prepositional logicAssignment 2 (due Wed Day 05)
F 09/19031.4, 1.5proofs
M 09/22041.6, 1.7proofsAssignment 3 (due Wed Day 08)
W 09/2405proofs, Hamming codes202.hamming.nb
F 09/26063.4divisibility, modular arithmetic
M 09/29073.8matrices
W 10/01083.5Hamming again, primes
F 10/03093.2growth of functionsAssignment 4 (due Wed Day 11)
M 10/06103.6integer algorithms
W 10/08113.7RSA cryptosystemAssignment 5 (due Fri Day 15)
F 10/10124.1induction
M 10/13134.2, 4.3strong and structural induction
W 10/1514midterm exam
F 10/17152.1, 2.2sets
M 10/20midterm break
W 10/22162.3functionsAssignment 6 (due Wed Day 19)
F 10/24175.1, 5.2counting
M 10/27185.3permutations and combinations
W 10/29195.4, 5.5more combinatoricsAssignment 7 (due Wed Day 22)
F 10/31207.1recurrence relations
M 11/03217.2recurrence relations
W 11/05227.3, 6.1divide-and-conquer, probability
F 11/07236.2probabilityAssignment 8 (due Fri Day 26)
M 11/10246.3Bayes' theorem
W 11/12256.4expected value
F 11/14269.1, 9.2graphsAssignment 9 (due Wed Day 28)
M 11/17279.3, 9.4paths202.graphs.nb
W 11/19289.5Eulerian, Hamiltonian circuits
M 11/24final exam 8:30AM-11:00AM