CS 401 / MCS 401 - Computer Algorithms I
University of Illinois - Chicago
Fall 2022


This course will cover the important principles behind the design and analysis of computer algorithms. We will study techniques such as divide-and-conquer, dynamic programming, and greedy methods, as well as algorithms for sorting, searching, graph computations, and pattern matching. We will also discuss the theory of NP-completeness.

Basic Information

Syllabus: pdf
Time and Location: M-W-F 2:00–2:50PM, 180G Thomas Beckham Hall (TBH)
Instructor: Lev Reyzin, SEO 417
TA/Grader: Xing Gao, SEO 1211
Textbook: J. Kleinberg and É. Tardos, Algorithm Design, 1st edition
Instructor's Office Hours: T 9:00-9:50AM (online), F 10:00-10:50AM (SEO 417)
TA/Grader Office Hours: M 10:00-11:50AM (SEO 1211)
Piazza site: link for self sign-up

Exam Dates

Midterm Exam 1: Wednesday, October 12th, 2:00-2:50PM
Midterm Exam 2: Monday, November 14th, 2:00-2:50PM
Final Exam: Wednesday, December 7th, 1:00-3:00PM

Problem Sets

problem set 1 due 9/9/22
problem set 2 due 9/28/22
problem set 3 due 10/10/22
problem set 4 due 10/31/22
problem set 5 due 11/11/22
problem set 6 due 12/2/22

Lectures and Readings

Note: lectures will have material not covered in the readings.

Lecture 1 (8/22/22)
covered material: intro to the course, overview of covered material, introduction to stable marriage problem
reading: preface

Lecture 2 (8/24/22)
covered material: the Gale-Shapley stable marriage algorithm
reading: chapter 1.1
optional reading: chapter 1.2

Lecture 3 (8/26/22)
covered material: measuring algorithm complexity, efficient algorithms, asmyptotic analysis
reading: chapter 2.1, 2.2

Lecture 4 (8/29/22)
covered material: implementing Gale-Shapley, common running times
reading: chapters 2.3, 2.4

Lecture 5 (8/31/22)
covered material: priority queues, implementation with heaps
reading: chapter 2.5

Lecture 6 (9/2/22)
covered material: graph algorithms, graph connectivity, bredth-first search (BFS), depth-frst search (DFS)
reading: chapter 3

Lecture 7 (9/7/22)
covered material: introduction to greedy algorithms, interval scheduling
reading: chapter 4.1

Lecture 8 (9/9/22)
covered material: scheduling to minimize maximum lateness, an exchange argument
reading: chapter 4.2

Lecture 9 (9/12/22)
covered material: shortest path trees and Dijkstra's algorithm, implementing with priority queues
reading: chapter 4.4

Lecture 10 (9/14/22)
covered material: the MST problem, Prim's and Kruskal's and Reverse-Delete algorithms
reading: chapter 4.5

Lecture 11 (9/16/22)
covered material: cut and cycle properties of MSTs, union-find for implementing Kruskal's
reading: chapter 4.6

Lecture 12 (9/19/22)
covered material: prefix-free codes, Huffman trees and codes
reading: begin chapter 4.8

Lecture 13 (9/21/22)
covered material: proof that Huffman codes are optimal
reading: finish chapter 4.8

Lecture 14 (9/23/22)
covered material: introduction to divide and conquer, mergesort, the master theorem
reading: chapter 5.1 and this statement of the master theorem
optional reading: chapter 5.2 and these notes on the master theorem

Lecture 15 (9/26/22)
covered material: counting inversions using divide and conquer
reading: chapter 5.3

Lecture 16 (9/28/22))
covered material: multiplying integers in subquadratic time
reading: chapter 5.5

Lecture 17 (9/30/22)
covered material: finding the closest pair of points in the plane
reading: chapter 5.4

Lecture 18 (10/3/22)
covered material: the fast Fourier transform
reading: chapter 5.6

Lecture 19 (10/5/22)
covered material: review for midterm 1

Lecture 20 (10/7/22)
covered material: intro to dynamic programming via the Fibonacci sequence
reading: chapter 6.2

Lecture 21 (10/10/22)
covered material: review of problem sets 1, 2, and 3

Lecture 22 (10/12/22)
midterm exam 1: no lecture

Lecture 23 (10/14/22)
covered material: dynamic program for weighted interval scheduling
reading: chapter 6.1

Lecture 24 (10/17/22)
covered material: segmented least squares
reading: chapter 6.3

Lecture 25 (10/19/22)
covered material: sequence alignment
reading: chapter 6.6

Lecture 26 (10/21/22)
covered material: subset sum and knapsack
reading: chapter 6.4

Lecture 27 (10/24/22)
covered material: the Bellman-Ford dynamic programming algorithm for shortest paths in graphs with negative edges
reading: chapter 6.8

Lecture 28 (10/26/22)
covered material: the max-flow problem
reading: chapter 7.1

Lecture 29 (10/28/22)
covered material: the Ford Fulkerson algorithm, min-cut problem
reading: chapter 7.2

Lecture 30 (10/31/22)
covered material: scaling max-flow, using max-flows to solve the perfect matching problem
reading: chapters 7.3, 7.5

Lecture 31 (11/2/22)
covered material: edge-disjoint paths, circulations with demands (and lower bounds)
reading: chapters 7.6, 7.7

Lecture 32 (4/6/22)
covered material: flows for survey design, airline scheduling, and image segmentation
reading: chapters 7.8, 7.9

Lecture 33 (11/7/22)
covered material: Hall's theorem, image segmentation, project selection
reading: chapters 7.10, 7.11

Lecture 34 (11/9/22)
covered material: introduction to computational complexity
reading: intro to chapter 8

Lecture 35 (11/11/22)
covered material: midterm 2 review

Lecture 36 (11/14/22)
midterm 2: no lecture

Lecture 37 (11/16/22)
covered material: went over midterm

Lecture 38 (11/18/22)
covered material: polynomial-time reductions, IS, VC, SC, and 3SAT
reading: chapters 8.1, 8.2

Lecture 39 (11/21/22)
covered material verifier definition of NP
reading: chapter 8.3

Lecture 40 (11/23/22)
covered material: NP-Completeness
reading: chapter 8.4

Lecture 41 (11/28/22)
covered material: sequencing problems, gadget reduction to HAMPATH
reading: chapter 8.5

Lecture 42 (11/30/22)
covered material: reduction to 3-COLORINGg, more NPC problems
reading: chapters 8.7, 8.10

Lecture 43 (12/2/22)
covered material: final exam review