CSE 431/531: Algorithm Analysis and Design (Spring 2020)

Course Information

Time: MoWeFr 9:00~9:50am

Location: Knox 110

Credits: 3

Please sign up for the course on Piazza.


Shi Li

Office: 328 Davis Hall

Email: [first name][last name initial][at][buffalo][dot][edu]

Homepage: http://www.cse.buffalo.edu/~shil/

Office Hours: 10:00am-11:00am, Mondays


NameEmailOfficeOffice Hours
Xiangyu Guo xiangyug[at] 203 Davis Hall 11:00am-12:00pm, Fridays
Minhua Wang minghuaw[at] 203 Davis Hall 2:00pm-3:00pm, Wednesdays


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 NP-completeness 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".


HomeworksPost DateDue Date
HW1Feb 10Feb 17
HW2Feb 26Mar 4
HW3Mar 13Mar 25
HW4Apr 10Apr 19
HW5Apr 27May 4
Programming HWApr 1May 8

Syllabus & Tentative Schedule

WeekDateTopicContentsOther Notes
1 Jan 27 Introduction syllabus
asymptotic notations (KT 2.2)
common running times (KT 2.4)
Jan 29
Jan 31
2 Feb 3
Feb 5Graph Basics graph basics (KT 3.1)
connectivity and traversal (KT 3.2, 3.4)
topological order (KT 3.6)
Feb 7
3 Feb 10 HW1 Posted
Feb 12Greedy Algorithms interval scheduling (KT 4.1)
Optimum Caching (KT 4.3)
Huffman code (KT 4.8) Minimizing Lateness (KT 4.2)
Feb 14
4 Feb 17HW1 Due
Feb 19
Feb 21
5Feb 24
Feb 26RecitationHW2 Posted
Feb 28Divide and Conquer merge sort and counting inversions (KT 5.1, 5.3)
quicksort, median-finder, selection (KT 13.5)
polynomial and matrix multiplications (KT 5.5)
solving recurrences (KT 5.2)
6 Mar 2
Mar 4HW2 Due
Mar 6
7 Mar 9
Mar 11
Mar 13RecitationHW3 Posted
8Spring Break
9 Mar 23Dynamic Programming weighted interval scheduling (KT 6.1)
subset sums and knapsack (KT 6.4)
Mar 25HW3 Due
Mar 27
10Mar 30HW1,2&3 Solutions
Apr 1Midterm ExamProgramming HW posted
Apr 3Dynamic Programming
Sequence Alignment (KT 6.6)
Increasing Subsequence
11 Apr 6
Apr 8
Apr 10RecitationHW4 Posted
12 Apr 13Graph 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 Bellman-Ford (KT 6.8)
Apr 15
Apr 17HW4 Due on Apr 19
13 Apr 20
Apr 22
Apr 24
14Apr 27HW5 Posted
Apr 29NP-Completeness P, NP, Co-NP, P=NP?, NPC (KT 8.1-8.4)
circuit-SAT, 3-SAT (KT 8.5)
independent set (KT 8.5)
May 1
15May 4HW5 Due
May 6
May 8HW4&5 SolutionsProgramming HW Due
Wed, May 13 8:00am-11:00am: Final Exam

Academic Integrity

Academic integrity is a fundamental university value. Through the honest completion of academic work, students sustain the integrity of the university while facilitating the university's imperative for the transmission of knowledge and culture based upon the generation of new and innovative ideas.

The academic degrees and the research findings produced by our Department are worth no more than the integrity of the process by which they are gained. If we do not maintain reliably high standards of ethics and integrity in our work and our relationships, we have nothing of value to offer one another or to offer the larger community outside this Department, whether potential employers or fellow scholars. For this reason, the principles of Academic Integrity have priority over every other consideration in every aspect of our departmental life, and we will defend these principles vigorously. It is essential that every student be fully aware of these principles, what the procedures are by which possible violations are investigated and adjudicated, and what the punishments for these violations are. Wherever they are suspected, potential violations will be investigated and determinations of fact sought. In short, breaches of Academic Integrity will not be tolerated.

Departmental Statement on Academic Integrity in Homework Assignments

The following statement further describes the specific application of these general principles to a common context in the CSE Department environment, the production of source code for project and homework assignments. It should be thoroughly understood before undertaking any cooperative activities or using any other sources in such contexts. All academic work must be your own. Plagiarism, defined as copying or receiving materials from a source or sources and submitting this material as one's own without acknowledging the particular debts to the source (quotations, paraphrases, basic ideas), or otherwise representing the work of another as one's own, is never allowed. Collaboration, usually evidenced by unjustifiable similarity, is never permitted in individual assignments. Any submitted academic work may be subject to screening by software programs designed to detect evidence of plagiarism or collaboration.

It is your responsibility to maintain the security of your computer accounts and your written work. Do not share passwords with anyone, nor write your password down where it may be seen by others. Do not change permissions to allow others to read your course directories and files. Do not walk away from a workstation without logging out. These are your responsibilities. In groups that collaborate inappropriately, it may be impossible to determine who has offered work to others in the group, who has received work, and who may have inadvertently made their work available to the others by failure to maintain adequate personal security. In such cases, all will be held equally liable. These policies and interpretations may be augmented by individual instructors for their courses. Always check the handouts and web pages of your course and section for additional guidelines. The following statement further describes the specific application of these general principles to a common context in the CSE Department environment, the production of source code for project and homework assignments. It should be thoroughly understood before undertaking any cooperative activities or using any other sources in such contexts.

Departmental Policy on Violations of Academic Integrity

Link to CSE departmental policy: https://engineering.buffalo.edu/computer-science-engineering/information-for-students/policies/academic-integrity-students.html

The CSE Department has a zero-tolerance policy regarding academic integrity (AI) violations. When there is a potential violation of academic integrity in a course, the course director shall first notify the concerned students. This notification begins the UB Academic Integrity Policy review and appeals process (Consultative Resolution, Departmental Level Procedures, Decanal Level Procedures, Vice Provost Level Procedures). Upon conclusion of the review and appeals process, if the department, school, and university have determined that the student has committed a violation, the following sanctions will be imposed upon the student:

  1. Documentation. The department, school, and university will record the student's name in departmental, decanal, and university-level academic integrity violations databases.
  2. Penalty Assessment. The standing policy of the department is that all students involved in an academic integrity violation will receive an F grade for the course and may lose financial aid and/or lose financial support from the department. The course director may recommend a lesser penalty for the first instance of academic integrity violation, and the adjudication committees that hear the appeal at the department, decanal and provost level may recommend a lesser or greater penalty.