CS 31: Algorithms
Spring 2017 | 2A hour (TTh 14:25-16:15, x-hr W 16:35-17:25) | LSC 201

This page will be updated frequently with current and upcoming topics.

Topics Day-by-Day

After each unit (lecture), please follow up by reading at least the indicated section of CLRS (the main textbook). Optionally, read the indicated sections of KT (the recommended secondary textbook).

The readings will cover things beyond what I say in class. You are responsible for the material in these readings. Homework and exam problems, and quiz questions, might expect you to know this material.

#DateTopicsRefs & Follow-up Reading
1Tu Mar 28Introduction; Searching, SortingCLRS 2.1, 2.2, 3.1, 3.2
 
2Th Mar 30Time cost analysis; Induction; RecurrencesCLRS 2.3, 4.1; KT 5.1
Slides, Video
3Tu Apr 4Heaps and HeapsortCLRS Ch. 6; KT 2.5
Videos 1, 2, 3
4Th Apr 6Graphs, Digraphs, Connected components; BFS and shortest pathsCLRS 22.1, 22.2;
KT 3.1, 3.2, 3.3
5Tu Apr 11Runtime of BFS; DFS and its properties; DAGs; Topological sortCLRS 22.3, 22.4; KT 3.5, 3.6
Slides
XWe Apr 12Analysis of topological sort; Comments on homework
 
6Th Apr 13Divide-and-conquer I: Karatsuba integer multiplication CLRS 4.1, 4.3, 4.4, 4.5;
KT 5.1, 5.2, 5.3, 5.5
7Tu Apr 18Divide-and-conquer II: Strassen matrix multiplication; Linear-time selection CLRS 9.3; (KT: none)
Slides
XWe Apr 19Divide-and-conquer III: Closest pair of points in 2-DCLRS 33.4; KT 5.4
 
8Th Apr 20Dynamic programming I: Interval scheduling; Rod cutting; LCSCLRS 15.1, 15.3, 15.4;
KT 6.1, 6.2
9Tu Apr 25Dynamic programming II: Weighted shortest paths; Bellman-Ford; Floyd-WarshallCLRS 24.1, 24.2, 25.2;
KT 6.8
10Th Apr 27Dynamic programming III: Subset sum; Greedy I: DijkstraCLRS 24.3; KT 6.4, 4.4
 
11Tu May 2Greedy II: Minimum spanning trees; Prim; KruskalCLRS 23.1, 23.2; KT 4.5, 4.6
 
12Th May 4Greedy algorithms and their analysisCLRS 16.1, 16.2, 16.3;
KT 4.1, 4.2, 4.8
13Tu May 9Randomized algorithms; Selection; QuicksortCLRS 9.2, 7.1, 7.2, 7.3, 7.4;
KT 13.3, 13.5; Slides
XWe May 10Detailed analysis of Quicksort; Comments on midterm
 
14Th May 11Hashing; Dictionaries; Application to closest-pairCLRS 11.1, 11.2, 11.3;
KT 13.6, 13.7; our notes
15Tu May 16Amortized analysis I: Incrementing a counterCLRS 17.1, 17.2, 17.3, 17.4
 
XWe May 17Amortized analysis II: Union-find CLRS 21.1, 21.2, 21.3
KT 4.6
16Th May 18Amortized analysis III: Fibonacci heapsCLRS 19.1, 19.2, 19.3, 19.4
Slides
17Tu May 23Max flow; Min cut; Ford-FulkersonCLRS 26.1, 26.2
KT 7.1, 7.2
18Th May 25Max flow II: Edmonds-Karp; application to bipartite matchingCLRS 26.2, 26.3
KT 7.3, 7.5; Video
19Tu May 30More applications of Max flow and Min cut; Wrap-Up; AMATBD

Although not shown in the above plan, X-hours may be used (perhaps frequently) to catch up, as needed.