Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Scheduling Conflicting Jobs: Problems and Techniques Guy Kortsarz, Rutgers University, Camden.

Similar presentations


Presentation on theme: "1 Scheduling Conflicting Jobs: Problems and Techniques Guy Kortsarz, Rutgers University, Camden."— Presentation transcript:

1 1 Scheduling Conflicting Jobs: Problems and Techniques Guy Kortsarz, Rutgers University, Camden

2 2 Scheduling dependent jobs Jobs compete on resources Create a graph. Each job is a vertex. Two vertices are adjacent if dependent Two possibilities: Single unit jobs Jobs that require more than one unit of processing Two conflicting jobs can not be executed at the same time unit

3 3 Relation of single units jobs to graph coloring Given a graph G, find a mapping  :V  N so that if  (v)=  (u) then uv  E Objective, usually, is to minimize the number of colors used. Classic applications: Timetabling, frequency allocation

4 4 Multicoloring bipartite graphs 2 3 2 1 4 4

5 5 2 3 2 1 4 4

6 6 Formal definition of the multicoloring problem Input: Graph G=(V,E), with lengths x(v) on the vertices Output: An assignment  :V  2 N such that adjacent vertices do not receive overlapping times.  (v)  (u)   implies that uv  E Goal: minimize the maximum integer: Minimize Max u  V { f  (u) } f  (u)- The largest color of u.

7 7 Multicoloring is often easy 6-clique More generally, chordal graphs, even perfect, are no harder to multicolor than to color. Maybe one reason why multicolorings are not more common.

8 8 Some other objectives than makespan (= number of colors) Sum of completion times of jobs –For each vertex, count the last time unit assigned, and sum these values up Weighted sum of completion times –Vertices additionally have importance value attached Total lateness –Assumes deadline for each task Sum of flow times –Assumes release time of each job

9 9 “Sum of completion times” in Graph coloring? Recall we color with numbers,  :V  N Sum of a coloring = Sum of the values assigned to the vertices Sum coloring problem: –Find a coloring that minimizes the chromatic sum, This measure is more favorable to the users (as a whole), while the makespan is desired by the system (machines)

10 10 The Sum Multicoloring problem  Each vertex v  V requires x(v)  1 distinct colors.  A proper coloring of G is a function Ψ: V → 2 , such that adjacent vertices are assigned distinct sets of numbers (colors). Let f Ψ (v) denote the maximum color assigned to v by Ψ.  The sum multicoloring (SMC) problem: find a multicoloring Ψ that minimizes  v  V f Ψ (v). The preemptive model (pSMC): each vertex can get any set of colors. The no-preemption model (npSMC): assign to each vertex a contiguous set of colors.

11 11 Is “Sum coloring” any different from ordinary coloring? 1211 1 2 3 YES!

12 12 Ok, isn’t at least the sum of an ordinary coloring “good enough”? Any 3-coloring has sum of 2n...... while a certain 4-coloring has sum of n+6 Factor k for k- chromatic graphs.

13 13 Applications Wire minimization in VLSI design; The conflict graph is an interval graph Train scheduling; Permutation graphs Minimizing distance in storage allocation; Interval graphs Session scheduling in path arrays Biprocessor scheduling; Line graphs Data migration; Line graphs Dynamic storage allocation; Interval graph Open shop scheduling; Line graphs of bipartite graphs

14 14 Some interesting results in sum coloring; Upper bounds NP-hard on planar graphs, but approximation scheme (PTAS) exists. Halldorsson, K. Bipartite graphs: 27/26 approximation. The following problem is polynomial: Color the vertices by 3 colors, so that the sum is minimized but the third color-class may not be an independent set. M. Malafiejski, K. Giaro, R. Janczewski and M. Kubale Approximable within factor 4, with an oracle for Max Independent Set It was well known that produces O(log n)  colors Bar-Noy, Bellare, Halldorsson, Schachnai,Shapira

15 15 Some hardness results APX-hard on bipartite graphs. [Bar-Noy, K. 98] Sum coloring is as hard as Graph Coloring in general, i.e. n 1-o(1) -approximation hardness [Feige-Killian 96, Bar-Noy+ 96] Therefore, SMC is at least as hard. APX-hard on interval graphs [Gonen 01] Open shop scheduling APX-hard; [Hoogoveen, Shurman and Woeginger 98] Hardness not well understood

16 16 Very Few Exact Results Sum multicoloring non preemptively of trees is in P. [Halldórsson, K, Proskurowski, Salman, Shachnai and Telle] Preemptive sum multicoloring of Paths is in P. An ICALP paper (!) [Kovács] Preemptive coloring of trees is NPC (!) [Marx] See the collection of papers maintained by Daniel Marx for more results: http://www2.informatik.hu- berlin.de/~dmarx/sum.php

17 17 Tools and techniques “The craftsman is known by his tools”

18 18 Techniques Geometric series and randomization Grouping by length Universal colorings Delaying long vertices Reducing to Independent Set, via SC Rounding and scaling Reducing sum to makespann LP techniques

19 19 A simple guessing game Player A decides on a number x. Player B tries a sequence x 1, x 2,..., of guesses until it finds x i that Player A says satisfies x i ≥ x. The value of the game is the performance ratio

20 20 A simple deterministic strategy Guess 1, 2, 4, 8, 16,... Performance ratio of 4: –The last number is at most 2x –The next-to-last number is less than x –The previous numbers are a geometric series, at most x. Bad instance: –x=2 k +1, then  =(2 k+2 -1)/(2 k +1)  4 This is also best possible...deterministic.

21 21 Lower bound on a deterministic algorithm We show that no deterministic approximation can have ratio better than 4-  Let  >0 be a small enough constant x i =  i  j  i-1 x j ; x i+1 =µ i  x i

22 22 Assumptions The start point assumption: x 1  max{4,1/  } Otherwise, wait for the guess to be large enough We may assume that  i  4. Otherwise the adversary waits a bit and then stops. Declares x=x i +1. The ratio is (4x i +x i )/(x i +1)=5  x i /(x i +1)  4 The last inequality follows as x 1  4

23 23 Strategy for an adversary Stopping condition: If at some iteration µ i  (1-  /8)(1+  i ) the adversary stops and says x=x i +1 Else: let r=x 2 /x 1 and =8ln (3/r)/  If for +2 times the stopping condition does not apply then the adversary stops Answers: your last guess x q equals x

24 24 Analysis If at one of the +2 iterations µ i  (1-  /8)(1+  i ) The ratio is: (1/  i +1+µ i )  x i /(x i +1)  4-  The last inequality is proved using: 1)  small enough 2)  i  4 3)x 1  1/  2 4)x 2 +1/x  2 for every x

25 25 If +2 consecutive failures For every i:  i+1 =µ i  i /(  i +1)  (1-  /8)  i Thus  +2 <(1-  /8) <1/3 Thus: 3x q <  j  q-1 x j The ratio is at least: (x q +3x q )/x q =4

26 26 A randomized strategy Defeat the worst-case instance, by randomizing the initial guess. Work in the log scale –Choose an arithmetic series with a fixed multiple; for instance, e. –Randomize the starting point,  R [0,1) –Define guess x i =  e i+    0 log length  +1  +2  +3  +4

27 27 Analysis of randomized strategy Write x=e t, or t = ln x and let i=i  be such that i-1+  ≤ t ≤ i+ . As  ranges from 0 to 1, i+  -t also ranges uniformly from 0 to 1. Thus, i-2 i-1i t

28 28 Analysis, cont. The expected amount spent by the algorithm is then Hence, a performance ratio of 2.71

29 29 Applications of strategy Geometric series has been used on different measures for different problems –Lengths of vertices [BBHST’98] Non-preemptive SMC of bipartite graphs –Maximum k-colorable subgraph [HKS’01] Sum coloring interval graphs –LP values of vertices [ GHKS, WAOA’04] SMC of line graphs (pre and non-pre) and interval graphs (non-pre) All, in some sense, are lower bounds on the optimal solution

30 30 Grouping by length The challenge of multicoloring is that vertices can have widely divergent lengths Handling separately vertices with roughly similar lengths often simplifies the problem It is also natural to expect that vertices of like length go together

31 31 Grouping by length Divide the real line into segments: Vertices of lengths that fall within the same induce a subproblem that is solved separately. Subsolutions are pasted together in order to produce final solution length V4V4 V3V3 V2V2 V1V1 V5V5

32 32 How to group Cost of whole (given that we break)= Cost of coloring V SMALL + | V BIG | * #colors used on V SMALL + Cost of coloring V BIG Avoid length V BIG V SMALL xxx x x x BIG SMALL

33 33 The Markov Inequality: Several Break Points The Markov inequality: Given a collection of n positive numbers with average µ : |{ a i | a i  2µ }|  n/2 |{ a i | a i  3µ }|  n/3 What happens if we consider all break points r, r+1, r+2,…….,s? Can we get a point where there are less than 1/i numbers that are at least i times the average?

34 34 The basic breakpoint lemma Consider the collection of breakpoints r,r+1,…..,s There exists r  j  s so that: |{ a i | a i  j  µ }|  n/(j  ln(s/r))

35 35 Breakpoint lemma [Halldorsson,K ’98] Can break into size groups BIG and SMALL such that –The largest item in SMALL is negligible in comparison with the average item in BIG Thus, if the number of colors used is proportional to the largest item, then the cost of breaking up is minor –Holds for constant-colorable graphs Breakup overhead = | V BIG | * #colors used on V SMALL

36 36 Breakpoint Lemma For any q, there is a sequence of breakpoints b i satisfying such that the total breakpoint overhead is at most b1b1 b2b2 b3b3 b4b4

37 37 PTAS for planar graphs of roughly equal length vertices Let [a,b] be the range of vertex lengths Round the lengths of the jobs to a multiple of  a   factor overhead Scale the lengths by  a factor [  -2,  -1 b/a]  No overhead for nonpreemptive problems Baker decomposition into k-outerplanar G k and outerplanar and small G O. Solve optimally by dp, but truncate the coloring after (1/  )b/a colors.  Cost ≤ OPT Finish by 4-coloring G O and remaining vertices  Cost of O(n/k)* c (1/  )b/a ≤  n/c when k >>  -2 (b/a).

38 38 Round and scale, by factor of  a Baker’s decomposition Color with minimal amount of colors Retain the (1/  )b/a smallest colors Solve optimally by DP Combine Input graph G Output a coloring

39 39 Preemptive multicoloring of planar graphs A general tool for O(1) makspan coloring: preemptive scaling. We are able to reduce job lengths paying only (1+  ) Claim 1: Say that all x(v) are divisible by q. Then then if x(v)/q  c ln n for every v then:  (I)  q  (I/q)  (1+  )  (I)

40 40 Proof Take the optimum for I Include every independent set with probability (1+  ’)/q in a solution for I/q With constant probability the makespan is not larger than (1+  ’)(1+  ’’)  (I)/q By the Chernoff bound and the union bound every vertex gets at least x(v)/q scheduling units

41 41 A general lemma on reducing jobs lengths Assume that a graph is constant colorable It is possible to reduce all job lengths to O(log n) with only (1+  ) penalty The number of preemption can be reduce to O(log n) This holds true even if tasks are initially of size exponential in n (!)

42 42 Proof Split jobs to (roughly) log n most significant bits and the rest The large parts of numbers are all divisible by some large q Reduce these numbers to log n bits (small loss). The O(log n) is derived Color firs by round robin the small parts non- preemptively Small delay because constant colors and small numbers Then take the solution to the O(log n) instance The coloring for x’/q is repeated q times

43 43 Planar decomposition A planar graph G can be decomposed into two graphs G’ and G’’ so that: G’ has treewidth k 2 G’’ has treewidth 2, and color requirement sum O(S/k 2 ) If we have an approximation for p-SMC for graphs with treewidth k, we can use to get c’ and c’’ for G’ and G’’ To get the combine coloring: Each k color classes of c’ put one of c’’

44 44 Universal family of colorings Works for graphs that have constant treewidth It is a family of colorings so that for every instance there exists a coloring in the family that approximates the SMC by (1+  ) factor The key property: the number of different colorings of v in the family is polynomial in n This allows finding the best solution via DP if treewidth constant The existence is proven by modifying OPT

45 45 A somewhat surprising fact The colorings in our family depend only on a specific k-coloring of the graph, on n and on p In particular, it does not depend on the actual connections in the graph, nor on the distribution of color requirements Hence the name universal

46 46 The universal family Split the colors of every vertex in powers of (1+  ) Segment i: colors (1+  ) i to (1+  ) i+1 In every segment, treat the coloring as a makespann instance Thus in every segment O(log n) colors Make the number of segments in which a vertex is colored, constant

47 47 How to bound # of segments For every vertex v, its colors that are smaller than  x(v) or larger than (2/  )x(v) are removed from OPT Instead they are replace by round robins that are performed every (roughly) 1/  rounds The key: the number of “non-standard” segments for every v is O(log 1+  (  2 ) )

48 48 The number of preemption for v In every segment v has O(log n) preemptions # colors per segment clog n. Choose c’ log n of them for v The number of possibilities for v is O((2 clog n ) f(  ) ) hence polynomial in n The round robin, executed only every 1/  rounds and adds O(  opt)

49 49 Delay of large jobs This technique is illustrated via its Application on two classical problems: 1) Data migration 2) Open shop scheduling

50 50 Data migration p e = length of data transfer along edge e At most one active transfer per storage device Minimize (weighted) sum of completion times of the storage devices pepe pepe pepe pepe Storage Area Networks

51 51 Open Shop Scheduling Out In m1m1 3 m2m2 4 m4m4 2 m2m2 2 m3m3 2 m4m4 2 m1m1 4 m2m2 1 m3m3 6 m1m1 2 m3m3 5 m4m4 3 Jobs m1m1 m2m2 m3m3 m4m4 The Sho p wt=100 wt=40 wt=15 wt=30

52 52 Graph formulation of Open Shop v1v1 Machines Jobs v4v4 v3v3 v2v2 v5v5 v8v8 v7v7 v6v6 p e =3 4 2 w 5 = 403010015 w 1 = 0000 Assign interval (C e -p e,C e ] to each edge e; intervals of adjacent edges non-overlapping; minimizing  v  V w v C v (C v = max v  e C e ) minimizing  e  E w e C e operation completion sum is the SMC problem in bipartite line graphs

53 53 History Coffman+ ’852makespan Kim ’039  v w v C v GHKS 055.06  v w v C v, r v Data Migration Open shop scheduling Chakrabarti+ ’965.78 fixed# Hoogeveen+ ’98APX-hard fixed# Queyranne+ ’025.83 GHKS 055.06

54 54 Problems with greediness Long job delays short ones 11111 Q Maximality can cause long delays 11111 2 2 22 2 Q

55 55 Linear programming relaxation From [Hall+ 96, Kim ´03] Let E v = the set of edges incident on vertex v Let p(X) =  p e = sum of lengths of edges in set X (LP) minimize  w v C v vVvV C v  C e, for each edge e and incident vertex v C v  p(E v ), for each vertex v  p e C e  ½ [p(S v ) 2 + p(S v 2 )], for any S v  E v C e  0, for each edge e subject to: eSveSv eXeX Solvable in poly-time using ellipsoid method [Queyranne]

56 56 Capacity inequality When the edges are scheduled in some sequence, without a break: eSveSv v SvSv e3e3 e4e4 e5e5 e2e2 e1e1 p1p1 p2p2 p3p3 p4p4 p5p5 C1C1 C5C5 C2C2 C3C3 C4C4  i p i C i = p 1 p 1 + (p 1 +p 2 )p 2 +..+(p 1 +p 2 +    +p t )p t =  i  j p i p j = ½ [(  i  j p i ) 2 +  i  j p i 2 ] = ½ [p(S v ) 2 + p(S v 2 )] Denote p i = p e i

57 57 Delay technique active for p e steps, once it becomes active. finished, after being active delayed, if an adjacent edge is active waiting, until it has waited W e steps waiting/active/finished, if no active nbor Priority rule: If two adjacent edges can become active, give priority to the smaller LP value An edge is...

58 58 The first delay function W e =  1 C e *  C e * is the value of C e in LP sol. Theorem: With this weight function and  1 chosen optimally, each vertex v completes within 5.83 C v * steps  5.83 ratio Same as Queyranne & Sviridenko!

59 59 The second delay function W e =  2 max (p(S e (u)), p(S e (v))   Also 5.83-ratio on per-vertex basis  5.0553-ratio by trying both weight functions, and using the one that gives a better result uv S e (v) e S e (u) Edges w/ LP-value  C e *

60 60 Proof outline: Ratio 6 The algorithm’s completion time of u: A u = A e u = [Time e u is waiting] + [e u is active] + [e u delayed by D u ] + [e u delayed by D v ] }  C u * Edges e w/ A e < A e u uv DvDv eueu DuDu By LP inequality The last edge incident on u that the algorithm completes = p(D v ) = W e u = C e u *  C u *

61 61 Bounding size by LP values Let X t = {e  E v : C e *  t} = edges incident on v with LP-value at most t [Hall+’96] p(X t )  2t Proof follows from main LP-inequality. Tight example: 2t edges, p e = 1. All C e * = t 1 1 111

62 62 Proof outline: Ratio 6 (cont) Time that e u is delayed by neighbors of v : p(D v )  2 C e’ * = 2 W e’ If e’ is waiting, then edges incident on v are inactive W e’  [(e u waiting) + (e u delayed by D v )]  2 C u * Algorithm’s completion time of u is then A u = C u * + C u * + p(D v )  2 C u * + 2 W e’  6 C u * uv DvDv eueu DuDu Edge in D v with largest LP-value. e’

63 63 Simulating the algorithm Waiting Delayed Finished Active 3 2 1 43 1 2 31 21 W e =p e

64 64 Simulating the algorithm Waiting Delayed Finished Active 3 2 1 43 1 2 3 4 5 W e =p e 1 2 3 4

65 65 Simulating the algorithm Waiting Delayed Finished Active 3 2 1 43 1 2 3 4 5 6 W e =p e

66 66 A stronger property of the LP Recall X t = {e  E v : C e *  t} Know p(X t )  2t Suppose p(X t/2 ) =t, what is then p(X t ) = t New: p(X t )  t + sqrt(t 2 – 2 (t – t/c)) where = p(X t/c ) E.g. if p(X t/2 ) =t, then p(X t ) = t ! Or, if p(X t ) =2t, then p(X t/2 ) = 0 !

67 67 Combining weight functions 4 6 021 5  1 =  2 =1 = p(S e (v)  D v )/C u * h( )=2max(1, )+2 f( )=  (4-2 )+4

68 68 The Effect of Lambda If = 2 then only “short” edges are responsible for the delay of e u. So, by the stronger LP property p(D v )  2 C u * for a ratio of 4 uv DvDv eueu DuDu

69 69 Reducing sum multicoloring to makespann A general technique to reduce sum problems to makespann problems Leads to the first constant approximation for SMC non-preemptively interval graphs Independently invented by Queyranne and Sviridenko (a few months before us). But we gave new applications

70 70 The Generic Algorithm ACS(G,q) r  uniformly random in (0,1]. i  0, m i  1 while (G   ) do c i  max(1,  q i+r  ) G i  DualThruput(G,  c i ) Color G i next (with new colors m i, m i +1,…, m i +  c i -1) G  G- G i, m i+1  m i +  c i,,, i  i+1 end Approximate throughput with resource augmentation  = d * 

71 71 Approximating Non-preemptive SMC Overview: Formulate npSMC as an integer program. Find an optimal fractional solution, f * (v), for all v  V. Let F t be the set of vertices with f * (v)  t, then f * (v) satisfies Property 1: max v  Ft f * (v)   (F t )/d, for some d  1, where  (F t ) is the maximum weight of any clique in F t. Partition the time axis into intervals (c m-1, c m ], m=1,2…, M, and let V m ={v  V: f * (v)  (c m-1, c m ] }. Let A be an approximation algorithm for graph multicoloring that uses   (V m ) colors for V m.

72 72 Approximating npSMC (Cont’d) Assign colors to the vertices in V m using algorithm A. Let u be the vertex satisfying f * (u)= max v  Vm f * (v), then, by Property 1, f * (u)   (V m )/d, for some d  1; the largest color assigned to any vertex v by A is f v    (V m )   d f * (u) Suppose that c m /c m-1  , for some   1, then we get a  d – approximation for npSMC. In general, we can argue that d=2. An algorithm of [Gergov 1996] achieves the ratio  =3 for multicoloring interval graphs. By optimizing on  we have: Theorem: There is a 11.273 approximation algorithm for npSMC on interval graphs.

73 73 Application for sum-coloring The sum set-cover problem was studied by Feige, Lovats and Tetali. The motivation: Heuristics for speeding Semidefinite solvers Input: G(A,B,E) as in Set-cover Output: An ordered subset S={a 1,…,a k }  A and a function  :B  S so that (b,  (b))  E The input is as in set-cover and the output too except that the set-cover is ordered

74 74 Objective function Let B i ={b  B |  (b)=a i } Intuitively, B i the set of ``jobs” covered at time i. Objective function: Minimize:  i i  |B i | Example: If vertices in A represent independent sets in a graph, we get sum-coloring

75 75 Approximation results Bar-Noy, Bellare, Sachnai and Shapira showed: The algorithm that iteratively picks an maximum independent set gives ratio 4 (if IS can be found in poly time) The same proof implies: the classic greedy algorithm has ratio 4 approximation for minimum sum set-cover

76 76 Lower bound Bar-Noy, Halldorsson, K. There is a (rather complex) example where the greedy maximum independent set algorithm has indeed ratio 4 Feige, Lovats and Tetali: The lower bound for greedy MIS of [BHK] can be adapted to show that unless P=NP no 4-  ratio is possible for sum set-cover for any constant 

77 77 Better result for sum-coloring The following was shown by Gandhi, Halldorsson, K. and Shachnai The reduction from sum to makespann gives an 3.591 approximation algorithm for sum-coloring assuming a maximum independent set can be found This ratio can be apllied for all PERFECT graphs

78 78 Open problems For graphs that admit a polynomial time exact algorithm for maximum independent set is there an O(1) for npSMC on this class? Example: Chordal graphs(?) Lower bounds (maybe 4??) for open shop scheduling? The only APX hardness has a very small constant [Hoogeveen, Schurman and Woeginger 98] Can minimum makespann of PLANAR graphs be approximated within 4/3? Ratio 2 easy: 4-colorable, Bip graph solvable


Download ppt "1 Scheduling Conflicting Jobs: Problems and Techniques Guy Kortsarz, Rutgers University, Camden."

Similar presentations


Ads by Google