Recurrences DivideConquer HW 2 4 Quiz 2 1























- Slides: 23


Recurrences / Divide&Conquer HW: 2. 4 Quiz: 2. 1, 4. 2, 5. 2, 7. 3, 7. 4 Midterm: 8 given a recursive algorithm, state the recurrence solve a recurrence, using Master theorem given a recurrence and its solution, prove that the solution is correct solve a problem using divide&conquer (study: merge sort, closest pair of points in R 2)

Basics Quiz: 1. 1, 1. 2, 13. 1 Midterm: 7 group a bunch of function by their asymptotic growth loga b a =b c (ab ) = abc ab+c = (ab)(ac)

Basics Quiz: 1. 1, 1. 2, 13. 1 Midterm: 7 quicksort, heapsort, mergesort, counting sort, bucket sort, radix sort, sorting lower bound heaps, B-trees union find basic geometry (do two lines intersect, is a point to the left of a line, . . . )

Dynamic programming HW: 5. 1, 5. 2, 5. 3, 5. 4, 6. 3, 6. 4, 7. 1, 8. 2, 10. 1 Midterm: 10, 11, 12 Quiz: 6. 1, 6. 2, 7. 1, 7. 2 given a problem and the interpretation of the entries in the dynamic programming table, design the heart of the algorithm

Dynamic programming

Dynamic programming

Dynamic programming

Linear-time median HW: 1. 3, 3. 1, 3. 2, 5. 5 employ the linear-time median algorithm

Greedy algorithms HW: 4. 1, 4. 2, 4. 3, 4. 4, 6. 2 Midterm: 6 Quiz: 5. 1, 11. 2 does the greedy algorithm work for a given problem? find counterexample / prove it does

Linear programming HW: 12. 1, 12. 2, 12. 3 Midterm: Quiz: 12. 1, 12. 2, given a linear program, find its dual given a problem, formulate it as a linear program (e. g. , HW 12. 1)

Linear programming

NP-completeness HW: Midterm: Quiz: 10. 3, 11. 1, 11. 2 is a given algorithm polynomial-time? basic NP-complete problems: (3 -SAT, Independent set, 3 -Coloring, Clique, Subset-Sum, Hamilltonian path, Vertex Cover, Integer Linear Programming, Max-Cut) Cook’s Theorem

NP-completeness

Graph algorithms HW: 6. 1 Quiz 9. 1, 9. 2 Midterm: 1, 2, 3, 5, 9 DFS, BFS, topological sort, connected components, minimum spanning tree (Kruskal, Prim), shortest paths (Dijkstra, Bellman-Ford, Warshall) maximum/maximal/perfect matching, augmenting paths, flows, residual networks, Ford-Fulkerson, maximum-weight matching, Max-Flow=Min-Cut theorem

Approximation algorithms vertex cover set cover metric TSP knapsack 2 - approx O(log n) - approx 1. 5 - approx (1+ ) - approx

Reductions HW: 8. 1, 8. 3, 9. 1, 9. 2, 9. 3, 11. 1 Quiz: 8. 2, 8. 3, 10. 1 solve one problem using a black-box for another problem

Reductions

Reductions

Reductions

Reductions

Probability theory HW: 2. 1, 2. 2 Quiz: 3. 1, 3. 2, 4. 3, 5. 3 random variable, expectation coupon collector problem linearity of expectation Las Vegas / Monte Carlo

Score information HW: total - two-lowest = score 1 max 330 rank a-b Quiz: total - two-lowest = score 2 max 220 rank a-b 25 score 1 330 + 20 score 2 220 + 25 midterm 75