20
Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin.

Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

Embed Size (px)

Citation preview

Page 1: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

Batch Scheduling of Conflicting Jobs

Hadas ShachnaiThe Technion

Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin.

Page 2: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

2

Batch Scheduling Problems

• A batch is a set of jobs that can be processed jointly

• The completion time of a batch is the latest completion time of a job in the batch.

• In the p-batch model, the length of a batch is the maximum processing time of any job in the batch.

• The jobs are processed on a batching machine which can process up to b jobs simultaneously.

• Objective functions– Sum of completion times of jobs– Sum of batch completion times– Makspan

Page 3: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

3

Batch Scheduling of Conflicting Jobs• But, what if some jobs cannot be scheduled

simultaneously? • Real-life examples: Conflicting resource requirements,

compatibility/cooperation among jobs etc.• Such conflicts are often modeled by an undirected

graph.

A

E

D

C

BB,C need some

shared resource

Lengths = color

requirements

A schedule - A multicoloring of G.

Page 4: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

4

Batch Scheduling of Conflicting Jobs

Mac

hine

s

1 2 3 4 5 6 7 time

G

Given is an undirected graph G=(V,E)

Each vertex v V has a positive length.

Find a proper batch coloring of the graph: each batch is assigned a distinct contiguous set of colors of size equal to the maximum length of any vertex in the batch.

Each batch is an indepndent set in G

Minimize

-sum of job completion times (SJC)

- sum of batch completion times (SBC)

-Makespan (Max coloring)

SJC(I)=2*2+1+2*5+3+7=25

Page 5: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

5

Batch Scheduling of Conflicting Jobs

Mac

hine

s

1 2 3 4 5 6 7 time

G

Given is an undirected graph G=(V,E)

Each vertex v V has a positive length.

Find a proper batch coloring of the graph: each batch is assigned a distinct contiguous set of colors of size equal to the maximum length of any vertex in the batch.

Each batch is an indepndent set in G

Minimize

-sum of job completion times (SJC)

- sum of batch completion times (SBC)

-Makespan (Max coloring)

SBC(I)=3*2+3*5+7=28

Max-col (I)=7

Page 6: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

6

Known Results

• Sum of job completion times

Constant factor approximations for certain subclasses of conflict graphs (e.g., perfect, interval, line and bipartite graphs (Epstein, Halldórsson, Levin, S, 2006).

EPTASs for planar graphs and graphs with bounded treewidth (Halldórsson and S., 2008)

• For general graphs BSC and Max-coloring are hard to approximate within factor n1-ε unless NP=ZPP (Bar-Noy et al, 1998; Feige and Kilian, 1998)

Page 7: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

7

Known Results (Cont’d) • Sum of batch completion times

A 4ρ-approximation for SBC for graph classes on which Maximum Independent Set can be approximated within factor ρ, for some ρ ≥1 (Epstein, Halldórsson, Levin, S, 2006).

• Max coloring

Constant factor approximation algorithms for bipartite, planar, interval and perfect graphs (Epstein and Levin,2007; Escoffier at al., 2006; Pemmaraju et al., 2004; Pemmaraju and Raman, 2005)

PTASs for graphs with bounded treewidth (Escoffier at al., 2006; Pemmaraju and Raman, 2005)

Solvable in ploynomial time on paths (Halldórsson and S., 2008)

Page 8: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

8

Batch Coloring Problems with Minsum Objective - a General Technique

• Minimize sum of job completion times• Unbounded model (b ≥ n)

• Obtain approximation algorithms for SJC on several classes of conflicts graphs

Page 9: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

9

A simple guessing game

• Player A decides on a number x.

• Player B tries a sequence x1, x2, ..., of guesses until it finds xi that Player A says satisfies xi ≥ x.

• The value of the game is the performance ratio

x

xi

i

Page 10: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

10

A simple deterministic strategy

• Guess 1, 2, 4, 8, 16, ...• Performance ratio of 4:

– The last number is at most 2x– The previous numbers are a geometric series,

at most x.

• This is also best possible...deterministic.

Page 11: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

11

A randomized strategy

• Defeat the worst-case instance by– changing the base of the geometric series

– randomizing the initial guess [0,1)

• For this game, set base to be e

– Define guess xi = ei+, i ≥0.

log length

0 +1 +2 +3 +4

- Last guess e-1 times optimal guess - Achieves performance ratio of e.

Page 12: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

12

Geometric Grouping in Coloring

• Each vertex has a real value attached• Divide the real line into geom. increasing

segments

• Each group solved separately.• Subsolutions are pasted together in order to

produce final solution

A(V1) A(V2)A(V3) A(V4)

A(V5)..

length

V4V3V2V1 V5

Each block must be solved with a small

makespan

Solve efficiently in terms of OPT: - Length based: immediate - LP based: bound clique number of the induced subgraph

Page 13: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

13

Bounds for Perfect and Line GraphsPreprocessing the input I:

• Pick a random number ~ U[0,1).• Partition the jobs into classes by their processing

times: J0= { j: pj ≤ e} and Ji={ j: ei-1+ < pj ≤ ei+ }.

• Let k be the largest index of any non-empty class.• For all i=0,1, …, k, round up the processing time of

each job j Ji to p’j=ei+ . The resulting input is I’.

Lemma (preprocessing): Let OPT, OPT be the sum of completion times of an optimal solution for I and I’, such that in I’ the jobs are scheduled in batches, and all jobs in a batch have a common class. Then E[OPT] ≤ e·OPT, where the expectation is over the random choices of .

Page 14: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

14

Using Non-preemptive Scheduling Scheme

Problem: Given an instance J= {1, …, n} of dependent jobs, with the conflict graph G=({V= 1, … , n}, E), schedule the jobs non-preemptively on a set of (unbounded size of) machines so as to minimize the sum of completion times of all jobs.

Linear programming formulation:• For any edge (u,v)E there is a variable uv {0,1};

uv =1 if u precedes v in the schedule, and 0 otherwise.

• Denote by Nv the set of neighbors of v in G.• Denote by C1, …, CNv the set of maximal cliques in

Nv.

Page 15: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

15

LP formulation (Cont’d)

Let fv* denote the completion time of job Jv in the

optimal solution for LP.

(LP) minimize fvvV

subject to:

fv ≥ pv + puuv, for all vV, 1 r Nv

uv + vu ≥ 1 for all (u,v) E

uCr

Page 16: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

16

Non-preemptive Scheduling Scheme

• Partition the jobs to blocks of geometrically increasing sizes by the fv

* values.• Apply to each block Vk an algorithm A for non-

preemptive multicoloring, so as to minimize the total number of colors used.

• Concatenate the schedules obtained for the blocks: first the schedule for V0, then the schedule for V1 and so on…

• Let OPT*= v fv*, w(Vk) is the maximum size of a

clique in Vk, and suppose that A(Vk) ß w(Vk).

Theorem (Non-pre-scheduling): The LP scheme gives a non-preemptive schedule in which the sum of start times of the jobs is at most 3.591 ß OPT* - p(V)/2, where p(V)= v pv .

Page 17: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

17

Approximation Algorithm JB for SJC

1. Apply the Preprocessing step for partitioning J to job classes by rounded processing times.

2. For any pair of jobs Ji, Jj that belong to different classes, add an edge (i,j) in the conflict graph G. Denote the resulting graph G'.

3. Solve LP for the input jobs with rounded processing times and conflict graph G'.

4. Partition the jobs in the input into blocks V0,V1, …, VL, by their LP completion times.

5. Schedule the blocks in sequence using for each block a coloring algorithm for unit length jobs.

Page 18: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

18

Analysis of the Algorithm

Theorem 2: JB approximates SJC within a factor of 9.76 ß + (1 – (e-1)/2) 9.76 ß + 0.14

• In general, LP may not be solvable in polynomial time on

G’; can be solved when the maximum weight clique problem is solvable on G.

Page 19: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

19

Analysis of the Algorithm (Cont’d)

• In particular, maximum weighted clique and coloring are

polynomially solvable on perfect graphs.

Corollary 1: JB is a 9.9-approximation algorithm for SJC on perfect graphs.

• In a line graph there are at most n maximal cliques; also, using Vizing’s theorem, ß= 1+ o(1).

Corollary 2: JB is a 9.9+ o(1)-approximation algorithm for SJC on line graphs.

Page 20: Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin

20

Summary and Open problems

• Interesting features of the current results: Randomized strategy is combined in many ways

– K-colorable subgraphs (interval,compar.)– LP values + lengths (line, perfect)

• NP-hardness for partial k-trees, trees, paths?• Any non-trivial graph classes that are polynomially

solvable (beyond stars)?• Better ratios…

Thank you