www cs technion ac ilreuven A Unified Approach

  • Slides: 28
Download presentation
www. cs. technion. ac. il/~reuven A Unified Approach to Approximating Resource Allocation and Scheduling

www. cs. technion. ac. il/~reuven A Unified Approach to Approximating Resource Allocation and Scheduling Amotz Bar-Noy. ……. . . AT&T and Tel Aviv University Reuven Bar-Yehuda…. Technion IIT Ari Freund……………Technion IIT Seffi Naor……………. Bell Labs and Technion IIT Baruch Schieber…. . . …IBM T. J. Watson Slides and paper at: http: //www. cs. technion. ac. il/~reuven 1

www. cs. technion. ac. il/~reuven 2 Summery of Results: Discrete Single Machine Scheduling Bar-Noy,

www. cs. technion. ac. il/~reuven 2 Summery of Results: Discrete Single Machine Scheduling Bar-Noy, Guha, Naor and Schieber STOC 99: 1/2 Non Combinatorial* Berman, Das. Gupta, STOC 00: 1/2 This Talk, STOC 00(Independent) 1/2 Bandwidth Allocation Albers, Arora, Khanna SODA 99: O(1) for |Activityi|=1* Uma, Phillips, Wein SODA 00: 1/4 Non combinatorial. This Talk STOC 00 (Independent) 1/3 for w 1/2 This Talk STOC 00 (Independent) 1/5 for w 1 Parallel Unrelated Machines: Bar-Noy, Guha, Naor and Schieber STOC 99: 1/3 Berman, Das. Gupta STOC 00: 1/2 This Talk, STOC 00(Independent) 1/2

www. cs. technion. ac. il/~reuven Summery of Results: Continuous Single Machine Scheduling Bar-Noy, Guha,

www. cs. technion. ac. il/~reuven Summery of Results: Continuous Single Machine Scheduling Bar-Noy, Guha, Naor and Schieber STOC 99: 1/3 Non Combinatorial Berman, Das. Gupta 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 Parallel unrelated machines: Bar-Noy, Guha, Naor and Schieber STOC 99: 1/4 Berman, Das. Gupta STOC 00: 1/2·(1 - ) This Talk, STOC 00: (Independent) 1/2·(1 - ) 3

www. cs. technion. ac. il/~reuven 4 Summery of Results: and more… General Off-line Caching

www. cs. technion. ac. il/~reuven 4 Summery of Results: and more… General Off-line Caching Problem Albers, Arora, Khanna SODA 99: O(1) Cache_Size += O(Largest_Page) O(log(Cache_Size+Max_Page_Penalty)) This Talk, STOC 00: 4 Ring topology: Transformation of approx ratio from line to ring topology 1/ 1/( +1+ ) Dynamic storage allocation (contiguous allocation): Previous results: none for throughput maximization Previous results Kierstead 91 for resource minimization: 6 This paper: 1/35 for throughput max using the result for resource min.

www. cs. technion. ac. il/~reuven The Local-Ratio Technique: Basic definitions Given a profit [penalty]

www. cs. technion. ac. il/~reuven 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 5

www. cs. technion. ac. il/~reuven The Local-Ratio Theorem: x is an r-approximation with respect

www. cs. technion. ac. il/~reuven 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 )* 6

www. cs. technion. ac. il/~reuven Special case: Optimization is 1 -approximation x is an

www. cs. technion. ac. il/~reuven 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 7

 A Local-Ratio Schema for Maximization[Minimization] problems: www. cs. technion. ac. il/~reuven 8 Algorithm

A Local-Ratio Schema for Maximization[Minimization] problems: www. cs. technion. ac. il/~reuven 8 Algorithm r-Approx. Max[Min]( Set, p ) If Set = Φ then return Φ ; If I Set p(I) 0 then return r-Approx. Max( Set-{I}, p ) ; [If I Set p(I)=0 then return {I} r-Approx. Min( Set-{I}, p ) ; ] Define “good” p 1 ; REC = r-Approx. Max[Min]( S, p- p 1 ) ; If REC is not an r-approximation w. r. t. p 1 then “fix it”; return REC;

www. cs. technion. ac. il/~reuven The Local-Ratio Theorem: Applications to some optimization algorithms (r

www. cs. technion. ac. il/~reuven The Local-Ratio Theorem: 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 2 SAT) Minimum Two-Satisfibility (Gusfield and Pitt) ( 2 VIP) 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 : …. 9

www. cs. technion. ac. il/~reuven Maximum Independent Set in Interval Graphs Activity 9 Activity

www. cs. technion. ac. il/~reuven Maximum Independent Set in Interval Graphs Activity 9 Activity 8 Activity 7 Activity 6 Activity 5 Activity 4 Activity 3 Activity 2 Activity 1 time Maximize s. t. For each instance I: For each time t: 10

 Maximum Independent Set in Interval Graphs: How to select P 1 to get

Maximum Independent Set in Interval Graphs: How to select P 1 to get optimization? www. cs. technion. ac. il/~reuven P =0 1 Activity 9 P 1=1 Activity 8 P 1=0 Activity 7 P 1=0 Activity 6 P 1=0 Activity 5 P 1=1 Activity 4 P 1=0 Activity 3 P 1=1 Activity 2 P 1=1 Activity 1 Î 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 11

 Maximum Independent Set in Interval Graphs: An Optimization Algorithm www. cs. technion. ac.

Maximum Independent Set in Interval Graphs: An Optimization Algorithm www. cs. technion. ac. il/~reuven P 1=P(Î ) Activity 9 P 1=0 Activity 8 P 1=0 Activity 7 P 1=0 Activity 6 P 1=0 Activity 5 P 1=P(Î ) Activity 4 P 1=0 Activity 3 P 1=P(Î ) Activity 2 P 1=P(Î ) Activity 1 Î time Algorithm Max. IS( S, p ) If S = Φ then return Φ ; If I S p(I) 0 then return Max. IS( S - {I}, p); Let Î S that ends first; I S define: p 1 (I) = p(Î) (I in conflict with Î) ; IS = Max. IS( S, p- p 1 ) ; If IS is Î-maximal then return IS else return IS {Î}; 12

www. cs. technion. ac. il/~reuven Maximum Independent Set in Interval Graphs: Running Example P(I

www. cs. technion. ac. il/~reuven Maximum Independent Set in Interval Graphs: Running Example P(I 5) = 3 -4 P(I 6) = 6 -4 -2 P(I 3) = 5 -5 P(I 2) = 3 -5 P(I 1) = 5 -5 P(I 4) = 9 -5 -4 -2 13

 Single Machine Scheduling : www. cs. technion. ac. il/~reuven Bar-Noy, Guha, Naor and

Single Machine Scheduling : www. cs. technion. ac. il/~reuven Bar-Noy, Guha, Naor and Schieber STOC 99: 1/2 LP Berman, Das. Gupta, STOC 00: 1/2 This Talk, STOC 00(Independent) 1/2 Activity 9 Activity 8 Activity 7 Activity 6 Activity 5 Activity 4 Activity 3 Activity 2 Activity 1 ? ? ? ? time Maximize s. t. For each instance I: For each time t: For each activity A: 14

 Single Machine Scheduling: How to select P 1 to get ½-approximation ? www.

Single Machine Scheduling: How to select P 1 to get ½-approximation ? www. cs. technion. ac. il/~reuven P =1 15 P =0 1 1 Activity 9 P 1=0 P 1=1 Activity 8 P 1=0 Activity 7 P 1=0 Activity 6 P 1=0 Activity 5 P 1=1 P 1=0 Activity 4 P 1=1 P 1=0 Activity 3 P 1=0 P 1=1 Activity 2 P 1=1 Activity 1 Î 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

 Single Machine Scheduling: The ½-approximation Algorithm www. cs. technion. ac. il/~reuven Activity 9

Single Machine Scheduling: The ½-approximation Algorithm www. cs. technion. ac. il/~reuven Activity 9 Activity 8 Activity 7 Activity 6 Activity 5 Activity 4 Activity 3 Activity 2 Activity 1 Î time Algorithm Max. IS( S, p ) If S = Φ then return Φ ; If I S p(I) 0 then return Max. IS( S - {I}, p); Let Î S that ends first; I S define: p 1 (I) = p(Î) (I in conflict with Î) ; IS = Max. IS( S, p- p 1 ) ; If IS is Î-maximal then return IS else return IS {Î}; 16

 Bandwidth Allocation Activity 9 Activity 8 Activity 7 Activity 6 Activity 5 Activity

Bandwidth Allocation Activity 9 Activity 8 Activity 7 Activity 6 Activity 5 Activity 4 Activity 3 Activity 2 Activity 1 I www. cs. technion. ac. il/~reuven 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 w(I) s(I) e(I) time Maximize s. t. For each instance I: For each time t: For each activity A: 17

www. cs. technion. ac. il/~reuven 18 Bandwidth Allocation for w 1/2 How to select

www. cs. technion. ac. il/~reuven 18 Bandwidth Allocation for w 1/2 How to select P 1 to get 1/3 -approximation? Activity 9 Activity 8 Î Activity 7 Activity 6 Activity 5 Activity 4 Activity 3 Activity 2 Activity 1 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

www. cs. technion. ac. il/~reuven Bandwidth Allocation The 1/5 -approximation for any w 1

www. cs. technion. ac. il/~reuven Bandwidth Allocation The 1/5 -approximation for any w 1 Activity 9 Activity 8 w > ½ Activity 7 w > ½ w > ½ Activity 6 Activity 5 w > ½ Activity 4 Activity 3 w > ½ Activity 2 Activity 1 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 19

www. cs. technion. ac. il/~reuven Continuous Scheduling { w(I) d(I) s(I) e(I) Single Machine

www. cs. technion. ac. il/~reuven Continuous Scheduling { w(I) d(I) s(I) e(I) Single Machine Scheduling (w=1) Bar-Noy, Guha, Naor and Schieber STOC 99: 1/3 Non Combinatorial Berman, Das. Gupta 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 20

 Continuous Scheduling: Split and Round Profit (Loose additional (1 - ) factor) www.

Continuous Scheduling: Split and Round Profit (Loose additional (1 - ) factor) www. cs. technion. ac. il/~reuven d(I 1) d(I 2) 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] I 11 I 12 d(I 1) I 21 I 22 d(I 2) 21

www. cs. technion. ac. il/~reuven Minimization problem: General Off-line Caching Problem 22

www. cs. technion. ac. il/~reuven Minimization problem: General Off-line Caching Problem 22

www. cs. technion. ac. il/~reuven The Demand Scheduling Problem Resource 0. 9 0. 8

www. cs. technion. ac. il/~reuven The Demand Scheduling Problem Resource 0. 9 0. 8 0. 7 0. 6 0. 5 0. 4 0. 3 0. 2 w(I) 0. 1 0. 0 Minimize s. t. For each instance I: For each time t: 23

www. cs. technion. ac. il/~reuven 24 Special Case: “Min Knapsack” Demand = 1 For

www. cs. technion. ac. il/~reuven 24 Special Case: “Min Knapsack” Demand = 1 For all intervals I define: p 1 (I) = Min {w(I), 1} For every feasible x: p 1 ·x 1 minimal is 2 -approximation For every minimal x: p 1 ·x 2

www. cs. technion. ac. il/~reuven 25 From Knapsack to Demand Scheduling max demand=1 at

www. cs. technion. ac. il/~reuven 25 From Knapsack to Demand Scheduling max demand=1 at time t’ For all intervals I intersecting time t’ define: p 1 (I) = Min {w(I), 1} p 1 (others) = 0 p 1 (all “right-minimal”) is at most 2 p 1 (all “left-minimal”) is at most 2 For every minimal x: p 1 ·x 2+2 For every feasible x: p 1 ·x 1 Every minimal is 4 -approximation

www. cs. technion. ac. il/~reuven General Off-line Caching Problem Albers, Arora, Khanna SODA 99:

www. cs. technion. ac. il/~reuven General Off-line Caching Problem Albers, Arora, Khanna SODA 99: O(1) Cache_Size += O(Largest_Page) O(log(Cache_Size+Max_Page_Penalty)) This Talk 4 26 0. 9 0. 8 w(page 2)=0. 7 0. 6 w(page 1)=0. 5 0. 4 w(page 3)=0. 3 0. 2 0. 1 0. 0 page 1 page 2 page 3 page 1 page 3 page 2 page 3 w(pagei) = size of pagei p(pagei) = the reload cost of the page

www. cs. technion. ac. il/~reuven 4 -Approximation for Demand Scheduling Algorithm Min. Demand. Cover(

www. cs. technion. ac. il/~reuven 4 -Approximation for Demand Scheduling Algorithm Min. Demand. Cover( S, p ) If S = Φ then return Φ ; If there exists an interval I S s. t. p(I) = 0 ; then return {I}+Min. Demand. Cover( S - {I}, p) ; Let t’ be the time with maximum demand k; Let S’ be the set of instances intersects time t ; Let δ = MIN {p(I)/w(I) : I S’} ; MIN {w(I) , k} if I S’ For all intervals I S define: p 1 (I) = δ × 0 else C = Min. Demand. Cover( S, p- p 1 ) ; Remove elements form C until it is minimal and return C ; 27

www. cs. technion. ac. il/~reuven Application: 4 -Approximation for the Loss Minimization Problem Resource

www. cs. technion. ac. il/~reuven Application: 4 -Approximation for the Loss Minimization Problem Resource The cost of a schedule is the sum of profits of instances not in the schedule. For the special case where Ai is a singleton {Ii} the problem is equivalent to the Min Demand Scheduling where: 28