• No results found

The 2 machine case

From the previous section we see that there is a huge gap between the lower and upper bound on the competitive ratio. To obtain more insight in the problem, it is useful to study special cases with a small number of machines. They are easier to study and the ideas behind the algorithms for these special cases might form a basis for improvements on the general case.

For the case with two machines, Chan et al. [10] prove a lower bound of 1 +p2/3 on the competitive ratio by considering the same sequence of jobs as in Theorem 2.6. The drawback of their approach lies in determining the makespan of the optimal offline schedule. Since there are 2 machine and 3 jobs with machine requirement of 1, a case distinction has to be made on the optimal solution. Trying to improve the lower bound by using job sequence σn as defined in Section 2.3.2 will only require

more case distinctions. To avoid this, we construct a slightly difference job sequence where the optimal schedule is uniquely determined. This sequence leads to the lower bound of 2.

2.4.1

Lower bound of 2

To prove a lower bound of 2 on the competitive ratio of any online algorithm for P 2|online − list, mj|Cmax, we are going to construct a series of job sequences and

argue that no online algorithm can have a makespan strictly less than twice the makespan of the optimal offline solution. In the following we assume A to be an

q

2

p

2

q

1

2

1

x

0

p

0

y

1

x

1

p

1

y

2

x

2

Figure 2.6: Structure of the online schedule for σ2.

online algorithm with competitive ratio 2− δ, with δ a small positive value, and we show that such an algorithm cannot exist.

We define a job sequence similar to the job sequence in Section 2.3.2. We define σn as the sequence of jobs (p0, q1, p1, q2, p2, . . . , qn, pn), where pi (qi) denotes a job

with processing time pi(qi) and a machine requirement of 1 (2). The job lengths are

defined as: p0= 1 p1= x0+ p0+ y1+ ǫ pi= 2· pi−1 ∀i ≥ 2 q1= x0+ ǫ qi= max{yi−1, qi−1, xi−1} + ǫ ∀i ≥ 2 ,

where xiand yiare values given by delays the online algorithm has used for placing

earlier jobs, and ǫ is a small positive value. Note that this job sequence only differs from the one in Section 2.3.2 in the definition of pi jobs. Again, the job lengths

depend on the online Algorithm A.

From the above definition of the processing times, it is not directly clear that the jobs can only be scheduled in the order they appear. Therefore, one part of the proof consists of showing that any online algorithm with competitive ratio strictly less than 2 has to schedule the jobs in the same order as they appear in the sequence σn. As a consequence, Figure 2.6 illustrates the structure of the online schedule.

Again, the only remaining decision for the online Algorithm A is to decide how long it delays the start of a job, i.e. how much time is left between the start of the current job and the completion of the previous job. As before, we denote by xi(yi) the delay

incurred by Algorithm A on job pi (qi), completing thereby also the definition of the

processing times.

To simplify notation for the remaining, we let Qn =Pni=1qi denote the sum of

processing times of the q-jobs and let Dn = x0+Pni=1(yi+ xi) denote the total delay

on the jobs. Assuming that jobs are scheduled in the same order as they appear in σn, the makespan of the online schedule for σn is given by:

CA(σn) = x0+ p0+ n X i=1 (yi+ qi+ xi+ pi) = n X i=0 pi+ Qn+ Dn .

q

2

p

0

p

2

p

1

q

1

2

1

Figure 2.7: Structure of the optimal offline schedule for σ2.

An optimal offline schedule for σn is obtained by scheduling the jobs p0, ..., pn−1

parallel to job pn after a block containing the jobs q1, ..., qn (see Figure 2.7). Note

that due to the definition of the p-jobs we have pn > Pni=0−1pi. Therefore, the

makespan of the optimal schedule is given by: C∗(σn) =

n

X

i=1

qi+ pn= Qn+ pn .

Using pn = 2n−1· p1 and Pni=1pi = (2n− 1) · p1, the competitive ratio of the

online Algorithm A on instance σn is given by

CA(σn) C∗n) = Pn i=0pi+ Qn+ Dn Qn+ pn = p0+ (2 n− 1) · p 1+ Qn+ Dn Qn+ 2n−1· p1 = 2Qn− Dn− p0+ p1 Qn+ 2n−1· p1 .

In Lemma 2.12 we prove that for an online Algorithm A with competitive ratio 2− δ we have Qi+ qi+1 < pi and xi+ yi+1 < pi. This last inequality implies that

online Algorithm A schedules the job pi after job qi (i ≥ 2), since pi = 2· pi−1 >

xi+ pi−1+ yi+1 implies that before qino gap on any of the machines is large enough

to accommodate pi. Furthermore, by definition of the length of job qi there is no

gap in the schedule before pi−1 in which job qican be scheduled. The same holds for

p1. Summarizing, an online algorithm with competitive ratio 2− δ has to schedule

the jobs in the order they appear in σn.

In Lemma 2.13 we prove that for an online Algorithm A with competitive ratio 2− δ

Qn− Dn− p0+ p1

Qn+ 2n−1· p1 → 0 ,

as n goes to infinity. However, this is a contradiction with the competitive ratio being strictly less than 2. As a result, we have proven the main theorem of this section.

Theorem 2.11. No online algorithm for P 2|online − list, mj|Cmax is (2 − δ)-

To complete the proof, in the following the proof of the two lemmata are given. Proof of the Lemmata

Lemma 2.12. If an online algorithm A has a competitive ratio of 2− δ, then Qi+ qi+1< pi (2.18)

and

xi+ yi+1< pi . (2.19)

Proof. We prove (2.18) and (2.19) simultaneously by induction on i. If ǫ is chosen suf- ficiently small than the following inequalities follow from the (2− δ)-competitiveness of algorithm A.

• x0< p0: After scheduling job p0 we have x0+ p0≤ (2 − δ) · p0.

• y1< p0: After scheduling job q1we have x0+ p0+ y1+ q1≤ (2 − δ) · (q1+ p0),

or equivalently x0+ y1 ≤ (1 − δ) · (q1+ p0). Using q1 = x0+ ǫ and ǫ small

enough, the inequality follows.

• x1 < x0: After scheduling job p1 we have x0 + p0+ y1+ q1 + x1+ p1 ≤

(2− δ) · (q1+ p1), or equivalently x0+ p0+ y1+ x1≤ (1 − δ) · (q1+ p1). Using

p1= x0+ p0+ y1, q1= x0+ ǫ and ǫ small enough, the inequality follows.

By definition q2= max{x0, y1, x1}. Combining this with the above, we get q2< p0.

Thus, q1+ q2< x0+ p0≤ p1 and (2.18) holds for i = 1.

To prove that (2.18) holds for i≥ 2 we assume that both (2.18) and (2.19) hold up to i− 1. Since (2.19) holds up to i − 1, the jobs up to job qi+1 are scheduled in

the order as they are in σn. Since Algorithm A is 2− δ competitive, after scheduling

job pi we have

p0+ (2i− 1) · p1+ Qi+ Di

Qi+ 2i−1· p1 ≤ 2 − δ ,

which implies that

Di− x0− y1< Qi . (2.20)

(This inequality is also used in the proof of Lemma 2.13.) By definition of the length of qi+1 we have either qi+1 = qi ≤ Qi or qi+1 = max{xi, yi} ≤ Di− x0− y1 < Qi

since i≥ 2. Combining this with the induction hypothesis we have Qi+ qi+1< 2· Qi< 2· pi−1= pi ,

To prove that (2.19) holds for i we assume that (2.18) holds up to i. Since A is 2− δ competitive after scheduling job qi+1 we have

p0+ (2i− 1) · p1+ Qi+ qi+1+ Di+ yi+1

Qi+ qi+1+ 2i−1· p1 ≤ 2 − δ ,

which implies that

Di+ yi+1− x0− y1< Qi+ qi+1 . (2.21)

(This inequality is also used in the proof of Lemma 2.13.) Combining this with (2.18), we have

xi+ yi+1≤ Di+ yi+1− x0− y1< Qi+ qi+1< pi ,

and (2.19) also holds for i.

Lemma 2.13. If an online algorithm A has a competitive ratio of 2− δ, then Qn− Dn− p0+ p1

Qn+ 2n−1· p1 → 0

(2.22) if n→ ∞.

Proof. We prove that (2.22) holds by bounding the asymptotic growth of Qn, i.e. by

showing that Qn ∈ O(1.8n). Since the denominator of (2.22) is in Ω(2n), this proves

the lemma.

We claim that either Qi+1≤ 1.8 · Qi or Qi+2≤ 3.2 · Qi. Combining this with the

fact that Qn is monotone and 1.82> 3.2, we have that Qn ∈ O(1.8n).

To prove the claim, assume that Qi+1> 1.8· Qi. This implies that qi+1> 0.8· Qi

by definition of Qi+1, and that Di − x0− y1 > 0.8· Qi since the value of qi+1 is

attained by one of the delays.

Now consider qi+2. If qi+2> qi+1, then by using (2.20)

qi+2≤ yi+1+ xi+1= Di+1− Di≤ Qi+1− 0.8 · Qi ,

and by using (2.21)

Qi+2= Qi+1+ qi+2≤ 2 · Qi+1− 0.8 · Qi≤ (4 − 0.8) · Qi .

On the other hand, if qi+2 = qi+1, we get Qi+2 = Qi+ 2· qi+1 ≤ 3 · Qi, since

qi+1≤ Qi.

So in both cases the claim is true, and we have proven the lemma.

For problem P 2|online − list, mi|Cmax, we have by Theorem 2.2 that the greedy

algorithm is 2-competitive. Together with the lower bound of 2 from Theorem 2.11 we know that the greedy algorithm is best possible.

1

β + ǫ

ǫ

2

1

1

β + ǫ

β

2

+ ǫ

ǫ

3

2

1

Figure 2.8: Bad instances for Algorithm P J with small number of machines.

H

1

L

1

E

1

F

1

L

2

(H

2

= 0)

F

′ 2

E

2

F

2

F

′′ 2

1

3

2

Figure 2.9: Structure of an online schedule created by Algorithm 3M.