minimizing total completion time subject to job release dates and preemption penalties

15
MINIMIZING TOTAL COMPLETION TIME SUBJECT TO JOB RELEASE DATES AND PREEMPTION PENALTIES ZHAOHUI LIU 1;2 , AND T.C. EDWIN CHENG 2; 1 Department of Mathematics, East China University of Science and Technology, Shanghai 200237, People’s Republic of China 2 Department of Logistics, The Hong Kong Polytechnic University, Kowloon, Hong Kong SAR, People’s Republic of China ABSTRACT Extensive research has been devoted to preemptive scheduling. However, little attention has been paid to problems where a certain time penalty must be incurred if preemption is allowed. In this paper, we consider the single-machine scheduling problem of minimizing the total completion time subject to job release dates and preemption penalties, where each time a job is started, whether initially or after being preempted, a job-independent setup must take place. The problem is proved to be strongly NP-hard even if the setup time is one unit. We also study a natural extension of a greedy algorithm, which is optimal in the absence of preemption penalty. It is proved that the algorithm has a worst-case performance bound of 25/16, even when the maximum completion time, i.e., makespan, criterion is considered simultaneously. KEY WORDS: preemptive scheduling; preemption penalty; setup time 1. INTRODUCTION Preemptive scheduling problems are those in which the processing of a job can be temporarily interrupted, and restarted at a later time. Conventionally, in the literature on preemptive scheduling, preempted jobs can simply be resumed from the point at which preemption occurred at no cost. However, this situation is not always true in practice. It is likely that in some cases, a certain delay or setup time must be incurred before a preempted job can be resumed, i.e., a certain time penalty must be incurred. Consider the situation in a computer system. In order to execute more urgent or short tasks, the operating system must interrupt current tasks tempo- rarily. Later, when the interrupted tasks are resumed, some extra time must be expended. That might include the time to load relevant compilers into memory, the time to get the information about done and left work, the time to repeat some work, and so on. Several papers have been devoted to scheduling with preemption penalties. Potts and Van Wassenhove (1992) suggested to consider preemption penalties under the lot-sizing model. Then, Monma and Potts (1993) and Chen (1993) studied the preemptive parallel machine scheduling problem with batch setup times. Zdrzalka (1994), Schuurman and Woeginger (1999) and Liu and Cheng (2002) studied preemptive scheduling problems with job-dependent setup *Correspondence to: T.C. Edwin Cheng, Department of Management, The Hong Kong Polytechnic University, Kowloon, Hong Kong SAR, People’s Republic of China. E-mail: [email protected] Journal of Scheduling 7: 313–327, 2004. Ó 2004 Kluwer Academic Publishers. Printed in the Netherlands.

Upload: zhaohui-liu

Post on 06-Aug-2016

214 views

Category:

Documents


2 download

TRANSCRIPT

MINIMIZING TOTAL COMPLETION TIME SUBJECT TOJOB RELEASE DATES AND PREEMPTION PENALTIES

ZHAOHUI LIU1;2, AND T.C. EDWIN CHENG 2;�

1Department of Mathematics, East China University of Science and Technology, Shanghai 200237,People’s Republic of China

2Department of Logistics, The Hong Kong Polytechnic University, Kowloon, Hong Kong SAR,People’s Republic of China

ABSTRACT

Extensive research has been devoted to preemptive scheduling. However, little attention has been paid toproblems where a certain time penalty must be incurred if preemption is allowed. In this paper, we considerthe single-machine scheduling problem of minimizing the total completion time subject to job release datesand preemption penalties, where each time a job is started, whether initially or after being preempted, ajob-independent setup must take place. The problem is proved to be strongly NP-hard even if the setuptime is one unit. We also study a natural extension of a greedy algorithm, which is optimal in the absence ofpreemption penalty. It is proved that the algorithm has a worst-case performance bound of 25/16, evenwhen the maximum completion time, i.e., makespan, criterion is considered simultaneously.

KEY WORDS: preemptive scheduling; preemption penalty; setup time

1. INTRODUCTION

Preemptive scheduling problems are those in which the processing of a job can be temporarilyinterrupted, and restarted at a later time. Conventionally, in the literature on preemptivescheduling, preempted jobs can simply be resumed from the point at which preemption occurredat no cost. However, this situation is not always true in practice. It is likely that in some cases, acertain delay or setup time must be incurred before a preempted job can be resumed, i.e., acertain time penalty must be incurred. Consider the situation in a computer system. In order toexecute more urgent or short tasks, the operating system must interrupt current tasks tempo-rarily. Later, when the interrupted tasks are resumed, some extra time must be expended. Thatmight include the time to load relevant compilers into memory, the time to get the informationabout done and left work, the time to repeat some work, and so on.Several papers have been devoted to scheduling with preemption penalties. Potts and Van

Wassenhove (1992) suggested to consider preemption penalties under the lot-sizing model.Then, Monma and Potts (1993) and Chen (1993) studied the preemptive parallel machinescheduling problem with batch setup times. Zdrzalka (1994), Schuurman and Woeginger (1999)and Liu and Cheng (2002) studied preemptive scheduling problems with job-dependent setup

*Correspondence to: T.C. Edwin Cheng, Department of Management, The Hong Kong Polytechnic University,Kowloon, Hong Kong SAR, People’s Republic of China. E-mail: [email protected]

Journal of Scheduling 7: 313–327, 2004.� 2004 Kluwer Academic Publishers. Printed in the Netherlands.

times. Julien, Magazine, and Hall (1997) proposed more preemption models and applied themto two single-machine scheduling problems. In this paper, we investigate the single-machineproblem of minimizing the total completion time subject to job release dates in the preemption-setup model, where each time a job is started, whether initially or after having been preempted, asetup must take place.To state our problem, we are given a set of n jobs J ¼ fJ1; J2; . . . ; Jng, where job Jj is asso-

ciated with a processing time pj and a release date rj, before which it cannot be processed. Also,we are given a machine that can handle only one job at a time. All jobs may be preempted.Whenever a job is to be started, whether initially or after preemption, a job-independent setup isnecessary. The setup time is s. The setup can be performed only after the corresponding job isreleased and the setup is subject to the preemption-repeat mode, i.e., a preempted setup must betotally repeated. During the setup time the machine is unavailable for processing. Our objectiveis to find a schedule that minimizes the total completion time of the n jobs.It is well known that if s ¼ 0, i.e., no preemption penalty, the above problem is solved by the

shortest remaining processing time (SRPT) rule: at any time, process the unfinished job with theshortest remaining processing time among the available jobs. However, little is known about thecase of s 6¼ 0. In Section 2, we show that the problem is strongly NP-hard even if s ¼ 1. Then inSection 3, we present a greedy algorithm, which is a generalization of the SRPT rule. It is provedthat the algorithm has a worst-case performance bound of 25=16, even when the maximumcompletion time, i.e., makespan, criterion is considered simultaneously. Finally, some con-cluding remarks are made in Section 4.

2. COMPUTATIONAL COMPLEXITY

In this section, we prove that the problem of scheduling subject to job release dates and pre-emption penalties is strongly NP-hard. This is achieved by a reduction from NumericalMatching with Target Sum (NMTS), which is known to be strongly NP-hard (Garey andJohnson, 1979).NMTS. Given two sets of positive integers X ¼ fx01; x02; . . . ; x02mg and B ¼ fb01; b02; . . . ; b0mg withP2mi¼1 x

0i ¼

Pmi¼1 b

0i, decide if there exists a partition of the index set I ¼ f1; 2; . . . ; 2mg into m

disjoint 2-element subsets I1; I2; . . . ; Im such thatP

k2Ij x0k ¼ b0j (j ¼ 1; 2; . . . ;m).

Let I be an instance of NMTS and

b ¼ 2m2Xmi¼1

b0i;

xi ¼ bþ x0i ði ¼ 1; 2; . . . ; 2mÞ;

bi ¼ 2bþ b0i ði ¼ 1; 2; . . . ;mÞ;

L ¼ 2Xmi¼1

bi þ 1:

We construct the following instance P of the decision version of the scheduling problem underdiscussion.

Z. LIU, AND T.C.E. CHENGZ. LIU, AND T.C.E. CHENG314

For i ¼ 1; 2; . . . ; 2m, let Ji be a job with zero release date and processing time

pi ¼ xi � 1:

We call them X -jobs.For i ¼ 2mþ ðj� 1ÞLþ 1; . . . ; 2mþ jL (1 � j � m), let Ji be a job with unit processing time

and release date

ri ¼Xjk¼1

bk þ 2ðj� 1ÞL:

We call them U -jobs. Note that for given j, J2mþðj�1ÞLþ1; . . . ; J2mþjL have the same release date.We specially call them Uj-jobs and denote their release date by Rj.The setup time of each job is one unit. Given the threshold value

d ¼ m2L2 þ ð2m� 1ÞmLþ ð2þ LÞXmk¼1

ðm� kþ 1Þbk;

we are asked to decide if there exists a feasible schedule r for P such that TCTðrÞ � d, whereTCTðrÞ denotes the total completion time of r.

Lemma 1. If the answer to I is ‘‘Yes’’, then the answer to P is ‘‘Yes’’, too.

Proof. Suppose that fI1; I2; . . . ; Img is a partition of I such that

jIjj ¼ 2;Xk2Ij

x0k ¼ b0j; j ¼ 1; 2; . . . ;m:

Let Ij ¼ fnðjÞ; gðjÞg, where nðjÞ; gðjÞ 2 f1; 2; . . . ; 2mg. ThenpnðjÞ þ pgðjÞ ¼ xnðjÞ þ xgðjÞ � 2 ¼ bj � 2:

We construct r as follows:

r ¼ ðJnð1ÞJgð1ÞU1 � � �U1Jnð2ÞJgð2ÞU2 � � �U2 � � � JnðmÞJgðmÞUm � � �UmÞ;

where no preemption happens. Noticing the completion time of JgðjÞ is equal to2ðj� 1ÞLþ

Pjk¼1ð2þ pnðkÞ þ pgðkÞÞ ¼ Rj, we have

TCTðrÞ < ð2þ LÞXmj¼1

Rj þXmj¼1

XLk¼1

2k

¼ ð2þ LÞ mðm� 1ÞLþXmj¼1

Xjk¼1

bk

!þmLðLþ 1Þ

¼ d:

Thus, the answer to P is ‘‘Yes’’. j

In the following, we will show that the converse of Lemma 1 is also true. Let r be a feasibleschedule for P with TCT ðrÞ � d. Since all U -jobs have a unit processing time, it is reasonable torequire that r satisfies the following conditions:

(C1) The processing order of U -jobs abides by the earliest release date rule.(C2) None of the U -jobs is preempted.(C3) For each j ¼ 1; 2; . . . ;m, all Uj-jobs are processed consecutively.

MINIMIZING TOTAL COMPLETION TIMEMINIMIZING TOTAL COMPLETION TIME 315

Now we discuss further the form of r. For each j ¼ 1; 2; . . . ;m, let tj ¼ Rj þ �j (�j � 0) be thestart time of the first Uj-job in r. Thus, the total completion time of all U -jobs is given by

d1 ¼Xmj¼1

LðRj þ �jÞ þXLk¼1

2k

!

¼ LXmj¼1

�j þ LXmj¼1

Xjk¼1

bk þmðm� 1ÞL2 þmLðLþ 1Þ

¼ LXmj¼1

�j þ d� 2mðm� 1ÞL� 2Xmj¼1

ðm� jþ 1Þbj: ð1Þ

Lemma 2. For each j ¼ 1; 2; . . . ;m, there are at most 2j X -jobs completed by time tj inschedule r.

Proof. The conclusion is trivial for j ¼ m. Suppose to the contrary that for some j0 with1 � j0 � m� 1, there are at least 2j0 þ 1 X -jobs completed by time tj0 . Note that the total setupand processing requirement of the 2j0 þ 1 X -jobs is greater than ð2j0 þ 1Þb. By condition (C1),all U1-jobs, U2-jobs, . . ., Uj0�1-jobs, which have a total setup and processing requirement of2ðj0 � 1ÞL, should have been finished by time tj0 . Then

tj0 ¼ Rj0 þ �j0 > ð2j0 þ 1Þbþ 2ðj0 � 1ÞL;

i.e.,

�j0 > ð2j0 þ 1Þb�Xj0k¼1

bk ¼ b�Xj0k¼1

b0k � 2m2Xm

k¼j0þ1

b0k:

Since j0 � m� 1, it holds that �j0 > 2m2. Combined with Equation (1), the inequality impliesthat

TCTðrÞ � d1

> 2m2Lþ d� 2mðm� 1ÞL� 2Xmj¼1

ðm� jþ 1Þbj

� dþ 2mL� 2mXmj¼1

bj > d;

a contradiction. j

In fact, due to conditions (C2) and (C3), Lemma 2 implies that for each j ¼ 1; 2; . . . ;m, thereare at most 2j X -jobs completed by time Rj þ 2L, i.e., there are at least 2ðm� jÞ X -jobs com-pleted after time Rj þ 2L. Let h be the number of X -jobs completed after time Rm þ 2L, and d2denote the total completion time of all X -jobs. Then

d2 � 2Xm�1

j¼1

ðRj þ 2LÞ þ hðRm � Rm�1Þ

� 2mðm� 1ÞLþ 2Xm�1

j¼1

Xjk¼1

bk þ 2hL: ð2Þ

Z. LIU, AND T.C.E. CHENGZ. LIU, AND T.C.E. CHENG316

Lemma 3. h ¼ 0 and �j ¼ 0 for each j ¼ 1; 2; . . . ;m.

Proof. By Equations (1) and (2), we have

TCTðrÞ ¼ d1 þ d2 � LXmj¼1

�j þ d� 2Xmj¼1

bj þ 2hL:

Since TCTðrÞ � d, it holds that

L 2hþXmj¼1

�j

!� 2

Xmj¼1

bj ¼ L� 1:

Then the desired results follow from the fact that h ¼ 0 and �j (j ¼ 1; 2; . . . ;m) are integers. j

From Lemma 3, we deduce that all jobs are completed by time Rm þ 2L in r and tj ¼ Rj foreach j ¼ 1; 2; . . . ;m. The former implies that r contains no idle time and no preemption happensin r. Let I1 be the index set of X -jobs completed by time t1, and for j ¼ 2; 3; . . . ;m, Ij be the indexset of X -jobs processed between tj�1 þ 2L and tj. ThenX

k2Ijð1þ pkÞ ¼ tj � ðtj�1 þ 2LÞ ¼ bj; ðj ¼ 2; 3; . . . ;mÞ;

i.e., Xk2Ij

x0k þ jIjjb ¼ 2bþ b0j:

From the above relation, it is easy to show that jIjj ¼ 2 andP

k2Ij x0k ¼ b0j. Thus, fI1; I2; . . . ; Img is

a solution to instance I , i.e., the following lemma is true.

Lemma 4. If the answer to P is ‘‘Yes’’, then the answer to I is ‘‘Yes’’, too.Combining Lemmas 1 and 4, we obtain the following conclusion.

Theorem 1. The single-machine scheduling problem of minimizing the total completion timesubject to job release dates and preemption penalties is strongly NP-hard even if each setup time isone unit.

3. A GREEDY ALGORITHM

The greedy technique is among the fundamental techniques for the design of approximationalgorithms. Actually, the SRPT rule is a greedy algorithm for the special case of our problem inwhich s ¼ 0. In the following, we present a greedy algorithm for the general problem, whichreduces to the SRPT rule when s ¼ 0.

Algorithm H. Whenever a job is completed or a new job is released, schedule the unfinishedjob that can be completed at the earliest time (preempting when necessary).

To evaluate the performance of algorithm H with respect to the total completion time, we willfirst analyse its performance with respect to the maximum completion time criterion. Note thatminimizing the maximum completion time is solved by scheduling all jobs in order of

MINIMIZING TOTAL COMPLETION TIMEMINIMIZING TOTAL COMPLETION TIME 317

nondecreasing release dates without preemption. But we have two reasons to study the per-formance of algorithm H regarding the maximum completion time:

(i) the result will serve as a lemma for the analysis of the total completion time criterion;(ii) a schedule of high quality with respect to more than one criterion is favored in many

practical applications.

3.1. The performance with respect to the maximum completion time

Let r denote the schedule produced by algorithm H. It is reasonable to assume that r containsno idle time here. Let C½0� ¼ 0 and C½k� be the kth earliest completion time in r for k ¼ 1; 2; . . . ; n.Let Jk1 ; J

k2 ; . . . ; J

kkðkÞ be all the job-pieces that are performed in that order in the interval

ðC½k�1�;C½k�Þ according to r, where kðkÞ denotes the number of job-pieces in ðC½k�1�;C½k�Þ. Notethat a job-piece is either a whole setup plus a part of a job or only an incomplete setup. For eachjob-piece Jki , we introduce the following notation:

ski : the setup time of Jki ;tki : the processing time of Jki ;qki : the remaining processing time of the job related to Jki after Jki is finished;rki : the release date of the job related to Jki ;pki : the total processing time of the job related to Jki .

Obviously, each JkkðkÞ contains a whole setup and the following lemma holds.

Lemma 5. For each k with kðkÞ � 2, it holds that rki ¼ C½k�1� þPi�1

j¼1ðskj þ tkj Þ and pki ¼ tki þ qkiði ¼ 2; 3; . . . ; kðkÞÞ.Let l ð0 � l < nÞ be the minimum index such that kðlþ 1Þ ¼ kðlþ 2Þ ¼ � � � ¼ kðnÞ ¼ 1. Since

kðnÞ ¼ 1 always holds, l must exist. If l ¼ 0, then C½n� ¼Pn

k¼1ðsþ pkÞ � C�max, where C�

max

denotes the minimum makespan. In the following we assume that 1 � l < n, which implieskðlÞ � 2.

Lemma 6. C½l� � C�max.

Proof. Since kðlÞ � 2, it follows from Lemma 5 that

rlkðlÞ ¼ C½l�1� þXkðlÞ�1

j¼1

ðslj þ tljÞ:

Therefore, C½l� ¼ rlkðlÞ þ slkðlÞ þ tlkðlÞ � C�max. j

Define

X ¼X

fski jkðkÞ � 2; 1 � i � kðkÞ � 1g;Y ¼ C½l� � X;

Z ¼Xnk¼lþ1

ðsþ tk1Þ ¼ C½n� � C½l�:

Note that X þ Y þ Z ¼ C½n� and Y þ Z ¼ nsþPn

k¼1 pk � C�max:

Lemma 7. X � Y þ ð2=9ÞZ.

Proof. See Appendix A. j

Z. LIU, AND T.C.E. CHENGZ. LIU, AND T.C.E. CHENG318

Theorem 2. C½n� � ð25=16ÞC�max.

Proof. Note that C½n� ¼ X þ Y þ Z � X þ C�max. If X � ð9=16ÞC½l�, then it follows from

Lemma 6 that X � ð9=16ÞC�max. If X > ð9=16ÞC½l�, then Y ¼ Cx½l� � X < ð7=16ÞC½l� �

ð7=16ÞC�max. By Lemma 7, we have

X � 2

9ðYþ ZÞ þ 7

9Y <

2

9C�

max þ 7=9 � 716

C�max ¼

9

16C�

max:

Thus, C½n� � X þ C�max � ð25=16ÞC�

max j

The example with s ¼ 1 in Table 1 shows that the bound in Theorem 2 is tight. Obviously,C�max ¼ 16þ 16� is obtained by scheduling jobs in increasing order of their release dates.

However, algorithm H produces schedule r as follows:

r1 r2 r3 r4 r5 r6 r7 r8 r9 r10J1 J2 J3 J4 J3 J5 J3 J6 J3 J7 J3 J8 J3 J9 J3 J10 J3 J2 J1# # # # # # # # # # # # # # # # # # #ðJ11 J12 J13 J14 J21 J22 J31 J32 J31 J42 J51 J52 J61 J62 J71 J72 J81 J91 J101 Þ

where each job-piece contains a whole setup. Thus, C½n� ¼ 25þ 16�. We get

C½n�=C�max ¼ ð25þ 16�Þ=ð16þ 16�Þ ! 25=16 as � ! 0:

3.2. The performance with respect to the total completion time

In this section, we analyse the performance of algorithm H with respect to the total com-pletion time. We will show that by any time ð25=16Þt, the schedule produced by algorithm H hasfinished at least as many jobs as an optimal total completion time schedule could have finishedby time t. The idea is similar to that used in Phillips, Stein, and Wein (1998) for studying aparallel machine problem without preemption penalties.Let NHðJ ; tÞ denote the number of jobs completed by time t when the set of jobs J is scheduled

according to algorithm H. We have the following lemma.

Lemma 8. Let I and J be two sets of jobs with I � J . Then for any t � 0, it holds thatNHðJ ; tÞ � NHðI ; tÞ.

Proof. See Appendix B. j

Theorem 3. With respect to the total completion time, algorithm H has a performance bound of(25/16 ).

Table 1. Data of the example problem

i 1 2 3 4 5 6 7 8 9 10

ri 0 1 2 3 5þ � 7þ 2� 9þ 3� 11þ 4� 13þ 5� 15þ 6�

pi 3þ 4� 2þ 3� 1þ 2� � � � � � � �

MINIMIZING TOTAL COMPLETION TIMEMINIMIZING TOTAL COMPLETION TIME 319

Proof. Given an optimal total completion time schedule, we first show thatNHðJ ; 25=16Þ � NoptðJ ; tÞ for any t � 0. Consider the set of jobs JoptðtÞ finished in the optimaltotal completion time schedule by time t. Note that NoptðJ ; tÞ ¼ jJoptðtÞj. Since the performancebound of algorithm H regarding the maximum completion time is 25=16, we have

NHðJoptðtÞ;25

16tÞ ¼ jJoptðtÞj:

Since JoptðtÞ � J , it follows from Lemma 8 that

NH J;25

16t

� �� NH JoptðtÞ;

25

16t

� �:

Then NHðJ ; 25=16Þ � NoptðJ ; tÞ.For k ¼ 1; 2; . . . ; n, let C½k� and Copt

½k� denote the kth earliest completion time in the scheduleproduced by algorithm H and the optimal total completion time schedule, respectively. Fromthe result above, we obtain that C½k� � kCopt

½k� for each k. This completes the proof. j

4. CONCLUDING REMARKS

In this paper, we have studied the single-machine scheduling problem of minimizing the totalcompletion time subject to job release dates and preemption penalties, where each time a job isstarted, whether initially or after being preempted, a job-independent setup must take place. Theproblem is proved to be stronglyNP-hard even if the setup time is one unit. Also, a greedy heuristicis presented and its worst-case performance bound with respect to both the total completion timeand the maximum completion time is studied. The bound is tight regarding the maximum com-pletion time, but we do not know whether the bound is tight regarding the total completion time.Scheduling with preemption penalties is a new topic in scheduling research. We hope that

more attention can be paid to it. In fact, besides the preemption-setup model, some otherpreemption models have been presented in Julian, Magazine, and Hall (1997) such aspreemption-startup model, where the finished part of a preempted job must be repeated in someproportion.

ACKNOWLEDGMENTACKNOWLEDGMENT

This research was supported in part by The Hong Kong Polytechnic University under grantnumber G-YW59. The authors were also respectively supported by the National Natural Sci-ence Foundation of China under grant number 10101007 and the Research Grants Council ofHong Kong under grant number PolyU 5245/99H.

APPENDIX A: PROOF OF LEMMA 7

We first prove that for any k; i; j with 1 � i � kðkÞ � 1 and iþ 1 � j � kðkÞ, qki >Pj�1

u¼i sku þ pkj

holds. By algorithm H, the fact that Jki is preempted implies s� ski þ qki > sþ pkiþ1, i.e.,qki > ski þ pkiþ1. Noticing pkiþ1 � qkiþ1, we can successively prove that

Z. LIU, AND T.C.E. CHENGZ. LIU, AND T.C.E. CHENG320

qki > ski þ pkiþ1

> ski þ skiþ1 þ pkiþ2

..

.

> ski þ skiþ1 þ � � � þ skj�1 þ pkj : ð3Þ

Next we prove Lemma 7. Partition the index set f1; 2; . . . ; ng into K1;K2; . . . ;Km by thefollowing two steps:Step 1. K1 :¼ f1g, m :¼ 1.Step 2. For k :¼ 2 to n doIf there exist indices i; u; v (1 � i � m, u 2 Ki, 1 � v � kðuÞ � 1) such that job-pieces Jk1 and Juv

come from the same job, then Ki :¼ Ki [ fkg, else Kmþ1 :¼ fkg;m :¼ mþ 1.For each K 2 fK1;K2; . . . ;Kmg, we define

XðKÞ ¼X

fski jk 2 K; kðkÞ � 2; 1 � i � kðkÞ � 1g;

YðKÞ ¼X

fskkðkÞjk 2 K; k � lg;

ZðKÞ ¼X

fsþ tk1jk 2 K; k � lþ 1g:

Obviously, it holds that X ¼P

K X ðKÞ, Y �P

K Y ðKÞ and Z ¼P

K ZðKÞ. Thus, to show thatX � Y þ ð2=9ÞZ, we need only to show that for each K,

XðKÞ � YðKÞ þ 2

9ZðKÞ: ð4Þ

Let kð1Þ ¼ minfkjk 2 Kg. If kð1Þ � lþ 1, then X ðKÞ ¼ 0. The conclusion certainly holds. Inthe following we suppose that kð1Þ � l. Steps 10–50 choose a subset K� of K.Step 10. g :¼ 1.Step 20. Determine the index hðgÞ (0 � hðgÞ � kðkðgÞÞ � 1) such that

(1) the jobs related to JkðgÞ1 ; . . . ; JkðgÞhðgÞ are completed after C½l�;

(2) the jobs related to JkðgÞhðgÞþ1; . . . ; JkðgÞkðkðgÞÞ are completed at or before C½l�.

Step 30. If hðgÞ ¼ 0 or the job related to JkðgÞhðgÞ does not appear in ðC½kðgÞ�;C½l�Þ, then goto Step 50,else perform Step 40.Step 40. Letting Ju1 be the last job-piece before C½l� that comes from the same job as JkðgÞhðgÞ , then

kðgþ 1Þ :¼ u, g :¼ gþ 1 and goto Step 20.Step 50. K� :¼ fkð1Þ; kð2Þ; . . . ; kðgÞg.Since for each i ¼ 1; 2; . . . ; g� 1, Jkðiþ1Þ

1 and JkðiÞhðiÞ come from the same job, K� � K holds. It iseasy to verify that(A1) if hð1Þ ¼ 0, then g ¼ 1;(A2) if hð1Þ � 1, then hðgÞ � 1 and hð2Þ; hð3Þ; . . . ; hðg� 1Þ � 2.Define

MINIMIZING TOTAL COMPLETION TIMEMINIMIZING TOTAL COMPLETION TIME 321

X1ðKÞ ¼X

fsk1jk 2 KnK�; kðkÞ � 2g;

Y1ðKÞ ¼X

fskkðkÞjk 2 KnK�; kðkÞ � 2g;

X2ðKÞ ¼Xgi¼1

XkðkðiÞÞ�1

j¼hðiÞþ1

skðiÞj þ

Xfski jk 2 KnK�; 2 � i � kðkÞ � 1g;

Y2ðKÞ ¼X

fskkðkÞjk 2 KnK�; k < l; kðkÞ ¼ 1g:

Obviously, it holds that X1ðKÞ � Y1ðKÞ and

XðKÞ ¼ X1ðKÞ þ X2ðKÞ þXgi¼1

XhðiÞj¼1

skðiÞj ;

YðKÞ ¼ Y1ðKÞ þ Y2ðKÞ þXgi¼1

skðiÞkðkðiÞÞ:

We now argue that the jobs related to job-pieces Jki (k 2 KnK�; 2 � i � kðkÞ � 1) must have beencompleted by time C½l�1�. Otherwise, there exists a smallest index k1 2 KnK� such that for some i(2 � i � kðk1Þ � 1), the job related to job-piece Jk1i is completed after C½l�. Then, the job relatedto job-piece Jk11 is also completed after C½l�, and it should not appear in ðC½k1�;C½l�Þ. Since k1 2 Kand k1 6¼ kð1Þ, there exists a smallest index k2 < k1 (k2 2 K) such that Jk11 comes from the samejob as some Jk2j (1 � j � kðk2Þ � 1). If k2 62 K�, then j ¼ 1 (according to the definition of k1). Butj ¼ 1 implies there exists a smaller index with the property of k2, a contradiction. Then, k2 2 K�.Since the job related to Jk2j appears as Jk11 , the jobs related to Jk2jþ1; . . . ; J

k2kðk2Þ must have been

completed before Jk11 . Since the job related to Jk2j is completed after C½l�, the jobs related toJk21 ; . . . ; Jk2j�1 must be completed after C½l�. Thus, k1 2 K�, a contradiction, too. Now we haveproved that the jobs related to job-pieces Jki (k 2 KnK�; 2 � i � kðkÞ � 1) must have beencompleted by time C½l�1�, so we have X2ðKÞ � Y2ðKÞ. To prove Equation (4), it suffices to provethat

Xgi¼1

XhðiÞj¼1

skðiÞj �

Xgi¼1

skðiÞkðkðiÞÞ þ 2

9ZðKÞ ¼ gsþ 29ZðKÞ: ð5Þ

Since the jobs related to JkðiÞ1 ; JkðiÞ2 ; . . . ; JkðiÞhðiÞ�1 (i ¼ 1; 2 . . . ; g) do not appear in ðC½kðiÞ�;C½l�Þ andthe job related to JkðgÞhðgÞ does not appear in ðC½kðgÞ�;C½l�Þ, we have

ZðKÞ �Xgi¼1

XhðiÞ�1

j¼1

sþ qkðiÞj

� �þ sþ q

kðgÞhðgÞ: ð6Þ

Now we prove that

Xgi¼1

XhðiÞ�1

j¼1

qkðiÞj >

Xgi¼1

XhðiÞ�1

j¼1

jskðiÞj þ s

kðiÞj

Xi�1

u¼1

ðhðuÞ � 1Þ !

þXgu¼1

ðhðuÞ � 1ÞpkðgÞhðgÞ ð7Þ

Z. LIU, AND T.C.E. CHENGZ. LIU, AND T.C.E. CHENG322

by induction on g. When g ¼ 1, it follows from Equation (3) that

Xhð1Þ�1

j¼1

qkð1Þj >

Xhð1Þ�1

j¼1

Xhð1Þ�1

u¼j

skð1Þu þ pkð1Þhð1Þ

!¼Xhð1Þ�1

j¼1

jskð1Þj þ ðhð1Þ � 1Þpkð1Þhð1Þ:

Next we consider the case of g > 1. By the induction hypothesis, it holds that

Xgi¼1

XhðiÞ�1

j¼1

qkðiÞj >

Xg�1

i¼1

XhðiÞ�1

j¼1

jskðiÞj þ s

kðiÞj

Xi�1

u¼1

ðhðuÞ � 1Þ !

þXg�1

u¼1

ðhðuÞ � 1Þpkðg�1Þhðg�1Þ þ

XhðgÞ�1

j¼1

qkðgÞj :

Additionally, noticing pkðg�1Þhðg�1Þ � qkðgÞ1 , we obtain from Equation (3) that

Xg�1

u¼1

ðhðuÞ � 1Þpkðg�1Þhðg�1Þþ

XhðgÞ�1

j¼1

qkðgÞj >

Xg�1

u¼1

ðhðuÞ � 1ÞXhðgÞ�1

j¼1

skðgÞj þ p

kðgÞhðgÞ

!

þXhðgÞ�1

j¼1

XhðgÞ�1

u¼j

skðgÞu þ pkðgÞhðgÞ

!

¼XhðgÞ�1

j¼1

jskðgÞj þ s

kðgÞj

Xg�1

u¼1

ðhðuÞ � 1Þ !

þXgu¼1

ðhðuÞ � 1ÞpkðgÞhðgÞ:

Thus, Equation (7) is also true for g > 1.Note that pkðgÞhðgÞ � qkðgÞhðgÞ > skðgÞhðgÞ. Combining Equations (6) and (7), we have

ZðKÞ >Xgi¼1

XhðiÞ�1

j¼1

sþ jskðiÞj þ s

kðiÞj

Xi�1

u¼1

ðhðuÞ � 1Þ !

þXgu¼1

ðhðuÞ � 1ÞskðgÞhðgÞ þ sþ skðgÞhðgÞ

¼Xg�1

i¼1

XhðiÞ�1

j¼1

sþ jskðiÞj þ s

kðiÞj

Xi�1

u¼1

ðhðuÞ � 1Þ !

þXhðgÞj¼1

sþ jskðgÞj þ s

kðgÞj

Xg�1

u¼1

ðhðuÞ � 1Þ !

:

Thus, to show Equation (5), it suffices to show that for i ¼ 1; 2; . . . ; g,

XHðiÞ

j¼1

skðiÞj � lisþ

2

9

XHðiÞ

j¼1

sþ jskðiÞj þ s

kðiÞj

Xi�1

u¼1

HðuÞ !

; ð8Þ

where

HðiÞ ¼ hðiÞ � 1 ði ¼ 1; 2; . . . ; g� 1Þ;

HðgÞ ¼ hðgÞ;Xgi¼1

li � 1:

MINIMIZING TOTAL COMPLETION TIMEMINIMIZING TOTAL COMPLETION TIME 323

When g ¼ 1, it is simple to show that Equation (8) is true by setting l1 ¼ 1. Now consider thecase of g � 2. Due to (A2), for i � 5, Equation (8) is trivially true even if li ¼ 0. By setting liaccording to Table 2, we can prove (8) for i ¼ 1; 2; 3; 4. j

APPENDIX B: PROOF OF LEMMA 8

First, we give a lemma. Its proof is trivial.

Lemma 9. Let Q and Q0 be two multi-sets of numbers with Q � Q0, which means that jQj ¼ jQ0jand for each i, the ith smallest element of Q is not greater than the ith smallest element of Q0.Let pand p0 be two numbers with p � p0. Then Q [ fpg � Q0 [ fp0g.

Next we prove Lemma 8. Let J ¼ fJ1; J2; . . . ; Jmg. We construct a job set J 0 ¼ fJ 01; J 02; . . . ; J 0mgas follows:

(i) if Ji 2 I , then J 0i ¼ Ji ;(ii) if Ji 2 J nI , then J 0i is such that r0i ¼ ri and p0i ¼ 1.

Clearly NHðJ 0; tÞ ¼ NHðI ; tÞ for any t � 0, since the jobs in J 0 nI never finish, and they never run ifa job with a finite processing time can run instead. Then it suffices to show that for any t � 0,

NHðJ; tÞ � NHðJ0; tÞ: ð9ÞLet r be the schedule produced by algorithm H for J , and qiðtÞ be the remaining processing

time of Ji at time t in r. Note that if Ji is finished at time t, then qiðtÞ ¼ 0. Let siðtÞ be defined asfollows. If Ji is running at time t in r, then siðtÞ is equal to the remaining quantity of the currentsetup; if Ji is finished, then siðtÞ ¼ 0; if Ji is unfinished and not running, then siðtÞ ¼ s. Lets½i�ðtÞ þ q½i�ðtÞ be the ith smallest element of multi-set

QðtÞ ¼ fsiðtÞ þ qiðtÞj1 � i � m; ri � tg:

Also, we make the analogous definitions r0; q0iðtÞ; s0iðtÞ and Q0ðtÞ for J 0. We are going to show thatfor any t � 0,

QðtÞ � Q0ðtÞ; ð10Þi.e.,

s½i�ðtÞ þ q½i�ðtÞ � s0½i�ðtÞ þ q0½i�ðtÞ for each i:

Table 2. Values for li; i ¼ 1; 2; 3; 4

Hð1Þ � 3 l1 ¼ 1 l2 ¼ 0 l3 ¼ 0 l4 ¼ 0

Hð1Þ ¼ 2 l1 ¼ 8=9 l2 ¼ 1=9 l3 ¼ 0 l4 ¼ 0

Hð1Þ ¼ 1;Hð2Þ � 2 l1 ¼ 5=9 l2 ¼ 4=9 l3 ¼ 0 l4 ¼ 0

Hð1Þ ¼ 1;Hð2Þ ¼ 1 l1 ¼ 5=9 l2 ¼ 1=3 l3 ¼ 1=9 l4 ¼ 0

Hð1Þ ¼ 0;Hð2Þ � 3 l1 ¼ 0 l2 ¼ 1 l3 ¼ 0 l4 ¼ 0

Hð1Þ ¼ 0;Hð2Þ ¼ 2 l1 ¼ 0 l2 ¼ 8=9 l3 ¼ 1=9 l4 ¼ 0

Hð1Þ ¼ 0;Hð2Þ ¼ 1;Hð3Þ � 2 l1 ¼ 0 l2 ¼ 5=9 l3 ¼ 4=9 l4 ¼ 0

Hð1Þ ¼ 0;Hð2Þ ¼ 1;Hð3Þ ¼ 1 l1 ¼ 0 l2 ¼ 5=9 l3 ¼ 1=3 l4 ¼ 1=9

Z. LIU, AND T.C.E. CHENGZ. LIU, AND T.C.E. CHENG324

Note that Equation (10) implies Equation (9), because if Equation (10) holds, then QðtÞ mustcontain at least as many zeroes as Q0ðtÞ, and hence at least as many jobs have been completed bytime t in r as in r0.Let t0 ¼ 0 and t1 < t2 < � � � < tm be all the completion times in r. We claim that for each k

(0 � k � m), Equation (10) is true over ½0; tk� by induction on k. At time t0, Equation (10) istrivially true. As the induction hypothesis, Equation (10) is assumed to be true for t 2 ½0; tk�1�,where k � 1. Then

Qðtk�1Þ � Q0ðtk�1Þ; ð11Þ

and

q½i�ðtk�1Þ � q0½i�ðtk�1Þ 8i � k; ð12Þ

where Equation (12) follows from Equation (11) and the fact that s½i�ðtk�1Þ ¼ s (i � k). In thefollowing, we consider the case of tk�1 � t � tk.Note that s½k�ðtÞ þ q½k�ðtÞ remains the smallest positive element of QðtÞ over ½tk�1; tkÞ (though it

may correspond to different jobs at different time). To prove Equation (10) for tk�1 � t � tk, weneed only to show that

s½k�ðtÞ þ q½k�ðtÞ � s0½k�ðtÞ þ q0½k�ðtÞ;

and

Q0ðtÞ � Q00ðtÞ;

where Q0ðtÞ ¼ fq½i�ðtÞji � k þ 1; r½i� � tg and Q00ðtÞ ¼ fq0½i�ðtÞji � k þ 1; r0½i� � tg. This will be done

by induction on t.By Equations (11) and (12), the conclusion is true at time tk�1. From s� 1 to s (s > tk�1), we

have to perform two steps. First, we complete one unit of setup or processing for J½k� and J 0½l�,where J 0½l� is such that s0½l�ðs� 1Þ þ q0½l�ðs� 1Þ is the smallest positive element of Q0ðs� 1Þ. Notethat l � k must hold. Second, we release each pair of jobs JxðsÞ and J 0xðsÞ with rxðsÞ ¼ r0xðsÞ ¼ s.Let s� be referred to as the left limit of s. After the first step, we obtain Qðs�Þ and Q0ðs�Þ,

where

s½k�ðs�Þ þ q½k�ðs�Þ ¼ s½k�ðs� 1Þ þ q½k�ðs� 1Þ � 1;

s0½l�ðs�Þ þ q0½l�ðs�Þ ¼ s0½l�ðs� 1Þ þ q0½l�ðs� 1Þ � 1;

and the other elements are equal to the corresponding elements in Qðs� 1Þ and Q0ðs� 1Þ. Sincel � k, s½k�ðs�Þ þ q½k�ðs�Þ � s0½k�ðs�Þ þ q0½k�ðs�Þ and Q0ðs�Þ � Q0

0ðs�Þ follow from the inductionhypothesis on s� 1. Moreover, it is evident that if q½k�ðs� 1Þ � q0½k�ðs� 1Þ, thenq½k�ðs�Þ � q0½k�ðs�Þ.Now consider the second step. Let s0½j�ðs�Þ þ q0½j�ðs�Þ be the smallest positive element of Q0ðs�Þ.

Obviously, j � k holds. We make a case by case analysis. Note that pyðsÞ and p0yðsÞ, respectively,denote the elements to be added to Q0ðs�Þ and Q0

0ðs�Þ after JxðsÞ and J 0xðsÞ are released.Case 1. sþ pxðsÞ � s½k�ðs�Þ þ q½k�ðs�Þ and sþ p0xðsÞ � s0½k�ðs�Þ þ q0½k�ðs�Þ.Now we have that pyðsÞ ¼ pxðsÞ and p0yðsÞ ¼ p0xðsÞ. Obviously, it holds that

MINIMIZING TOTAL COMPLETION TIMEMINIMIZING TOTAL COMPLETION TIME 325

s½k�ðsÞ þ q½k�ðsÞ ¼ s½k�ðs�Þ þ q½k�ðs�Þ � s0½k�ðs�Þ þ q0½k�ðs�Þ ¼ s0½k�ðsÞ þ q0½k�ðsÞ:

Case 2. sþ pxðsÞ � s½k�ðs�Þ þ q½k�ðs�Þ and there exists u (j � u � k) such that s0½u�1�ðs�Þþq0½u�1�ðs�Þ � sþ p0xðsÞ < s0½u�ðs�Þ þ q0½u�ðs�Þ.In this case, it holds that p0xðsÞ < q0½u�ðs�Þ and p0xðsÞ < q0½k�ðs�Þ. Then,

pyðsÞ ¼ pxðsÞ;

p0yðsÞ ¼ maxfq0½k�ðs�Þ; q0½u�ðs�Þg;

s0½k�ðsÞ ¼ s;

q0½k�ðsÞ ¼maxfminfq0½k�ðs�Þ; q0½u�ðs�Þg; q0½k�1�ðs�Þg; u < k ,

p0xðsÞ; u ¼ k .

8<: :

Thus,

s½k�ðsÞ þ q½k�ðsÞ ¼ s½k�ðs�Þ þ q½k�ðs�Þ � sþ pxðsÞ � sþ p0xðsÞ � s0½k�ðsÞ þ q0½k�ðsÞ:

Case 3. sþ pxðsÞ < s½k�ðs�Þ þ q½k�ðs�Þ and sþ p0xðsÞ � s0½k�ðs�Þ þ q0½k�ðs�Þ.Now p0xðsÞ ¼ 1 must hold. We have that pyðsÞ ¼ q½k�ðs�Þ, p0yðsÞ ¼ p0xðsÞ, and it holds that

s½k�ðsÞ þ q½k�ðsÞ ¼sþ pxðsÞ

<s½k�ðs�Þ þ q½k�ðs�Þ � s0½k�ðs�Þ þ q0½k�ðs�Þ ¼ s0½k�ðsÞ þ q0½k�ðsÞ:

Furthermore, q½k�ðsÞ ¼ pxðsÞ < q0½k�ðsÞ holds.Case 4. sþ pxðsÞ < s½k�ðs�Þ þ q½k�ðs�Þ and there exists u (j � u � k) such that s0½u�1�ðs�Þþ

q0½u�1�ðs�Þ � sþ p0xðsÞ < s0½u�ðs�Þ þ q0½u�ðs�Þ.In this case, p0xðsÞ < q0½u�ðs�Þ and p0xðsÞ < q0½k�ðs�Þ hold, too. We have

pyðsÞ ¼ q½k�ðs�Þ;

p0yðsÞ ¼ maxfq0½k�ðs�Þ; q0½u�ðs�Þg;

s½k�ðsÞ ¼ s0½k�ðsÞ ¼ s;

q½k�ðsÞ ¼ pxðsÞ;

q0½k�ðsÞ ¼maxfminfq0½k�ðs�Þ; q0½u�ðs�Þg; q0½k�1�ðs�Þg; u < k,

p0xðsÞ; u ¼ k.

(

Obviously, q½k�ðsÞ � p0xðsÞ � q0½k�ðsÞ holds, and hence s½k�ðsÞ þ q½k�ðsÞ � s0½k�ðsÞ þ q0½k�ðsÞ holds.Note that in any Case, we have

Q0ðsÞ ¼ Q0ðs�Þ [ fpyðsÞg and Q00ðsÞ ¼ Q0

0ðs�Þ [ fp0yðsÞg:

Since pyðsÞ � p0yðsÞ holds in Cases 1–3 and in Case 4 if q½k�ðs�Þ � q0½k�ðs�Þ, Q0ðsÞ � Q00ðsÞ follows

from Q0ðs�Þ � Q00ðs�Þ and Lemma 9 for these cases. In the following, we analyse Case 4 with

q½k�ðs�Þ > q0½k�ðs�Þ.

Z. LIU, AND T.C.E. CHENGZ. LIU, AND T.C.E. CHENG326

By Equation (12), it holds that q½k�ðtk�1Þ � q0½k�ðtk�1Þ. We can determine the latest time s� suchthat q½k�ðs�� Þ � q0½k�ðs�� Þ and q½k�ðtÞ > q0½k�ðtÞ (8 t 2 ½s�; sÞ). Then Case 2 must appear at time s�, andneither Case 3 nor Case 4 can appear at time s� þ 1; s� þ 2; . . . ; s� 1. Suppose that Case 2appears at time s� ¼ s1 < s2 < � � � < sv and Case 1 appears at other times infs�; s� þ 1; . . . ; s� 1g. Let svþ1 ¼ s. According to Case 1, the jobs corresponding to index ½k� donot change from si�1 to s�i for each i ¼ 2; 3; . . . ; vþ 1. Since s½k�ðs�i Þ þ q½k�ðs�i Þ �s0½k�ðs�i Þ þ q0½k�ðs�i Þ and q½k�ðs�i Þ > q0½k�ðs�i Þ for i � 2, we have that s0½k�ðs�i Þ > 0, which implies thatq0½k�ðs�i Þ ¼ q0½k�ðsi�1Þ. Then, according to Case 2 or 4, we get that for i ¼ vþ 1; v; . . . ; 2,

p0yðsiÞ � q0½k�ðs�i Þ ¼ q0½k�ðsi�1Þ � p0xðsi�1Þ � pxðsi�1Þ ¼ pyðsi�1Þ:

Note that s1 ¼ s� and svþ1 ¼ s. We have

p0yðs1Þ � q0½k�ðs�1 Þ � q½k�ðs�1 Þ � q½k�ðs�Þ ¼ pyðsvþ1Þ:

Then Q0ðsÞ � Q00ðsÞ follows from Q0ðs�1 Þ � Q0

0ðs�1 Þ, where Lemma 9 is applied. j

REFERENCES

Potts, C. N. and L. N. Van Wassenhove, ‘‘Integrating scheduling with batching and lot-sizing: A review of algorithms

and complexity,’’ J. Oper. Res. Soc. 43, 395–406 (1992).

Monma, C. L. and C. N. Potts, ‘‘Analysis of heuristics for preemptive parallel machine scheduling with batch setup

times,’’ Oper. Res. 41, 981–993 (1993).

Chen, B., ‘‘A better heuristic for preemptive parallel machine scheduling with batch setup times,’’ SIAM J. Comput. 22,

1303–1318 (1993).

Zdrzalka, S., ‘‘Preemptive scheduling with release dates, delivery times and sequence independent setup times,’’ Eur. J.

Oper. Res. 76, 60–71 (1994).

Schuurman P. and G.J. Woeginger, ‘‘Preemptive scheduling with job-dependent setup times,’’ Proceedings of the 10th

ACM-SIAM Symposium on Discrete Algorithms 1999 pp. 759–767.

Liu, Z. and T. C. E. Cheng, ‘‘Scheduling with job release dates, delivery times and preemption penalties,’’ Information

Process. Lett., 82, 107–111 (2002).

Julien, F. M., M. J. Magazine, and N. G. Hall, ‘‘Generalized preemption models for single-machine dynamic scheduling

problems,’’ IIE Trans. 29, 359–372 (1997).

Garey, M. R. and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-completeness. Freeman, San

Francisco, 1979.

Phillips, C., C. Stein, and J. Wein, ‘‘Minimizing average completion time in the presence of release dates,’’ Math. Prog.,

82, 199–223 (1998).

MINIMIZING TOTAL COMPLETION TIMEMINIMIZING TOTAL COMPLETION TIME 327