Chapter 8 Local Ratio
description
Transcript of Chapter 8 Local Ratio
![Page 1: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/1.jpg)
Chapter 8 Local Ratio
II. More Example
This ppt is editored from a ppt of Reuven Bar-Yehuda.
Reuven Bar-Yehuda
![Page 2: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/2.jpg)
2
Local Ratio for Scheduling Problems
![Page 3: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/3.jpg)
3
Profit Maximization
![Page 4: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/4.jpg)
4
Maximum Independent Set
.for }1,0{
,),(for 1 subject to
maximize
,tor profit vec a and ),(graph aGiven
Vix
Ejixx
xw
ZwEVG
i
ji
V
![Page 5: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/5.jpg)
5
Applications
• Computer Vision/Pattern Recognition
• Information/Coding Theory
• Map Labeling
• Molecular Biology
• Scheduling
![Page 6: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/6.jpg)
6
Independent Set in Interval Graphs
Activity 9Activity 8Activity 7Activity 6Activity 5Activity 4Activity 3Activity 2Activity 1
• We must schedule jobs on a single processor with no preemption. • Each job may be scheduled in one interval only.• The problem is to select a maximum weight subset of non-conflicting
jobs.
time
![Page 7: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/7.jpg)
7
Independent Set in Interval Graphs
I
IxIp )( }1,0{Ix
)()(:
1IetIsIIx
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2 Activity1
Maximize s.t. For each instance I
For each time t
time
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
![Page 8: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/8.jpg)
8
Maximal Solutions
• We say that a feasible schedule is I-maximal if either it contains instance I, or it does not contain I but adding I to it will render it infeasible.
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2 Activity1
time
I2I1
The schedule above is I1-maximal and also I2-maximal
![Page 9: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/9.jpg)
9
An effective profit function
P1= P(Î)
P1=0
P1=0
P1=0
P1=0
P1=0
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2 Activity1
Let Î be an interval that ends first;
Î
P1= P(Î)
P1= P(Î)
P1= P(Î)
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
negative.) becan )( :(note )()()(
otherwise 0
ˆith conflect win if )ˆ()(
212
1
IpIpIpIp
IIIpIp
![Page 10: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/10.jpg)
10
An effective profit function
P1= P(Î)
P1=0
P1=0
P1=0
P1=0
P1=0
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2 Activity1
Î
P1= P(Î)
P1= P(Î)
P1= P(Î)
For every feasible solution x: p1 ·x p(Î) For every Î-maximal solution x: p1 ·x p(Î)
Every Î-maximal is optimal.
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
![Page 11: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/11.jpg)
11
Independent Set in Interval Graphs:An Optimization Algorithm
Algorithm MaxIS( S, p )1. If S = Φ then return Φ ;2. If I S p(I) 0 then return MaxIS( S - {I}, p);3. Let Î S that ends first;4. I S define: p1 (I) = p(Î) (I in conflict with Î) ;5. IS = MaxIS( S, p- p1 ) ;6. If IS is Î-maximal then return IS else return IS {Î};
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
![Page 12: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/12.jpg)
12
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
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
![Page 13: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/13.jpg)
13
• Each job consists of a finite collection of time intervals during which it may be scheduled.
• The problem is to select a maximum weight subset of non-conflicting intervals, at most one interval for each job.
Activity 9Activity 8Activity 7Activity 6Activity 5Activity 4Activity 3Activity 2Activity 1
time
Interval Scheduling
![Page 14: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/14.jpg)
14
Single Machine Scheduling with Release and Deadlines
Activity 9Activity 8Activity 7Activity 6Activity 5Activity 4Activity 3Activity 2Activity 1
Each job has a time window within which it can be processed.
time
![Page 15: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/15.jpg)
15
Single Machine Scheduling with Release and Deadlines
Activity 9Activity 8Activity 7Activity 6Activity 5Activity 4Activity 3Activity 2Activity 1
![Page 16: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/16.jpg)
16
Single machine scheduling
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2 Activity1
I
IxIp )( }1,0{Ix
)()(:
1IetIsIIx
Maximize s.t. For each instance I
For each time t
1AI
Ix For each activity A
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
![Page 17: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/17.jpg)
17
A ½-effective profit function
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
Let Î be an interval that ends first;
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2 Activity1
Î
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
negative.) becan )( :(note )()()(
otherwise 0
ˆith conflect win if )ˆ()(
212
1
IpIpIpIp
IIIpIp
![Page 18: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/18.jpg)
18
A ½-effective profit function
For every feasible solution x: p1 ·x 2 p(Î) For every Î-maximal solution x: p1 ·x p(Î)
Every Î-maximal is ½-effective.
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
Activity9Activity8Activity7Activity6Activity5Activity4Activity3Activity2 Activity1
Î
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
![Page 19: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/19.jpg)
19
Single Machine Scheduling with Release and Deadlines
Activity 9Activity 8Activity 7Activity 6Activity 5Activity 4Activity 3Activity 2Activity 1
![Page 20: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/20.jpg)
20
Bandwidth Allocation
Activity 9Activity 8Activity 7Activity 6Activity 5Activity 4Activity 3Activity 2Activity 1
time
IIxIp )( }1,0{IxMaximize s.t. For each instance I
For each time t
1AI
Ix For each activity A
)()(:
1)(IetIsI
IxIw
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
![Page 21: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/21.jpg)
21
Bandwidth Allocation
Activity 9Activity 8Activity 7Activity 6Activity 5Activity 4Activity 3Activity 2Activity 1
time
Bandwidth
time
![Page 22: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/22.jpg)
22
Outline of the algorithm
To approximate this problem, we first consider the following two special cases.
Case Case 11. All instances are wide, that is, w(I ) > 1/2 for all I .Case Case 22. All activity instances are narrow, that is, w(I ) ≤ 1/2 for all I .
In the case of wide instances, the problem reduces to interval scheduling since no pair of intersecting instances may bescheduled together. Thus, we can use Algorithm MaxIS to find a 1/2-approximate schedule. In the case of narrow instances, we find a 1/3-approximate schedule by a variant of MaxIS as described in the following.
![Page 23: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/23.jpg)
23
An effective profit function for w ≤ 1/2
Activity 9Activity 8Activity 7Activity 6Activity 5Activity 4Activity 3Activity 2Activity 1
Î
Let Î be an interval that ends first;
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
negative.) becan )( :(note )()()(
otherwise 0
ˆith activity w same in the if )ˆ(
ˆ with conflects if )ˆ(2
)(
212
1
IpIpIpIp
IIIp
IIIp
Ip
![Page 24: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/24.jpg)
24
An effective profit function for w ≤ 1/2
For every feasible solution x: p1 ·x 3 p(Î) For every Î-maximal solution x: p1 ·x p(Î)
Every Î-maximal is 1/3-effective.
negative.) becan )( :(note )()()(
otherwise 0
ˆith activity w same in the if )ˆ(
ˆ with conflects if )ˆ(2
)(
212
1
IpIpIpIp
IIIp
IIIp
Ip
![Page 25: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/25.jpg)
25
Bandwidth Allocation The 5-approximation for any w 1
Algorithm:GRAY = Find 1/2-approximation for gray (w>1/2) intervals;COLORED = Find 1/3-approximation for colored intervalsReturn 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
w > ½
w > ½
w > ½
w > ½
w > ½ w > ½
w > ½
w > ½ w > ½
Slide from http://www.cs.technion.ac.il/~reuven/STOC2000.ppt
![Page 26: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/26.jpg)
26
The Local Ratio Technique– 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 :
….
Slide from http://www.cs.technion.ac.il/~reuven/APPROX-SEMINAR/spr06/LR.ppt
![Page 27: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/27.jpg)
27
“Standard” Local Ratio
• The standard local ratio approach is to use a weight decomposition that guarantees that the solution constructed by the algorithm will be r-approximate with respect to w1.
• The analysis consists of comparing, at each level of the recursion, the solution found in that level, and an optimal solution for the problem instance passed to that level, where the comparison is made with respect to w1 and with respect to w2.
• Thus, in each level of the recursion, there are potentially two optima (one with respect to w1, and one with respect to w2) against which the solution is compared, and in addition, different optima are used at different recursion levels.
![Page 28: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/28.jpg)
28
Fractional Local Ratio Theorem(for maximization problems)
Let w = w1 + w2 . Let x∗ and x be solutions such that x is r-approximate relative to x∗ with respect to w1, and with respect to w2. Then, x is r-approximate relative to x∗ with respect to w as well.
Note that the theorem holds even when negative weights are allowed.
PROOF:F w1(x) ¸ r ¢w1(x¤)F w2(x) ¸ r ¢w2(x¤)
! w(x) = w1(x) +w2(x) ¸ r ¢w(x¤)
![Page 29: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/29.jpg)
![Page 30: Chapter 8 Local Ratio](https://reader035.fdocuments.net/reader035/viewer/2022062408/56813a1c550346895da1f657/html5/thumbnails/30.jpg)