[ news | information | lectures | problem sets | links ]

CS140 - Fall 2006
TR 2:45-4:00 in Millikan 134
Prof. Chen

12/27/2006: I've archived all of the notes and problem sets (ie, most of the links below don't work) and am only leaving up the syllabus for reference. If you're looking for the material, you may be able to find a link to a more recent offering of the class here or here.


Please check here regularly for assorted announcements. You are responsible for being aware of any information posted here.
  • 12/6: You can pick up the final from me or from Kathy Sheldon any time one of us is around. You must return it to either myself or Kathy Sheldon by the earlier of "24 hours after you get the final" and "5PM on Monday 12/11". I will be in my office both Saturday 12/9 and Sunday 12/10 from noon to 5PM for the purpose of handing out and collecting exams.
  • 11/16: For problem 2 on problem set 12b: note that an integer linear programming problem is one where the variables are restricted to integer values.
  • 11/14: On problem set 12a, problem 1b should be 26.2-3 on page 663 of CLRS, not problem 26.2-2. The posted .tex and .pdf versions have been updated.
  • 11/8: I will have extra office hours on Thursday 11/9 from about 5:30 to 6:30PM. (The actual start time will be about 10 minutes after the CS colloquium ends.) However, note that there won't be office hours on Monday night.
  • 10/23: You should feel free to take a 7.5 hour extension on the block programming assignment (ie, turning it in by 7AM on Tuesday (tomorrow) morning instead of by 11:30PM tonight).
  • 10/18: In the latex file for ps7b (due 10/19), the qtree package is not necessary. The second line should read:
    The posted version has been updated.
  • 10/5: The due date for the midterm was incorrectly listed on this web page as being today (10/5) at 2:45PM. It's actually noon tomorrow (Friday, 10/6), which is what was announced in lecture as well as what's written on the midterm itself.
  • 9/27: I will have office hours next week both Monday 6:30-8 and Tuesday 4-5. I'm cancelling next week's Wednesday (10/4) office hours.
  • 9/26: My office hours tomorrow (Wednesday, 9/27) will be from 5:30-6:30PM (instead of from 4-5).
  • 9/17: On the Pomona DCI machines, java and javac are in: /usr/local/java/bin
  • 9/7: America's office hours have moved to Millikan 209 (but they're still 6:30-8PM on Wednesdays).
  • 9/6: Jonathan will hold office hours 6:30-8PM on Mondays and Steve will hold office hours 6:30-8PM on Wednesdays. Both will be on the second floor of the LAC at HMC.
  • 9/1: Clarification on administrivia: in addition to not looking at materials from other/previous offerings of Algorithms, you may not show the materials (problem sets, exams, solutions) from this class to students taking future offerings of cs140.
  • 8/29: There has been a room change. We will be meeting in Millikan 134 beginning Thursday, August 31.
  • 8/28: Jonathan will have office hours 6:30-8PM on Wednesdays (starting August 30th). This may change later in the semester.
  • Information

    CS140 is an introduction to algorithm design and analysis techniques. The course covers basic techniques used to analyze algorithms, basic techniques used in designing algorithms, and important classical algorithms. The goal is to help you understand how to apply all of the above to designing solutions for real-world problems (a skill that you will practice throughout the semester). Grades will be based primarily on problem sets and exams, but participation will also be factored in.

    The prerequisites for the class are cs55 (at Pomona) or math55 (at HMC), and cs70. Exceptions will be made for students who have taken an advanced math course and cs52/cs60, but not cs70.

    The lectures are on Tuesdays and Thursdays from 2:45-4:00 in Millikan 134.

    The textbook is Introduction to Algorithms, 2nd Edition by Cormen, Leiserson, Rivest, and Stein. It will also be available at Huntley bookstore. Note that the most recent version comes packaged with a CD, which is not required for this course.

  • Administrivia <pdf>
  • Lectures

    Any topic that's listed for a date in the future should be taken as tentative. Any topic that's listed for a date at least 2 days in the past is what was actually covered in that lecture.

    Week Date In class Reading Assignment due
    1 (Tue) 8/29 introduction, administrivia, review
    (Thu) 8/31 insertion sort
    loop invariants
    2 (Tue) 9/5 divide & conquer technique
    solving recurrences
    2.3, 4.1-2 ps1b
    (Thu) 9/7 master method
    worst/average/best case analysis
    4.3-4, 7.1-4 ps2a
    3 (Tue) 9/12 bounding problems
    matrix multiplication
    linear time sorting, order statistics
    8, 9, 28.2 ps2b
    (Thu) 9/14 data structures
    heaps and heapsort
    10, 6 ps3a
    4 (Tue) 9/19 amortized analysis 17 ps3b
    (Thu) 9/21 binary search trees
    red-black trees
    12, 13 ps4a
    5 (Tue) 9/26 disjoint sets:
    linked lists, forests, union-by-rank,
    path compression, log* analysis
    21 ps4b
    (Thu) 9/28 mergeable heaps: linked lists,
    heaps, binomial heaps,
    Fibonacci heaps
    19, 20 ps5a
    6 (Tue) 10/3 review ps5b
    (Thu) 10/5
    *** no class ***
    midterm due by
    noon tomorrow (10/6)
    7 (Tue) 10/10 greedy algorithms:
    change, activity scheduling
    (Thu) 10/12 dynamic programming:
    matrix multiplication,
    longest common subsequence
    15 ps7a
    8 (Tue) 10/17
    *** no class: fall recess ***
    (Thu) 10/19 dynamic programming: 0-1 knapsack
    graphs (review)
    15, B ps7b
    9 (Mon) 10/23 blocks assignment due at 11:30PM
    (Tue) 10/24 bfs, dfs
    topological sort
    strongly connected components
    22 ps8
    (Thu) 10/26 minimum spanning trees:
    greedy choice property,
    Prim's, Kruskal's
    23 ps9a
    10 (Tue) 10/31 single source shortest path:
    Bellman-Ford, Dijkstra's
    24 ps9b
    (Thu) 11/2 all pairs shortest path 25 ps10a
    11 (Tue) 11/7 network flow: Ford-Fulkerson 26 ps10b
    (Thu) 11/9 review ps11a
    12 (Tue) 11/14 network flow: Edmonds-Karp,
    maximum bipartite matching
    midterm due
    (Thu) 11/16 linear programming 29 ps12a
    13 (Tue) 11/21 introduction to computational complexity
    polynomial time reductions
    34.1-4 ps12b
    (Thu) 11/23
    *** no class: Thanksgiving ***
    14 (Tue) 11/28 NPC reductions
    more on the polynomial hierarchy
    34.5 ps13
    (Thu) 11/30 more NPC reductions
    approximation algorithms
    wrapping up, course evaluations
    34.5, 35.1 ps14a
    15 (Tue) 12/5 review
    16 (Mon) 12/11 final must be turned in by 5PM

    Problem Sets

  • ps1a, due 2:45PM on 8/31 <tex> <pdf>
  • ps1b, due 2:45PM on 9/5 <tex> <pdf>
  • ps2a, due 2:45PM on 9/7 <tex> <pdf>
  • ps2b, due 2:45PM on 9/12 <tex> <pdf>
  • ps3a, due 2:45PM on 9/14 <tex> <pdf>
  • ps3b, due 2:45PM on 9/19 <tex> <pdf>
  • ps4a, due 2:45PM on 9/21 <tex> <pdf>
  • ps4b, due 2:45PM on 9/26 <tex> <pdf>
  • ps5a, due 2:45PM on 9/28 <tex> <pdf>
  • ps5b, due 2:45PM on 10/3 <tex> <pdf>
  • No, I don't know (or won't tell you) what happened to ps6
  • ps7a, due 2:45PM on 10/12 <tex> <pdf>
  • ps7b, due 2:45PM on 10/19 <tex> <pdf>
  • blocks programming assignment, due 11:30PM on 10/23 (a Monday!) <tex> <pdf>
    sample files: <blocks10.in> <blocks10.out>
  • ps8, due 2:45PM on 10/24 <tex> <pdf>
  • ps9a, due 2:45PM on 10/26 <tex> <pdf>
  • ps9b, due 2:45PM on 10/31 <tex> <pdf>
  • ps10a, due 2:45PM on 11/2 <tex> <pdf>
  • ps10b, due 2:45PM on 11/7 <tex> <pdf>
  • ps11a, due 2:45PM on 11/9 <tex> <pdf>
  • ps12a, due 2:45PM on 11/16 <tex> <pdf>
  • ps12b, due 2:45PM on 11/21 <tex> <pdf>
  • ps13, due 2:45PM on 11/28 <tex> <pdf>
  • ps14a, due 2:45PM on 11/30 <tex> <pdf>
  • Links

  • web site for the textbook. Note the list of errata.
  • complexity:
  • complexity zoo
  • NP compendium
  • some pages discussing LaTeX, which is the best way to format anything containing mathematical equations.
  • A simple latex document sample.tex that creates the file <sample.pdf> (by running "pdflatex sample.tex")
  • A gentle introduction to TeX by Laura Tallman and Michael Kozdron.
  • The Not So Short Introduction to LaTeX2e, also known as LaTeX2e in 139 minutes by Oetiker, Partl, Hyna, and Schlegl. (This is an evolving document, at the moment they're on version 4.20, dated May 2006.)
  • Information specific to running TeX on the DCI systems is here, and information on TeX distributions can be found here.

  • "Computers do not solve problems, they execute solutions"
    --Laurent Gasser