This page summarizes the lectures and mentions the suggested reading assignments.
This summary is quite brief, and its intention is to help the student and
instructor recollect what was covered.
Week 1
- Meeting 1: We begin Chapter 3 on Graphs. We will cover the material in Section 3.1, which talks about various types of graphs, and the questions that one may be interested in asking about them.
- Meeting 2: Graph traversal, depth first search, and breadth first search in undirected graphs. From Section 3.2 of the book.
Week 2
- Meeting 1: Representing graphs using adjacency lists and adjacency matrices. Breadth First Search (at the level of pseudocode) and its running time analysis. This is from Section 3.3 of the text. We briefly mentioned two uses of BFS: it computes minimum length paths, the vertices at any one level of BFS separate the graph.
- Meeting 2: Using BFS to check if a graph is bipartite. This is discussed in detail in Section 3.4 of the text. The running time of depth first search (Section 3.3). Computing a topological ordering for a directed acyclic graph (Section 3.6 of the text).
Week 3
- Meeting 1: Completing the topological ordering algorithm (Section 3.6). Using DFS/BFS to find all conencted components in an undirected graph (Last part of Section 3.3). Connectivity in directed graphs, Section 3.5.
- Meeting 2: Connectivity in directed graphs, Section 3.5. Brief discussion of some adavnced algorithmic problems on graphs. Greedy Algorithms -- Section 4.1 on Interval Scheduling.
Week 4
- Meeting 1: Greedy algorithms for interval scheduling and the earliest finish time rule. Correctness and Running time.
- Meeting 2: Scheduling to minimize lateness, from Section 4.2. Proof that the proposed greedy algorithm always works for inputs with two jobs.
Week 5
- Meeting 1: Scheduling to minimize lateness: proving in the general case that the greedy algorithm works.
- Meeting 2: Interval Coloring, from Section 4.1.
Week 6
- Meeting 1: Shortest Paths in a Graph (Section 4.4). We discussed Dijkstra's algorithm as an important example of a greedy algorithm. We did not discuss the proof of correctness. We very briefly discussed the possibility of a fast implementation using priority queues, but did not flesh this out. The Minimum Spanning Tree Problem (Section 4.5) and Kruskal's algorithm. Again, no proof of correctness.
- Meeting 2: Section 4.6 on Implementing Kruskal's Algorithm. We discussed the first data structure for Union-Find, the one corresponding to Statement (4.23).
Week 7
- Meeting 1: Prim's algorithm for Minimum Spanning Tree, from Section 4.5. We did not prove correctness, or get into details about a fast implementation using priority queues. Began with examples of recursive thinking, with the intent of laying a foundation for Chapter 5 (Divide-and-Conquer) and Chapter 6 (Dynamic Progarmming). Discussed the example of searching in a sorted array, developed the binary-search algorithm, set up a recurrence to evaluate running time, and solved it.
- Meeting 2: Midterm 1
Week 8
- Meeting 1: Insertion Sort and Merge Sort. The latter is an example of divide-and-conquer. The merge-sort recurrence, and its solution.
- Meeting 2: Couting Inversions (5.3)
Week 9
- Meeting 1: Closest pair (5.4)
- Meeting 2: Integer Multiplication (5.5)
Week 10
- Meeting 1: Randomized algorithm for checking matrix multiplication.
- Meeting 2: We begin the module on dynamic programming. Weighted interval scheduling from Section 6.1.
Week 11
- Meeting 1: Dynamic programming for weighted interval scheduling. The subset sum problem from Section 6.4.
- Meeting 2: Dynamic programming for subset sum from Section 6.4. Recursive thinking for the longest increasing subsequence problem. This is from Section 3.6 of Lecture 3 on backtracking from Jeff Erickson's notes.
Week 12
- Meeting 1: Finishing the recursive thinking for LIS. The dynamic programming algorithm for this is described in Section 5.2, in Lecture 5 on dynamic programming from from Jeff Erickson's notes.
- Meeting 2: Midterm 2.
Week 13
- Meeting 1: Shortest paths in graphs with negative cost edges. The Bellman-Ford algorithm from Section 6.8.
- Meeting 2: The problem of computing a maximum cost path between two vertices in a directed acyclic graph can be reduced to the problem considered in Meeting 1 above. A faster algorithm than the one we get using this reduction is possible, using a topological ordering of the DAG. Applications to LIS and weighted interval scheduling.
Week 14
- Meeting 1: Independent Set as a decision problem. Two other decision problems -- 3-colorability, and Boolean (CNF) satisfiability. Why recursive thinking does not need to a polynomial algorithm for these problems. Using CNF
constraints to express conditions like ``of these 4 variables, exactly one must be set to one''.
- Meeting 2: A reduction of 3-colorability to CNF-Satisfiability. Polynomial time reductions between decision problems. Consequences. Transitivity of polynomial time reductions. The notion of an efficient certifier for a decsion problem. This material corresponds to discussions in Sections 8.1, 8.2, and 8.3.
Week 15
- Meeting 1: NP, P, NP vs. P, NP-completeness. How to prove that a problem is NP-complete. Slides for this discussion.
- Meeting 2: Solving Homework 8 questions in class.