[ news | information | syllabus | links ]

Algorithms
CS140 - Fall 2019

MW 11:00-12:15 in Seaver Commons 102
Prof. Chen
TAs: Marcel Alfonso Garcia, Levente Papp, Sophie Richards

News

We will be using Piazza for distributing problem sets, making announcements, etc. Please make sure that you're signed up for this course! If you aren't, let me know. The piazza page is here.

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 and exams, with participation factoring in a small amount.

The prerequisites for the class are cs54/cs55/math55 and cs62/cs70. Come talk to me if you have questions about these requirements.

The lectures are on Mondays and Wednesdays from 11:00-12:15 in Seaver Commons 102.

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 (Wed) 9/4 intro
    review (asymptotics, proofs - direct, contradiction, style)
    3
    2 (Mon) 9/9 review (proofs - induction)
    insertion sort
    mergesort
    2, 3 ps1
    (Wed) 9/11 recurrences
    quicksort
    average case analysis
    4.4-6, 7 ps2
    3 (Mon) 9/16 bounding problems
    matrix multiplication
    linear time sorting
    4.2, 8 ps3 - part 1
    (Wed) 9/18 linear time sorting
    order statistics
    8, 9 ps3 - part 2 - coding
    4 (Mon) 9/23 heaps
    review (basic data structures)
    6, 10 ps4
    (Wed) 9/25 checkpoint 1
    5 (Mon) 9/30 amortized analysis 17
    (Wed) 10/2 (balanced) binary search trees
    12, 13 ps5
    6 (Mon) 10/7 mergeable heaps: linked lists, heaps, binomial heaps 19 ps6
    (Wed) 10/9 disjoint sets: linked lists, forests,
    union-by-rank, path compression
    21 ps7
    7 (Mon) 10/14 greedy algorithms: change, activity scheduling
    optimal substructure, greedy choice
    16 ps8
    (Wed) 10/17 dynamic programming: fibonacci, longest common subsequence 15 ps9
    8 (Mon) 10/21 *** no class, fall recess ***
    (Wed) 10/23 dynamic programming: matrix multiplication, 0-1 knapsack 15 ps10 - part 1
    9 (Mon) 10/28 checkpoint 2
    (Wed) 10/30 review (graphs, trees, search/traversals)
    strongly connected components
    22 ps10 - part 2 - coding
    10 (Mon) 11/4 minimum spanning trees:
    Kruskal's, Prims
    23 ps11
    (Wed) 11/7 single source shortest paths:
    Bellman-Ford, Dijkstra's
    24 ps12
    11 (Mon) 11/12 all pairs shortest paths:
    Johnson's, Floyd-Warshall
    25 ps13
    (Wed) 11/14 network flow
    maximum bipartite matching
    26 ps14
    12 (Mon) 11/18 linear programming 29 ps15
    (Wed) 11/20 checkpoint 3
    13 (Mon) 11/25 P, NP, NPC 34 ps15
    (Wed) 11/27 *** no class - Thanksgiving ***
    14 (Mon) 12/3 reductions 34
    (Wed) 12/5 more reductions 34 ps16
    15 (Mon) 12/10 approximation algorithms 35 ps17
    (Wed) 12/12 wrapping up

    The take-home final will be due by noon on Monday, December 16.

    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 139 minutes by Oetiker, Partl, Hyna, and Schlegl. (This is an evolving document, at the moment they're on version 6.2, dated February 2018.)
  • Obtaining LaTeX, information about where/how to get LaTeX on your machine.

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