Efficient Algorithms and Intractable Problems
Spring 2007
Announcements
Announcements will be made here and on the
CS170 newsgroup.
People
Lecturer:
Professor James Demmel
- demmel@cs
Office: 737 Soda, 643-5386
Lectures: TuTh 12:30-2:00 (50 Birge)
Office hours: W 10:00 - 11:00, Th 2:15 - 3:15, or by appointment
TAs:
Discussion Sections
Enrollment: There should be no limit on enrollment,
as long as you try to enroll in a section that is not full
(and have fulfilled the prerequisites, see below).
Homeworks
The (roughly weekly) homework sets (and solutions)
will be posted here as the term progresses.
In general, problem sets will be assigned on Tuesday and will be
due Thursday the following week at 4pm in the boxes
in 283 Soda Hall. Make sure to put your name, SID, course name (CS170)
and section number on each page.
You are encouraged to work on homework problems in study groups
of 2 to 4 people. But you must write up your own solutions, and
not read or copy the solutions of other students. You may use
books or on-line resources to help solve homework problems, but
you must credit all such sources in your writeup and you must
not copy material verbatim. See also the discussion of grading
and academic honesty below.
No late homework will be accepted, since the answers will
be posted on the web immediately afterwards. Instead, the lowest
3 homework scores will be dropped.
Exams
You are permitted 2 sheets of double-sided notes (i.e. 4 pages in all)
for the final, large enough to read without a magnifying glass.
This is a change to the earlier rules that allowed 1 double-sided sheet.
There will be two review sessions for the final exam, both in 306 Soda:
Friday, May 11, from 12-2pm, and Tuesday, May 15, from 6-8pm.
The rules for the final exam are identical to the midterms: Closed book,
closed calculator, closed computer, closed network, and open brain.
You are permitted a 1 page, double-sided set of notes, large enough to read
without a magnifying glass. (SEE CHANGE ABOVE)
A review session for Midterm 2 will be held in 159 Mulford
from 6:30-8:30pm on Tuesday April 3.
The midterm will be closed book, closed calculator, closed computer,
closed network, and open brain.
You are permitted a 1 page, double-sided set of notes, large enough to read
without a magnifying glass.
A review session for Midterm 1 will be held in 141 McCone
on Friday Feb 16 from 4-5pm, or later if there are questions.
Note: we had originally planned to post midterms
from earlier semesters, but have decided not to since we are
presenting material in a different order so the earlier midterms
cover different subsets of the material. The best way to study is
to look at other homework questions in Chapters 0, 1 and 2, and
go to the review session.
Midterm 1 will be in class on Feb 20.
Midterm 2 will be in class on Apr 5.
Sample midterms and finals from earlier semesters will be posted here,
along with results from this semester.
Midterm 1, with answers, in
pdf
Histogram of scores from Midterm 1
Midterm 1 (with answers) from 1998, in pdf
Midterm 1 (with answers) from 1999, in pdf
Midterm 2 (with answers) from 1998, in pdf
Midterm 2 (with answers) from 1999, in pdf
Midterm 2, with answers, in
pdf
Histogram of scores from Midterm 2
Final from 1998, in pdf
Final from 1999, in pdf
Final from 2001, in pdf
Notes and Text
The required textbook for the course is
Algorithms, by Dasgupta, Papadimitriou and Vazirani.
It was developed from a set of notes especially for
this course, and we will follow it fairly closely.
The previous text book was Introduction to Algorithms
by Cormen, Leiserson and Rivest, which is still a good
reference.
Prerequisites:
The prerequisites for this course are CS 61B, and either CS 70
or Math 55. In particular you should be comfortable with
mathematical induction, big-O notation, and
basic data structures. If you need to refresh any of
this material, refer to the relevant sections of the textbook.
We assume that you are familiar with a standard
imperative programming language like C, C++ or Java, so that
you can read and write the algorithms presented in the course.
Before this textbook became available, I posted very
detailed lecture notes for each lecture on this web page.
The availability of this textbook means the notes will
mostly point to the sections of the book covered, but
I will continue to post more detailed notes of material
not in the book.
Syllabus and Lecture Notes
- (1/16) Lecture 1: Course Overview, and Computing Fibonacci Numbers
(Chap 0 in text)
- (1/18) Lecture 2: Review of (Modular) arithmetic, Euclid's GCD Algorithm
(Sections 1 through 1.2.4 in text)
- (1/23) Lecture 3: Modular division, Primality testing and generation,
begin Cryptography/RSA
(Sections 1.2.5 to 1.4 in text)
- (1/25) Lecture 4: Finish Cryptography; Hashing
(Sections 1.4 and 1.5 in text)
- (1/30) Lecture 5: Divide-and-conquer: Multiplication, Master Theorem,
Mergesort (sections 2.1, 2.2, 2.3 in text)
- (2/1) Lecture 6: Divide-and-conquer: Median finding, quicksort, parallelism
(section 2.4 in text and
extra notes on
parallelism)
- (2/6) Lecture 7: Matrix Multiplication
(section 2.5 in text and
extra notes on
cache blocking)
- (2/8) Lecture 8: Fast Fourier Transform (FFT)
(section 2.6 in text and
extra notes)
(last updated 2/8 at 11:15am)
Here is the Matlab script
to create the compressed clown images in the notes.
Handouts
Grades
Grades will be based on homework, quizzes, 2 midterms and a final:
- Homeworks - 25%
- Quizzes - 5%
- 2 Midterms - 20% each
- Final - 30%
The final exam is schedule for May 16, 5-8pm.
A makeup final will only be given for
- unexpected circumstances beyond your control,
documented by a signed note from a physician or equivalent,
- a religious holiday, or
- conflict with another scheduled exam (ask the other professor
first, and try to avoid this!!).
There will be no makeup midterms.
Instead, each midterm score will be replaced by the maximum of your
midterm score and your score on the final (whether you take the
midterm or not).
You are required to a bring
a student photo ID and blue-covered exam book to the exams.
There will be a short quiz at the beginning of (most) sections.
The quiz will consist of a few simple questions related to the
material from the previous class. There will be no make-up
quizzes but the two lowest quiz scores will be dropped.
The motivation is to encourage you to keep up with lectures.
Regrading of homework, quizzes or exams will be done when there
has been a mistake, in order to make sure all students are
graded consistently. To ask for a regrade, you must return the
work to your TA within one week of getting it back, along
with a written note (on another piece of paper) explaining
the problem. The entire assignment may be regraded in this case.