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 | Extras |
Jan 25 | Introduction. Course policies. Course overview. Some interesting problems. | DPV Chapter 0 | |
Jan 28 | Generating random permutations. Fibonacci numbers. | CLRS Section 5.3 (Randomized Algorithms), DPV Chapter 0. | |
Feb 1 | Arithmetic. Modular arithmetic. | DPV 1.1, 1.2. | |
Feb 4 | More modular arithmetic. Euclid's Algorithm. Modular division. | DPV 1.2. | |
Feb 8 | Running times. Divide-and-conquer and recurrence relations. Integer multiplication and mergesort. | DPV 0.3, 2.1, 2.2, 2.3. CLRS 4.3, 4.4, 4.5. | |
Feb 11 | More divide-and-conquer: sorting lower bound, selection. | DPV 2.4, CLRS 8.1. | |
Feb 15 | No class (President's Day) | ||
Feb 18 | Quicksort, matrix multiplication | DPV 2.4, 2.5. CLRS 4.2 and Chapter 7. | Feb 22 | Intro to graphs. Depth-first search | DPV 3.1, 3.2, 3.3. CLRS 22.1, 22.3, 22.4. |
Feb 25 | Directed graphs. Topological sort. | DPV 3.3, 3.4. CLRS 22.4. | Mar 1 | Strongly connected components. Breadth-first search. | DPV 3.4, 4.1, 4.2. CLRS 22.5, 22.2. |
Mar 4 | Dijkstra's algorithm. Priority queues. | DPV 4.3, 4.4, 4.5. CLRS 24.3, 6.1, 6.2. | |
Mar 15 | Negative edges. The Bellman-Ford Algorithm. Shortest paths in DAGs. | DPV 4.6, 4.7. CLRS 24.1, 24.2. | |
Mar 18 | Spanning Trees, and Prim's algorithm for MSTs. | DPV 5.1. CLRS 23.1. | |
Mar 22 | Kruskal's algorithm. The disjoint set data structure. | DPV 5.1. CLRS 23.2. | |
Mar 25 | Midterm exam. | ||
Mar 29 | Midterm solutions. Disjoint set amortized analysis, contd. | DPV 5.1. | |
Apr 1 | Building a heap. Heapsort. Intro to AVL trees | CLRS 6.1-6.4. | |
Apr 5 | AVL Tree insertion. Hash tables. Chaining. | Wikipedia on AVL trees. CLRS 11.1, 11.2. | |
Apr 8 | Open addressing. Universal hash functions.. | CLRS 11.3, 11.4. DPV 1.5. | |
Apr 12 | Cuckoo hashing. | Cuckoo hashing notes from Rasmus Pagh | |
Apr 15 | Cuckoo hashing contd. Bloom Filters. Intro to Huffman coding. | Wikipedia on Bloom Filters, DPV 5.2. | |
Apr 19 | Guest lecture by Prof. Anshelevich. Flow networks. Max-flow = min-cut. The Ford-Fulkerson algorithm. | DPV 7.2. CLRS 26.1, 26.2. | |
Apr 22 | Max-flow contd. Bipartite matching. Huffman coding | DPV 7.3, 5.2. | |
Apr 26 | Dynamic programming: shortest paths in DAGs, longest increasing subsequence, edit distance. | DPV 6.1, 6.2, 6.3. | |
Apr 29 | Dynamic programming: knapsack, chain matrix multiplication. | DPV 6.4, 6.5. | |
May 3 | Dyanmic programming: all pairs shortest paths. The classes P an NP. | DPV 6.6, 8.1 | |
May 6 | NP complete problems and reductions (SAT, 3SAT, Independent Set, Vertex Cover, Clique). | DPV 8.2, 8.3 | |
May 10 | TSP and the DP approach to TSP. Extras (Circuit-SAT, Halting Problem) | DPV 8.3 |