||Lecture 28: Probabilistic analysis and
Lecture 27: Algorithms for NP complete problems. Introduction to probabilistic analysis.
|Section 10.2. Section 13.3 (on basics on
random variables and expectations). Wikipedia
page on dynamic programming algorithm for TSP. Some
slides on the hiring problem. See Section 13.5 for
quicksort (which is somewhat different from the way I
present in the class).
||Lecture 26: NP completeness and
algorithms for NP complete problems
Lecture 25: NP complete problems
|Section 8.5. Chapter 10 (p. 553 to 554).
Notes on 2-SAT.
|HW10. Due Apr. 27.|
||Lecture 24: NP complete problems
Lecture 23: NP complete and polynomial time reduction.
|Sections 8.1 to 8.4.
||HW9. Due Apr. 20.|
||Lecture 22: Concept of NP.
Lecture 21: Exam 2.
|Section 8.1 to 8.3 (I did not cover all
of these; will come back to these next week). For graph
coloring, see pages 485 to 487.
assignment II. Due: 4/13.
Test data (for Linux/Mac).
Test data (for Windows).
||Lecture 20: Shortest path problem
Lecture 19: Shortest path problem.
|Sections 4.4, 6.8, 6.9 and 6.10.
||Lecture 18: Dynamic programming:
knapsack, matrix chain multiplication.
Lecture 17: Dynamic programming: weighted interval scheduling, subset sum.
|Sections 6.1 and 6.4. Reference for
matrix chain multiplication: Wikipedia
page and slides.
||HW8. Due Mar. 30.|
||Lecture 16: Dynamic programming:
longest increasing subsequence and longest common subsequence (LCS)
Lecture 15: Divide and conquer: linear time selection and closest point. Dynamic programming: longest increasing subsequence
|Section 5.4. On DP: section 6.2. Section
6.6 is a (more complicated) version of LCS. Here is the Wikipedia
page on LCS. On longest increasing subsequence: link.
||HW7. Due Mar. 23.
Programming assignment (substitute for quiz 2). Due: Mar. 25.
Test data for this assignment.
Another set of test data for this assignment.
||Lecture 14: Divide and conquer: integer
and matrix multiplication, linear time selection and
Lecture 13: Exam 1.
|Chapter 5. Sections 5.4 and 5.5.
Additional references for square matrix multiplication (link)
and linear time selection (link,
||HW6. Due Mar. 9.|
||Lecture 12: Divide and conquer: solving
recurrence and design of algorithms
Lecture 11: Greedy algorithm and divide and conquer
|Chapter 5. Sections 5.1, 5.2 and 5.5.
Master theorem: Wikipedia
document contains extensive explanation of Master
theorem (perhaps more than what is required by this
course). You don't need to understand the proof; focus on
how to apply it.
||Lecture 10: Greedy algorithm: Huffman
Lecture 9: Greedy algorithm: minimum spanning tree
|Chapter 4. Sections 4.5 and 4.8. I did
not cover the priority queue. We may use priority queue
sometime in this class. See Section 2.5 in your textbook.
||HW5. Due Feb. 24.|
||Lecture 8: Greedy algorithm: coin change
and interval scheduling
Lecture 7: No class (snow day)
|Chapter 4. Section 4.1.
||HW4. Due Feb. 17.
||Lecture 6: DFS and its applications
Lecture 5: Basic graph algorithms: BFS and DFS
|Chapter 3. There are some topics taught
in class but not well covered in the class (e.g.
classification of DFS edges and timestamps). See these
slides for reference: slides
2. References for the algorithms (slightly different
from the textbook) for topological
sort and strongly
||HW3. Due Feb. 10. (Note:
for those without the textbook: I added figures and
descriptions and this assignment should be self-contained.)
||Lecture 4: Asymptotic notations and
common running time.
Lecture 3: Introduction to analysis of algorithms. Asymptotic notations.
|Chapter 2 of the textbook. We discussed
insertion sort in the class. Check out these
slides which contain detailed explanation on
||HW2. Due Feb. 03.
Lecture 1: Basic concepts of algorithms. Stable
matching problem: a motivating example.
Lecture 2: None (due to holiday)
Chapter 1 of the textbook (also available online here).
HW1. Due Jan. 27 (added clarification
for the last problem). You need to submit in PDF in HuskyCT by the
end of Jan. 27. No hard copy is accepted.