Download presentation
Presentation is loading. Please wait.
Published byAvice Clarke Modified over 9 years ago
1
LR for Packing problems Reuven Bar-Yehuda www.cs.technion.ac.il/~reuven
2
The Local-Ratio Technique: Basic definitions The Local-Ratio Technique: Basic definitions Given a profit [penalty] vector p. Maximize[Minimize] p·x Subject to:feasibility constraints F(x) x is r-approximation if F(x) and p·x [ ] r · p·x* An algorithm is r-approximation if for any p, F it returns an r-approximation 2
3
The Local-Ratio Theorem: The Local-Ratio Theorem: x is an r-approximation with respect to p 1 x is an r-approximation with respect to p- p 1 x is an r-approximation with respect to p Proof: ( For maximization) p 1 · x r × p 1 * p 2 · x r × p 2 * p · x r × ( p 1 *+ p 2 *) r × ( p 1 + p 2 )* 3
4
Special case: Optimization is 1-approximation Special case: Optimization is 1-approximation x is an optimum with respect to p 1 x is an optimum with respect to p- p 1 x is an optimum with respect to p 4
5
A Local-Ratio Schema for Maximization[Minimization] problems: A Local-Ratio Schema for Maximization[Minimization] problems: Algorithm r-ApproxMax[Min]( Set, p ) If Set = Φ then return Φ ; If I Set p(I) 0 then return r-ApproxMax( Set-{I}, p ) ; [ If I Set p(I)=0 then return {I} r-ApproxMin( Set-{I}, p ) ; ] Define “good” p 1 ; REC = r-ApproxMax[Min]( S, p- p 1 ) ; If REC is not an r-approximation w.r.t. p 1 then “fix it”; return REC; 5
6
Maximum Independent Set in Interval Graphs Maximum Independent Set in Interval Graphs Activity9 Activity8 Activity7 Activity6 Activity5 Activity4 Activity3 Activity2 Activity1 time Maximize s.t. For each instance I: For each time t: 6
7
Maximum Independent Set in Interval Graphs: How to select P 1 to get optimization? Maximum Independent Set in Interval Graphs: How to select P 1 to get optimization? Activity9 Activity8 Activity7 Activity6 Activity5 Activity4 Activity3 Activity2 Activity1 Î time Let Î be an interval that ends first; 1 if I in conflict with Î For all intervals I define: p 1 (I) = 0 else For every feasible x: p 1 ·x 1 Every Î- maximal is optimal. For every Î- maximal x: p 1 ·x 1 P1=1P1=1 P1=1P1=1 P1=1P1=1 P1=1P1=1 P1=0P1=0 P1=0P1=0 P1=0P1=0 P1=0P1=0 P1=0P1=0 7
8
Maximum Independent Set in Interval Graphs: An Optimization Algorithm Maximum Independent Set in Interval Graphs: An Optimization Algorithm Activity9 Activity8 Activity7 Activity6 Activity5 Activity4 Activity3 Activity2 Activity1 Î time Algorithm MaxIS( S, p ) If S = Φ then return Φ ; If I S p(I) 0 then return MaxIS( S - {I}, p); Let Î S that ends first; I S define: p 1 (I) = p(Î) (I in conflict with Î) ; IS = MaxIS( S, p- p 1 ) ; If IS is Î- maximal then return IS else return IS {Î}; P1=0P1=0 P1=0P1=0 P1=0P1=0 P1=0P1=0 P1=0P1=0 P 1 =P (Î ) 8
9
Maximum Independent Set in Interval Graphs: Running Example Maximum Independent Set in Interval Graphs: Running Example P(I 1 ) = 5 -5 P(I 4 ) = 9 -5 -4 P(I 3 ) = 5 -5 P(I 2 ) = 3 -5 P(I 6 ) = 6 -4 -2 P(I 5 ) = 3 -4 -5 -4 -2 9
10
Single Machine Scheduling : Single Machine Scheduling : Activity9 Activity8 Activity7 Activity6 Activity5 Activity4 Activity3 Activity2 Activity1 ????????????? time Maximize s.t. For each instance I: For each time t: For each activity A: Bar-Noy, Guha, Naor and Schieber STOC 99: 1/2 LP Berman, DasGupta, STOC 00: 1/2 This Talk, STOC 00(Independent) 1/2 10
11
Single Machine Scheduling: How to select P 1 to get ½-approximation ? Single Machine Scheduling: How to select P 1 to get ½-approximation ? Activity9 Activity8 Activity7 Activity6 Activity5 Activity4 Activity3 Activity2 Activity1 Î time Let Î be an interval that ends first; 1 if I in conflict with Î For all intervals I define: p 1 (I) = 0 else For every feasible x: p 1 ·x 2 Every Î- maximal is 1/2-approximation For every Î- maximal x: p 1 ·x 1 P1=1P1=1P1=1P1=1P1=1P1=1P1=1P1=1 P1=1P1=1 P1=1P1=1 P1=1P1=1 P1=1P1=1 P1=1P1=1 P1=0P1=0 P1=0P1=0 P1=0P1=0 P1=0P1=0 P1=0P1=0 P1=0P1=0 P1=0P1=0 P1=0P1=0 P1=0P1=0P1=0P1=0 P1=0P1=0 11
12
Single Machine Scheduling: The ½-approximation Algorithm Single Machine Scheduling: The ½-approximation Algorithm Activity9 Activity8 Activity7 Activity6 Activity5 Activity4 Activity3 Activity2 Activity1 Î time Algorithm MaxIS( S, p ) If S = Φ then return Φ ; If I S p(I) 0 then return MaxIS( S - {I}, p); Let Î S that ends first; I S define: p 1 (I) = p(Î) (I in conflict with Î) ; IS = MaxIS( S, p- p 1 ) ; If IS is Î- maximal then return IS else return IS {Î}; 12
13
Activity9 Activity8 Activity7 Activity6 Activity5 Activity4 Activity3 Activity2 Activity1 I w(I) s(I) e(I) time Maximize s.t. For each instance I: For each time t: For each activity A: Bandwidth Allocation Bandwidth Allocation Albers, Arora, Khanna SODA 99: O(1) |A i |=1* Uma, Phillips, Wein SODA 00: 1/4 LP. This Talk 1/3 for w 1/2 and 1/5 for w 1 13
14
14 Bandwidth Allocation Activity 9 Activity 8 Activity 7 Activity 6 Activity 5 Activity 4 Activity 3 Activity 2 Activity 1 time Bandwidth time
15
Bandwidth Allocation for w 1/2 How to select P 1 to get 1/3-approximation? Bandwidth Allocation for w 1/2 How to select P 1 to get 1/3-approximation? Activity9 Activity8 Î Activity7 Activity6 Activity5 Activity4 Activity3 Activity2 Activity1 I w(I) s(I) e(I) time 1 if I in the same activity of Î For all intervals I define: p 1 (I) = 2*w(I) if I in time conflict with Î 0 else For every feasible x: p 1 ·x 3 Every Î- maximal is 1/3-approximation For every Î- maximal x: p 1 ·x 1 15
16
Bandwidth Allocation The 1/5-approximation for any w 1 Bandwidth Allocation The 1/5-approximation for any w 1 Activity9 Activity8 w > ½ Activity7 w > ½ w > ½ Activity6 Activity5 w > ½ Activity4 Activity3 w > ½ w > ½ Activity2 Activity1 w > ½ w > ½ w > ½ Algorithm: 1. GRAY = Find 1/2-approximation for gray (w>1/2) intervals; 2. COLORED = Find 1/3-approximation for colored intervals 3. Return the one with the larger profit Analysis: If GRAY* 40%OPT then GRAY 1/2(40%OPT)=20%OPT else COLORED* 60%OPT thus COLORED 1/3(60%OPT)=20%OPT 16
17
17 Single Machine Scheduling with Release and Deadlines Activity 9 Activity 8 Activity 7 Activity 6 Activity 5 Activity 4 Activity 3 Activity 2 Activity 1 Each job has a time window within which it can be processed. time
18
18 Single Machine Scheduling with Release and Deadlines Activity 9 Activity 8 Activity 7 Activity 6 Activity 5 Activity 4 Activity 3 Activity 2 Activity 1
19
Continuous Scheduling Single Machine Scheduling (w=1) Bar-Noy, Guha, Naor and Schieber STOC 99: 1/3 Non Combinatorial Berman, DasGupta STOC 00: 1/2·(1- ) This Talk, STOC 00: (Independent) 1/2·(1- ) Bandwidth Allocation Uma, Phillips, Wein SODA 00: 1/6 Non combinatorial This Talk, STOC 00 (Independent) 1/3 ·(1- ) for w 1/2 1/5 ·(1- ) for w 1 s(I) e(I) { w(I)w(I) d(I) 19
20
If currant p(I 1 ) original p(I 1 ) then delete I 1 else Split I 2 = (s 2,e 2 ] to I 21 =(s 2, s 1 +d 1 ] and I 22 =(s 1 +d 1,e 2 ] Continuous Scheduling: Split and Round Profit (Loose additional (1- ) factor) Continuous Scheduling: Split and Round Profit (Loose additional (1- ) factor) d(I 1 ) d(I 2 ) d(I 1 ) d(I 2 ) I 11 I 12 I 21 I 22 20
21
LP Rounding using Fractional Local Ratio Reuven Bar-Yehuda www.cs.technion.ac.il/~reuven www.cs.technion.ac.il/~reuven IBM2006 21
22
General framework: Given a weight vector w. Minimize [Maximize] w·x Subject to:feasibility constraints F(x) x is an r-approximation if F(x) and w·x r w·x* [w·x r w·x* ] An algorithm is an r-approximation if for any w, F it returns an r-approximation
23
15 Min 5x Bisli +8x Tea +12x Water +10x Bamba +20x Shampoo +15x Popcorn +6x Chocolate +$4x WaterShampoo + s.t. x Shampoo + x Water + x WaterShampoo 1 5 8 12 20 6 10 $4 $1 $3 $1 $2 $1
24
The generalized vertex cover problem Minimize w·x Subject to:x u + x v + x e 1 e={u,v} E x {0,1} |V|+|E|
25
2-Approx GVC(G,w) If E= return If e E w(e)=0 return {e}+GVC(G-e, w) If v V w(v)=0 return {v}+GVC(G-E(v), w) Let e={u,v} E s.t = min {w(u), w(v), w(e)}>0. if x {u,v,e} 1 w 1 (x) = 0 else Notice:w 1 x 2 w 1 x for Good(x) VC(G, w-w 1 ) REC= GVC(G, w 2 = w-w 1 ) Induction hyp is: w 2 REC 2 w 2 x so if Good(REC): w 1 REC 2 w 1 x we are done If REC-e is a cover thenREC=REC-e If REC-e is a cover thenREC=REC-e Return REC
26
“2 integral for the price of 1 fractional”: The local ratio technique for rounding Let x be the the fractional solution Minimize w·x Subject to:x u + x v + x e 1 e=(u,v) E x [0,1] |V|+|E|
27
“d integral for the price of fractional”: 2-2/(Δ+1)-Approx GVC(G,w) “d integral for the price of ½(d+1) fractional”: 2-2/(Δ+1)-Approx GVC(G,w) If E= return If e E w(e)=0 return {e}+GVC(G-e, w) If v V w(v)=0 return {v}+GVC(G-E(v)-v, w) Let v V s.t x v is minimum and Let =min(w(i) : i N[v]} if i N[v] 1 w 1 (i) = 0 else Claim:w 1 x r Δ w 1 x for Good(x) VC(G, w-w 1 ) REC= GVC(G, w 2 = w-w 1 ) Induction hyp is: w 2 REC r Δ w 2 x so if Good(REC): w 1 REC r Δ w 1 x we are done If REC is not a minimal cover then make REC minimal If REC is not a minimal cover then make REC minimal Return REC Min x v
28
“d integral for the price of fractional”: “d integral for the price of ½(d+1) fractional”: Claim: w 1 x r Δ w 1 x for Good(x) Min x v If Min x v ≥ ½ Then x (N[v]) ≥ ½(d+1) Else x (N[v]) ≥ ½(d+1) Thus w 1 x ≥ ½(d+1) But w 1 x d Hence : w 1 x/ w 1 x 2-2/(d+1) Δ 2-2/( Δ +1) = r Δ
29
A Generalized Local-Ratio Schema for M inimization [ M aximization] problems: Let x be any “fisible?” vector (e.g. an optimal solution) Algorithm r-ApproxMin [Max](Set, w) If Set = then return ; If v Set w(v) = 0 then return {v} r-ApproxMin(Set-{v},w ) ; [If v Set w(v) 0 then return r-ApproxMax(Set-{v},w ) ;] Define “good” w 1 ; i.e. Good(x): w 1 x [ ] r w 1 x REC = r-ApproxMin [Max](Set, w 2 ) ; Induction hyp is: w 2 REC [ ] r w 2 x so if Good(REC): w 1 REC [ ] r w 1 x we are done, otherwise “fix it”; return REC’;
30
The maximum independent set problem Maximize w·x Subject to:x u + x v ≤ 1 e=(u,v) E x {0,1} |V|
31
The maximum independent set problem “1 integral for the gain of r fractional”: Let x be the the fractional solution Maximize w·x Subject to:x u + x v ≤ 1 e=(u,v) E x [0,1] |V|
32
Gain 1 integral, lose fractional 2/(Δ+1)-Approx IS(G,w) Gain 1 integral, lose ½(d+1) fractional 2/(Δ+1)-Approx IS(G,w) If v V w(v) 0 return IS(G-v, w) If E= return V Let v V s.t x v is maximum and Let = w(v) if i N[v] 1 w 1 (i) = 0 else Claim:w 1 x ≥r Δ w 1 x for Good(x) (G, w-w 1 ) REC= IS(G, w 2 = w-w 1 ) Induction hyp is: w 2 REC ≥ r Δ w 2 x so if Good(REC): w 1 REC ≥ r Δ w 1 x we are done If REC+v is an independent set then REC=REC+v If REC+v is an independent set then REC=REC+v Return REC Max x v www.cs.technion.ac.il/~reuven IBM2006 32
33
Gain 1 integral, lose fractional Gain 1 integral, lose ½(d+1) fractional Claim: w 1 x ≥ r Δ w 1 x for Good(x) Max x v If Max x v ≤ ½ Then x (N[v]) ≤ ½(d+1) Else x (N[v]) ≤ ½(d+1) Thus w 1 x ≤ ½(d+1) But w 1 x ≥ Hens : w 1 x/ w 1 x ≥ 2/(d+1) Δ ≥ 2/( Δ +1) = r Δ
34
Î, and the weight decomposition: Let Î be the interval which ends first. I in conflict with Î, Define w 1 (I) = w 2 = w-w 1 0 otherwise, w 1 = w 1 = 0 time Activity9 Activity8 Activity7 Activity6 Activity5 Activity4 Activity3 Activity2 Activity1
35
4-approximation for 2 Dimentional Interval graphs
40
2t-approximation for t- Dimentional Interval graphs
41
2t-approximation for t-Interval Graphs Maximize w·x Subject to: v C x v ≤ 1 C Clique x {0,1} |V|
42
2t-approximation for t- Interval Graphs finding x Maximize w·x Subject to: v C x v ≤ 1 C Interval Clique x [0,1] |V| e.g. x 1 +x 4 +x 5 ≤ 1
43
2t-approximation for t- Interval Graphs finding more relaxed x Maximize w·x Subject to: v C x v ≤ t C t-Interval Clique x [0,1] |V| e.g. x 1 +x 3 +x 4 +x 5 ≤ 3
44
Gain 1 integral, lose fractional 1/(2t)-Approx IS(G,w) Gain 1 integral, lose 2 t fractional 1/(2t)-Approx IS(G,w) If v V w(v) 0 return IS(G-v, w) If E= return V Let v V s.t x (N[v]) is minimum and Let = w(v) if i N[v] 1 w 1 (i) = 0 else Claim:w 1 x ≥ r t w 1 x for Good(x) (G, w-w 1 ) REC= IS(G, w 2 = w-w 1 ) Induction hyp is: w 2 REC ≥ r t w 2 x so if Good(REC): w 1 REC ≥ r t w 1 x we are done If REC+v is an independent set then REC=REC+v If REC+v is an independent set then REC=REC+v Return REC Min x (N[v]) 2t
45
Gain 1 integral, lose fractional Gain 1 integral, lose 2t fractional Claim: w 1 x ≥ r t w 1 x for Good(x) Min x (N[v]) We need to show that (next slide) x (N[v]) ≤ 2t Thus w 1 x ≤ 2t But w 1 x ≥ 1 Hence : w 1 x/ w 1 x ≥ /(2t ) = r t
46
Claim: v u N[v] x u ≤ 2t Define a directed graph G(V,E) V = Set of t-splits E = {i j : A right endpoind of i “hits” interval j} Define x ij = x i x j y i + = i j x ij and y i - = j i x ji Thus y i + t x i i y i = i y i + + i y i - 2t i x i Thus i y i 2t x i and therefore i i-j x j 2t
47
6t-apx for t-Interval Graphs with demands finding x Maximize w·x Subject to: v C d v x v ≤ 1 C Interval Clique x [0,1] |V| e.g. d 1 x 1 +d 4 x 4 +d 5 x 5 ≤ 1
48
t-Interval Graphs with demands 6t = ( fat ) 2t +( thin ) 4t (Assign z i =d i x i ) R.Bar-Yehuda and D. Rawitz. ESA2005 and Discrete Optimization 2006.
49
2- Dimentional Interval graphs rectangles packing
50
MIS on axix-parallel rectangles: NP-Hard even on unit squares [Asano91] Divide and conquare O(logn)-apx [AKS98] PTAS where all heights are the same [AKS98] log(n)/ apx for any constant [BDMR01] 4c-apx where c=max #rects covering a point [LNO04] 12c-apx with demands [Rawitz06]
51
4c-apx Liane Lewin-Eytan, Joseph (Seffi) Naor, and Ariel Orda1 Admission Control in Networks with Advance Reservations Algorithmica (2004) 40: 293–304
52
4c-apx for rectangle packing Types of intersections: Stabbing: Crossing:
53
4c-apx for rectangle packing. Result: 4c -apx Algorithm: Partition the input into c crossing free sets Apply 4 -apx for each and pick the maximum.
54
MIS on axix-parallel rectangles 4-approximation for MIS on axix-parallel rectangles finding x Maximize w·x Subject to: v C x v ≤ 1 C right upper corner Clique x [0,1] |V| e.g. x 1 +x 3 +x 4 ≤ 1 2 1 3 5 4
55
MIS on axix-parallel rectangles 4-approximation for MIS on axix-parallel rectangles finding more relaxed x Maximize w·x Subject to: v C x v ≤ 2 C right segment Cliques x [0,1] |V| e.g. x 1 +x 3 +x 4 +x 5 ≤ 2 2 1 3 5 4
56
Gain 1 integral, lose fractional Gain 1 integral, lose 4 fractional 4-apx for crossing free recangles If v V w(v) 0 return IS(G-v, w) If E= return V Let v V s.t x (N[v]) is minimum and Let = w(v) if i N[v] 1 w 1 (i) = 0 else Claim:w 1 x ≥ ¼ w 1 x for Good(x) (G, w-w 1 ) REC= IS(G, w 2 = w-w 1 ) Induction hyp is: w 2 REC ≥ ¼ w 2 x so if Good(REC): w 1 REC ≥ ¼ w 1 x we are done If REC+v is an independent set then REC=REC+v If REC+v is an independent set then REC=REC+v Return REC Min x (N[v]) 4 0 0 0 0 0
57
Claim: v u N[v] x u ≤ 4 Define a directed graph G(V,E) V = Set of rectangles E = {i j : Rectangle i “right-stubs” rectangle j} Define x ij = x i x j y i + = i j x ij and y i - = j i x ji Thus y i + 2*x i i y i = i y i + + i y i - 2*2 i x i Thus i y i 4 x i and therefore i i-j x j 4 www.cs.technion.ac.il/~reuven IBM2006 57
58
Max IS RECT with demand Admission Control with Advance Reservation in Simple Networks Dror Rawitz 2006 Thin: Color with C colors Each factor 8 12c= fat 4c + thin 8c www.cs.technion.ac.il/~reuven IBM2006 58
59
Thank you ! www.cs.technion.ac.il/~reuven IBM2006 59
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.