Efficient algorithms for average completion time scheduling
Introduction
Efficient algorithms for average completion time scheduling Ren´e Sitters VU University Amsterdam Department of Econometrics and Operations Research
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Outline
Efficient algorithms for average completion time scheduling
Introduction
Introduction Unweighted jobs Weighted jobs Conclusions
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Average completion time scheduling
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs
Objective: Find a feasible schedule that minimizes the (weighted) average completion time of the jobs. min
1X Cj n j∈J
or
min
1X wj Cj n j∈J
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Competitive analysis Offline versus online scheduling: offline Complete instance is known online Instance is revealed over time: Jobs appear at their release time. Scheduled jobs cannot be removed. Jobs cannot be scheduled in history.
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Definition An online algorithm A is c-competitive if for any instance I A(I ) ≤ c · OPT(I )
Some known competitive ratios
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs
Problem (Online) P 1|rj , pmtn| j Cj P 1|rj | j wj Cj P P|rj , pmtn| j Cj P P|rj | j wj Cj
Lower 1 2 1.047 1.309
Upper 1 2 1.86 → 1.25 2.62 → 1.791
Table: Known lower and upper bounds on the competitive ratio for (deterministic) online scheduling problems.
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs
Part 1: Unweighted jobs
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Definition SRPT: At any moment process the job(s) with the smallest remaining processing time among the available jobs
Efficient algorithms for average completion time scheduling
Introduction
Known: Optimal on a single machine (Schrage, Oper. Res. 1968) 2-competitive on parallel machines (Phillips, Stein, Wein, Math Prog. 1998)
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
1.86-competitive on parallel machines (Chung, Nonner, Souza, SODA 2010)
Overview Algorithm Analysis
Conclusions
Definition SRPT: At any moment process the job(s) with the smallest remaining processing time among the available jobs
Efficient algorithms for average completion time scheduling
Introduction
Known:
Unweighted jobs
Optimal on a single machine (Schrage, Oper. Res. 1968) 2-competitive on parallel machines (Phillips, Stein, Wein, Math Prog. 1998)
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
1.86-competitive on parallel machines (Chung, Nonner, Souza, SODA 2010)
Overview Algorithm Analysis
Conclusions
Lower bound 21/19 (Chung et al.)
0
1
SRPT:
2
P
Cj =
3
4
0
OPT
1
P
2
Cj =
3
4
Definition SRPT: At any moment process the job(s) with the smallest remaining processing time among the available jobs
Efficient algorithms for average completion time scheduling
Introduction
Known:
Unweighted jobs
Optimal on a single machine (Schrage, Oper. Res. 1968) 2-competitive on parallel machines (Phillips, Stein, Wein, Math Prog. 1998)
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
1.86-competitive on parallel machines (Chung, Nonner, Souza, SODA 2010)
Overview Algorithm Analysis
Conclusions
Lower bound 21/19 (Chung et al.)
0
1
SRPT:
2
P
3
Cj = 21
4
0
OPT:
1
P
2
3
Cj = 19
4
Efficient algorithms for average completion time scheduling
Theorem SRPT is 5/4-competitive for minimizing total completion time on identical machines. Observation Observation Observation Observation Observation
1 2 3 4 5
→ → → → →
→ Theorem 1.
Lemma Lemma Lemma Lemma Lemma
1 2 3 4 5
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Observation (1) The optimal value will not decrease if processing times increase.
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Observation (1) The optimal value will not decrease if processing times increase.
Introduction Unweighted jobs
Lemma (PSW’98 ) Let I and I 0 satisfy: (i) J = J 0 = {1, 2, . . . , n}, (ii) rj = rj0
∀j ∈ J,
pj0
∀j ∈ J.
(iii) pj ≤
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
σ0
Let σ and be SRPT schedules for, respectively, I and I 0 . Then, for every k ∈ {1, 2, . . . , n}, µk (σ) ≤ µk (σ 0 ), where µk () is the k-th completion time in the schedule.
Conclusions
Proof of Lemma 1 Definition Let Xt (Xt0 ) be ordered multiset of remaining processing times at timet in σ (σ 0 ). 0 0 For example 1 ≺ 2 3 2
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
Claim Xt Xt0 for t = 0, 1, 2, . . .
Overview Algorithm Analysis
Conclusions
Proof of Lemma 1 Definition Let Xt (Xt0 ) be ordered multiset of remaining processing times at timet in σ (σ 0 ). 0 0 For example 1 ≺ 2 3 2
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
Claim Xt Xt0 for t = 0, 1, 2, . . .
Proof. X0 = X00 . Assume Xt Xt0 t → t + 1: (i) (ii)
0 One unit is processed: Xt+1 Xt+1 0 New jobs arrive: Xt+1 Xt+1
Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Proof of Lemma 1 Example of induction step
Introduction
0 0 1 2 = Xt0 . Assume Xt = 3 2 Job j with pj = 4 arrives at t + 1. Two machines.
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
0 0 ˆ0 ˆ 0 1 =X • One unit processed → Xt+1 = t+1 2 1 0 0 0 1 0 • Job j is added → Xt+1 = 2 1 = Xt+1 4 4
Overview Algorithm Analysis
Conclusions
Observation (2) The optimal value will not decrease if we reduce the release time by δj and increase the processing time by at least δj .
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Observation (2) The optimal value will not decrease if we reduce the release time by δj and increase the processing time by at least δj .
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs
Lemma (2)
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Let I and I 0 satisfy: (i) J = J 0 ,
Weighted jobs
(ii) rj − δj = rj0
∀j ∈ J,
(iii) pj + δj ≤ pj0
∀j ∈ J.
σ0
Let σ and be SRPT schedules for, respectively, I and Then, for every k ∈ {1, 2, . . . , n}, µk (σ) ≤ µk (σ 0 ), where µk () is the k-th completion time in the schedule.
Overview Algorithm Analysis
Conclusions
I 0.
Efficient algorithms for average completion time scheduling
Proof of Lemma 2 Definition Xt : remaining processing times in σ of jobs with rj ≤ t. Xt0 : remaining processing times in σ 0 of jobs with rj ≤ t .
Example of definition, m = 2, n = 3 r1 = r2 = 0, r3 = 2
r10 = r20 = 0, r30 = 1
p1 = p2 = p3 = 2
p10 = p20 = 2, p30 = 3
At time t = 1 : 1 X1 = 1
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
X10
1 1 = 3
X10
Now apply proof of Lemma 1: Xt Xt0 for all t.
=
1 1
Observation (3) Let OPT (J 0 ) be the optimal value for scheduling J 0 ⊆ J. Then OPT (J 0 ) ≥ minK ⊆J,|K |=|J 0 | OPT (K ). (Trivial!)
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Observation (3) Let OPT (J 0 ) be the optimal value for scheduling J 0 ⊆ J. Then OPT (J 0 ) ≥ minK ⊆J,|K |=|J 0 | OPT (K ). (Trivial!)
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Lemma (PSW’98 ) Let I and I 0 satisfy:
Weighted jobs
(i) J ⊇ J 0 , (ii) rj =
rj0
∀j ∈
(iii) pj =
pj0
∀j ∈ J 0 .
Overview Algorithm Analysis
J 0,
Conclusions
Let σ and σ 0 be SRPT schedules for, respectively, I and I 0 . Then, for every k ∈ {1, 2, . . . , |J 0 |}, µk (σ) ≤ µk (σ 0 ).
Efficient algorithms for average completion time scheduling
Proof of Lemma 3
Introduction
Follows directly from Lemma 1: For every j ∈ J \ J 0 add a job with processing time ∞ to I 0 . Now apply Lemma 1.
Example, J = {1, 2, 3}, J 0 = {2, 3} 2 1
C1 = C2 = 1
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
2 3
Unweighted jobs
3 C1 = 1, C2 = 2
Conclusions
Efficient algorithms for average completion time scheduling
Proof of Lemma 3
Introduction
Follows directly from Lemma 1: For every j ∈ J \ J 0 add a job with processing time ∞ to I 0 . Now apply Lemma 1.
Example, J = {1, 2, 3}, J 0 = {2, 3} 2 1
3
C1 = C2 = 1
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
p1 = ∞
2
Unweighted jobs
3 C1 = 1, C2 = 2
Overview Algorithm Analysis
Conclusions
Observation (4) SRPT is a greedy algorithm → not much idle time.
Efficient algorithms for average completion time scheduling
Introduction
Example
Unweighted jobs
2 1 t=0
1 3 t=2
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
2 3
t=0
t=2
Given σ, let Vt (σ) be the remaining volume at time t.
Weighted jobs Overview Algorithm Analysis
Conclusions
Observation (4) SRPT is a greedy algorithm → not much idle time.
Efficient algorithms for average completion time scheduling
Introduction
Example
Unweighted jobs
2 1 t=0
1 3 t=2
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
2 3
t=0
t=2
Given σ, let Vt (σ) be the remaining volume at time t.
Lemma (4) For any greedy algorithm A: Vt (σ A ) − Vt (OPT ) ≤ mt/4. *
Also in: - Hussein and Schwiegelshohn 2006, - Chung, Nonner, and Souza, unpublished.
Weighted jobs Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Proof of Lemma 4 (mt/2)
Introduction
OPT t
For each job j, mark slots that correspond to the backlog of j.
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
A(greedy ) t
Efficient algorithms for average completion time scheduling
Proof of Lemma 4 (mt/2)
Introduction
OPT t
For each job j, mark slots that correspond to the backlog of j.
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
A t
Efficient algorithms for average completion time scheduling
Proof of Lemma 4 (mt/2)
Introduction
OPT t
For each job j, mark slots that correspond to the backlog of j.
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
A t
Efficient algorithms for average completion time scheduling
Proof of Lemma 4 (mt/2)
Introduction
OPT t
For each job j, mark slots that correspond to the backlog of j.
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
A t
Efficient algorithms for average completion time scheduling
Proof of Lemma 4 (mt/2)
Introduction
OPT t
For each job j, mark slots that correspond to the backlog of j.
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
V =
P
j
pj
Overview Algorithm Analysis
Conclusions
A t
Vt (σ A ) − Vt (OPT ) ≤ V − Vt (σ A ) ⇒ 2(Vt (σ A ) − Vt (OPT )) ≤ V − Vt (OPT ) ≤ mt
Observation (5) For any schedule, the sum of the last m completion times is at least its volume.
Efficient algorithms for average completion time scheduling
Introduction
Example
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Observation (5) For any schedule, the sum of the last m completion times is at least its volume.
Efficient algorithms for average completion time scheduling
Introduction
Example
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Lemma (5) Let σ be an SRPT schedule for instance I . Then, n X j=n−m+1
5 µj (σ) ≤ 4
n X j=n−m+1
µj (OPT ).
Proof of Lemma 5 OPT → OPT 0
t
OPT
t
OPT 0
I → I0 σ → σ0
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Proof of Lemma 5 OPT → OPT 0
OPT
t n P
t Lemma
µj (σ)
OPT 0
≤
n P
2
I → I0 σ → σ0
µj (σ 0 )
j=n−m+1
j=n−m+1
≤ Lemma
≤
mt + Vt 4
(σ 0 )
mt + mt/4 + Vt (OPT 0 ) + Vt (OPT 0 )) n P µj (OPT 0 )
≤
5 4 (mt
=
5 4
=
5 4
j=n−m+1 n P j=n−m+1
µj (OPT ).
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Proof of Lemma 5 OPT → OPT 0
OPT
t n P
t Lemma
µj (σ)
OPT 0
≤
n P
2
I → I0 σ → σ0
µj (σ 0 )
j=n−m+1
j=n−m+1
≤ Lemma
≤
mt + Vt 4
(σ 0 )
mt + mt/4 + Vt (OPT 0 ) + Vt (OPT 0 )) n P µj (OPT 0 )
≤
5 4 (mt
=
5 4
=
5 4
j=n−m+1 n P j=n−m+1
µj (OPT ).
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Proof of Lemma 5 OPT → OPT 0
OPT
t n P
t Lemma
µj (σ)
OPT 0
≤
n P
2
I → I0 σ → σ0
µj (σ 0 )
j=n−m+1
j=n−m+1
≤ Lemma
≤
mt + Vt 4
(σ 0 )
mt + mt/4 + Vt (OPT 0 ) + Vt (OPT 0 )) n P µj (OPT 0 )
≤
5 4 (mt
=
5 4
=
5 4
j=n−m+1 n P j=n−m+1
µj (OPT ).
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Proof of Lemma 5 OPT → OPT 0
OPT
t n P
t Lemma
µj (σ)
OPT 0
≤
n P
2
I → I0 σ → σ0
µj (σ 0 )
j=n−m+1
j=n−m+1
≤ Lemma
≤
mt + Vt 4
(σ 0 )
mt + mt/4 + Vt (OPT 0 ) + Vt (OPT 0 )) n P µj (OPT 0 )
≤
5 4 (mt
=
5 4
=
5 4
j=n−m+1 n P j=n−m+1
µj (OPT ).
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Proof of Lemma 5 OPT → OPT 0
OPT
t n P
t Lemma
µj (σ)
OPT 0
≤
n P
2
I → I0 σ → σ0
µj (σ 0 )
j=n−m+1
j=n−m+1
≤ Lemma
≤
mt + Vt 4
(σ 0 )
mt + mt/4 + Vt (OPT 0 ) + Vt (OPT 0 )) n P µj (OPT 0 )
≤
5 4 (mt
=
5 4
=
5 4
j=n−m+1 n P j=n−m+1
µj (OPT ).
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Proof of Lemma 5 OPT → OPT 0
OPT
t n P
t Lemma
µj (σ)
OPT 0
≤
n P
2
I → I0 σ → σ0
µj (σ 0 )
j=n−m+1
j=n−m+1
≤ Lemma
≤
mt + Vt 4
(σ 0 )
mt + mt/4 + Vt (OPT 0 ) + Vt (OPT 0 )) n P µj (OPT 0 )
≤
5 4 (mt
=
5 4
=
5 4
j=n−m+1 n P j=n−m+1
µj (OPT ).
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Theorem SRPT is 5/4-competitive for minimizing total completion time on identical machines.
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs
Proof. Let S be the set of first k jobs in OPT. (m ≤ k ≤ n)
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
OPT µ1 µ2 µ3 µ4 µ5 µ6,7 µ8 µ9
(Example: n = 9, k = 5)
Apply SRPT to S: σ → σ S . k X j=k−m+1
Lemma 3
µj (σ)
≤
k X j=k−m+1
µj (σ S )
Lemma 5
≤
5 4
k X j=k−m+1
µj (OPT )
Conclusions
Efficient algorithms for average completion time scheduling
More properties of SRPT Not true: An SRPT-schedule is optimal if no job is preempted. Not true: An SRPT-schedule is optimal if it contains no idle time.
Lower bound 21/19
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
0
1
SRPT:
2
P
3
Cj = 21
4
0
OPT:
1
P
2
3
Cj = 19
4
Conclusions
Efficient algorithms for average completion time scheduling
More properties of SRPT Not true: An SRPT-schedule is optimal if no job is preempted. Not true: An SRPT-schedule is optimal if it contains no idle time.
Lower bound 21/19
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
0
1
SRPT:
2
P
3
Cj = 21
4
0
OPT:
1
P
2
3
4
Cj = 19
Not true: An SRPT-schedule is optimal if there is no idle time AND no preemption. (Elyot Grant, Will Ma)
Conclusions
Efficient algorithms for average completion time scheduling
Corollary
Introduction Unweighted jobs
Theorem (
Lu, S. Stougie, 2004 )
Algorithm ..... is 2α-competitive for the NON-preemptive parallel machines problem, where α is the competitive ratio of the SRPT-rule for the preemptive problem. → 2.5-competitive algorithm for the non-preemptive problem.
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs
Part 2: Weighted jobs
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Some known competitive ratios Problem (Online) P 1|rj , pmtn| j Cj P 1|rj , pmtn| j wj Cj P 1|rj | j Cj P 1|rj | j wj Cj P P|rj , pmtn| j Cj P P|rj , pmtn| j wj Cj P P|rj | j Cj P P|rj | j wj Cj
L.B. Rand.
U.B. Rand.
L.B. Det.
U.B. Det.
1 1.038 e/(e − 1) e/(e − 1) 1 1 1.157 1.157
1 4/3 e/(e −1) ≈ 1.58 1.69 1.86 → 5/4 2 → 1.791 2 → 1.791 2 → 1.791
1 1.073 2 2 1.047 1.047 1.309 1.309
1 1.57 2 2 1.86 2 2 2.62
Introduction Unweighted jobs → → → →
5/4 1.791 1.791 1.791
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
Table: Known lower and upper bounds on the competitive ratio for randomized and deterministic online algorithm.
Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Some known competitive ratios Problem (Online) P 1|rj , pmtn| j Cj P 1|rj , pmtn| j wj Cj P 1|rj | j Cj P 1|rj | j wj Cj P P|rj , pmtn| j Cj P P|rj , pmtn| j wj Cj P P|rj | j Cj P P|rj | j wj Cj
L.B. Rand.
U.B. Rand.
L.B. Det.
U.B. Det.
1 1.038 e/(e − 1) e/(e − 1) 1 1 1.157 1.157
1 4/3 e/(e −1) ≈ 1.58 1.69 1.86 → 5/4 2 → 1.791 2 → 1.791 2 → 1.791
1 1.073 2 2 1.047 1.047 1.309 1.309
1 1.57 2 2 1.86 2 2 2.62
Introduction Unweighted jobs → → → →
5/4 1.791 1.791 1.791
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
Table: Known lower and upper bounds on the competitive ratio for randomized and deterministic online algorithm.
Theorem
√ There is a 1.791+O(1/ m)-competitive algorithm for minimizing average weighted completion time on identical machines. This holds for preemptive and non-preemptive schedules.
Overview Algorithm Analysis
Conclusions
24 + -approximation by Phillips, Stein and Wein (1995) 3.75-approximation for unweighted Phillips, Schulz, Shmoys, Stein and Wein (J. Comb. Opt. 1998) 2.89 + -competitive randomized (Chakrabarti, Phillips, Schulz, Shmoys, Stein, Wein (ICALP 1996) (4 + )-competitive algorithm by Hall, Schulz, Shmoys, Wein (Math. of OR 1997) Lower bound of 1.309 by Vestjens (PhD thesis, 1997) PTAS by Afrati et al. (FOCS 1999) 2-competitive randomized by Schulz and Skutella (SIAM JDM 2002) 2CSRPT -competitive for unweighted by Lu, S. and Stougie (ORL 2003) 3.28-competitive by Megow and Schulz (ORL 2004) 2-competitive preemptive by Megow and Schulz (ORL 2004) 2.68-competitive Correa and Wagner(IPCO 2005) 2-competitive unweighted by Liu and Lu (Comp. & OR 2009)
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Preemptive problem
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs
A 2-competitive preemptive algorithm:
Algorithm Megow and Schulz 2003
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
Process preemptively in order wj /pj (preemptive WSPT-rule)
Overview Algorithm Analysis
Conclusions
Non-preemptive problem A 2-competitive randomized algorithm:
Schulz and Skutella 2002 (i) Apply preemptive WSPT on fast single machine. (ii) For each j pick a machine mj and αj ∈ [0, 1] at random. (iii) Schedule on parallel machines: When an αj fraction has been processed schedule j as early as possible on mj .
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Non-preemptive problem A 2-competitive randomized algorithm:
Schulz and Skutella 2002 (i) Apply preemptive WSPT on fast single machine. (ii) For each j pick a machine mj and αj ∈ [0, 1] at random. (iii) Schedule on parallel machines: When an αj fraction has been processed schedule j as early as possible on mj .
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
A 2.62-competitive algorithm:
Correa and Wagner 2005 (i) Apply preemptive WSPT on fast single machine. (ii) Choose α ∈ [0, 1] properly. (iii) Schedule on parallel machines: When an α fraction has been processed schedule j as early as possible.
Conclusions
Efficient algorithms for average completion time scheduling
New algorithm Algorithm Online()
Introduction
Input: Instance I = {(pj , wj , rj ) | j = 1 . . . n}. (i) Change the instance: I → I 0 : pj0 = pj , wj0 = wj and rj0 = rj + pj . (ii) Apply non-preemptive WSPT on fast single machine. (iii) Schedule on parallel machines: When j starts on single machine, schedule as early as possible.
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Theorem Algorithm Online is 1.791 1 + √ = 1/ m.
√1 m
2
-competitive for
Efficient algorithms for average completion time scheduling
Example, m = 3
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Step 1 0
1
2
Weighted jobs Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Example, m = 3
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Step 1 0
1
2
Weighted jobs Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Example, m = 3
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Step 1 0
1
Weighted jobs
2
Step 2
Single machine 0
1
2
Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Example, m = 3
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Step 1 0
1
Weighted jobs
2
Step 2
Single machine 0
1
2
0
1
2
Overview Algorithm Analysis
Conclusions
Step 3
Parallel machines 3
Efficient algorithms for average completion time scheduling
Analysis √ I → I 0 : pj0 = pj , wj0 = wj and rj0 = rj + pj , = 1/ m.
Introduction Unweighted jobs
cj sj 0
sj
cj
=
sj +pj /m sj
≤1+
pj /m pj
=1+
1 m
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Analysis √ I → I 0 : pj0 = pj , wj0 = wj and rj0 = rj + pj , = 1/ m.
Introduction Unweighted jobs
cj sj sj
0
=
sj +pj /m sj
≤1+
pj /m pj
=1+
1 m
cj
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
I →
I 00 :
pj00
=
pj , wj00
= wj and
rj00
= min{sj , (1 +
1 0 m )rj }.
Lemma The single machine schedule is a preemptive WSPT-schedule for instance I 00 .
Overview Algorithm Analysis
Conclusions
Efficient algorithms for average completion time scheduling
Fact: Preemptive WSPT-procedure minimizes the weighted mean busy time on a single machine. →
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs
Lemma (A) P
j
wj (sj + pj /2) ≤ OPT (I 00 )
Overview Algorithm Analysis
Conclusions
Lemma OPT (I 0 ) ≤ (1 + )OPT (I )
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Lemma OPT (I 0 ) ≤ (1 + )OPT (I )
Efficient algorithms for average completion time scheduling
Introduction
Lemma
Unweighted jobs
OPT (I 00 ) ≤ (1 +
1 0 m )OPT (I )
√ Now take = 1/ m
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Lemma (B)
Conclusions
OPT (I 00 ) ≤ 1 +
√1 m
2
OPT (I ).
Efficient algorithms for average completion time scheduling
Lemma OPT (I 0 ) ≤ (1 + )OPT (I )
Introduction
Lemma
Unweighted jobs
OPT (I 00 ) ≤ (1 +
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
1 0 m )OPT (I )
√ Now take = 1/ m
Weighted jobs Overview Algorithm Analysis
Lemma (B)
Conclusions
OPT (I 00 ) ≤ 1 +
√1 m
2
OPT (I ).
Lemma (A+B) w (s + p /2) ≤ 1+ j j j j
P
√1 m
2
OPT (I ).
Efficient algorithms for average completion time scheduling
Theorem Algorithm Online is 2 1 +
√1 m
2
-competitive.
Introduction Unweighted jobs
Proof. Step 2
Single machine 0
1
1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
2
Conclusions
Step 3
Parallel machines 0
1
2
3
Job j completes at Cj ≤ 2sj + pj
√ Loosing the O(1/ m)-term Correa and Wagner (IPCO2005) give a randomized 2 − 1/m competitive algorithm. 2 We give a 1.79 1 + √1m -competitive algorithm. Algorithm MIXED: Apply algorithm CW2005 for m < 320 Apply algorithm ONLINE for m = 320
Efficient algorithms for average completion time scheduling
Introduction Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions
Theorem Algorithm MIXED is (2 − 1/320) ≈ 1.997-competitive.
Conclusions/Open problems
Efficient algorithms for average completion time scheduling
Introduction
Efficient online algorithms with ratios less than 2 are possible for parallel machines Lower bounds indicate that ratios close to 1 are possible Our analysis for SRPT is ‘tight’. New idea is needed to close the gap. Our analysis of ONLINE is not tight. Probably, e/(e − 1) ≈ 1.58 is the real ratio. Minimizing average stretch: (Cj − rj )/pj . Minimizing mean busy time.
Unweighted jobs 1st observation 2nd observation 3rd observation 4th observation 5th observation Proof Theorem 1
Weighted jobs Overview Algorithm Analysis
Conclusions