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

CS140 - Pomona Section - Fall 2013

TR 2:45-4:00 in Edmunds 101
Prof. Chen

5/20/2014: 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 general announcements/thoughts/etc. You are responsible for things posted here.
  • 9/3/2013: We will be using Piazza for distributing problem sets, making announcements, etc. You should have already been enrolled in the cs140 Piazza forum (at https://piazza.com/hmc/fall2013/cs140/home). If not, let me know as soon as possible.
  • 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 learn 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 (both doing them and grading one!) and exams, but participation will also be a factor.

    The prerequisites for the class are cs55/math55 and cs62/cs70. Exceptions will be made for students who have taken an advanced proof-based math course and cs52/cs60, but not cs62/cs70. Come talk to me if you have questions about these requirements.

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

    The textbook is Introduction to Algorithms, 3rd Edition by Cormen, Leiserson, Rivest, and Stein. Copies are available at Huntley bookstore.

  • Administrivia <pdf>
  • Syllabus

    Any topic/readings/assignments that are listed for a date in the future should be taken as (potentially very) tentative. Readings/assignments will be updated by the preceding class; lecture topics will be updated by the following class.

    Week Date In class topic(s) Readings (CLRS) Assignment due
    1 (Tue) 9/3 intro
    review (big-O, insertion sort)
    loop invariants
    2.2-2, 3.1-2
    (Thu) 9/5 divide-and-conquer
    loop invariants cont.
    2.3, 4.1 ps1a
    2 (Tue) 9/10 recurrences
    average case analysis
    4.3-5, 7.1-4 ps1b
    (Thu) 9/12 bounding problems
    matrix multiplication
    linear time sorting
    4.2, 8 ps2a
    3 (Tue) 9/17 order statistics
    review (data structures)
    9, 10, 6 ps2b
    (Thu) 9/19 amortized analysis 17 ps3a
    4 (Tue) 9/24 binary search trees
    balanced binary search trees
    12, 13 ps3b
    (Thu) 9/26 mergeable heaps: linked lists, heaps,
    binomial heaps, Fibonacci heaps
    19 ps4a
    5 (Tue) 10/1 disjoint sets: linked lists, forests,
    union-by-rank, path compression
    21 ps4b
    (Thu) 10/3 optional review session ps5a
    6 (Tue) 10/8 greedy algorithms: change,
    activity scheduling
    16 Midterm 1 due!
    (Thu) 10/10 dynamic programming:
    matrix multiplication,
    longest common subsequence
    15.1-4 ps6a
    7 (Tue) 10/15 greedy vs. dynamic programming:
    fractional vs 0-1 knapsack
    16.2 ps6b
    (Thu) 10/17 review (graphs, trees, search/traversals)
    topological sort
    strongly connected components
    B, 22 ps7a
    ps6b coding (due 10/18)
    8 (Tue) 10/22 *** no class, fall recess ***
    (Thu) 10/24 minimum spanning trees:
    greedy choice property
    Prim's, Kruskal's
    23 ps7b
    9 (Tue) 10/29 minimum spanning trees
    single source shortest paths:
    Bellman-Ford, Dijkstra's
    24 ps8b
    (Thu) 10/31 single source shortest paths
    all pairs shortest paths
    24, 25 ps9a
    10 (Tue) 11/5 all pairs shortest paths
    network flow: terminology
    25, 26.1 ps9b
    (Thu) 11/7 network flow: min-flow/max-cut,
    maximum bipartite matching
    26.2-3 ps10a
    11 (Tue) 11/12 linear programming 29.1-2 Midterm 2 due!
    (Thu) 11/14 P/NP/NPC
    34.1-4 ps11a
    12 (Tue) 11/19 reductions cont. 34.5 ps11b
    (Thu) 11/21 reflections on P/NP/NPC
    approximation algorithms
    35 ps12a
    13 (Tue) 11/26 approximation algorithms cont. 35 ps12b
    (Thu) 11/28 *** no class, Thanksgiving ***
    14 (Tue) 12/3 parallel algorithms ps13b
    (Thu) 12/5 parallel algorithms ps14a
    15 (Tue) 12/10 wrapping-up ps14b
    (Thu) 12/12
    optional review session at HMC

    Problem Sets

    Problem sets will be posted under the "Resources" tab under the "Course Page" tab at https://piazza.com/hmc/fall2013/cs140/home.

    1. for ps1a: Flash Mind Reader for problem 5


  • 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.
  • LaTeX/Absolute Beginners, "aimed at getting familiar with the bare bones of LaTeX".
  • A gentle introduction to TeX by Laura Tallman and Michael Kozdron.
  • The Not So Short Introduction to LaTeX2e, also known as LaTeX2e in 157 minutes by Oetiker, Partl, Hyna, and Schlegl. (This is an evolving document, at the moment they're on version 5.01, dated April 2011.)
  • Obtaining LaTeX, information about where/how to get LaTeX on your machine.

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