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. It is no substitute for participating in the lectures.

## Week 1

• Lecture 1: The interval scheduling problem from Section 4.1 of the text.
• Lecture 2: The interval scheduling problem continued. Quiz.
• Reading assignment for Week 1: Section 4.1 of the text. Some old lecture notes on Interval Scheduling .

## Week 2

• Lecture 1: Interval Partitioning, from Section 4.1.
• Lecture 2: Scheduling to minimize lateness, Section 4.2.
• Lecture 3: Completing the proof of the correctness of the algorithm for scheduling to minimize lateness.
• Reading Assignment: Section 4.2. Old notes on Scheduling to minimize lateness. There is a typo on page 2 in the definition of the lateness.

## Week 3

This week's material is from Chapter 3 of the text.
• Lecture 1: Graphs and their contexts, graph representation, searching for all vertices reachable from a given vertex, breadth-first-search.
• Lecture 2: Further development of the breadth first search algorithm, connection to finding shortest paths, introducing depth-first-search.
• Lecture 3: Depth first search.
• Reading Assignment for Week 3: Sections 3.1, 3.2, and 3.3.

## Week 4

• Lecture 1: Directed graphs, representation, DFS and BFS on directed graphs, strongly connected components (Section 3.5).
• Lecture 2: Directed Acyclic Graphs and Topological Sorting (Section 3.6)
• Lecture 3: Mergesort and Counting Inversions (Section 5.3)
• Reading Assignment for Week 4: Sections 3.5 and 3.6.

## Week 5

• Lecture 1: Counting Inversions, analyzing the resulting recurrence relation. (Section 5.1)
• Lecture 2: Sorting Pancakes, Tiling Chessboards. Integer multiplication from Section 5.5. (In class we consider integers in decimal representation, but the book considers binary representation.)
• Lecture 3: Completing Karatsuba's algorithm for integer multiplication from Section 5.5. The discussion on integer multiplication follows Section 1.7 of Jeff Erickson's lecture notes.
• Reading: Sections 5.1, 5.2, 5.3, and 5.5.

## Week 6

• Lecture 1: The closest pair problem from Section 5.4. Some old lecture notes.
• Lecture 2: Some practice problems ahead of Friday's midterm. Finding the maximum contiguous subarray using divide-and-conquer.

## Week 7

• Lecture 1: Completing discussion of maximum contiguous subarray, and approaches to the closest point problem and variants that should improve over brute force in practice.
• Lecture 2: The O(n log n) closest pair algorithm from Section 5.4. These notes also contain a discussion of the maximum contiguous subarray problem.
• Lecture 2: Minimum Spanning Trees, Section 4.5.

## Week 8

• Lecture 1: Correctness of minimum spanning tree algorithms, Section 4.5.
• Lecture 2: Data Structuring for implementing Prim's algorithm.
• Lecture 3: Data Structures for Kruskal's algorithm, Section 4.6.

## Week 9

• Lecture 1: Dijkstra'a algorithm for shortest paths in graphs with non-negative edge costs, Section 4.4.
• Lecture 2: Correctness, data structure, and implementation of Dijkstra.
• Lecture 3: Weighted interval scheduling from Section 6.1: Problem formulation, expressing optimal solution to problem in terms of optimal solution to subproblems.

## Week 10

• Lecture 1: A correct recursive algorithm for weighted interval scheduling. There are only O(n) distinct subproblems generated by the recursion, but algorithm is exponential because it solves each subproblem multiple times.
• Lecture 2: An O(n^2) algorithm obtained via caching/memoizing already solved subproblems. A version of this that is iterative. Possible to improve running time to O(n) by having subproblems only solve for the value of optimal solution, not the optimal solution itself. This is the approach taken in the textbook.
• Lecture 3: The material we will discuss is similar to Section 6.3 of the text, but it is not the same thing. We will follow these notes on the segmentation problem.

## Week 11

• Lecture 1: Developing the dynamic programming algorithm for segmentation. Introduction to the knapsack problem (Section 6.4).
• Lecture 2: Knapsack algorithm
• Lecture 3: Knapsack algorithm completed. Review for second midterm.

## Week 12

• Lecture 1: Second Midterm
• Lecture 2: Shortest Paths when edges have negative lengths. The Bellman-Ford algorithm from Section 6.8.
• Lecture 3: Randomized algorithms: The majority party problem from the homeworks

## Week 13

• Lecture 1: Randomized algorithms: quicksort. The stuff on randomized algorithms will not be tested in the final exam.
• Lecture 2: The CNF satisfiability problem and the maximum independent set problems from Chapter 8.
• Lecture 3: More dynamic programming examples. Led by TA.

## Week 14

• Lecture 1: Reduction of Problem 3 of Homework 7 to shortest paths, and CNF-SAt to Independent Set.
• Lecture 2: Polynomial time reducibility: definition and consequences. All of this week's material is from Chapter 8.
• Lecture 3: Efficient verifiers, the classes P and NP, and NP-completeness. Slides used for this meeting.

## Week 15

• Lecture 1: NP-Completeness of CNF-SAT and Independent Set. As an example of showing NP-completeness of a new problem, we looked at Exercise 4 of Chapter 8.