The Local-Ratio Technique:The Local-Ratio Technique: Basic definitions 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
The Local-Ratio Theorem:The Local-Ratio Theorem:
x is an r-approximation with respect to p1
x is an r-approximation with respect to p- p1
x is an r-approximation with respect to p
Proof: (For maximization)
p1 · x r × p1*
p2 · x r × p2*
p · x r × ( p1*+ p2*)
r × ( p1 + p2 )*
3
Special case: Optimization is 1-approximationSpecial case: Optimization is 1-approximation
x is an optimum with respect to p1
x is an optimum with respect to p- p1
x is an optimum with respect to p
4
A Local-Ratio Schema for A Local-Ratio Schema for Maximization[Minimization] problems: 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” p1 ;
REC = r-ApproxMax[Min]( S, p- p1 ) ;
If REC is not an r-approximation w.r.t. p1 then “fix it”;
return REC;
5
Maximum Independent Set in Interval GraphsMaximum Independent Set in Interval Graphs
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2
Activity1
time
Maximize s.t. For each instance I:
For each time t:
I
IxIp )( }1,0{Ix
)()(:
1IetIsIIx
6
Maximum Independent Set in Interval Graphs: Maximum Independent Set in Interval Graphs: How to select How to select PP11 to get optimization? to get optimization?
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2
Activity1 Î time
Let Î be an interval that ends first;
1 if I in conflict with Î
For all intervals I define: p1 (I) = 0 else
For every feasible x: p1 ·x 1
Every Î-maximal is optimal.
For every Î-maximal x: p1 ·x 1
P1=1
P1=1
P1=1
P1=1
P1=0
P1=0
P1=0
P1=0
P1=0
7
Maximum Independent Set in Interval Graphs:Maximum Independent Set in Interval Graphs: An Optimization Algorithm An Optimization Algorithm
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2Activity1 Î
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: p1 (I) = p(Î) (I in conflict with Î) ;
IS = MaxIS( S, p- p1 ) ;If IS is Î-maximal then return IS else return IS {Î};
P1=0
P1=0
P1=0
P1=0
P1=0
P1=P(Î )
P1=P(Î )
P1=P(Î )
P1=P(Î )
8
Maximum Independent Set in Interval Graphs:Maximum Independent Set in Interval Graphs: Running Example Running Example
P(I1) = 5 -5
P(I4) = 9 -5 -4
P(I3) = 5 -5
P(I2) = 3 -5
P(I6) = 6 -4 -2
P(I5) = 3 -4
-5 -4 -2
9
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:
I
IxIp )( }1,0{Ix
)()(:
1)(IetIsI
IxIw
1AI
Ix
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
Single Machine Scheduling:Single Machine Scheduling: How to select How to select PP11 to get ½-approximation ? to get ½-approximation ?
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2
Activity1 Î time
Let Î be an interval that ends first;
1 if I in conflict with Î For all intervals I define: p1 (I) =
0 else
For every feasible x: p1 ·x 2
Every Î-maximal is 1/2-approximation
For every Î-maximal x: p1 ·x 1
P1=1P1=1P1=1P1=1
P1=1
P1=1
P1=1
P1=1
P1=1
P1=0
P1=0
P1=0
P1=0
P1=0
P1=0
P1=0
P1=0
P1=0 P1=0
P1=0
11
Single Machine Scheduling:Single Machine Scheduling: The ½-approximation Algorithm The ½-approximation Algorithm
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2Activity1 Î
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: p1 (I) = p(Î) (I in conflict with Î) ;
IS = MaxIS( S, p- p1 ) ;
If IS is Î-maximal then return IS else return IS {Î};
12
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2Activity1 I w(I)
s(I) e(I) time
Maximize s.t. For each instance I:
For each time t:
For each activity A:
BandwidthBandwidth Allocation Allocation
I
IxIp )(
)()(:
1)(IetIsI
IxIw
1AI
Ix
}1,0{Ix
Albers, Arora, Khanna SODA 99: O(1) |Ai|=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
Bandwidth AllocationBandwidth Allocation
Activity 9
Activity 8
Activity 7
Activity 6
Activity 5
Activity 4
Activity 3
Activity 2
Activity 1 time
Bandwidth
time
BandwidthBandwidth Allocation for Allocation for ww 1/2 1/2 How to select How to select PP11 to get 1/3-approximation? 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: p1 (I) = 2*w(I) if I in time conflict with Î
0 else
For every feasible x: p1 ·x 3
Every Î-maximal is 1/3-approximation
For every Î-maximal x: p1 ·x 1
15
BandwidthBandwidth Allocation Allocation The 1/5-approximation for any The 1/5-approximation for any w w 1 1
Activity9Activity8 w > ½ Activity7 w > ½ w > ½Activity6Activity5 w > ½Activity4Activity3 w > ½ w > ½Activity2Activity1 w > ½ w > ½ w > ½
Algorithm:1. GRAY = Find 1/2-approximation for gray (w>1/2) intervals;2. COLORED = Find 1/3-approximation for colored intervals3. Return the one with the larger profitAnalysis:If GRAY* 40%OPT then GRAY 1/2(40%OPT)=20%OPT elseCOLORED* 60%OPT thus COLORED 1/3(60%OPT)=20%OPT
16
17
Single Machine Scheduling with Release and Single Machine Scheduling with Release and DeadlinesDeadlines
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
Single Machine Scheduling with Release and Single Machine Scheduling with Release and DeadlinesDeadlines
Activity 9
Activity 8
Activity 7
Activity 6
Activity 5
Activity 4
Activity 3
Activity 2
Activity 1
Continuous SchedulingContinuous 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 AllocationUma, 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) d(I)
19
If currant p(I1) original p(I1) then delete I1
else Split I2=(s2,e2] to I21=(s2, s1+d1] and I22=(s1+d1,e2]
Continuous Scheduling:Continuous Scheduling: Split and Round Profit Split and Round Profit (Loose additional (1- (Loose additional (1-) factor)) factor)
d(I1)
d(I2)
d(I1)
d(I2)
I11 I12
I21 I22
20
LP RoundingLP Roundingusingusing
Fractional Local RatioFractional Local Ratio
Reuven Bar-Yehuda
www.cs.technion.ac.il/~reuven
www.cs.technion.ac.il/~reuven IBM2006 21
General framework: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 rw·x*
[w·x rw·x* ]
An algorithm is an r-approximation if for any w, F
it returns an r-approximation
15
Min 5xBisli+8xTea+12xWater+10xBamba+20xShampoo+15xPopcorn+6xChocolate
+$4xWaterShampoo+ • • •
s.t. xShampoo + xWater + xWaterShampoo 1
5
812
20
6
10
$4
$1
$3
$1
$1
$2
$1$1
The generalized vertex cover problemThe generalized vertex cover problem
Minimize w·x
Subject to: xu + xv + xe 1 e={u,v} E
x {0,1}|V|+|E|
2-Approx 2-Approx GVC(G,w)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}w11(x) =
0 else
Notice:w1 x 2 w1 x for Good(x)
REC= GVC(G, VC(G, w2= w- w-ww11))
Induction hyp is: w2REC 2 w2x
so if Good(REC): w1REC 2 w1x we are done
If REC-e is a cover thenREC=REC-eIf REC-e is a cover thenREC=REC-e
Return RECReturn REC
““2 integral for the price of 1 fractional”: 2 integral for the price of 1 fractional”: The local ratio technique for roundingThe local ratio technique for rounding
Let x be the the fractional solution
Minimize w·x
Subject to: xu + xv + xe 1 e=(u,v) E
x [0,1]|V|+|E|
““d d integral for the price of integral for the price of ½(d+1) fractional”: fractional”: 2-2/(2-2/(ΔΔ+1)-Approx +1)-Approx GVC(G,w)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 xv is minimum and
Let =min(w(i) : i N[v]}
if i N[v]w11(i) =
0 else
Claim:w1 x rΔ w1 x for Good(x)
REC= GVC(G, VC(G, w2= w- w-ww11))
Induction hyp is: w2REC rΔ w2x
so if Good(REC): w1REC rΔ w1x we are done
If REC is not a minimal cover then make REC minimalIf REC is not a minimal cover then make REC minimal
Return RECReturn REC
Min xv
““d d integral for the price of integral for the price of ½(d+1) fractional”: fractional”: Claim: w1 x rΔ w1 x for Good(x)
Min xv
If Min xv ≥ ½
Then x(N[v]) ≥ ½(d+1)
Else x(N[v]) ≥ ½(d+1)
Thus w1 x ≥ ½(d+1)
But w1 x d
Hence: w1 x/ w1 x 2-2/(d+1)
2-2/(ΔΔ +1) = rΔ
A Generalized Local-Ratio Schema for A Generalized Local-Ratio Schema for M Minimizationinimization [ [MMaximization] problems: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” w1 ; i.e. Good(x): w1 x [] r w1 x
REC = r-ApproxMin [Max](Set, w2 ) ;
Induction hyp is: w2REC [] r w2x
so if Good(REC): w1REC [] r w1x we are done,
otherwise “fix it”; return REC’;
The maximum independent set problemThe maximum independent set problem
Maximize w·x
Subject to: xu + xv ≤ 1 e=(u,v) E
x {0,1}|V|
The maximum independent set problemThe maximum independent set problem “1 integral for the gain of “1 integral for the gain of rr fractional”: fractional”:
Let x be the the fractional solution
Maximize w·x
Subject to: xu + xv ≤ 1 e=(u,v) E
x [0,1]|V|
Gain Gain 11 integral, lose integral, lose ½(d+1) fractional fractional
2/(2/(ΔΔ+1)-Approx +1)-Approx IS(G,w)IS(G,w)If v V w(v) 0 return IS(G-v, w)
If E= return V
Let v V s.t xv is maximum and
Let = w(v)
if i N[v]w11(i) =
0 else
Claim:w1 x ≥rΔ w1 x for Good(x)
REC= IS(G, (G, w2= w- w-ww11))
Induction hyp is: w2REC ≥ rΔ w2x
so if Good(REC): w1REC ≥ rΔ w1x we are done
If REC+v is an independent set then REC=REC+vIf REC+v is an independent set then REC=REC+v
Return RECReturn REC
Max xv
www.cs.technion.ac.il/~reuven IBM2006 32
Gain Gain 11 integral, lose integral, lose ½(d+1) fractional fractional Claim: w1 x ≥ rΔ w1 x for Good(x)
Max xv
If Max xv ≤ ½
Then x(N[v]) ≤ ½(d+1)
Else x (N[v]) ≤ ½(d+1)
Thus w1 x ≤ ½(d+1)
But w1 x ≥
Hens: w1 x/ w1 x ≥ 2/(d+1)
≥ 2/(ΔΔ +1) = rΔ
ÎÎ, and the weight decomposition:, and the weight decomposition:
• Let Î be the interval which ends first.
I in conflict with Î ,
• Define w1(I) = w2= w-w1
0 otherwise,
w1= w1= w1= w1= w1=
w1= w1=
w1= w1=
w1= 0
w1= 0
w1= 0w1= 0
w1= 0w1 = 0
w1= 0w1= 0
w1= 0 w1= 0
w1= 0
time
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2 Activity1
2t-approximation for t- Interval Graphs
finding x
Maximize w·xSubject to: vC xv ≤ 1 C Interval Clique
x [0,1]|V|
e.g. x1+x4+x5 ≤ 1
2t-approximation for t- Interval Graphs
finding more relaxed x
Maximize w·xSubject to: vC xv ≤ t C t-Interval Clique
x [0,1]|V|
e.g. x1+x3+x4+x5 ≤ 3
Gain Gain 11 integral, lose integral, lose 2t fractional fractional
1/(2t1/(2t)-Approx )-Approx IS(G,w)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]w11(i) =
0 else
Claim:w1 x ≥ rt w1 x for Good(x)
REC= IS(G, (G, w2= w- w-ww11))
Induction hyp is: w2REC ≥ rt w2x
so if Good(REC): w1REC ≥ rt w1x we are done
If REC+v is an independent set then REC=REC+vIf REC+v is an independent set then REC=REC+v
Return RECReturn REC
Min x(N[v]) 2t
Gain Gain 11 integral, lose integral, lose 2t fractional fractional Claim: w1 x ≥ rt w1 x for Good(x)
Min x(N[v])
We need to show that (next slide)
x(N[v]) ≤ 2t
Thus w1 x ≤ 2t
But w1 x ≥ 1
Hence: w1 x/ w1 x ≥ /(2t) = rt
Claim: v u N[v] xu
≤ 2t
Define a directed graph G(V,E)
V = Set of t-splits
E = {ij : A right endpoind of i “hits” interval j}
Define xij = xi xj yi+ = ij xij and yi
- = j i xji
Thus yi+ t xi i yi = i yi
+ + i yi- 2t
i xi
Thus i yi 2t xi and therefore i i-j xj 2t
6t-apx for t-Interval Graphs with demands
finding x
Maximize w·xSubject to: vC dv xv ≤ 1 C Interval Clique
x [0,1]|V|
e.g. d1x1+d4x4+d5x5 ≤ 1
t-Interval Graphs with demands
6t = (fat)2t+(thin)4t (Assign zi=dixi )
R.Bar-Yehuda and D. Rawitz. ESA2005 and Discrete Optimization 2006.
MIS on axix-parallel rectangles: 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]
4c-apx
Liane Lewin-Eytan, Joseph (Seffi) Naor, and Ariel Orda1
Admission Control in Networks with Advance Reservations
Algorithmica (2004) 40: 293–304
4c-apx for rectangle packing
.
Result: 4c-apx
Algorithm:Partition the input into c crossing free setsApply 4-apx for each and pick the maximum.
4-approximation for MIS on axix-parallel rectanglesMIS on axix-parallel rectangles
finding x
Maximize w·x
Subject to: vC xv ≤ 1 C right upper corner Clique
x [0,1]|V|
e.g. x1+x3+x4 ≤ 1
2
1
3
5
4
4-approximation for MIS on axix-parallel rectanglesMIS on axix-parallel rectangles
finding more relaxed x
Maximize w·x
Subject to: vC xv ≤ 2 C right segment Cliques
x [0,1]|V|
e.g. x1+x3+x4+x5 ≤ 2
2
1
3
5
4
Gain Gain 11 integral, lose integral, lose 4 fractional fractional4-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]w11(i) =
0 else
Claim:w1 x ≥ ¼ w1 x for Good(x)
REC= IS(G, (G, w2= w- w-ww11))
Induction hyp is: w2REC ≥ ¼ w2x
so if Good(REC): w1REC ≥ ¼ w1x we are done
If REC+v is an independent set then REC=REC+vIf REC+v is an independent set then REC=REC+v
Return RECReturn REC
Min x(N[v]) 4
0
0
0
0
0
Claim: v u N[v] xu
≤ 4
Define a directed graph G(V,E)
V = Set of rectangles
E = {ij : Rectangle i “right-stubs” rectangle j}
Define xij = xi xj yi+ = ij xij and yi
- = j i xji
Thus yi+ 2*xi i yi = i yi
+ + i yi- 2*2
i xi
Thus i yi 4 xi and therefore i i-j xj 4
www.cs.technion.ac.il/~reuven IBM2006 57
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