Title: LR at Haifa 1
1????? ?? ????? ???? ????? ?????? ?????
??????????? ???
- Reuven Bar-Yehuda
- CS Technion IIT
-
- Slides and papers at
- http//www.cs.technion.ac.il/reuven
2Example VC
- Given a graph G(V,E) penalty pv? Z for each v ?
V - Min ? pvxv
- S.t. xv? 0,1
- xv xu ? 1 ?v,u? E
-
3 Linear Programming (LP) Integer
Programming (IP)
-
- Given a profit penalty vector p.
- MaximizeMinimize px
-
- Subject to Linear Constraints F(x)
- IP where x is an integer vector is a constraint
4Example VC
- Given a graph G(V,E) and penalty vector p? Zn
- Minimize px
- Subject to x? 0,1n
- xi xj ? 1 ?i,j? E
-
5Example SC
- Given a Collection S1, S2,,Sn of all subsets of
1,2,3,,m and penalty vector p? Zn - Minimize px
- Subject to x? 0,1n
- ?xi ? 1 ?j1..m
- j? Si
S1
1
2
S2
3
S3
m
Sn
6Example Min Cut
- Given Network N(V,E) s,t ? V and capacity vector
p? ZE - Minimize px
- Subject to x? 0,1E
- ?xe ? 1 ?s?t path P
- e? P
7Example Shortest Path
- Given digraph G(V,E) s,t ? V and length vector p?
ZE - Minimize px
- Subject to x? 0,1E
- ?xe ? 1 ?s?t cut P
- e? P
8Example MST (Minimum Spanning Tree)
- Given graph G(V,E) s,t ? V and length vector p?
ZE - Minimize px
- Subject to x? 0,1E
- ?xe ? 1 ?cut P
- e? P
9Example Minimum Steiner Tree
- Given graph G(V,E) T?V and length vector p? ZE
- Minimize px
- Subject to x? 0,1E
- ?xe ? 1 ?Ts cut P
- e? P
10Example Generalized Steiner Forest
- Given graph G(V,E) T1T1Tk ? V
- and length vector p? ZE
- Min px
- S.t. x? 0,1E
- ?xe ? 1 ?i ?Tis cut P
- e? P
11Example IS (Maximum Independent Set)
- Given a graph G(V,E) and profit vector p? Zn
- Maximaize px
- Subject to x? 0,1n
- xi xj ? 1 ?i,j? E
-
12 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
-
13 The Local-Ratio Technique Basic
definitions
-
- Given a profit penalty vector p.
- Minimize Maximize px
-
- Subject to feasibility constraints F(x)
- x is r-approximation if F(x) and px ? r px
- An algorithm is r-approximation if for any p, F
- it returns an r-approximation
14 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 minimization)
- p1 x ? r p1
- p2 x ? r p2
- ?
- p x ? r ( p1
p2) - ? r ( p1 p2 )
15 Special 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
-
-
-
16 A Local-Ratio Schema for
MinimizationMaximization problems
- Algorithm r-ApproxMinMax( Set, p )
- If Set F then return F
- If ?I ? Set p(I)0 then return I ?
r-ApproxMin( Set-I, p ) - If ? I ? Set p(I) ? 0 then return
r-ApproxMax( Set-I, p ) -
- Define good p1
- REC r-ApproxMaxMin( Set, p- p1 )
- If REC is not an r-approximation w.r.t. p1 then
fix it - return REC
17The Local-Ratio Theorem Applications
- Applications to some optimization algorithms (r
1) - ( MST) Minimum Spanning Tree (Kruskal)
- ( SHORTEST-PATH) s-t Shortest Path (Dijkstra)
- (LONGEST-PATH) s-t DAG Longest Path (Can be
done with dynamic programming) - (INTERVAL-IS) Independents-Set in Interval
Graphs Usually done with dynamic programming) - (LONG-SEQ) Longest (weighted) monotone
subsequence (Can be done with dynamic
programming) - ( MIN_CUT) Minimum Capacity s,t Cut (e.g.
Ford, Dinitz) - Applications to some 2-Approximation algorithms
(r 2) - ( VC) Minimum Vertex Cover (Bar-Yehuda and
Even) - ( FVS) Vertex Feedback Set (Becker and Geiger)
- ( GSF) Generalized Steiner Forest (Williamson,
Goemans, Mihail, and Vazirani) - ( Min 2SAT) Minimum Two-Satisfibility
(Gusfield and Pitt) - ( 2VIP) Two Variable Integer Programming
(Bar-Yehuda and Rawitz) - ( PVC) Partial Vertex Cover (Bar-Yehuda)
- ( GVC) Generalized Vertex Cover (Bar-Yehuda
and Rawitz) - Applications to some other Approximations
- ( SC) Minimum Set Cover (Bar-Yehuda and Even)
- ( PSC) Partial Set Cover (Bar-Yehuda)
- ( MSP) Maximum Set Packing (Arkin and Hasin)
18The creative partfind ?-Effective weights
- p1 is ?-Effective if every feisible solution is
?-approx w.r.t. p1 - i.e. p1 x ? ? p1
- VC (vertex cover)
- Edge
- Matching
- Greedy
- Homogeneous
19VC Recursive implementation (edge by edge)
- VC (V, E, p)
- If E? return ?
- If ? p(v)0 return vVC(V-v, E-E(v), p)
- Let (x,y)?E
- Let ? minp(x), p(y)
- Define p1 (v) ? if vx or vy and 0 otherwise
- Return VC(V, E, p- p1 )
0
0
0
?
?
0
0
0
20VC Iterative implementation (edge by edge)
? ?
- VC (V, E, p)
- for each e ? E
- let ? minp(v) v ? e
- for each v ? e
- p(v) p(v) - ?
- return v p(v)0
0
0
0
?
?
0
0
0
21Min 5xBisli8xTea12xWater10xBamba20xShampoo15x
Popcorn6xChocolate s.t. xShampoo xWater ? 1
15
22Movie1 4 the price of 2
?
23VC Iterative implementation (edge by edge)
? ?
- VC (V, E, p)
- for each e ? E
- let ? minp(v) v ? e
- for each v ? e
- p(v) p(v) - ?
- return v p(v)0
30
15
90
10
50
100
80
2
24VC Greedy ( O(H(?)) - approximation)H(?)1/21/3
1/? O(ln ?)
- Greedy_VC (V, E, p)
- C ?
- while E??
- let varc min p(v)/d(v)
- C C v
- V V v
- return C
n/? n/4 n/3 n/2 n
?
?
25VC LR-Greedy (star by star)
- LR_Greedy_VC (V, E, p)
- C ?
- while E??
- let varc min p(v)/d(v)
- let ? p(v)/d(v)
- C C v
- V V v
- for each u ? N(v)
- p(v) p(v) - ?
- return C
?
?
4?
?
?
26VC LR-Greedy by reducing 2-effective
homogeniousHomogenious all vertices have the
same greedy value
- LR_Greedy_VC (V, E, p)
- C ?
- Repeat
- Let ? Min p(v)/d(v)
- For each v ? V
- p(v) p(v) ? d(v)
- Move from V to C all zero weight vertices
- Remove from V all zero degree vertices
- Until E?
- Return C
3?
4?
6?
4?
5?
3?
3?
2?
27Example MST (Minimum Spanning Tree)
- Given graph G(V,E) s,t ? V and length vector p?
ZE - Minimize px
- Subject to x? 0,1E
- ?xe ? 1 ?cut P
- e? P
28MST Recursive implementation (Homogenious)
- MST (V, E, p)
-
- If V? return ?
- If ? self-loop e return MST(V, E-e, p)
- If ? p(e)0 return eMST(Vshrink(e),
Eshrink(e), p) -
- Let ? minp(e) e?E
- Define p1 (e) ? for all e?E
- Return MST(V, E, p- p1 )
29MST Iterative implementation (Homogenious)
30Some effective weights
VC IS MST S. Path Steiner FVS Min Cut
Edge 2 ? ? ? ? ? ?
Matching 2 ? ? ? ? ? ?
Odd Cycle 2-1/k ? ? ? ? ? ?
Clique (k-1)/k ? ? ? ? ? ?
Star 2 (k1)/2 ? 1 ? ? ?
Homogenious 2 k 1 ? 2 2 ?
Special trik 1