This is a foundational course in the design and analysis of algorithms and the data structures they are coupled with. While we will concentrate on the theoretical design and analysis of algorithms and data structures, we will reinforce the theory with examples, laboratories, and applied homework questions.
The goal of this course is to provide a strong foundation in algorithms and data structures in preparation for jobs in industry or for more advanced courses. Algorithms are the basic language of computer science. After taking this course, you should be able to prove the correctness of and analyze the running times of different algorithms. You should also be able to use different algorithm-design techniques to solve particular problems. Data structures and algorithms also form a major component of any software system. After taking this course you should be able to make intelligent decisions about alternative techniques in the context of practical problems, choosing from existing data structures and algorithms or designing your own when necessary.
Date | Topics | Readings |
Jan 23 | Introduction. Course policies. Course overview. Some interesting problems. | DPV Chapter 0 |
Jan 26 | Generating random permutations. Fibonacci numbers. Basic arithmetic. | CLRS Section 5.3 (Randomized Algorithms), DPV Chapter 0, Section 1.1. | Jan 30 | Integer division. Divide and conquer algorithms, recurrence relations, the Master Theorem. | DPV Sections 1.1, 2.1, 2.2 |
Feb 2 | Mergesort. Sorting lower bound. Medians and Selection. Matrix multiplication. | DPV Sections 2.3, 2.4, 2.5. |
Feb 6 | Quicksort. | CLRS Chapter 7. |
Feb 9 | Heaps and heapsort. Modular arithmetic. | CLRS Chapter 6. DPV Section 1.2. |
Feb 13 | Modular arithmetic contd. Intro to graphs. | DPV Sections 1.2, 3.1. |
Feb 16 | Reachability. Depth-first search. | DPV Sections 3.1-3.3. | Feb 20 | No class. President's Day. |
Feb 23 | Topological sort. Strongly connected components. | DPV Sections 3.3-3.4. | Feb 27 | Breadth-First Search. Dijkstra's algorithm. Negative edge lengths. | DPV Sections 4.1-4.6. |
Mar 1 | Shortest paths contd. Minimum spanning trees. | DPV Sections 4.7, 5.1. |
Mar 5 | Midterm #1. | |
Mar 8 | Midterm discussion. The Disjoint Set data structure. | DPV Section 5.1. CLRS Chapter 21. |
Mar 19 | Amortized analysis of path compression. Amortized analysis in general. | DPV 5.1, CLRS 21.4, 17.1-17.3. |
Mar 22 | Huffman coding. Greedy approximation for set cover. | DPV 5.2 and 5.4. |
Mar 26 | Hashing. Chaining, open addressing, cuckoo hashing. | CLRS 11.1, 11.2, 11.4; Cuckoo hashing notes from Rasmus Pagh |
Mar 29 | Bloom Filters. Universal hashing. Horn formulas. | Wikipedia on Bloom Filters; CLRS 11.3, DPV 1.5, 5.3. |
Apr 2 | Intro to dynamic programming: shortest paths in DAGs, longest increasing subsequence, edit distance | DPV 6.1-6.3. |
Apr 5 | Dynamic programming: knapsack, chain matrix multiplication | DPV 6.4-6.5. |
Apr 9 | Dynamic programming: shortest paths, independent sets in trees | DPV 6.6-6.7. |
Apr 12 | Midterm #2. | |
Apr 16 | The DP approach to TSP. Flows and max-flow. | DPV 7.2; CLRS 26.1-26.2 |
Apr 19 | Midterm discussion and return. Flows contd. | |
Apr 23 | Max-flow min-cut theorem. Bipartite matching. Intro to NP-completeness. | CLRS 26.3. DPV 7.3, 8.1. |
Apr 26 | NP-completeness contd. Reductions: Rudrata path to Rudrata cycle. 3SAT to Independent Set. SAT to 3SAT. Independent Set to Vertex Cover. | DPV 8.2, 8.3. |
Apr 30 | More reductions. Independent Set to Clique. 3SAT to 3-D Matching. 3-D Matching to ZOE. ZOE to Subset Sum. | DPV 8.3. |
May 3 | Reductions: ZOE to RCWPE. RCWPE to Rudrata Cycle. Rudrata Cyle to TSP. | DPV 8.3. |
May 7 | Reduction: Circuit SAT to SAT. Sketch for reducing all of NP to Circuit SAT. Unsolvable problems. | DPV 8.3. |