lecture22

# lecture22 - CSci 5403 COMPLEXITY THEORY LECTURE XXII...

This preview shows pages 1–3. Sign up to view the full content.

1 COMPLEXITY THEORY CSci 5403 LECTURE XXII: APPROXIMATION ALGORITHMS Let R(x,y) be a polynomial time relation, and define F(x) = { y | R(x,y)}, i.e. the “Feasible Set.” The maximization problem for R and value function val : {0,1}* × {0,1}* R is to find Y ˥ F(x) such that val(x,Y) = OPT(x) = max y ˥ F(x) val(x,y) The minimization problem for R and cost function cost : {0,1}* × {0,1}* R is to find Y ˥ F(x) such that cost(x,Y) = OPT(x) = min y ˥ F(x) cost(x,y) Example. Let R = { ((V,E),S) : S ˧ V } and c((V,E),S) = | { (u,v) ˥ E : u ˥ S ˭ v S } |. Then the maximization problem is MAX-CUT, and the minimization problem in MIN-CUT. Definition. Let A be an algorithm such that for all x, A(x) ˥ F(x). Then A has approximation ratio α for: - the minimization problem (R,cost) if ˲ x, cost(x,A(x)) α OPT(x) - the maximization problem (R,val) if ˲ x, val(x,A(x)) OPT(x)/ α Example. We know an efficient algorithm with approximation ratio 2 for MAX-CUT. (HW1.2+2.2) Is there an efficient algorithm with approximation ratio 1+ ε ? Example. KNAPSACK = R = { ((w 1 ,…,w n ,v 1 ,…v n ,W),S) : S ˧ [n] ˭ i ˥ S w i W. } val((w,v,W),S) = i ˥ S v i . 15 lbs \$500 ½ lb \$15 3 lbs \$2000 1lb, \$20 50 ×

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Theorem. ˲ ε > 0, there is an efficient algorithm A ε for KNAPSACK with approximation ratio 1+ ε . We start with a O(n × ( i v i ))-time exact algorithm: 1. Let V = i v i . 2. ˲ v V, set S(0,v) = , W(0,v) = ; set W(0,0)=0. 3. for each 1 i n, 0 v V: If W(i-1,v-v i ) + w i < W(i-1,v) set S(i,v) = S(i-1,v-v i ) ˫ {i} else set S(i,v) = S(i-1,v) Set W(i,v) = min{ W(i-1,v-v i )+w i , W(i-1,v) } 4. Find (i,v) that maximizes v s.t. W(i,v) W.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 5

lecture22 - CSci 5403 COMPLEXITY THEORY LECTURE XXII...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online