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 12 | Introduction. Course policies. Course overview. Fibonacci numbers. Max subsequence sum. | DPV Chapter 0 | Lecture notes |
Jan 15 | Generating random permutations. | CLRS Section 5.3 (Randomized Algorithms) | Notes |
Jan 22 | Basic arithmetic, modular arithmetic. | DPV Sections 1.1, 1.2. CLRS Sections 31.1, 31.2. | |
Jan 26 | Modular division.Intro to divide-and-conquer (integer multiplication) | DPV Sections 1.2, 2.1. | |
Jan 29 | Divide-and-conquer contd. Master theorem. Mergesort. Median-finding. | DPV Sections 2.2-2.4. | |
Feb 2 | Quicksort. Matrix multiplication | CLRS Chapter 7. DPV 2.5. | |
Feb 5 | Graphs. Depth-first search. | DPV 3.1-3.3. CLRS 22.1, 22.3. | |
Feb 9 | Topological sort. Strongly connected components. | DPV 3.4. CLRS 22.4, 22.5. | Feb 12 | Breadth-first search. Edge lengths. Dijkstra's algorithm. | DPV 4.1-4.4. CLRS 22.2, 24.3. |
Feb 17 (Tue class) | Heaps. Negative edge-lengths. The Bellman-Ford Algorithm. | DPV 4.5-4.7. CLRS 24.1-24.2. | Feb 19 | Creating heaps. Heapsort. Merging and binomial heaps. | CLRS Chapter 6 and 19.1 |
Feb 23 | Binomial heaps. Intro to amortized analysis. | CLRS Chapter 19. | |
Feb 26 | Amortized analysis. Lazy merging. AVL trees. | CLRS Chapter 17.3. Wikipedia page on AVL trees. | |
Mar 2 | Midterm. | ||
Mar 5 | Midterm solutions presented by Eyuphan and Ashok. | ||
Mar 16 | Splay trees. | Pages 652-659 of Sleator and Tarjan (RPI access only). | |
Mar 19 | Universal hashing. Cuckoo hashing. | DPV Section 1.5, Rasmus Pagh's notes on cuckoo hashing. | |
Mar 23 | Minimum spanning trees. Kruskal's algorithm.Disjoint sets. | DPV Section 5.1, CLRS Sections 21.1, 21.3, Chapter 23. | |
Mar 26 | MSTs contd. Prim's algorithm. Union-by-rank with path compresson for disjoint sets. | DPV Section 5.1, CLRS Chapter 23, Section 21.4. | |
Mar 30 | Greedy algorithm design. Huffman encoding. | DPV Section 5.2. CLRS Section 16.3. | |
Apr 2 | Horn formulas. A greedy approximation for set cover. Intro to dynamic programming. | DPV Sections 5.3, 5.4, 6.1, 6.2. | |
Apr 6 | Dynamic programming contd. Edit distance, knapsack. | DPV 6.3, 6.4. | |
Apr 9 | More DP. Chain matrix multiplication. All-pairs shortest paths. | DPV 6.5, 6.6. | |
Apr 13 | DP for TSP, Indepdendet Sets on Trees. Flow networks and max flow. | DPV 6.6, 6.7, 7.2. CLRS 26.1, 26.2. | |
Apr 16 | More max flow. Introduction to NP completeness. | CLRS 26.3. DPV Chapter 8. | |
Apr 20 | NP completeness reductions. SAT and problems on graphs. | DPV Chapter 8. CLRS Chapter 34. | |
Apr 23 | More NP completeness. 3-d Matching, ZOE, etc. | DPV Chapter 8. CLRS Chapter 34. | |
Apr 27 | Wrap-up. Seriously hard problems. | DPV Chapter 8. |