Algorithm Design and Analysis
Winter 2018

Zhaojun Bai,
Office: 3005 Kemper Hall
Phone: 752-4874
Email: bai at

Teaching Assistants:
Nima Joharizadeh (johari at
Kenan Nalbant (kanalbant at
Yuan Pan (yapan at

M.W.F. 12:10pm - 1:00pm
Hunt 100

TA Section Time Place
Yuan A01 (CRN51558) Mon. 10-10:50 Olson 106
Nima A02 (CRN51559) Wed. 10-10:50 Olson 106
Kenan A03 (CRN51560) Wed. 3:10-4:00 Chemistry 176
Website for discussion sessions

Office Hours:
Day Time Place
Mondays 3:00 - 4:00 Kemper 3005, Bai
5:00 - 7:00 Kemper 53, Nima
Tuesdays 10:00 - 11:00 Kemper 55, Yuan
5:00 - 7:00 Kemper 53, Kenan
Wednesdays 2:00 - 3:00 Kemper 3005, Bai
5:00 - 6:00 Kemper 53, Kenan
Thursdays 6:00-8:00 Kemper 53, Yuan
Fridays 10:00 -- 11:00 Kemper 3005, Bai
5:00 -- 6:00 Kemper 53, Nima

Course Objectives:
The notion of an algorithm is fundamental to all of computer science. In this course, we study methods for designing efficient algorithms, evaluating their performance, and ways of establishing precise limits on the possible effectiveness of classes of algorithms.

Textbook and lecture notes:

ECS20 and ECS60.

Course Outline
  1. Introduction and foundations (Ch.1-3)
  2. Algorithm design paradigms:
    • Divide-and-conquer (Ch.4)
    • Dynamic programming (Ch.15)
    • Greedy algorithms (Ch.16)
  3. Algorithms on graphs and trees (Ch.22-25)
  4. NP-completeness and approximate algorithms (Ch.34-35)


Exams (All exams are closed-book, no notes allowed):

Grading may reflect the clarity of your presentation as well as the correctness of your answers.
Regrading of homeworks and midterm exams is only considered within 5 days from the return day. Regrading request must be submitted in writing.

Online Info:
Annoucements, handouts and homework assignments will be posted at the following sites. They get updated frequently throughout the quarter.

Lecture-by-Lecture summaries, handouts and homework assignments

Date Topics Handouts/Homeworks
1/8 I. Introduction and getting started LN: Introduction and getting started
Reading: Chaps. 1 and 2
Review: linear recurrences (ECS20)
Warmup exercise
1/10 I. Introduction and getting started (2/3) Problem set 1
1/12 I. Introduction and getting started
II. Asymptotic notations
LN: Asymptotic notations
Reading: Section 3.1
1/15 holiday, no class
1/17 II. Asymptotic notations
III. Divide-and-Conquer (DC) recurrences
LN: DC recurrences
Reading: Section 3.2
Problem set 2
1/19 III. Divide-and-Conquer recurrences
Reading: Section 4.4
1/22 IV. DC algorithms: maximum-subarray
IV. DC algorithms: Strassen's method
LN: maximum-subarray
LN: Strassen
Reading: Sections 4.1 and 4.2
1/24 IV. DC algorithms: the closest pair
LN: closest pair
Problem set 3
1/26 V. Greedy algorithms: activity selection
LN: activity selection
Reading: 16.1
1/29 V. Greedy algorithms: Huffman codes
LN: Huffman codes
Reading: sections 16.2 and 16.3
1/31 V. Greedy algorithms: knapsack problem
LN: knapsack
Problem set 3 due
Extra reading: money changing
2/2 VI. Dynamic programming: rod cutting
Brief review for midterm I
LN: rod cutting
Reading: section 15.1
Problem set 4
2/5 Midterm 1 Review checklist, Slides
2/7 VI. Dynamic programming: matrix-chain product LN: matrix-chain product
Reading: sections 15.2 and 15.3
2/9 VI. Dynamic programming: longest common subsequence LN: LCS
Reading: section 15.4
2/12 VI. Dynamic programming: LCS and edit distance LN: edit distance
Problem set 5
2/14 VI. Dynamic programming: Knapsack problem and summary LN: knapsack revisited
Handout on knapsack
Reading: section 15.3
2/16 VII. Graph algorithms: Intro and BFS
LN: Graph intro
Reading: Sections 22.1 and 22.2, Appendix B.4
2/19 holiday, no class ...
2/21 VII. Graph algorithms: DFS
Handout: DFS
Reading: sections 22.3 and 22.4
Problem set 6
2/23 VII. Graph algorithms: DFS apps and MST
LN: DFS apps
Reading: section 22.4
2/26 VII. Graph algorithms: MST
Reading: Chap. 23
2/28 VII. Graph algorithms: Shortest-path I - intro
LN: Shortest-path intro
Reading: Chap. 24 (pp.643-650)
3/2 VII. Graph algorithms: Shortest-path II - Bellman-Ford
Brief review for midterm II
LN: Shortest-path algs.
Reading: section 24.1
Problem set #7
3/5 Midterm 2 Review checklist, Slides
3/7 VII. Graph algorithms: Shortest-path III - Dijkstra and DAG LN: Shortest-path algs.
Reading: sections 24.2 and 24.3
3/9 VII. Graph algorithms: Shortest-path III - Dijkstra and DAG Extra LN: Shortest-path profs.
3/12 VIII. NP-completeness I LN: NPC-intro
Handout: NPC
3/14 VIII. NP-completeness II LN: NPC-p vs np
Questions on NPC (ans@canvas)
3/16 VIII. NP-completeness III
Final review
Extra LN on NPC
Final review checklist, slides
extra office hours:
3:00 - 5:00pm, Kenan, 55 Kemper
5:00 - 7:00pm, Nima, 55 Kemper
extra office hours:
10:00 - 12:00noon, Yuan, 55 Kemper
2:00 - 4:00pm, Bai, 3005 Kemper
Final Exam:
6:00-8:00pm, 100 Hunt

Important announcement:

Maintained by Zhaojun Bai