CS174: COMBINATORICS & DISCRETE PROBABILITY

INSTRUCTOR: Alistair Sinclair (sinclair at eecs, 677 Soda, 643-8144)
OFFICE HOURS: Monday 1:30-2:30, Tuesday 2:00-3:00 in 677 Soda

TEACHING ASSISTANT: Hoeteck Wee (hoeteck at eecs, 587 Soda, 642-3560)
OFFICE HOURS: Tuesday 4:00-5:00, Wednesday 5:00-6:00 in 511 Soda

LECTURES: Tuesday, Thursday 12:30-2:00 in 310 Soda

DISCUSSION SECTIONS:
101: W 3:00-4:00 in 285 Cory
102: W 4:00-5:00 in 85 Evans

RECENT ANNOUNCEMENTS


LECTURES

The following is a list of topics covered in each lecture, together with pointers to the corresponding portions of the Mitzenmacher/Upfal text and, where appropriate, additional lecture notes.

Topic Readings
1/16 Introduction; events & probability MU Sections 1.1-1.2
1/18 Verifying matrix multiplication; Karger's algorithm MU Sections 1.3-1.4
1/23 Random variables and expectation MU Section 2.1
1/25 Binomial and geometric distributions; coupon collecting; Quicksort MU Sections 2.2, 2.4-5
1/30 Branching processes; conditional expectation; Markov's inequality; variance MU Sections 2.3, 3.1-2
2/1 Chebyshev's inequality; random sampling; randomized algorithm for median finding MU Sections 3.3-4
2/6 Randomized median finding (cont.) MU Section 3.4
2/8 Chernoff bounds; set balancing MU Sections 4.2-4
2/13 Proof of Chernoff bounds; randomized routing MU Sections 4.2, 4.5
2/15 Randomized routing; birthday problem MU Sections 4.5, 5.1
2/20 Birthday problem; Poisson distribution and rare events MU Sections 5.1-5.3
2/22 Poisson approximation for balls & bins; maximum load MU Section 5.4
2/27 Review Session (Hoeteck) Sample Midterm 1
3/1 Hashing; Bloom filters MU Section 5.5
3/6 Random graphs; connectivity; probabilistic method MU Sections 5.6.1, 6.1
3/8 Probabilistic method; method of conditional expectations MU Sections 6.2, 6.3
3/13 More on the probabilistic method; thresholds in random graphs MU Section 6.4, 6.5
3/15 Property testing (Hoeteck) Pages 1-3 of this survey.
3/20 Pairwise independence MU Sections 13.1-2
3/22 Universal hash functions MU Section 13.3
4/3 The power of two choices (Hoeteck) These notes.
4/5 Markov chains; 2-SAT MU Section 7.1
4/10 Markov chains: gambler's ruin, stationary distributions, fundamental theorem MU Sections 7.2-3
4/12 Markov chains: examples; card shuffling, random walks, simple queue, cover time MU Sections 7.3-4
4/17 Review Session (Hoeteck) Sample Midterm 2
4/19 Markov chain Monte Carlo; Metropolis algorithm MU Sections 10.3 (no details), 10.4
4/24 Mixing time; coupling MU Sections 11.1-2 (omit 11.2.3)
4/26 No lecture (faculty retreat)
5/1 Sampling graph colorings; analysis of riffle shuffle MU Section 11.5
5/3 Fingerprinting, pattern matching These notes.
5/8 Primality testing These notes.

HOMEWORKS

All homeworks are due Thursday at 5:00pm unless otherwise stated. Turn in your homeworks in the box labeled "CS174" on the 2nd floor of Soda Hall. Please ensure that each sheet is labeled with your name, SID number, section number, and "CS174--Spring 2007". You risk receiving no credit for any homework submitted without this information. Please take the time to write clear and concise solutions; we will not grade messy or unreadable submissions. The lowest two homework scores will be dropped. No late homeworks will be accepted.

DISCUSSION SECTIONS

Posted below are notes for discussion sections, provided by Hoeteck. Note: These are typically sketches, and are less detailed and less carefully checked than the homework solutions.

EXAMS

There will be two midterms and one final. The final is scheduled for Wednesday May 16, 5-8pm. Midterm dates and other details will be announced in due course.

ASSESSMENT

Your grade in the class will be determined as follows: Homeworks 20%; Midterms 20% each; Final 40%.

COURSE POLICIES

Prerequisites: You should have taken an Upper Division course on algorithms (CS170 or equivalent) and a course on discrete mathematics including basic probability (CS70, Math55 or equivalent). If you found those classes hard, then you will find this course harder and you should consider carefully whether it is the right class for you. It is also assumed that you have experience with programming in a standard imperative language such as C, C++ or Java. Although most homeworks will be pencil-and-paper exercises, you may also be expected to do some small programming assignments. If you have any doubts about your background, you should come and talk to me as soon as possible.

Readings: The required text for the class is Probability and Computing: Randomized Algorithms and Probabilistic Analysis , by Michael Mitzenmacher and Eli Upfal, Cambridge University Press, 2005. It is essential that all students have regular access to this book. Pointers to the relevant sections of the book will be provided as we go along. (See here for errata in the first printing of the book, some of which were corrected in the second printing.)

Contact Information: The instructor and TA will post announcements, clarifications, hints, etc. to this website and/or to the class newsgroup, ucb.class.cs174. Hence you must check this website and the newsgroup frequently throughout the semester. For information on how to access UCB newsgroups, go here (see also here for more).

If you have a straightforward clarification question, your best option is to post a message to the newsgroup. We will check the newsgroup regularly, and if you use the newsgroup, other students will be able to help you too. When using the newsgroup, please avoid off-topic discussions, and please do not post answers to homework questions before the homework is due.

If your question is personal or not of interest to other students, you may send email to cs174@cory.eecs. Email to this address is forwarded to the instructor and the TA. We prefer that you use this address, rather than directly emailing the instructor and/or your TA. If you wish to talk with one of us individually, you are welcome to come to our office hours. If the office hours are not convenient, you may make an appointment with either of us by email. Please reserve email for the questions you can't get answered in office hours, in discussion sections, or through the newsgroup.

In any class, it can be challenging for the instructor to gauge how smoothly the class is going. We always welcome any feedback on what we could be doing better. If you would like to send anonymous comments or criticisms, please feel free to use an anonymous remailer like this one to avoid revealing your identity.

Collaboration: You are encouraged to work on homework problems in study groups of two to four people; however, you must write up the solutions on your own, and you must never read or copy the solutions of other students. Similarly, you may use books or online resources to help solve homework problems, but you must credit all such sources in your writeup and you must never copy material verbatim. Warning: Your attention is drawn to the Department's Policy on Academic Dishonesty. In particular, you should be aware that copying solutions, in whole or in part, from other students in the class or any other source without acknowledgment constitutes cheating. Any student found to be cheating risks automatically failing the class and being referred to the Office of Student Conduct.

Regrading Policies: Regrading of homeworks or exams will only be undertaken in cases where you believe there has been a genuine error or misunderstanding. Bear in mind that our primary aim in grading is consistency, so that all students are treated the same; for this reason, we will not adjust the score of one student on an issue of partial credit unless the score allocated clearly deviates from the grading policy we adopted for that problem. If you wish to request a regrading of a homework or exam, you must return it to the instructor or the TA with a written note on a separate piece of paper explaining the problem. The entire assignment may be regraded, so be sure to check the solutions to confirm that your overall score will go up after regrading. All such requests must be received within one week from the date on which the homework or exam was made available for return.

SOME HELPFUL HINTS

The following tips are offered based on our experience with Upper Division classes in CS Theory. If you follow these guidelines, you will make life much easier for yourself in this class.

1. Don't fall behind! In a conceptual class such as this, it is particularly important to maintain a steady effort throughout the semester, rather than hope to cram just before homework deadlines or exams. This is because it takes time and practice for the ideas to sink in. Make sure you allocate a sufficient number of hours every week to the class, including enough time for reading and understanding the material as well as for doing assignments. (As a rough guide, you should expect to do at least one hour of reading and two hours of problem solving for each hour of lecture.) Even though this class does not have any major projects, you should plan to spend as much time on it as on any of your other Upper Division technical classes.

2. Take the homeworks seriously! The homeworks are explicitly designed to help you to learn the material as you go along. Although the numerical weight of the homeworks is not huge, there is usually a strong correlation between homework scores and final grades in the class. Also, regardless of how well you did on the homework, read the sample solutions, even for the problems you got right. You may well learn a different way of looking at the problem, and you may also benefit from emulating the style of the solutions. (In science people learn a lot from emulating the approach of more experienced scientists.)

3. Make use of office hours! The instructor and TA hold office hours expressly to help you. It is often surprising how many students do not take advantage of this service. You are free to attend as many office hours as you wish. You will also likely get more out of an office hour if you have spent a little time in advance thinking about the questions you have, and formulating them precisely. (In fact, this process can often lead you to a solution yourself!)

4. Take part in discussion sections! Discussion sections are not auxiliary lectures. They are an opportunity for interactive learning, through guided group problem solving and other activities. The success of a discussion section depends largely on the willingness of students to participate actively in it. As with office hours, the better prepared you are for the discussion, the more you are likely to get out of it.

5. Form study groups! As stated above, you are encouraged to form small groups (two to four people) to work together on homeworks and on understanding the class material on a regular basis. In addition to being fun, this can save you a lot of time by generating ideas quickly and preventing you from getting hung up on some point or other. Of course, it is your responsibility to ensure that you contribute actively to the group; passive listening will likely not help you much. And recall the caveat above that you must write up your solutions on your own.