Time: TuTh 5:30pm~6:45pm
Location: Davis 101, and Remote
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  

Xiaoyu Zhang  zhang376[at]  
Charles Wiechec  cwiechec[at]  
Yunus Esencayi  yunusese[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  Aug 31  Introduction  syllabus asymptotic notations (KT 2.2) common running times (KT 2.4) 

Sep 2  
2  Sep 7  
Sep 9  Graph Basics  graph basics (KT 3.1) connectivity and traversal (KT 3.2, 3.4) topological order (KT 3.6) 

3  Sep 14  HW1 Posted  
Sep 16  Greedy Algorithms  interval scheduling (KT 4.1) optimum caching (KT 4.3) Huffman code (KT 4.8) flow time minimization 

4  Sep 21  
Sep 23  
5  Sep 28  HW1 Due  
Sep 30  HW2 Posted, PA1 Posted  
6  Oct 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) 

Oct 7  
7  Oct 12  
Oct 14  Oct 17: HW2 Due  
8  Oct 19  
Oct 21  Dynamic Programming 
weighted interval scheduling (KT 6.1) subset sums and knapsack (KT 6.4) Sequence Alignment (KT 6.6) Increasing Subsequence  HW3 Posted  
9  Oct 26  
Oct 28  PA1 Due  
10  Nov 2  
Nov 4  HW3 Due, HW4 Posted, PA2 Posted  
11  Nov 9  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 

Nov 11  
12  Nov 16  
Nov 18  HW4 Due  
13  Nov 23  HW5 Posted  
Nov 25  Fall Recess  
14  Nov 30  NPCompleteness  P, NP, CoNP, P=NP?, NPC (KT 8.18.4) circuitSAT, 3SAT (KT 8.5) independent set (KT 8.5) 

Dec 2  
15  Dec 7  HW5 Due, HW6 Posted  
Dec 9  HW Solutions and Final Review  PA2 Due  
Dec 14, Tue, 7:15pm10:15pm: Final Exam 