CS170: EFFICIENT ALGORITHMS & INTRACTABLE PROBLEMS
INSTRUCTOR: Alistair Sinclair
(sinclair@cs)
LECTURES: Tuesday, Thursday 09:30-11:00
PLACE: 306 Soda
OFFICE HOURS: Monday 1:30-2:30, Tuesday 11:30-12:30 in 677 Soda
TEACHING ASSISTANTS:
Yan Huang (yan@icsi.berkeley.edu, 464 Soda, 666-2942)
Omar Khan (omar@eecs, 592 Soda, 642-5422)
Junming Yin (junming@eecs, 594 Soda, 642-1017)
DISCUSSION SECTIONS:
101: Tu 3-4, 3 Evans; Omar
102: Tu 4-5, 289 Cory; Junming
103: W 10-11, 75 Evans; Yan
104: W 11-12, 75 Evans; Omar
105: W 1-2, 3 Evans; Junming
TA OFFICE HOURS:
Yan: W 9-10, Soda Alcove 511
Omar: W 3-4, Th 11:30-12:30, both in Soda Alcove 511
Junming: M 4-5 in Soda Alcove 711, W 2-3 in Soda Alcove 751
RECENT ANNOUNCEMENTS
- May 18:
The final has been graded, and course grades assigned. You should have
received an email with your final score and grade. Statistics for the
final were as follows: mean 45.4 (out of 80), SD 15.9.
We hope you enjoyed the course and that you have a great summer!
- May 11:
Shortly you should receive an individual email listing all the HW and midterm
scores that we have recorded for you. If you find any errors, please bring
the relevant assignment to us BY THE FINAL AT THE LATEST. Note that we are
not considering regrading requests at this time; this is for clerical errors
only.
- May 11:
Solutions for HW11 are posted below. Graded solutions can be picked
up at tomorrow's review session.
- May 9:
The Final Exam will cover all the material from the semester EXCEPT FOR
the last two lectures (Fast Fourier Transform and Randomized Algorithms).
For further information about arrangements between now and the Final,
see the posting below (May 2).
- May 3:
Solutions for HW10 are posted below. The mean was 31.3 (out of 42),
SD was 9.6. Quite a few people did not submit this homework.
Everybody is strongly encouraged to work through these problems
and the solutions as this (and HW11) is you main chance to understand
NP-Completeness.
- May 2:
Here are the arrangements for the remainder of the semester and exam:
- The Final Exam takes place 8-11am on Tuesday May 16th in 390 Hearst Mining.
It will be similar in design to the midterms, except that it will cover the
entire course. It will also be a bit longer (3 hours rather than 2). As
usual you are allowed one cheat sheet, and no electronic devices.
- There will be no sections next week; this week's sections are the last of the
semester. HW10 will be returned at this week's sections.
- Office hours will run as normal until the Final, except that Omar's office
hours next week (May 8 through 12) are cancelled. Instead, Omar will hold
additional office hours 11am-1pm on Monday May 15 (the day before the Final).
- There will be a review session on Friday, May 12th, 6:00-7:30pm in 306 Soda.
Yan will go over some sample problems for the Final.
- The last homework, HW11, will be available for collection during the review
session.
- Omar will give the lecture this Thursday, on the Fast Fourier Transform.
Notes for this will be posted shortly. In the last lecture, next Tuesday,
I will talk about Randomized Algorithms.
- Apr. 27:
HW11 (the LAST homework of the semester!) is posted below.
It is of normal length (i.e., shorter than HW10) and is
due next Thursday, May 4.
- Apr. 25:
Notes for this week's lectures ("Coping with NP-completeness")
are posted below.
- Apr. 18:
Midterm 2 has been graded; you should pick up your paper from your
TA at section this week. Generally people did quite well on this
midterm. The stats are as follows: Mean 47.9 (out of 65); SD 10.3;
Max 65; Min 16. Sample solutions are posted below. EVEN IF YOU GOT
A HIGH SCORE, YOU ARE STRONGLY
ADVISED TO READ THE SAMPLE SOLUTIONS CAREFULLY.
- Archived announcements
LECTURES
The following is a list of topics covered, together
with the corresponding lecture notes and suggested reading from
the CLRS textbook.
|
Topic |
Readings |
| 1 |
Overview |
Notes [ps]
[pdf]
CLRS Chapters 1, 2, 3
|
| 2 |
Divide-and-Conquer; Recurrences |
Notes [ps]
[pdf]
CLRS Chapter 4, Appendix A, Sect 33.4
|
| 3 |
Decompositions of Graphs |
Notes [ps]
[pdf]
CLRS Chapter 22 (omit 22.2)
|
| 4 |
Paths in Graphs |
Notes [ps]
[pdf]
CLRS 22.2 & Chapter 24 (omit 24.1, 24.4)
|
| 5 |
Minimum Spanning Trees; Greedy Algorithms |
Notes [ps]
[pdf]
CLRS Chap. 23, 21 (omit 21.4), 16.3
|
| 6 |
Lempel-Ziv algorithm, lower bounds and entropy |
Notes [ps]
[pdf]
|
| 7 |
Dynamic Programming |
Notes [ps]
[pdf]
CLRS Chap. 15
|
| 8 |
Linear Programming |
Notes [ps]
[pdf]
CLRS Chap. 29
|
| 9 |
NP-Complete Problems |
Notes [ps]
[pdf]
CLRS Chap. 34
|
| 10 |
Coping with NP-Completeness |
Notes [ps]
[pdf]
|
| 11 |
The Fast Fourier Transform |
Notes [ps]
[pdf]
CLRS Chap. 30
|
HOMEWORKS
All homeworks are due Thursday at 3:30pm unless otherwise stated.
Turn in your homeworks in the box labeled "CS170" on the 2nd
floor of Soda Hall. Please begin your answer to each problem on a new
sheet of paper. Please ensure that each sheet is
labeled with your name, SID number, section number, and "CS170--Spring 2006".
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.
EXAMS
There will be two midterms and one final. Dates and other details
will be announced in due course.
QUIZZES
There will be a short quiz at the beginning of class on randomly selected
dates. The quiz will consist of a small number of very simple questions
related to the material of the previous class. The two lowest quiz scores
will be dropped. The motivation for the
quizzes is twofold: (1) to encourage you to review the material of each
class before the next class; (2) to encourage on-time arrival at lectures.
ASSESSMENT
Your grade in the class will be determined as follows:
Homeworks 20%; Midterms 20% each; Final 35%; Quizzes 5%.
COURSE POLICIES
Prerequisites: Formal prerequisites are CS61B and either CS70 or Math55.
In particular, you should be comfortable with mathematical induction, big-O notation,
sorting algorithms, basic data structures and binary heaps. If you need to refresh
any of this background, you should refer to the relevant portions of the CLRS book
(see below).
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.
Readings: Lecture notes will be posted on this web page on or before
the day of the relevant class; most of these notes are draft chapters of
a book in preparation by Sanjoy Dasgupta, Christos Papadimitriou and Umesh Vazirani.
For additional background and examples, it is recommended that students consult the book
Introduction to Algorithms, by Cormen, Leiserson, Rivest and Stein,
Second Edition, MIT Press, 2001 (which we shall refer to as CLRS).
Pointers to the relevant sections of this book will also be provided as we go along.
Contact Information: The instructor and TAs will post announcements,
clarifications, hints, etc. to this website and/or to the class newsgroup,
ucb.class.cs170.
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 question, your best option is to post a message to the
newsgroup. The staff (instructor and TAs) 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 cs170@cory.eecs. Email to this address is
forwarded to the instructor and all TAs. 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 any 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 a class this large, 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 your section 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 TAs 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 are not constrained just to use the office hours of your section
TA). 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.