COMP 3804: Design and Analysis of
Algorithms (Fall 2022)
Fall 2022
Weekly-outline
Assignments
Problem Sets
OFFICE HOURS: Fridays 13:30 - 14:30 PM (No office hour
on Sept 16th)
E-mail: anil@scs.carleton.ca,
WWW:http://www.scs.carleton.ca/~anil
Grading Components
(Tentative)
- Course Logistics - Tutorials; Exam; Tests; Assignments.
- Illustrating D&C via finding a subarray of an array of integers that maximizes the sum.
- See Kadane's algorithm for the maximum subarray problem. Another link is here.
Week # |
Michiel's Video |
Michiel's Notes |
Topics + Additional pointers |
0 (Sep 9) |
Introductory
Remarks |
Introduction |
Naive and faster methods for computing Fibonacci numbers, O, Omega, Theta Notation See Chapter 1 (Section 1.3) for more details |
1 (Sep 14, 16) |
Part
1(Merge-Sort Analysis) Part 2(Multiplying Integers) Part 3(Faster Multiplication) Part 4 (Recursion Tree) |
Divide-and-Conquer Recursion Tree |
Divide-and-Conquer Technique Analyzing merge-sort, multiplication of two n-bit numbers, matrix multiplication. Additional notes on analyzing recurrences including substitution method. See Chapter 1 (Section 1.4 and 1.5) for more details Also, see the following link for Master Method simulator: https://www.nayuki.io/page/master-theorem-solver-javascript |
2 (Sept 21, 23) |
Deterministic
Selection Randomized Selection+ Heaps |
Selection (deterministic) Selection (randomized) Heaps |
Group of 5 deterministic selection algorithm. Randomized selection algorithm. What are Heaps? |
3 (Sept 28, 30) |
Operations
on Heaps More on Heaps + Graphs |
Introduction to Graphs and Graph Exploration |
Heap operations, heap sort. Introduction to Graphs. |
4 (Oct 5, 7) |
Graph
Representation- Explore Depth-first-search DAGs, Topological Sort, and DFS |
Depth-first-search Directed-graphs |
Graph representation, Graph exploration, tree and back edges, depth-first search traversal, finding connected components using explore and cc-number Is G bipartite? Directed graphs. Acyclic directed graphs (DAGs) Topological Sorting |
5 (Oct 12, 14) |
DFS
in directed graphs |
DFS in directed graphs |
DFS in directed graphs - forward, backward, cross and back edges in the traversal. |
6 (Oct 19, 22) |
Shortest-paths
in directed graphs Correctness of Dijkstra's algorithm |
shortest-paths correctness |
Shortest paths in DAGs Dijsktra's single-source shortest path algorithm for general directed graphs |
Oct 25-29 |
FALL BREAK |
NO OFFICE HOURS | |
7 (Nov 2, 4) |
Union-Find
DS + Kruskal's MST algorithm Kruskal and Prim's MST algorithms |
union-find data structure + MST Prim's MST algorithms Additional Notes on MSTs |
Union-find data structure Minimum spanning tree algorithms - Kruskal and Prim's Algorithm. Analysis of Kruskal's algorithm using union-find DS |
8 (Nov 9, 11) |
Prim's
MST Analysis & Introduction to Dynamic Programming I |
Dynamic Programming |
Analysis of Prim's using priority queues Revisiting shortest paths in DAGs, dynamic programming framework - structure of optimal solution, set-up recurrence relation, solve recurrence bottom-up. Longest paths in DAGs |
9 (Nov 16, 18) |
Dynamic
Programming II Dynamic Programming III |
Longest increasing sequence,
matrix-chain multiplication, longest-common sequence,
all-pairs shortest paths - Floyd-Warshall algorithm. Longest
paths in graphs - optimal substructure property? |
|
10 (Nov 23, 25) |
Decision
Problems Decision Problems using languages |
Introduction to P and NP Complexity
Classes Formal definitions of decision problems, P and NP. |
Complexity classes P and NP Decision problems - SAT, Clique, Hamiltonian Cycle, TSP, Subset Sum P subset NP, Polynomial-time reductions. |
11 (Nov 30, Dec 2) |
Polynomial-time
reductions NP-Completeness |
Polynomial-time reductions NP-Complete Problems |
Definition, Clique to Independent set, Clique
to Vertex cover, 3SAT to Independent set. NP-Hard and NP-Complete Problems. How to show a problem is NP-Complete? |
12 (Dec 7, 9) |
Hardness
Reductions Circuit-SAT is NP-Complete |
More Hardness Reductions Circuit-SAT problem |
3SAT, Clique, 0-1 Integer Linear Programs are
NP-Complete. Sketch of the proof of Circuit-SAT is NP-Complete. |