CS 401 / MCS 401 - Computer Algorithms I
University of Illinois - Chicago
Spring 2025


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 9:00–9:50am, 180G Thomas Beckham Hall (TBH)
Instructor: Lev Reyzin, SEO 417
Instructor's Office Hours: W 10:00-10:50am, F 11:00-11:50am
TA/Grader: Xing Gao, SEO 1211
TA/Grader Office Hours: M, F 10:00-10:50am
Textbook: J. Kleinberg and É. Tardos, Algorithm Design, 1st edition
Piazza site: please sign up via this link

Exam Dates

midterm exam: 9:00am-9:50am on Friday 3/21/25
final exam: 10:30am-12:30pm on Tuesday 5/6/25

Problem Sets

problem set 1, due 2/5/25
problem set 2, due 2/21/25
problem set 3, due 3/5/25
problem set 4, due 3/19/25

Lectures and Readings

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

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

Lecture 2 (1/15/25)
covered material: the Gale-Shapley stable marriage algorithm
reading: chapter 1.1
optional reading: chapter 1.2

Lecture 3 (1/27/25)
covered material: measuring algorithm complexity, efficient algorithms, asymptotic analysis
reading: chapter 2.1, 2.2

Lecture 4 (1/22/25)
covered material: implementing Gale-Shapley
reading: chapter 2.3
optional reading: chapter 2.4

Lecture 5 (1/24/25)
covered material: priority queues, implementation with heaps
reading: chapter 2.5

Lecture 6 (1/27/25)
covered material: graph algorithms, graph connectivity, bredth-first search (BFS), depth-frst search (DFS)
reading: chapter 3

Lecture 7 (1/29/25)
covered material: introduction to greedy algorithms, interval scheduling, "greedy stays ahead" argument
reading: chapter 4.1

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

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

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

Lecture 11 (2/7/25)
covered material: cut and cycle properties of MSTs, Union-Find
reading: chapter 4.6

Lecture 12 (2/10/25)
covered material: prefix-free codes, Huffman trees and codes
reading: chapter 4.8

Lecture 13 (2/12/25)
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 14 (2/14/25)
covered material: integer multiplication and counting inversions using divide and conquer
reading: chapters 5.3 and 5.5

Lecture 15 (2/17/25)
covered material: finding the closest pair of points in the plane
reading: chapter 5.4

Lecture 16 (2/19/25)
covered material: the fast Fourier transform (lecture by Xing Gao)
reading: chapter 5.6

Lecture 17 (2/21/25)
covered material: Strassen's algorithm for matrix multiplication
reading: notes on Strassen's algorithm

Lecture 18 (2/24/25)
covered material: intro to dynamic programming via the Fibonacci sequence
reading: chapter 6.2

lecture 19 (2/26/25)
covered material: median finding in linear time (online lecture by Dan Gusfield)
optional reading: these notes from MIT

Lecture 20 (2/28/25)
covered material: dynamic program for weighted interval scheduling
reading: chapter 6.1

Lecture 21 (3/3/25)
covered material: segmented least squares
reading: chapter 6.3

Lecture 22 (3/5/25)
covered material: subset sum, knapsack
reading: chapter 6.4

Lecture 23 (3/7/25)
covered material: sequence alignment and RNA secondary structure
reading: chapters 6.5 and 6.6

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

Lecture 25 (3/12/25)
covered material: a bottom-up implementation of Bellman-Ford, detecting negative cycles
reading: chapter 6.10

Lecture 26 (3/14/25)
covered material: the max-flow problem and the Ford-Fulkerson algorithm
reading: chapter 7.1

Lecture 27 (3/17/25)
covered material: min-cut problem, correctness of Ford-Fulkerson
reading: chapter 7.2

Lecture 28 (3/19/25)
covered material: choosing good augmenting paths, scaling max-flow
reading: chapter 7.3

Lecture 29 (3/21/25)
midterm exam