Smith s Rule In Stochastic Scheduling Caroline Jagtenberg Uwe Schwiegelshohn Utrecht University Dortmund University University of Twente Aussois 2011
The (classic) setting Problem n jobs, nonpreemptive, processing times p j and weights w j m identical, parallel machines C j = completion time of job j goal: minimize total weighted completion time, w j C j P w j C j (thanks JKL) Complexity The problem is (strongly) NP-hard [Bruno et al. 1974] PTAS exists [Skutella and Woeginger, 2000]
WSPT a.k.a. Smith s rule a.k.a. Photographer s Rule WSPT Schedule jobs in order of non-increasing ratios w j /p j Performance On 1 machine WSPT is optimal [Smith, 1956] For identical, parallel machines WSPT is a 1+ 2 2 1.207- approximation; this is tight [Kawaguchi and Kyan, 1986]
Step to stochastic scheduling Stochastic Scheduling processing times P = (P 1,..., P n ) unknown in advance P j s are random variables, known distribution solution no schedule, but scheduling policy Π for any policy Π: w j C j (Π, P) is a random variable Minimize expected performance E( w j C j (Π, P))
Complexity of (general) stochastic scheduling In general, optimal policies are NP-hard to find Calculating the objective value of a given policy can be # P complete [Hagstrom 1988] Question Optimal policy may require deliberate idleness [U. 2003] Does it become (significantly) easier if we restrict e.g. to only exponentially distributed processing times, i.e., P j exp(λ j )? i.e., P j s are memory-less, P[P j > x + t P j > t] = P[P j > x] Open Problem 1 Does there exist an optimal policy without deliberate idleness?
Intuition Quote Scheduling: Theory, Algorithms, and Systems [Pinedo, 2002] Example: P C max is NP-hard for deterministic scheduling, but for P j exp(λ j ), LEPT is optimal [Weiss and Pinedo, 1980]
Most natural & simple scheduling policy: WSEPT WSEPT or Smith s rule Greedily schedule jobs in order of decreasing w j /E(P j ) = w j λ j. Facts about WSEPT for minimizing E[ w j C j ] For one machine WSEPT is optimal [Rothkopf, 1966] For parallel machines WSEPT is optimal if ordering exists w. w 1... w n and w 1 λ 1... w n λ n [Kämpke, 1987] For parallel machines WSEPT is a (2 1 m )-approximation [Möhring, Schulz, U. 1999]
Our (Counterintuitive?) Result Theorem Performance of WSEPT is not better than 1.243 OPT. That is, instances where in expectation E[ w j Cj WSEPT ] > 1.243 E[ w j Cj OPT ] Counterintuition: This is even worse than WSPT in deterministic scheduling, which is at most 1.207 OPT. Proof Follows from analysis and adaptation of the instance given by Kawaguchi and Kyan.
Kawaguchi & Kyan (deterministic) example x m big jobs with p j = w j = p, n m small jobs with p j = w j = 1 n Left schedule: wj C j = (p 2 xm ) + ( 1 1 2 1 x m ) + o(1) Right schedule: wj C j = ((1 + p)pxm ) + ( 1 2 m ) + o(1) p = 1 + 2 and x = 1 2+ 1+ gives a maximal ratio of 2 2 2 1.207
Stochastic version of Kawaguchi & Kyan example x m i.i.d. big jobs each with P j exp(λ), and w j := E[P j ] = 1 λ := p n m i.i.d. small jobs each with P j exp(n), and w j := E[P j ] = 1 n
Scheduling m jobs with P j exp(λ) Lemma Say we start at time t = 0 m i.i.d. jobs with P j exp(λ), the expected number of available machines at time t is at least f (t) := m(1 e tλ ) 1. Interpretation
Behaviour of parallel jobs with P j exp(λ) When scheduling in parallel m jobs with i.i.d. processing times P j exp(λ), the first completion is expected at time 1/(mλ). As P j s are memory less, E[P j t P j > t] = E[P j ] = 1/λ, the second completion is expected time 1/((m 1)λ) later. etc., so j th completion is expected at time t j = Using H(m) = m i=1 1 i j i=1 1 (m i + 1)λ ln(m) + 0.58, find that t j 1 λ ln( m m j ), so # free machines at t: m(1 e tλ ) m(1 e tλ ) 1
Stochastic version of (worst case) WSPT schedule Remember Kawaguchi and Kyan s (worst case) schedule Machines finish processing short jobs more or less at t = 1 E[difference] 1 m 1 n i=1 1 i 0 (as we have n > m) Each long job completes in expectation at time (1 + 1 λ ) Hence, E[ w j C j ] to the deterministic case.
Stochastic version of (optimal) WSPT schedule The expected optimal schedule of the stochastic variant: Contribution of long jobs is the same as in the deterministic case. What about the small jobs? Compute time T such that T 0 f (t)dt total expected processing volume of small jobs. How? Numerically, T = 1.2933 suffices.
We can now approximate location of small jobs. But how much do they contribute to the objective value E[ w j C j ]?
Contribution of Small Jobs Lemma Consider nt jobs with i.i.d. processing times P j exp(n) and weights w j = 1/n, scheduled on a single machine. Then for all ε > 0 there exists n large enough so that Proof. E[ j w jc j ] = 1 n E[ j w jc j ] T 0 t dt + ε. nt 1/n+T 2 = 1 2 T 2 + 1 2n T = T 0 t dt + 1 2n T
Contribution of Small Jobs Generalization We can generalize this lemma for parallel machines. Let m(t) be the number of machines available at time t, then E[ j w jc j ] T 0 m(t) t dt + ε
Comparing the objective values E[ w j C j ] Ingredients 1 long jobs contribution same as in deterministic case 2 machines w. small jobs finish at equal times ( sand ) { 3 # available machines f (t) = m(1 e tλ ) 1 for OPT small jobs contribute E[ j w jc j ] T 0 f (t) t dt Putting all that together, we get WSEPT is an α-approximation, with α E(P j w j C j [B]) E( P j w j C j [A]) 1.229 (n, m )
The result Optimizing over # and length E[P j ] of the long jobs The result above was for 1 2+ 2 m 0.29 m long jobs with E[P j] = 1 + 2 2.4 Taking for example: yields α > 1.243 0.43 m long jobs with E[P j ] 1.8 Theorem For jobs with exponentially distributed processing times, WSEPT is no better than a 1.243 - approximation.
Conclusions What we ve found With P j exp(λ j ), WSEPT can be factor > 1.243 away from optimal policy (in expectation); worse than tight bound for deterministic scheduling, 1.207 [ WAOA 2010 proceedings] Open Problems 2 Instance(s) where WSEPT performs even worse? 3 I d rather go and improve the upper bound (2 1/m)! 4 Stochastic scheduling for P j exp(λ j ), hard at all? 5 And the complexity of computing E[ j w jc WSEPT j ]?
Smith s Rule = Photographer s Rule Group photos... Put short and important people first Back