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

CS140 - Algorithms - Fall 2011
TR 2:45-4:00 in Edmunds 101
Prof. Chen


2/2/2012: I've archived all of the course materials (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.


News

Please check here regularly for assorted announcements. You are responsible for being aware of any information posted here.
  • 11/30/11: Problem set ps14b is worth 30 points (although you'll see that it is possible to earn bonus-bonus points).
  • 11/29/11: You may work in groups of 1-3 on the optional bonus problem set ps14b.
  • 11/22/11: Prof. Chen won't be holding office hours tomorrow. Lindsay won't be holding office hours on Sunday 11/27.
  • 11/8/11: ps11a: only do problem 1. no extensions.
  • 10/4/11: ps6b: the version handed out in class says that the code portion is due at 5pm on Friday 10/14. It should be 11:30pm (to match what's been on the website since the beginning of the semester).
  • 10/3/11: ps6a: please put the 2 parts of problem 1 on separate sheets of paper (and put your ID # at the top of each!)
  • 10/3/11: due to lack of interest from students, we've cancelled the Sunday TA hours at Pomona.
  • 9/21/11: check email for clarification on deletion in a BST.
  • 9/20/11: the mail alias cs140-help@cs.pomona.edu can be used for short questions, requests for clarification, etc. It goes to the professor and all 4 TAs.
  • 9/13/11: reminder: TA hours are Sundays from 6-8pm (Edmunds 227) and 8-10pm (Platt); Mondays from 8-10pm (Platt); Wednesdays from 7-9PM (Platt).
  • 9/12/11: ps2b, problem 1: despite the sample input below, you really can assume the length of the test input will be a power of 2. But +2 bonus points if your code works more generally.
  • 8/30/11: the CCMS software lab provides LaTeX support. (though they won't open until 9/5 this semester)
  • 8/30/11: to indicate collaborators who are students currently taking this class (as opposed to TAs), please give the last 4 digits of their ID numbers. (as opposed to their names, which is what I said in class)
  • 8/30/11: in the administrivia it should say that problem sets are worth 55% of your grade.
  • Peer grading signup.
  • 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>
  • Lectures

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

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

    The scheduled time for the final is 2-5pm on the Monday of finals week.

    Problem Sets

  • due 9/1   -   ps1a <.tex> <.pdf>, Flash Mind Reader for problem 5
  • due 9/6   -   ps1b <.tex> <.pdf>
  • due 9/8   -   ps2a <.tex> <.pdf>
  • due 9/13 -   ps2b <.tex> <.pdf>, pdf figure for bonus problem, small sample input and output for coding problem
  • due 9/15   -   ps3a <.tex> <.pdf>
  • due 9/20 -   ps3b <.tex> <.pdf>, pdf figure for problem 1
  • due 9/22   -   ps4a <.tex> <.pdf>
  • due 9/27 -   ps4b <.tex> <.pdf>, pdf figure #1 for problem 2, pdf figure #2 for problem 2
  • due 9/29   -   ps5a <.tex> <.pdf>
  • due 10/6   -   ps6a <.tex> <.pdf>
  • due 10/11, 10/14   -   ps6b <.tex> <.pdf>
  • due 10/13   -   ps7a <.tex> <.pdf>
  • due 10/20   -   ps8a <.tex> <.pdf>
  • due 10/25   -   ps8b <.tex> <.pdf>
  • due 10/27   -   ps9a <.tex> <.pdf>
  • due 11/1   -   ps9b <.tex> <.pdf>
  • due 11/3   -   ps10a <.tex> <.pdf>
  • due 11/8   -   ps10b <.tex> <.pdf>
  • due 11/10   -   ps11a <.tex> <.pdf>, pdf figure #1 for problem 1
  • due 11/17   -   ps12a <.tex> <.pdf>
  • due 11/22   -   ps12b <.tex> <.pdf>
  • due 11/29   -   ps13 <.tex> <.pdf>
  • due 12/1   -   ps14a <.tex> <.pdf>, pdf figure #1 for problem 2
  • (OPTIONAL!) due 12/12 at 5pm   -   ps14b <.tex> <.pdf>
    pdf figures #1, #2, #3
    small sample input, MST output, and augmented MST output
  • 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.
  • 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