23

Recurrences / HW: 2.4 Quiz: 2.1, 4.1, 4.2, 5.2, 7.3, 7.4 Midterm: 8 given a recursive algorithm, state the recurrence solve a recurrence, using Master

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Recurrences / HW: 2.4Quiz: 2.1, 4.1, 4.2, 5.2, 7.3, 7.4Midterm: 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 R2)

Divide&Conquer

Basics

Quiz: 1.1, 1.2, 13.1Midterm: 7

group a bunch of function by their asymptotic growth

a = bloga b

(ab ) = abcc

ab+c = (ab)(ac)

Basics

Quiz: 1.1, 1.2, 13.1Midterm: 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.1Midterm: 10, 11, 12Quiz: 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.2Midterm: 6Quiz: 5.1, 11.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.3Midterm: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.1Quiz 9.1, 9.2Midterm: 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 algorithmsvertex cover 2 - approxset cover O(log n) - approxmetric TSP 1.5 - approxknapsack (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, expectationcoupon collector problem linearity of expectationLas Vegas / Monte Carlo

Score informationHW: total - two-lowest = score 1

rank a-b

Quiz: total - two-lowest = score 2

rank a-b

max220

330score 1

25 220

score 220 +

max330

75midterm

25 +