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 15 | Introduction. Course policies. Course overview. Fibonacci numbers. Max subsequence sum. | DPV Chapter 0, Weiss Chapter 2 | |
Jan 18 | Max subsequence sum contd. Generating random permutations. Basic arithmetic. | DPV Section 1.1, plus readings from previous lecture | Notes on generating random permutations |
Jan 22 | Modular arithmetic. Euclid's algorithm. | DPV Section 1.2 | |
Jan 25 | Divide and conquer methods: integer multiplication, recurrence relations, mergesort, sorting lower bound. | DPV Sections 2.1, 2.2, 2.3 | |
Jan 29 | Divide-and-conquer continued: Median-finding, Quicksort, Matrix multiplication. | DPV Sections 2.4, 2.5. Weiss Section 7.7. | |
Feb 1 | Graphs: Introduction, reachability, depth-first search. | DPV Sections 3.1, 3.2, 3.3.1. | |
Feb 5 | DFS in directed graphs. Linearization. Strongly connected components. | DPV Sections 3.3, 3.4. | |
Feb 8 | Eulerian tours. Breadth-first search. Dijkstra's algorithm. | DPV Sections 4.1-4.4. | |
Feb 12 | Dijkstra's algorithm contd. Heaps. | DPV Sections 4.4-4.5. | |
Feb 15 | Negative edge lengths. The Bellman-Ford Algorithm. Shortest paths in DAGs. More on heaps and heapsort. | DPV Sections 4.6-4.7. Weiss Sections 6.1-6.3 and 7.5. | Notes on binary heap creation |
Feb 22 | Binomial queues. Amortized analysis. | Weiss Sections 6.8, 11.1-11.2 | |
Feb 26 | More amortized analysis. Lazy merging for binomial queues. Intro to AVL trees. | Weiss Sections 11.4.2, 4.1-4.4 | |
Feb 29 | AVL Trees. Splay trees. | Weiss Sections 4.4, 4.5, 11.5 | |
Mar 7 | Midterm solutions. Universal hashing. | DPV Section 1.5 | |
Mar 18 | Minimum Spanning Trees. Kruskal's algorithm. Disjoint sets. | DPV Section 5.1 | |
Mar 21 | Disjoint sets contd. Prim's algorithm. | DPV Section 5.1 | |
Mar 25 | Huffman encoding | DPV Section 5.2 | |
Mar 28 | Horn formulas. Set cover. | DPV Sections 5.3-5.4 | |
Apr 1 | Dynamic programming: longest increasing subsequence, edit distance. | DPV Sections 6.1-6.3 | |
Apr 4 | Dynamic programming contd.: knapsack | DPV Sections 6.4 | |
Apr 8 | Dynamic programming contd.: chain matrix multiplication, shortest paths | DPV Sections 6.5-6.6 | |
Apr 11 | Dynamic programming contd.: TSP, independent sets in trees. Flow networks. | DPV Sections 6.6, 6.7, 7.2 | |
Apr 15 | Maximum flows and minimum cuts. Bipartite matching. | DPV Sections 7.2-7.3 | |
Apr 18 | Search problems. P and NP. NP-completeness. | DPV Chapter 8. | |
Apr 22 | Reductions between NP-complete problems. | DPV Chapter 8. | |
Apr 25 | Reductions, contd. | DPV Chapter 8. | |
Apr 29 | Loose ends. |