Time: MoWeFr 9:10am~10:00am
Location: Due to the coronavirus pandemic, all lectures will be online.
Credits: 3
Please sign up for the course on Piazza.
Shi Li
Email: [first name][last name initial][at][buffalo][dot][edu]
Homepage: http://www.cse.buffalo.edu/~shil/
Name  Office Hours  

Xiangyu Guo  xiangyug[at]  
Alesandro Baccarini  [at] 
Algorithm design and analysis is fundamental to all areas of computer science and gives a rigorous framework for the study of optimization. This course provides an introduction to algorithm design through a survey of the common algorithm design paradigms of greedy optimization, divide and conquer, dynamic programming, and linear programming, and the NPcompleteness theory.
There is no required text book for the class, but it is recommended that you have one of the following books:
Your final grade will be computed as follows:
NA stands for "no animation".
Week  Date  Topic  Contents  Other Notes 

1  Feb 1  Introduction  syllabus asymptotic notations (KT 2.2) common running times (KT 2.4) 

Feb 3  
Feb 5  
2  Feb 8  
Feb 10  Graph Basics  graph basics (KT 3.1) connectivity and traversal (KT 3.2, 3.4) topological order (KT 3.6) 

Feb 12  
3  Feb 15  HW1 Posted  
Feb 17  Greedy Algorithms  interval scheduling (KT 4.1) optimum caching (KT 4.3) Huffman code (KT 4.8) flow time minimization 

Feb 19  
4  Feb 22  
Feb 24  HW1 Due  
Feb 26  
5  Mar 1  
Mar 3  Recitation  HW2 Posted  
Mar 5  Divide and Conquer  merge sort and counting inversions (KT 5.1, 5.3) quicksort, medianfinder, selection (KT 13.5) polynomial and matrix multiplications (KT 5.5) solving recurrences (KT 5.2) 

6  Mar 8  
Mar 10  
Mar 12  HW2 Due  
7  Mar 15  
Mar 17  
Mar 19  Recitation  HW3 Posted  
8  Mar 22  Dynamic Programming 
weighted interval scheduling (KT 6.1) subset sums and knapsack (KT 6.4) Sequence Alignment (KT 6.6) Increasing Subsequence 

Mar 24  
Mar 26  
9  Mar 29  Mar 28: HW3 Due  
Mar 31  
Apr 2  
10  Apr 5  Recitation  
Apr 7  Graph Algorithms  Kruskal's and Prim's algorithm for MST (KT 4.5, 4.6) Dijkstra's algorithm for shortest path (KT 4.4) shortest path with negative weights and BellmanFord (KT 6.8) FloydWarshall  HW4 Posted  
Apr 9  
11  Apr 12  
Apr 14  
Apr 16  HW4 Due  
12  Apr 19  
Apr 21  Recitation  HW5 Posted  
Apr 23  NPCompleteness  P, NP, CoNP, P=NP?, NPC (KT 8.18.4) circuitSAT, 3SAT (KT 8.5) independent set (KT 8.5) 

13  Apr 26  
Apr 28  APR 27: Programming Problem 1 Due  
Apr 30  
14  May 3  May 2: HW5 Due  
May 5  HW Solutions and Final Review  
May 7  
Wed, May 12  8:00am11:00am: Final Exam  May 11: Programming Problem 2 Due 