20
Discrete Applied Mathematics 150 (2005) 140 – 159 www.elsevier.com/locate/dam Semi-online scheduling jobs with tightly-grouped processing times on three identical machines Yong He a, b , György Dósa c a Department of Mathematics, Zhejiang University, Hangzhou 310027, PR China b State Key Lab of CAD & CG, Zhejiang University, Hangzhou 310027, PR China c Department of Mathematics, University of Veszprém, Hungary Received 4 February 2003; received in revised form 3 August 2004; accepted 8 December 2004 Available online 10 May 2005 Abstract This paper investigates the semi-online version of scheduling problem P ||C max on a three-machine system. We assume that all jobs have their processing times between p and rp (p> 0,r 1). We give a comprehensive competitive ratio of LS algorithm which is a piecewise function on r 1. It shows that LS is an optimal semi-online algorithm for every r ∈[1, 1.5], [ 3, 2] and [6, +∞). We further present an optimal algorithm for every r ∈[2, 2.5], and an almost optimal algorithm for every r (2.5, 3] where the largest gap between its competitive ratio and the lower bound of the problem is at most 0.01417. We also present an improved algorithm with smaller competitive ratio than that of LS for every r (3, 6). © 2005 Elsevier B.V.All rights reserved. MSC: 90B35; 90C27 Keywords: Analysis of algorithm; Scheduling; Semi-online; Competitive ratio 1. Introduction In the parallel identical machine scheduling problem P ||C max we are confronted with a sequence J of independent jobs with positive processing times (sizes) p 1 ,p 2 ,...,p n , that The research was supported by the National Natural Science Foundation of China (10271110), and TRAPOYT of China. E-mail addresses: [email protected] (Y. He), [email protected] (G. Dósa). 0166-218X/$ - see front matter © 2005 Elsevier B.V. All rights reserved. doi:10.1016/j.dam.2004.12.005

Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

  • Upload
    yong-he

  • View
    214

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

Discrete Applied Mathematics 150 (2005) 140–159

www.elsevier.com/locate/dam

Semi-online scheduling jobs with tightly-groupedprocessing times on three identical machines�

Yong Hea,b, György DósacaDepartment of Mathematics, Zhejiang University, Hangzhou 310027, PR ChinabState Key Lab of CAD & CG, Zhejiang University, Hangzhou 310027, PR China

cDepartment of Mathematics, University of Veszprém, Hungary

Received 4 February 2003; received in revised form 3 August 2004; accepted 8 December 2004Available online 10 May 2005

Abstract

This paper investigates the semi-online version of scheduling problemP ||Cmaxon a three-machinesystem.We assume that all jobs have their processing times betweenpandrp (p>0, r�1).We give acomprehensive competitive ratio ofLSalgorithmwhich is a piecewise function onr�1. It shows thatLSis an optimal semi-online algorithm for everyr ∈ [1,1.5], [√3,2] and[6,+∞).We further presentan optimal algorithm for everyr ∈ [2,2.5], and an almost optimal algorithm for everyr ∈ (2.5,3]where the largest gap between its competitive ratio and the lower bound of the problem is at most0.01417. We also present an improved algorithm with smaller competitive ratio than that ofLS foreveryr ∈ (3,6).© 2005 Elsevier B.V. All rights reserved.

MSC:90B35; 90C27

Keywords:Analysis of algorithm; Scheduling; Semi-online; Competitive ratio

1. Introduction

In the parallel identical machine scheduling problemP ||Cmaxwe are confronted with asequenceJ of independent jobs with positive processing times (sizes)p1, p2, . . . , pn, that

� The researchwas supported by theNational Natural Science Foundation of China (10271110), andTRAPOYTof China.

E-mail addresses:[email protected](Y. He),[email protected](G. Dósa).

0166-218X/$ - see front matter © 2005 Elsevier B.V. All rights reserved.doi:10.1016/j.dam.2004.12.005

Page 2: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159 141

must be non-preemptively scheduled onmparallel and identical machinesP1, P2, . . . , Pm.We identify the jobs with their sizes. The machines are available at time zero. Theloadof a machine is the sum of the sizes of the jobs assigned to that machine. The objective isto minimize the maximum machine loadCmax, calledmakespan. A scheduling problem iscalledonlineif it requires to schedule jobs irrevocably onmachines as soonas they are given,without knowing about the jobs that follow later on. If we have complete information aboutthe job data before constructing a schedule, this problem is calledoffline. If the problem iscalledsemi-online with tightly-grouped processing times, we know in advance that all jobshave their sizes betweenp andrp (p>0, r�1). The parameterr is calledsize ratio. It isallowed that the jobs with sizep or/andrp may not come up in this semi-online problem,sincep and rp are only the lower and upper bounds of job sizes. By normalization, weassume in this paper thatp = 1. In fact, we will see that the knowledge ofp is unnecessaryfor designing our algorithms. It is clear that the information is useless ifr is sufficientlylarge, hence we are interested in the maximumr, denoted byrmax, for which a semi-onlinealgorithm can have a better performance than that for the pure online problem. Then thesequence satisfyingr < rmax can be called tightly-grouped.In a worst-case analysis, the performance of an online or a semi-online algorithm is

measured by itscompetitive ratio. For a job sequenceJ and an algorithmA, letwA denotethe makespan produced byA, andw∗ the optimal makespan in an offline version. Then thecompetitive ratio ofA is defined asRA =supJ wA/w∗.An online (semi-online) schedulingproblem hasa lower bound cif no online (semi-online) algorithm can have a competitiveratio of lower thanc. An online (semi-online) algorithm is calledoptimal if its competitiveratio matches the lower bound of the problem.For the pure online version of the discussed problem, Graham[10] proposed a simple

greedy algorithm calledList Scheduling(LS in short). This algorithm always assigns theincoming job to the machine with minimum current load. Graham showed thatRLS = 2−1/m. Faigle et al.[8] observed thatLS is an optimal online algorithm form = 2,3. Fora large number of machines, several algorithms have been proposed which have slightlysmaller competitive ratios than that ofLSalgorithm[1,2,5,9,19]. The competitive ratio ofan optimal online algorithm is now known to lie in the interval[1.88,1.9201] [9,17].Since Liu et al.[16] investigated a semi-online version ofP ||Cmax, where a schedule

must be created only knowing that the data of the job sizes are ordinal, many researchers[4,13,15,18,21]have proposed several semi-online variants onP ||Cmax. Refs.[3,11,12]considered semi-online problems with the objective of maximizing the minimum machineload. Refs.[6,7,20]also investigated semi-online problems in case of uniform machines.Ref. [22] considered a semi-online problem with machine available times.The semi-online scheduling problemwith tightly-groupedprocessing timeswasproposed

in [13]. Form=2, it was shown[13] that theoptimal semi-onlinealgorithmhasacompetitiveratio of(1+r)/2 for any 1�r�2 and32 for anyr >2. It states that a job sequence is tightly-grouped form=2 iff r <2. However, the optimal semi-online algorithm is justLS, the sameas that for the pure online problem. Noting thatLSis also an optimal algorithm for the pureonline problem ifm = 3, it is interesting to know whether it is still optimal for everyr�1,although the competitive ratio may become smaller than5

3 for smallr. It can also be shown[11] that LS is optimal with competitive ratio of 1+ (m − 1)(r − 1)/m for anym�3and 1�r�m/(m − 1). In this paper we focus onm = 3. We first present a comprehensive

Page 3: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

142 Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159

1.5 2 2.5 3

1.1

1.2

1.3

1.4

1.5

1.6

Fig. 1. Competitive ratios and lower bound forr ∈ [1,3].

competitive ratio ofLS, which is a piecewise function onr and can be formulated as follows:

RLS =

1+ 2(r − 1)

3if 1�r� 3

2,

2− 3

r + 3if

3

2<r�

√3,

r + 1

2if

√3<r�2,

2− 1

rif 2<r�3,

5

3if 3<r.

For r <3 we thus obtain competitive ratios below the ratio53, given by the pure on-lineoptimal algorithm.LSalgorithm is optimal only forr ∈ [1, 32], [

√3,2] and[6,+∞). We

further present an optimal algorithm calledALG1with competitive ratio of32 for r ∈ (2, 52],an almost optimal algorithmcalledALG2with competitive ratio of(4r+2)/(2r+3) for r ∈(52,3], while the lower bound is at least(7r+4+√

r2 + 8r + 4)/(2r+2+2√

r2 + 8r + 4).The largest gap between them is atmost 0.01417. Forr ∈ (3,6)wealso present an improvedalgorithm calledALG3with smaller competitive ratio than that ofLS. The competitive ratiois 5/3− �/18, where� = min{(6− r)/18,3/103}. All algorithms run inO(n) time. Theproblem of finding optimal algorithms forr ∈ (32,

√3) andr ∈ (52,6) is still open. On the

basis of the above results, we conclude that a job sequence is tightly-grouped form = 3 iffr <6, further the optimal semi-online algorithms strongly depend on the value ofr, andLSis not always optimal.Fig. 1 illustrates the competitive ratios ofLSand the new algorithms, as well as the best

lower bound for 1�r�3. Note that for 3/2<r�√3 we use a trivial lower bound43. Since

Page 4: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159 143

the gap between the competitive ratios ofLSandALG3 is quite small for 3<r <6, we donot show them inFig. 1.This paper is structured as follows. Section 2 presents some preliminary results.

Section 3 investigates the competitive ratio ofLS. Section 4 proposes improved algorithmsfor the intervals ofr, whereLS is not optimal.In the following, we assume that jobs come in the order ofp1, p2, . . . , pn. Since it is

allowed that the jobswith sizespand/orrpmaynot occur, wedenote bypmin=mini=1,...,npi

the actual smallest job size. Remember thatpmin�1 and 1�pi �r, i=1,2, . . . , n (becausewe assumep = 1).

2. Preliminaries

Lemma 2.1. For any job sequenceJ satisfying |J|�6 and r�2, we havewLS/w∗

�1+ (r − 1)/2.

Proof. For n = 1,2,3, it is clear thatLSyields an optimal solution. Forn = 4,5,6, it isclear thatLSassigns the first 3 jobs to different machines. Without loss of generality, weassume thatp1�p2�p3 andpi is assigned toPi, i = 1,2,3 byLS, andpn determines themakespan ofLS, wLS . Sincer�2, LSdoes not assign three or more jobs to a machine. Itfollows thatwLS = pn−3 + pn for everyn = 4,5,6.Suppose that there is an optimal schedule such thatpn−3 orpn is not a single job assigned

to itsmachine, for examplepn−3 shares amachinewithpj in the optimal schedule. ThenwehavewLS/w

∗ �(pn−3+pn)/(pn−3+pj )�(pn−3+ r)/(pn−3+1)=1+ (r −1)/(pn−3+1)�1+(r −1)/2. If bothpn−3 andpn are single jobs assigned to their respectivemachinesin anyoptimal schedule, we claim thatn=4. In fact, if the third optimal machine processesat least 3 jobs, then, since 1�r�2, the schedule improves if we move one of them ontothe machine with one job. Hence the third optimal machine processes exactly 2 jobs, andn = 4. It follows that bothpn−3 (=p1) andpn are greater than every remaining job, sincethey are alone in any optimal schedule. This contradictsp1�p2�p3. We are done. �

The next lemma can be easily verified by an averaging argument.

Lemma 2.2. LetA be an algorithm that schedules all jobs onmachineswithout introducingany idle time between consecutive two jobs, further schedules the last jobpn on themachinewith the minimum current load. Ifpn determines the makespan of A, we havepn�(3/2)(wA − w∗).

In the following sections of this paper, we denote byPi both theith machine and the jobsassigned to thismachine by a semi-online algorithm, right before the last job comes; byl(Pi)

the current load of machinePi right before the last job comes; and bys =mini=1,...,m l(Pi)

the minimum current machine load for the time given above. We denote byP ∗i both theith

optimal machine and the jobs assigned to this machine after assigning all jobs in an optimalschedule.

Page 5: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

144 Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159

3. The competitive ratio ofLS algorithm

This section is devoted to presenting the comprehensive competitive ratio ofLSalgorithmwith parameterr�1. It can be described as in the following theorem.

Theorem 3.1. LS algorithm has a competitive ratio of

RLS =

1+ 2(r − 1)

3if 1�r� 3

2,

2− 3

r + 3if

3

2<r�

√3,

r + 1

2if

√3<r�2,

2− 1

rif 2<r�3,

5

3if 3<r

and it is an optimal semi-online algorithm when1�r� 32,

√3�r�2 andr�6.

We show the result part by part. First, we have

Theorem 3.2(He [11] , He and Zhang[13]). If 1�r� 32, LS has a competitive ratio of

1+ 2(r − 1)/3,and is optimal.

Theorem 3.3. If r�3,LS has a competitive ratio of53, and is optimal forr�6.

Proof. From Graham’s seminal work[10] we have thatwLS/w∗ �5/3 for anyr�1. The

sequencewith jobs{p1=· · ·=p6=1, p7=3} shows thatLScannot have a competitive ratiosmaller than53 for anyr�3. Forr�6, any semi-online algorithm must have a competitiveratio of at least53, as proved by the sequence{p1=p2=p3=1, p4=p5=p6=3, p7=6},see[8]. In fact, if an algorithmAdoes not assign the first three jobs to distinctmachines, thenno new job comes.We getwA/w∗ �2. If A assigns the first three jobs to distinct machines,the next three jobs come. These jobs must also be assigned to distinct machines, otherwisewe havewA/w∗ �7/4. Finally, the last jobp7 comes. We getwA/w∗ = 10/6. �

Henceweare left to consider 3/2�r�3.Weprove the results in the next two subsections.

3.1. The competitive ratio of LS for3/2<r�2

Theorem 3.4. For 3/2<r�2, the competitive ratio of LS is

RLS =max

{r + 1

2,2− 3

r + 3

}=

2− 3

r + 3if

3

2<r <

√3,

r + 1

2if

√3�r�2

and LS is optimal for every√3�r�2.

Page 6: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159 145

Becauseof Lemma2.1,weonly need to consider the case|J|>6.To show theworst-casebehavior ofLSalgorithm for 3/2<r�2 and|J|>6, consider the following job sequence:J1 = {1,1,2r/3, (r + 3)/3, (r + 3)/3, (6− r)/3, r}. We havewLS = (4r + 6)/3, w∗ =(2r +6)/3, and thuswLS/w

∗ = (2r +3)/(r +3)=2−3/(r +3). It states thatLSalgorithmcannot have a competitive ratio smaller than 2− 3/(r + 3) for 3/2<r <

√3. Furthermore,

the job sequenceJ0 = {1,1,1, r} can show the optimality ofLSfor√3�r�2.

Lemma 3.1. Let J be any job sequence with|J|>6, then we havewLS/w∗ �

(2r + 3)/(r + 3) for any3/2<r�2.

Proof. Suppose that there exists a counterexampleJ with |J|>6 such thatw∗ =[(2r + 6)/3]t andwLS > [(4r + 6)/3]t with somet >0. It is clear according to Lemma2.2 thatpn > rt . Frompn/pmin�r results thatpmin> t . We will get a contradiction by thefollowing technical lemmas.

Lemma 3.2. pn < [(2r + 3)/3]t .

Proof. If pmin> [(2r + 6)/9]t , from 3pmin> [(2r + 6)/3]t = w∗ we obtain that none ofthe optimal machines can process more than two jobs, which contradicts|J|>6. We thusgetpmin�[(2r + 6)/9]t . It implies thatpn�rpmin�[(2r2+ 6r)/9]t < [(2r + 3)/3]t . �

Lemma 3.3. Assumepn ∈ P ∗1 , then|P ∗

1 | = 2.

Proof. Sincepn + 2pmin>rt + 2t > [(2r + 6)/3]t = w∗, we have|P ∗1 |�2. If |P ∗

1 | = 1,∑n−1i=1 pi �2w∗ = [(4r + 12)/3]t holds. It implies thats�(

∑n−1i=1 pi)/3�[(4r + 12)/9]t .

Combining it with Lemma 3.2, we havewLS = s +pn < [(4r + 12)/9]t + [(2r + 3)/3]t �[(4r + 6)/3]t , which is a contradiction. Hence|P ∗

1 | = 2. �

Lemma 3.4. |Pi | = 2 for i = 1,2,3,and|J| = 7.

Proof. If there exists an indexi ∈ {1,2,3} satisfying|Pi |�3, l(Pi)�3pmin>3t holds.Sinces�(3w∗ − pn)/3< [(2r + 6)/3]t − rt/3= [(r + 6)/3]t <3t (due topn < rt andr�2), LS does not assignpn to Pi . Hence after assigning all jobs byLS, there are twomachines, one with a load of at leastwLS > [(4r +6)/3]t , another with a load of at least 3t .Since the total size of all jobs is at most 3w∗ = (2r + 6)t , the third machine has a load of atmost(2r + 6)t − [(4r + 6)/3]t − 3t = [(2r + 3)/3]t . Hences�[(2r + 3)/3]t . Combiningit with wLS > [(4r + 6)/3]t , we obtainpn > [(2r + 3)/3]t , which contradicts Lemma 3.2.Thus we get that|Pi |�2 for i = 1,2,3. Since|J\{pn}|�6, we conclude that|Pi | = 2 fori = 1,2,3, and|J| = 7. �

Nowwe are ready to finish the proof of Lemma 3.1. Since 4pmin>4t �[(2r+6)/3]t , weget that|P ∗

i |�3, i = 1,2,3. Combining it with Lemmas 3.3 and 3.4, we can assume thatP ∗1 = {pn,X}, P ∗

2 = {Y,U}, andP ∗3 = {A,B,C}. If there is a machinePk which processes

two jobs in{A,B,C} before assigningpn in theLSschedule, then its load would be nogreater thanw∗ −pmin< [(2r +6)/3]t − t =[(2r +3)/3]t . By assigningpn to this machine

Page 7: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

146 Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159

we obtainwLS �[(2r + 3)/3]t + [(2r + 3)/3]t = [(4r + 6)/3]t , a contradiction. Thus jobsA, B, andC are assigned to different machines in theLSschedule. Consider the machinewhich processesX in theLSschedule. By Lemma 3.4, there is onemore job on this machinebefore assigningpn in theLSschedule. Without loss of generality, assume that this job isA. ThusX + A + pn > [(4r + 6)/3]t . Combining it withX + pn�w∗ = [(2r + 6)/3]t ,we getA>(2r/3)t , thusB + C�w∗ − A< [(2r + 6)/3]t − (2r/3)t = 2t . It implies thatmin{B,C}< t <pmin, a contradiction. �Finally, we can prove Theorem 3.4 as follows.

Proof. For any sequenceJ with |J|�6, we havewLS/w∗ �(r + 1)/2; and for any

sequenceJ with |J|>6, we havewLS/w∗ �(2r + 3)/(r + 3). Hence we obtain that

wLS/w∗ � max{(2r + 3)/(r + 3), (r + 1)/2} for any sequence. Noting that(2r + 3)/(r +

3) and (r + 1)/2 are continuous, monotonically increasing regardingr, and (2r + 3)/(r + 3)�(r + 1)/2 iff r�

√3, we thus get the desired competitive ratio.�

3.2. The competitive ratio of LS for2<r <3

To get the worst-case behavior ofLSalgorithm for 2<r <3, consider the following jobsequence:J2 = {1,1,1/(r − 1),1/(r − 1), r/(r − 1)}. We havewLS = (2r − 1)/(r − 1),w∗ = r/(r − 1), and thuswLS/w

∗ = (2r − 1)/r.

Theorem 3.5. For any2<r <3,we havewLS/w∗ �(2r − 1)/r.

Proof. Suppose that there exists a sequenceJ such thatw∗ = rt andwLS > (2r − 1)twith somet >0. Similarly, we assume that theLSmakespan is achieved bypn. It is clearby Lemma 2.2 thatpn > [(3r − 3)/2]t . Similar to Section 3.1, we first prove the followingresults. �

Lemma 3.5. Assume thatpn ∈ P ∗1 . Then|P ∗

1 | = 1.

Proof. Otherwise, if there existsX �= pn satisfyingX ∈ P ∗1 , it follows thatX�w∗ −

pn < rt − [(3r − 3)/2]t = [(3− r)/2]t . Combining it withpn > [(3r − 3)/2]t , we havepn/X> (3r − 3)/(3− r)> r, a contradiction. �

Lemma 3.6. Assume thatpn is assigned to machinePi in the LS schedule. Then|Pi | = 1.

Proof. Recall thatPi denotes the jobs assigned to that machine right beforeLS assignspn. Clearly, |Pi |>0 holds. By Lemma 3.5, we get

∑n−1i=1 pi �2w∗ = 2rt . It implies

s�(∑n−1

i=1 pi)/3�2rt/3. If |Pi |>1, there must be a job, sayY, satisfyingY ∈ Pi andY �s/2�(2rt/3)/2= rt/3. Thenpn/Y > (9r − 9)/2r�r, a contradiction. We thus get|Pi | = 1. �

Lemma 3.7. Denote by Z the job which shares the same machine withpn in LS schedule,and assume thatZ ∈ P ∗

2 . Then|P ∗2 |>1.

Page 8: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159 147

Proof. Suppose thatZ is the unique job inP ∗2 . Lemma 3.5 states thatpn is the unique job in

P ∗1 .Henceall jobsexceptZandpn are inP ∗

3 , andareassigned to twomachines (notPi) in theLSschedule. It implies that there exists a machine with current load of at mostw∗/2= rt/2beforeLSassignspn. Schedulingpn to that machine, we havewLS �rt/2+ rt �(2r −1)t ,a contradiction. �

Nowwe return to prove Theorem 3.5. SupposeU is another job, exceptZ in P ∗2 . Then we

haveU �w∗ −Z=rt −Z. ByZ=wLS −pn > (2r −1)t −pn and[(3r −3)/2]t <pn�rt ,thus we obtain

pn

U� pn

rt − Z>

pn

rt − ((2r − 1)t − pn)= pn

t − rt + pn

� rt

t − rt + rt= r.

This is the desired contradiction that concludes the proof.

4. Improved semi-online algorithms for2<r <6

In the following, we further denote byw∗k the current optimalmakespan for the firstk jobs

p1, . . . , pk in sequence, and byC1,k = (∑k

i=1pi)/3 a trivial lower bound ofw∗k . Denote

by L(Pi) the current load of machinePi during the procedure of running an algorithm.Remember thatl(Pi) denotes the current load of machinePi right before assigningpn bythe algorithm, ands =mini=1,...,m l(Pi), as defined in Section 2. Before going to the mainline, we first introduce a new procedureALG(�), which assigns jobs to the most loadedmachine as long as its new load does not exceed� times of the current optimal makespanor its lower bound, where� is the desired competitive ratio. This technique was proved tobe useful when obtaining better algorithms for the pure online problem, when the numberof machines was large[5,14]. Formally the procedure can be described as follows:ProcedureALG(�):

1. Fork = 1,2,3, assign thekth job to machinePk. Setk = 4.2. If k�7, computew∗

k and setCU = �w∗k . If k >7, computeC1,k and setCU = �C1,k.

3. Let I be the set of machines whose current loads are at mostCU − pk. If I = ∅, thealgorithm fails.

4. LetPi0 be the machine with maximum current load inI. Assign jobpk to machinePi0.5. k = k + 1. If no more job comes, stop; otherwise go to 2.

Noting that in the above algorithm we only calculatew∗k for k�7, the algorithm still

runs in linear time regardingn. We will show (for example, see Lemma 4.1) that it sufficesto replacew∗

k by C1,k whenk >7 to get our competitive ratios. In fact, it is impossible toget the exact value ofw∗

k for largek in polynomial time, unlessP = NP , since the offlineproblemP3||Cmax isNP-hard.

4.1. An optimal semi-online algorithmALG1 for 2<r�5/2

This subsection presents an algorithmALG1 and shows that it is optimal for 2<r�5/2.

Page 9: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

148 Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159

Algorithm ALG1: Set� = 3/2, and runALG(�).

Theorem 4.1. For 2<r�5/2,ALG1 has a competitive ratio of32, and it is optimal.

Proof. It is trivial that for anyr >2, the job sequence{1,1,1,2} shows that the lowerbound of the problem is32. To show thatALG1 is 3

2-competitive, we only need to show thatALG1 can schedule all jobs. Suppose that there exists a job sequenceJ such thatALG1fails (the algorithm stops at Step 3). Hence, without loss of generality, we can assume thatALG1 cannot schedule the last jobpn. We first show some properties onJ.

Lemma 4.1. |J|�7.

Proof. DenoteT = ∑ni=1pi . Then the current value ofCU is at least 3/2 · T/3= T/2

right before assigningpn by ALG1. Hence we gets + pn >T/2. It is trivial that 3s +pn�T . From these inequalities it follows thatpn >T/4 and s <T/4. r�5/2 impliespmin�pn/r >T/10.Without lossofgenerality,weassume thatl(P3)=s.Thens+pn >T/2implies l(P1) + l(P2)<T/2. It follows that machinesP1, P2 process at most four jobsaltogether, before assigningpn. l(P3)= s <T/4 andpmin>T/10 imply thatP3 processesat most two jobs, before assigningpn. Hence we conclude that|J|�7. �

From Lemma 4.1 we know that the current value ofCU equals(3/2)w∗, whenALG1assignspn.

Lemma 4.2. pn is a single job on its optimal machine, w∗ <3,and|J|�5.

Proof. Letw be the makespan which is yielded by assigning the firstn− 1 jobs byALG1and assigningpn by LS. Thenw = s +pn >CU = (3/2)w∗, sinceALG1 cannot schedulepn. Hence, according to Lemma 2.2, we getpn�(3/2)(w − w∗)> (3/4)w∗. Becausepn�r�5/2, we getw∗ �10/3. Thusw∗ − pn <w∗ − (3/4)w∗ <1. It follows thatpn isa single job on its optimal machine. Hence we haves� 1

3

∑n−1i=1 pi �(2/3)w∗. Combining

it with s + pn > (3/2)w∗, we getpn > (5/6)w∗. It follows thatw∗ <3 due topn�5/2.Fromw∗ <3, and the fact that the size of each job is at least 1, we get that every optimal

machine processes at most two jobs. Aspn is alone in the optimum, it follows that|J|�5.�

Now we are ready to prove Theorem 4.1. By Lemma 4.2, we assume thatP ∗3 = {pn}.

If |J|�3,ALG1 yields an optimal solution. If|J|=4, there exists an optimal machine,sayP ∗

1 , which processes at least two jobs. Hence there exists a job, sayX, which is assignedtoP ∗

1 and satisfiesX�w∗/2.X �= pn, sincepn is inP ∗3 . Therefore we haves�X�w∗/2.

It follows thatw = s + pn�w∗/2+ w∗ = (3/2)w∗, a contradiction.Finally, if |J|=5, there are two optimal machines, each of which processes two jobs, and

the third one processesp5. DenoteP ∗1 = {X, Y } andP ∗

2 = {U,V } with Y �X andV �U .ThenY �w∗/2 andV �w∗/2. Sincew∗

4�2 holds trivially andw∗ <3, the current value ofCU satisfiesCU = (3/2)w∗

4 >w∗ when assigning the fourth job. We next shows�w∗/2.In fact, if the fourth job isX (orU), then there are at least two jobs among the first three jobs,

Page 10: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159 149

each with a size of at mostw∗/2. Hence, right afterALG1 assigns the fourth job, there stillexists a machine with current load of at mostw∗/2. If the fourth job isY (orV), then thisjob can be assigned to the machine which has processedX (or U), before assigningY (orV), because of theALG1 rule, and becauseCU >w∗ �X + Y (orCU >w∗ �U + V ). Itimplies that there also exists a machine which only processesV (orY), and thus the currentload is at mostw∗/2. Hence we always haves�w∗/2. It follows thatp5 + s�(3/2)w∗,again a contradiction. Therefore the proof of Theorem 4.1 is complete.�

4.2. An improved semi-online algorithmALG2 for 5/2<r�3

This subsection introduces an algorithmALG2 with competitive ratio ofRALG2(r) =(4r +2)/(2r +3) for 5/2<r�3, while the lower bound of the problem is at leastLB(r)=(7r + 4+ √

r2 + 8r + 4)/(2r + 2+ 2√

r2 + 8r + 4).We first show the lower bound. Consider the job sequenceJ3 = {1,1,1, X,X,X, r},

where 1�X�r. It is obvious that if(2X + 1)/(X + 1)�(X + 1 + r)/(2X + 1), thenany semi-online algorithm has a competitive ratio of at least(X + 1+ r)/(2X + 1). TakeX=(r−2+√

r2 + 8r + 4)/6, then(X+1+r)/(2X+1)=(7r+4+√r2 + 8r + 4)/(2r+2+

2√

r2 + 8r + 4). Denote it byLB(r). Hence, for any5/2�r�3, any semi-onlinealgorithmhas a competitive ratio of at leastLB(r).Algorithm ALG2: Set� = (4r + 2)/(2r + 3), and runALG(�).

Remark 4.1. Note that the functionsRALG2(r) andLB(r) are monotonically increasingregardingr,RALG2(2.5)=1.5andRALG2(3)=14/9≈ 1.5555,LB(2.5)=1.5andLB(3) ≈1.5414. Furthermore min{RLS(r)−RALG2(r)| 2.5�r�3}=1/10, and max{RALG2(r)−LB(r)| 2.5�r�3} ≈ 0.01417, henceALG2 is much better thanLSand almost optimalfor any 2.5<r�3.

To show thatALG2 cannot be better than(4r + 2)/(2r + 3)-competitive, it suffices toconsider the job sequenceJ4={1,1,1+ �,1+ �,1+2�,1+2�, r}, where�= (2r −5)/8and 2.5<r�3. For this job sequence, we get thatP1=P2={1,1+2�}, P3={1+�,1+�, r},P ∗1 = P ∗

2 = {1,1+ �,1+ 2�}, P ∗3 = {r}. HencewALG3/w

∗ = (4r + 2)/(2r + 3). By aneasy calculation withJ4, we can conclude that lowering the value of� does not help usimprove the worst-case performance for 2.5<r�3.To obtain the desired competitive ratio, we prove thatALG2 schedules all jobs. We

do it again by contradiction. Hence we suppose that there exists a job sequenceJ suchthatALG2 cannot schedule the last jobpn. Let w be the makespan which is yielded byassigning the firstn − 1 jobs byALG2 and assigningpn by LS. Thenw = s + pn. SinceALG2 cannot schedulepn, w> [(4r + 2)/(2r + 3)]w∗ �(3/2)w∗. From Lemma 2.2, wegetpn > (3/4)w∗. Combining it withpn�r�3, we obtainw∗ <4.

w∗ <4 implies thateveryoptimalmachineprocessesatmost three jobs.Bypn > (3/4)w∗,we getpn + 1>w∗. Hencepn is a single job on its machine in the optimum. Therefore|J|�7 and

s� 1

3

n−1∑i=1

pi �2

3w∗. (1)

Page 11: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

150 Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159

Lemma 4.3. If |J|�5,ALG2 schedules all jobs.

Proof. The proof for the case|J|�4 is similar to that in Theorem 4.1. Thus we supposethat |J| = 5. Consider the assignment of jobp5 in theALG2 schedule. According to thealgorithm rule, there are twomachines processing one job, and onemachine processing twojobs at that time. Without loss of generality, suppose thatX,U, V, Y are the first four jobs,XandU are assigned to the first and second machines respectively, whileV, Y are assignedto the third machine in theALG2 schedule, andY is the fourth job.First we estimate the sizes of these four jobs. We claim thatX>w∗/2 andU >w∗/2.

Otherwise, we can assignp5 to the machine processingX orU with a size no greater thanw∗/2, and thusw�3w∗/2, a contradiction. HenceX>w∗/2 andU >w∗/2. If V (orY) isalso more thanw∗/2, considering thatp5 is a single job on its optimal machine, we cannotschedule jobsX,U , andV (orY) with sizes of greater thanw∗/2 into two optimal machines,a contradiction. Thus we get thatV �w∗/2 andY �w∗/2.Next we consider the optimal schedule. If there exists an optimal machine processing

three jobs, asw∗/2+ 2>w∗ (due tow∗ <4), then every job on this machine has a size ofat mostw∗/2. Thus three of the jobsX,U, V, Y are less thanw∗/2, contradicting the aboveestimation. Thus we can conclude thatY shares an optimal machine withX or U. Withoutloss of generality, we suppose thatYshares an optimal machine withX. ThenX + Y <w∗.It is obvious thatw∗

4�V + Y andw∗4�X. It follows that

w∗4� V + Y

2+ X

2. (2)

BecauseALG2 does not assignY to the machines which processX or U, andX,U �V ,hence, according to the algorithm rule, we get

4r + 2

2r + 3w∗4 <X + Y . (3)

Combining (2) and (3), we getX + Y > (r + 1/2)V . Substituting it intoX + Y <w∗, wegetw∗ >(r + 1/2)V �r + 1/2. Then from this inequality and (1), we have

w

w∗ = s + p5

w∗ �23w

∗ + r

w∗ <2

3+ r

r + 12

= 10r + 2

6r + 3� 4r + 2

2r + 3,

where the last inequality is due tor�5/2. This contradiction finishes the proof ofLemma 4.3. �

Lemma 4.4. If |J| = 6 or |J| = 7,ALG2 schedules all jobs.

Proof. Assume thatALG2 assigns jobpn−1 to machinePj . We first show thatPj is theleast loaded machine right before assigningpn−1, and next two inequalities

l(Pj )�1+ pn−1, (4)

w∗n−1�1+ pn−1. (5)

Page 12: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159 151

Two cases are considered as follows:Case1: |J| = n = 6. Without loss of generality, supposeP ∗

3 = {p6}. As we have shownthat every optimal machine processes at most three jobs, we assume thatP ∗

1 processes threejobs,P ∗

2 processes two jobs. DenoteP∗1 ={A,B,C} andP ∗

2 ={D,E}, whereD�E. Sincew∗ <4 and every job has a size of at least 1, we get thatA,B andC have a size of at mostw∗ − 2<w∗/2.D�w∗/2 holds trivially.Consider the assignment ofALG2 right before assigningp6. If there is a machine with

current load of at mostw∗/2, we gets�w∗/2 and thusw�w∗/2+ p6�(3/2)w∗, a con-tradiction. We can also assume thatE >w∗/2 (if not, all jobs exceptpn have a size ofat mostw∗/2; in this case there must exist a machine with a load of at mostw∗/2 atthat time). From above, we conclude that there exists a machine processing only a sin-gle jobE, and other two machines process two jobs at that time. ThenE �= p5, becauseALG2 assigns the first three jobs to distinct machines, i.e.p5 is one job in{A,B,C,D}and hencep5�w∗/2. FromE �= p5, we know that the machine processingp5 also pro-cesses another job. Hence we obtainl(Pj )�1 + p5, because every job has a size of atleast 1.Consider the time right before assigningp5. It is clear thatPj processes only one job

(not E) and thus has a current load of less thanw∗/2<2. Moreover, one of other ma-chines processes jobE, and the third machine processes two other jobs. By comparingthe current machine loads, we can easily conclude that machinePj is the least loadedmachine.To show (5), we consider an optimal schedule for the job sequence{A,B,C,D,E}. If

p5 is alone on its optimal machine, so isE, sinceE >w∗/2�p5. On the other hand, sinceany two jobs have a total size of at least 2>w∗/2�p5, we find that the remaining three jobsexceptE andp5 do not share a machine. A contradiction. Hencep5 must share a machinewith another job. It follows thatw∗

5�1+ p5.Case2: |J| = n = 7. Similarly supposeP ∗

3 = {p7}. Then each ofP ∗1 andP ∗

2 contains 3jobs, and thusw∗ �3. Asw∗ <4, we obtainpi <2, i = 1, . . . ,6.Consider the assignment ofALG2 right before assigningp7. Remember that the first

three jobs are assigned to distinct machines. If there is a machine processing at least threejobs, there is another machine processing only one job, denoted byX. It follows thats�X.It is clear thatX�w∗ − 2, since it shares an optimal machine with other two jobs. We thusobtain

w = s + p7�X + r�w∗ − 2+ 3�w∗ + 1< 32 w∗,

where the last inequality holds because ofw∗ �3, a contradiction. Therefore we concludethat every machine processes exactly two jobs right before assigningp7 in the ALG2schedule. It follows thatl(Pj )�1+ p6.Next consider the assignment ofp6 in theALG2 schedule. SetL=min{L(Pi) : i �= j},

thenL�2, since the other two machines (exceptPj ) have processed two jobs at that time.But there is only one job assigned toPj before assigningp6, andpi <2, i=1, . . . ,5, henceL(Pj )<2. It means thatL(Pj )<L, i.e.p6 is assigned to the least loaded machine.We prove (5) as follows. Since any two jobs have a total size of at least 2>p6, p6 must

shareamachinewithanother job inanoptimal schedule for the jobsequence{p1, p2, . . . , p6}.It follows thatw∗

6�1+ p6.

Page 13: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

152 Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159

Now we return to prove the lemma. Becausepn−1 is not assigned toP2 or P3, we knowfrom theALG2 rule that

4r + 2

2r + 3w∗

n−1<L + pn−1, (6)

whereL =min{L(Pi) : i �= j}. Substituting (5) into (6), we obtain

L>2r − 1

2r + 3pn−1 + 4r + 2

2r + 3. (7)

Letpn−1 = (2r − 1)/4+ x for some (possibly negative) real numberx. Substituting it into(4) and (7) respectively, we obtain

l(Pj )�1+ pn−1 = 2r + 3

4+ x (8)

and

L>2r − 1

2r + 3

(2r − 1

4+ x

)+ 4r + 2

2r + 3= 2r + 3

4+ 2r − 1

2r + 3x. (9)

We distinguish two cases as follows to get a final contradiction.Case1: x�0. By (8) and (9), we get

∑n−1i=1 pi �2L+ l(Pj )>3(2r +3)/4= (6r +9)/4.

SinceP ∗3 = {pn}, we havew∗ �(

∑n−1i=1 pi)/2>(6r + 9)/8. From this inequality and (1),

we get the following contradiction:

w

w∗ = s + pn

w∗ �23w

∗ + r

w∗ = 2

3+ r

w∗ <2

3+ r

6r+98

= 2

3+ 8r

6r + 9= 4r + 2

2r + 3. (10)

Case2:x <0.Thenby (8)and (9),wehavew∗n−1� 1

3

∑3i=1 l(Pi)� 1

3((2r+3)/4+x+2L),and thus

4r + 2

2r + 3w∗

n−1�4r + 2

2r + 3

1

3

(2r + 3

4+ x + 2L

)

= 2r + 1

6+ 4r + 2

6r + 9x + 8r + 4

6r + 9L. (11)

Combining (6), (11) andpn−1 = (2r − 1)/4+ x, we get

L<2r + 3

4+ 2r + 7

2r − 5x <

2r + 3

4+ 2r − 1

2r + 3x,

where the last inequality holds, because(2r + 7)/(2r − 5)> (2r − 1)/(2r + 3) andx <0.This contradicts (9). The proof is complete.�

Combining Lemmas 4.3–4.4, we have

Page 14: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159 153

Theorem 4.2. Thecompetitive ratioofalgorithmALG2 is(4r+2)/(2r+3) for5/2<r�3.

4.3. An improved semi-online algorithmALG3 for 3<r <6

In this subsection,wepresent an algorithmcalledALG3,which has a smaller competitiveratio than that ofLSfor every 3<r <6. For this purpose, we will show that it is crucial toschedule the first 10 jobs (see Lemma 4.5(3)), while the later jobs can be scheduled simplyby theLS rule. ALG3 assigns the first 10 jobs in the following way: schedule the firsttwo jobs to distinct machines, and let the third machine be empty. Then always schedule anewly-incoming job to one of the machines, as long as its new load is greater than a givenlower bound, and less than a given upper bound, which guarantees the desired competitiveratio. If this arrangement is impossible (the job is very large), then schedule the job by theLSrule. For any 3<r <6, define�=min{(6− r)/18,3/103}>0 and�=5/3− �/18<5/3.We will prove that the competitive ratio ofALG3 is no greater than�.Algorithm ALG3:

1. Fork = 1,2, assign thekth job to machinePk. Setk = 3.2. LetC1 be the maximum current machine load plus�, andC2 = (5/3− �)w∗

k .3. Let I be the set of machines whose current loads are in the interval(C1 − pk, C2 − pk).4. If I �= ∅, definei = arg min{L(Pj ), j ∈ I }, and assignpk to machinePi .5. If I = ∅, let Pi be the machine with minimum current load, and assignpk to machine

Pi .6. Letk = k + 1. If no new job comes, stop; otherwise, ifk�10, go to 2.7. Schedule the newly incoming jobs according to theLSrule, and end.

Theorem 4.3. For any3<r <6, the competitive ratio ofALG3 is at most�=5/3−�/18,where� =min{(6− r)/18,3/103}>0.

Proof. We prove the result again by contradiction. Without loss of generality we assumethat theALG3 makespan is determined by jobpn. Note that ifpn is assigned by Step 4,wALG3/w

∗ �5/3− �<� holds obviously. Hence we suppose in the following thatpn isassigned by theLSrule, i.e. by Step 5 or Step 7.

Lemma 4.5. If oneof the followingconditionsholds,wehavewALG3/w∗ ��: (1)w∗ �(r+

6)/2; (2)pn�w∗ − �; (3) n�11; (4)s�(2w∗ − �)/3.

Proof. From Lemma 2.2, we have

wALG3

w∗ �1+ 2pn

3w∗ . (12)

Substitutingw∗ �(r + 6)/2 into (12), we get

wALG3

w∗ �1+ 4r

3(r + 6)��.

Page 15: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

154 Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159

Thus, in the remainder of this proof we assumew∗ <(r +6)/2<6. If pn�w∗ −�, by (12)andw∗ <6 we get

wALG3

w∗ �1+ 2(w∗ − �)3w∗ = 5

3− 2�

3w∗ <5

3− �

9<�.

Therefore we assume in the following thatpn >w∗ − �>w∗ − 1. This implies thatpn isalone on its optimal machine, and thus the total size of all remaining jobs is at most 2w∗. Ifn�11, there is a machine processing at least four jobs right beforeALG3 assignspn, andthus its load is at least 4. It follows thats�(2w∗ − 4)/2= w∗ − 2. Thus

wALG3

w∗ = s + pn

w∗ � w∗ − 2+ pn

w∗ �1+ pn − 2

pn

�1+ r − 2

r��.

Similarly, if s�(2w∗ − �)/3, we then have

wALG3

w∗ = s + pn

w∗ �2w∗−�

3 + w∗

w∗ = 5

3− �

3w∗ <5

3− �

18= �. �

Remark 4.2. FromLemma4.5, in the followingweassume thatn�10,w∗ <(r+6)/2<6,pn >w∗−�, andpn is aloneon its optimalmachine. It follows thats�(2/3)w∗ <4. Further,s > (2w∗ − �)/3>(1/2)w∗. n�10 states that Step 7 does not occur.

Remark 4.3. (1) If there is a machinePi with l(Pi)�s + �, considering the total size ofall jobs exceptpn is no more than 2w∗, we obtain that 2w∗ �∑3

i=1 l(Pi)�3s + �, i.e.,s�(2w∗ − �)/3, contradicting Remark 4.2. Hence we haves� l(Pi)�s + �, i = 1,2,3.(2) By Remark 4.2, the optimal machine processingpn has a load of greater thanw∗ −�. Ifthere exists another machineP ∗

i with a load ofl(P ∗i )�w∗ − �, the total size of jobs except

pn is at most 2w∗ − �. Hence we also gets�(2w∗ − �)/3, a contradiction, too. Hence wehavel(P ∗

i ) >w∗ − �, i = 1,2,3.

Now consider the assignment of jobsp1, . . . , pn−1 in the ALG3 schedule. Sinces > (1/2)w∗, as shown in Remark 4.2, no machine is empty right beforeALG3 assignspn. Let Xi, i = 1,2,3, be the last job on its machine right beforeALG3 assignspn,respectively. Without loss of generality, we assume that these three jobs come in order ofX1, X2, X3. Denote byP(Xi) themachine processingXi in theALG3 schedule,i=1,2,3.We claim thatX2 andX3 are assigned by theLSrule in theALG3 schedule. In fact, when

ALG3 assignsX2, C1� l(P (X1)) + � holds, sinceX1 comes beforeX2 andX3. On theother hand, as in Remark 4.3(1), we havel(P (X2))�s + � andl(P (X1))�s. Hence wehavel(P (X2))�s + �� l(P (X1)) + ��C1, which means that the current load ofP(X2)

is no greater thanC1 − X2 right before assigningX2. It implies thatX2 is assigned by theLSrule (i.e. Step 5) instead of Step 4. The same argument can show thatX3 is also assignedby theLSrule.

Lemma 4.6. There is exactly onemore job assigned toP(X3),and onemore job toP(X2),right beforeALG3 assignspn. Denote these jobs by Z and U, respectively. Furthermore,the following inequalities hold: (a) 2s/3−5��X3�s−1+� andZ�s/3+6�; (b)U �Z

and2s/3− 6��X2�s − 1+ �; (c)U �Z − 2�.

Page 16: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159 155

Proof. Consider the assignment ofX3. Remark 4.3(1) states that every machine load is atleastsright afterALG3assignsX3, thus the current optimalmakespanw∗

k �s. HencewegetthatC2= (5/3−�)w∗

k �(5/3−�)s at the moment of running Step 2 for the iteration ofX3.s <4 impliesC2>(5/3)s − 4�. On the other hand, from Remark 4.3(1) again, no machinehas a current load more thans +�. Since machinesP(X1) andP(X2) have current loads ofat leasts, assigningX3 to one of themmakes new load be at leasts +1>(s + �)+ �>C1.If X3�(5/3)s − 4� − (s + �) = 2s/3− 5�, then assigningX3 to any machine makes thenew load be less thanC2. HenceI �= ∅, and thusX3 would be assigned by Step 4 in theALG3 schedule, a contradiction. It follows thatX3�2s/3− 5�.SupposeX3>s −1+�. Then it is a single job onP(X3) (otherwise the load of machine

P(X3)would be greater than(s−1+�)+1=s+�, contradicting Remark 4.3(1)). Further,we claim thatX2 is also a single job onP(X2). Otherwise,X2 could be processed at timezero on machineP(X3), since we have shown thatX2 is assigned by theLS rule, andP(X3) does not process any job at that time. SinceX2 andX3 are alone on their respectivemachines, andX1 comes earlier than them, we get thatX1 is assigned by Step 1 and isalso alone. Thus we can claim thatX1, X2 andX3 all have a size of at leasts. On the otherhand, becausepn is a single job on its optimal machine, we conclude that jobsX1, X2,andX3 must be assigned to two optimal machines, thusw∗ �2s, contradicting Remark 4.2.Therefore we haveX3�s − 1+ �.SinceX3<s − 1+ � andl(P (X3))�s, there is at least one more job other thanX3 on

P(X3). Further, sinceX3>2s/3− 5� and l(P (X3))�s + �, the total size of other jobsassigned toP(X3) is at mosts + � − X3<s/3+ 6��4/3+ 6�<2 (due to�<1/9) rightbefore assigningpn, thus exactly one more jobZ satisfyingZ�s/3+6� is assigned to thismachine.To prove the existence ofU and inequality (b), suppose thatX2 is a single job on the

machineP(X2) before assigningpn. Two cases are considered as follows: (i) IfX2 precedesjob Z in the job sequence, consider the iteration of assigningZ in theALG3 schedule. Thecurrent optimal makespanw∗

k �X2�s. Hence, by the same argument as above, we getC2�(5/3)s − 4�. SinceJ has at least 4 jobs exceptpn, which must be assigned to twooptimalmachines, we getw∗ �2 and thuss > (2w∗−�)/3�(4−�)/3 according toRemark4.2. It follows that

max{l(P (X1)), l(P (X2))} + Z�(s + �) + s

3+ 6� = 4

3s + 7�� 5

3s − 4��C2,

(13)

where the first inequality is from Remark 4.3(1), and the second inequality is due tos > (4− �)/3 and�<1/25. At the same time, sinceZ�1>2� and Remark 4.3(1) again,we have

max{l(P (X1)), l(P (X2))} + Z�s + 2�� max{l(P (X1)), l(P (X2)), l(P (X3))} + ��C1. (14)

Combining (13) and (14), we know thatZ should be assigned to machineP(X2) orP(X1),contradicting the fact that it is onP(X3). (ii) If Zprecedes jobX2 in the job sequence, then,by a similar argument, we can get thatC1<L(P (X3)) + X2 = Z + X2<C2 must holdwhen assigningX2, which implies thatX2 can also be assigned by Step 4 instead of theLS

Page 17: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

156 Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159

rule, a contradiction, too. Thus we conclude thatP(X2)must process other jobs. It followsthatX2�s − 1+ �.Furthermore, sinceX2 is assigned by theLS rule,Z has been assigned beforeX2 (oth-

erwise,X2 could be assigned toP(X3) since this machine is empty when assigningX2).Note thatZ�s/3+ 6�<2, which means that the size ofZ is smaller than the total sizeof any two jobs. Since there is only one jobZ on P(X3) right before assigningX2, andX2 is assigned by theLS rule, we conclude that there is only one more job onP(X2). Letus denote it byU. Since againX2 precedesX3, andX2 is assigned by theLS rule, we getU �Z. As in Remark 4.3(1), we haves�X2 + U �s + � ands�X3 + Z�s + �. Fromthese inequalities we getX2�X3 − � and thusX2�2s/3− 6�.Nowweonly have to prove inequality (c).We consider the assignment ofX2 in theALG3

schedule. Suppose on the contrary thatU <Z − 2�. Then, from Remark 4.3(1), we have

Z + X2>(U + 2�) + X2 = l(P (X2)) + 2��s + 2��C1, (15)

whenALG3 runsStep4 for the iterationofX2.On theother hand,wecanverifyZ+X2<C2as follows: when assigningX2 by ALG3, we havew∗

k � 13

∑ki=1pi �(2s + 1)/3, where

pk = X2. Thus

C2 =(5

3− �

)w∗

k �(5

3− �

) (2s + 1

3

)= 10

9s + 5

9−

(2s + 1

3

)� (16)

and

Z + X2�s

3+ 6� + s − 1+ � = 4

3s − 1+ 7�. (17)

Combining (16) and (17), we have

C2 − (Z + X2)�14

9− 2

9s −

(2

3s + 22

3

)�>

6

9− 10�>0 (18)

becauses <4 and�<1/15. (15) and (18) imply thatI �= ∅, and thusX2 would be assignedby Step 4 instead of theLSrule, a contradiction. �

Now we return to the main line of the proof of Theorem 4.3. SinceJ has at least 5jobsX1, X2, X3, U,Z exceptpn, which must be assigned to two optimal machines, we getw∗ �3. We next consider the assignment ofX2, X3, U,Z in the optimal schedule. Recallthatpn is a single job on its optimal machine; three cases may occur as follows.Case1:X2 andX3 are assigned to the same optimal machine. We have

X2 + X3� 43 s − 11�> 4

3

(2w∗ − �

3

)− 11�>

8

9w∗ − 103

9�>w∗ − 1,

where the first inequality is from Lemma 4.6(a) and (b), the second one from Remark4.2, whereas the last one is due tow∗ <6 and��3/103. It follows that there is no otherjob assigned to this optimal machine. Hence the optimal machine processingX2 andX3

Page 18: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159 157

has a load of

X2 + X3�2(s − 1+ �)� 4

3w∗ − 2+ 2�<w∗ − �,

where the first inequality is from Lemma 4.6(a) and (b), the second one from Remark4.2, whereas the last one is due tow∗ <(r + 6)/2 and��(6 − r)/18, contradictingRemark 4.3(2).Case2: X2 andX3 are assigned to two different optimal machines, and bothU and

Z are assigned to one of these two machines. Without loss of generality, we assume thatX2, U,Z ∈ P ∗

1 andX3 ∈ P ∗2 . Then

X2 + U + Z = l(P (X2)) + Z�s + Z>2w∗ − �

3+ 1,

where the first equality is from Lemma 4.6, the first inequality fromRemark 4.3(1), whereasthe last one is due to Remark 4.2. Thus no other job can belong toP ∗

1 because of((2w∗ −�)/3+ 1) + 1>w∗ (byw∗ <(r + 6)/2 and�<(6− r)/6). On the other hand, similarlyto Case 1, we have

l(P ∗1 ) = X2 + U + Z = l(P (X2)) + Z�(s + �) +

( s

3+ 6�

)

= 4

3s + 7�� 8

9w∗ + 7�<w∗ − �,

where the first inequality is from Remark 4.3(1) and Lemma 4.6(a), the second one fromRemark 4.2, whereas the last one is due to�<1/24 andw∗ �3, a contradiction again.Case3:X2, X3 are assigned to two different optimal machines, and so areU,Z. That is

to say, one ofX2, X3 is assigned toP ∗1 , the other is toP

∗2 , and one ofU,Z is assigned to

P ∗1 , the other toP ∗

2 . Two subcases are considered as follows to estimate the loads ofP ∗1

andP ∗2 :

(i) X2 andU are assigned to the same optimal machine, sayP ∗1 , andX3 andZare assigned

toP ∗2 . Since{X2, U} ∈ P(X2) and{X3, Z} ∈ P(X3), we haves�X2+U �s +� and

s�X3 + Z�s + �.(ii) X2 andZareassigned toP ∗

1 , andX3 andUareassigned toP ∗2 .Then fromZ−2��U �Z

as given in Lemma 4.6(b) and (c),s�X2 + U �s + � ands�X3 + Z�s + �, weconclude thats�X2 + Z�s + 3� ands − 2��X3 + U �s + �.

From the above estimation, we can conclude that the contributions of jobsX2, X3, U,Z

to loadsl(P ∗1 ), l(P

∗2 ) lie in the interval[s − 2�, s + 3�]. As Remark 4.3(2) states that

w∗ − �� l(P ∗i )�w∗, we get that the total size of remaining jobs assigned to any ofP ∗

1 andP ∗2 is no greater than

w∗ − (s − 2�)<w∗ − 2w∗ − �3

+ 2� = w∗

3+ 7

3�<2

due to��(6− r)/14, and more than

w∗ − � − (s + 3�)�w∗ − 4� − 2

3w∗ = w∗

3− 4�.

Page 19: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

158 Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159

Thus there is exactly onemore job, denoted byA, assigned toP ∗1 , and onemore job, denoted

byB, toP ∗2 . Thus we conclude thatJ = {A,B,U,Z,X2, X3, pn}, and the sizes ofA and

B are in(w∗/3− 4�, w∗/3+ (7/3)�).Now we can conclude that the first four jobs inJ areA, B,U andZ (possibly not in this

order), andAandBaregreater thanUandZ, sincew∗/3−4�>s/3+6� (due tos�(2/3)w∗,w∗ �3, and�<1/30). In theALG3 scheduleAandBare assigned to the samemachine, i.e.to the machineP(X1), and one of these jobs isX1. Without loss of generality, we assumethatB =X1. To get the final contradiction, we consider the assignment ofX1 in theALG3schedule. At this time every machine has processed one job, the greatest current load isA.Recall thatB = X1 is assigned afterA, andX1 is assigned beforeX2 andX3. Because of�<3/22, we have

min{U,Z} + X1�1+(w∗

3− 4�

)>

(w∗

3+ 7

3�)

+ ��A + � = C1.

It implies that every machine would have a new load greater thanC1 if X1 is assigned tothis machine. IfI �= ∅, from the fact thatA is greater thanU andZ, I must contain themachine processing min{U,Z}, and thusX1 is assigned to this machine, a contradiction. IfI = ∅, for the same reasonX1 must also be assigned to the machine processing min{U,Z}(due to theALG3 rule), a contradiction again. The proof is complete.�We conjecture that by dividing the interval 3<r <6 into several subintervals, a better

algorithm for each subinterval could be constructed using the ideas inALG(�) andALG3.

Acknowledgements

The authors would like to gratefully thank three anonymous referees for their valuablecomments which guided them to make improvements to their presentation.

References

[1] S. Albers, Better bounds for on-line scheduling, SIAM J. Comput. 29 (1999) 459–473.[2] S. Albers, On randomized online scheduling, Proceedings of the 34th ACM Symposium on Theory of

Computing, Montreal, 2002, pp. 134–143.[3] Y. Azar, L. Epstein, On-line machine covering, J. Scheduling 1 (1998) 67–77.[4] Y. Azar, O. Regev, Online bin stretching, Theoret. Comput. Sci. 268 (2001) 17–41.[5] Y. Bartal,A. Fiat, H. Karloff, R.Vohra, New algorithms for an ancient scheduling problem, J. Comput. System

Sci. 51 (1995) 359–366.[6] L. Epstein, Bin stretching revisited, Acta Inform. 39 (2003) 97–117.[7] L. Epstein, L. Favrholdt, Optimal non-preemptive semi-online scheduling on two related machines,

Proceedings of the 27th MFCS, 2002, pp. 245–256.[8] U. Faigle,W.Kern,G.Turán,On the performanceof on-line algorithm for particular problems,ActaCybernet.

9 (1989) 107–119.[9] R. Fleischer, M. Wahl, On-line scheduling revisited, J. Scheduling 3 (2000) 343–353.[10] R.L. Graham, Bounds for certain multiprocessing anomalies, The Bell System. Tech. J. 45 (1966)

1563–1581.[11] Y. He, The optimal on-line parallel machine scheduling, Comput. Math. Appl. 39 (2000) 117–121.[12] Y. He, Z. Tan, Ordinal on-line scheduling for maximizing theminimummachine completion time, J. Combin.

Optim. 6 (2002) 199–206.

Page 20: Semi-online scheduling jobs with tightly-grouped processing times on three identical machines

Y. He, G. Dósa / Discrete Applied Mathematics 150 (2005) 140–159 159

[13] Y. He, G. Zhang, Semi on-line scheduling on two identical machines, Computing 62 (1999) 179–187.[14] D.R. Karger, S.J. Phillips, E. Torng, A better algorithm for an ancient scheduling problem, J. Algorithms 20

(1996) 400–430.[15] H. Kellerer, V. Kotov, M.R. Speranza, Z. Tuza, Semi on-line algorithms for the partition problem, Oper. Res.

Lett. 21 (1997) 235–242.[16] W.P. Liu, J.B. Sidney, A. van Vliet, Ordinal algorithms for parallel machine scheduling, Oper. Res. Lett. 18

(1996) 223–232.[17] J.F. Rudin III, Improved bounds for the online scheduling problem, Ph.D. Thesis, The University of Texas at

Dallas, May 2001.[18] S. Seiden, J. Sgall, G. Woeginger, Semi-online scheduling with decreasing job sizes, Oper. Res. Lett. 27

(2000) 215–221.[19] J. Sgall, On-line scheduling, On-lineAlgorithms: The State ofArt, Lecture Notes in Computer Sciences 1442,

Springer, Berlin, 1998, pp. 196–231.[20] Z. Tan,Y. He, Semi-on-line scheduling with ordinal data on two uniformmachines, Oper. Res. Lett. 28 (2001)

221–231.[21] Z. Tan, Y. He, Semi-on-line problems on two identical machines with combined partial information, Oper.

Res. Lett. 30 (2002) 408–414.[22] Z. Tan, Y. He, Ordinal algorithms for parallel machine scheduling with nonsimultaneous machine available

times, Comput. Math. Appl. 43 (2002) 1521–1528.