Download presentation
Presentation is loading. Please wait.
Published byHartono Suharto Tanudjaja Modified over 6 years ago
1
Seminar 236813: Approximation algorithms for LP/IP optimization problems
Reuven Bar-Yehuda Technion IIT Slides and papers at:
2
Example VC Given a graph G=(V,E) penalty pv Z for each v V
Min pv·xv S.t.: xv {0,1} xv + xu 1 {v,u} E
3
Linear Programming (LP) Integer Programming (IP)
Given a profit [penalty] vector p. Maximize[Minimize] p·x Subject to: Linear Constraints F(x) IP: where “x is an integer vector” is a constraints
4
Example VC Given a graph G=(V,E) and penalty vector p Zn Minimize p·x
Subject to: x {0,1}n xi + xj 1 {i,j} E
5
Example SC Given a Collection S1, S2,…,Sn of all subsetsof {1,2,3,…,m} and penalty vector p Zn Minimize p·x Subject to: x {0,1}n xi 1 j=1..m j Si
6
Example Min Cut Given Network N(V,E) s,t V and capasity vector p Z|E| Minimize p·x Subject to: x {0,1}|E| xe st path P e P
7
Example Min Path Given digraph G(V,E) s,t V and length vector p Z|E| Minimize p·x Subject to: x {0,1}|E| xe st cut P e P
8
Example MST (Minimum Spanning Tree)
Given graph G(V,E) and length vector p Z|E| Minimize p·x Subject to: x {0,1}|E| xe cut P e P
9
Example Minimum Steiner Tree
Given graph G(V,E) TV and length vector p Z|E| Minimize p·x Subject to: x {0,1}|E| xe T’s cut P e P
10
Example Generalized Steiner Forest
Given graph G(V,E) T1T1…Tk V and length vector p Z|E| Min p·x S.t.: x {0,1}|E| xe 1 i Ti’s cut P e P
11
Example IS (Maximum Independent Set)
Given a graph G=(V,E) and profit vector p Zn Maximaize p·x Subject to: x {0,1}n 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 penalty [profit] vector p. Minimize [Maximize] 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
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
The Local-Ratio Theorem: (Proof2)
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 Proof2: (For minimization) Let x*, x1*, x2* be optimal solutions for p, p1, p2 respectively p1 · x r × p1 x1* p2 · x r × p2x2* p · x r × ( p1 x1*+ p2x2* ) r × ( p1x*, + p2 x*) = px*
16
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
17
A Local-Ratio Schema for Minimization[Maximization] problems:
Algorithm r-ApproxMin[Max]( Set, p ) If Set = Φ then return Φ ; 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-ApproxMax[Min]( Set, p- p1 ) ; If REC is not an r-approximation w.r.t. p1 then “fix it”; return REC;
18
The 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) Applications Resource Allocation and Scheduling : ….
19
The creative part… find -Effective weights
p1 is -Effective if every feasible solution is -approx w.r.t. p1 i.e. p1 ·x p1* VC (vertex cover) Edge Matching Greedy Homogenious
20
VC: Recursive implementation (edge by edge)
VC (V, E, p) If E= return ; If p(v)=0 return {v}+VC(V-{v}, E-E(v), p); Let (x,y)E; Let = min{p(x), p(y)}; Define p1 (v) = if v=x or v=y and 0 otherwise; Return VC(V, E, p- p1 )
21
VC: Iterative implementation (edge by edge)
VC (V, E, p) for each e E; let = min{p(v)| v e}; for each v e p(v) = p(v) - ; return {v| p(v)=0};
22
Min 5xBisli+8xTea+12xWater+10xBamba+20xShampoo+15xPopcorn+6xChocolate
s.t. xShampoo + xWater 1 5 8 12 20 6 10 15
23
Movie: 1 4 the price of 2
24
VC: Iterative implementation (edge by edge)
VC (V, E, p) for each e E; let = min{p(v)| v e}; for each v e p(v) = p(v) - ; return {v| p(v)=0}; 30 15 90 10 50 100 80 2
25
VC: Iterative implementation (edge by edge)
BarYehuda+Even 81 (V, E, p) for each e E; let = min{p(v)| v e}; for each v e p(v) = p(v) - ; return {v| p(v)=0}; 30 -10 -10 15 90 10 50 100 80 2
26
VC: Iterative implementation (edge by edge)
BarYehuda+Even 81 (V, E, p) for each e E; let = min{p(v)| v e}; for each v e p(v) = p(v) - ; return {v| p(v)=0}; 30 15 80 50 100 80 2
27
VC: Iterative implementation (edge by edge)
BarYehuda+Even 81 (V, E, p) for each e E; let = min{p(v)| v e}; for each v e p(v) = p(v) - ; return {v| p(v)=0}; 30 -80 15 80 -80 50 100 80 2
28
VC: Iterative implementation (edge by edge)
BarYehuda+Even 81 (V, E, p) for each e E; let = min{p(v)| v e}; for each v e p(v) = p(v) - ; return {v| p(v)=0}; 30 15 50 20 80 2
29
VC: Iterative implementation (edge by edge)
BarYehuda+Even 81 (V, E, p) for each e E; let = min{p(v)| v e}; for each v e p(v) = p(v) - ; return {v| p(v)=0}; 30 15 -50 -50 50 20 80 2
30
VC: Iterative implementation (edge by edge)
BarYehuda+Even 81 (V, E, p) for each e E; let = min{p(v)| v e}; for each v e p(v) = p(v) - ; return {v| p(v)=0}; 30 15 20 30 2
31
VC: Iterative implementation (edge by edge)
BarYehuda+Even 81 (V, E, p) for each e E; let = min{p(v)| v e}; for each v e p(v) = p(v) - ; return {v| p(v)=0}; -15 30 -15 15 20 30 2
32
VC: Iterative implementation (edge by edge)
BarYehuda+Even 81 (V, E, p) for each e E; let = min{p(v)| v e}; for each v e p(v) = p(v) - ; return {v| p(v)=0}; 15 20 30 2
33
VC: Greedy ( O(H()) - approximation) H()=1/2+1/3+…+1/ = O(ln )
Greedy_VC (V, E, p) C = ; while E let v=arc min p(v)/d(v) C = C + {v}; V = V – {v}; return C; n/ n/4 n/3 n/2 n … …
34
VC: LR-Greedy (star by star)
LR_Greedy_VC (V, E, p) C = ; while E let v=arc 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
35
VC: LR-Greedy by reducing 2-effective homogenious Homogenious = 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 3 5 3 2
36
Some effective weights
VC IS MST S. Path Steiner FVS Min Cut Edge 2 Matching Cycle 2-1/k Clique (k-1)/k Star (k+1)/2 1 Homogenious k Special trik
37
מסלול זול ביותר בין 2 ערים ST Shotest path
23 E 9 S 18 14 2 6 B G 30 19 11 F 5 6 15 20 16 T C 44 distance label
38
מסלול זול ביותר בין 2 ערים ST Shotest path
23 E 9 S 18 14 2 6 B G 30 19 11 F 5 6 15 20 16 T C 44 distance label
39
מסלול זול ביותר בין 2 ערים ST Shotest path
23 E 9 S 18 14 2 6 B G 30 19 11 F 5 6 15 20 16 T C 44 distance label
40
מסלול זול ביותר בין 2 ערים ST Shotest path
$14 + $30 + $16 = $60 A 23 E 9 S 18 14 2 6 B G 30 19 11 F 5 6 15 20 16 T C 44 distance label
41
מסלול זול ביותר בין 2 ערים ST Shotest path
$15+ $44 = $59 A 23 E 9 S 18 14 2 6 B G 30 19 11 F 5 6 15 20 16 T C 44 distance label
42
מסלול זול ביותר בין 2 ערים ST Shotest path
$9 + $23 + $19 = $61 A 23 E 9 S 18 14 2 6 B G 30 19 11 F 5 6 15 20 16 T C 44 distance label
43
מסלול זול ביותר בין 2 ערים ST Shotest path
$14 + $18 + $2 + $16 = $50 A 23 E 9 S 18 14 2 6 B G 30 19 11 F 5 6 15 20 16 T C 44 distance label
44
אפשרות טריביאלית: כולם אפסים! יש עוד ?...
מסלול זול ביותר בין 2 ערים לאיזה מערכת מחירים כל המסלולי הם אופטימאליים? אפשרות טריביאלית: כולם אפסים! יש עוד ?... A E S B G F T C distance label
45
מסלול זול ביותר בין 2 ערים לאיזה מערכת מחירים כל המסלולים הם אופטימאליים?
אפשרות טריביאלית: כולם אפסים! יש עוד ?... כן! הכבישים היוצאים מהמקור מחיר אחיד (ולכל השאר 0) A E 1 S 1 B G F 1 T C distance label
46
מסלול זול ביותר בין 2 ערים לאיזה מערכת מחירים כל המסלולים הם אופטימאליים?
אפשרות טריביאלית: כולם אפסים! יש עוד ?... כן! הכבישים היוצאים מהמקור מחיר אחיד (ולכל השאר 0), יש עוד?? A E S B G F T C distance label
47
+ מסלול זול ביותר בין 2 ערים לאיזה מערכת מחירים כל המסלולים הם אופטימאליים? הצעה: הכבישים היוצאים מהמקור מחיר אחיד הכבישים הנכנסים למטרה מחיר אחיד (ולכל השאר 0) וכביש ישיר? A E S B G F T C distance label
48
ונחזור למערך מחירים המקורי
ונחזור למערך מחירים המקורי... רוצים לעשות "מבצע הנחות" כך שלכל המסלולים תתקבל אותה הנחה $14 -$1+ $18 + $2 + $16 = $50-$1 A 23 E 9-1=8 S 18 14-1=13 2 6 B G 30 19 11 F 15-1=14 5 6 20 16 T C 44 distance label
49
כל המסלולים הוזלו ב 9$ כולל האופטימאלי, לכן מציאת מסלול "כחול" מינימום שקול לבעיה המקורית
למה לא יותר? $14 -$9+ $18 + $2 + $16 = $50-$9 = $41 A 23 E 9-9=0 S 18 14-9=5 2 6 B G 30 19 11 F 15-9=6 5 6 20 16 T C 44 distance label
50
$5 (+$9)+ $18 + $2 + $16 = $41 (+$9) מה עושים עם כביש חינם? A 23 E
9-9=0 S 18 14-9=5 2 6 B G 30 19 11 15-9=6 F 5 6 20 16 T C 44 distance label
51
והבעיה החדשה... ונמשיך באותה שיטה: מבצע הנחות של 5$
$5 (+$9)+ $18 + $2 + $16 = $41 (+$9) A 23 E 9-9=0 S 18 14-9=5 2 6 B G 30 19 11 15-9=6 F 5 6 20 16 T C 44 distance label
52
והבעיה החדשה... ונמשיך באותה שיטה: מבצע הנחות של 5$
$5-$5 (+$9)+ $18 + $2 + $16 = $41-$5 (+$9) A 23-5=18 E S 5-5=0 18 2 6 B G 30 19 11 F 5 6-5=1 6 20 16 T C 44 distance label
53
ושוב... מה עושים עם כביש חינם?
$5-$5 (+$9)+ $18 + $2 + $16 = $41-$5 (+$9) A 23-5=18 E S 5-5=0 18 2 6 B G 30 19 11 F 5 6 20 16 6-5=1 T C 44 distance label
54
וכן הלאה.. (קיבלנו והוכחנו את האלגוריתם של דיקסטרה)
$5(+$14)+ $18 + $2 + $16 = $36(+$14) A 23-5=18 E S Water Spreading 5-5=0 18 2 6 B G 30 19 11 F 5 6 20 16 6-5=1 T C 44 distance label
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.