Published on

26-Jun-2016View

212Download

0

Embed Size (px)

Transcript

Computers & Operations Research 34 (2007) 23962402www.elsevier.com/locate/cor

A simple linear time algorithm for scheduling withstep-improving processing times

Min Jia,b, Yong Hea, T.C.E. Chengb,aDepartment of Mathematics, State Key Lab of CAD & CG, Zhejiang University, Hangzhou 310027, China

bDepartment of Logistics, The Hong Kong Polytechnic University, Kowloon, Hong Kong SAR, China

Available online 6 October 2005

Abstract

We consider the problem of scheduling jobs with step-improving processing times around a common critical date on a singlemachine to minimize the makespan. For this problem, we present a simple linear time off-line approximation algorithm and proveits worst-case performance guarantee. 2005 Elsevier Ltd. All rights reserved.

Keywords: Scheduling; Approximation algorithm; Worst-case ratio

1. Introduction

Machine scheduling problems with jobs having start-time-dependent processing times have received increasingattention from the scheduling community over the last decade. For a survey of the research in this area, we refer thereader to Cheng et al. [1]. Recently, Cheng et al. [2] considered the following single-machine scheduling problem withtime-dependent processing times: there are n-independent jobs J = {J1, J2, . . . , Jn} with a common critical date d.All the jobs are available for processing at time 0. The processing time of job Jj (j = 1, . . . , n) is specied by twointegers aj and bj with 0bj aj . If job Jj is started at some time t < d, then its processing time is aj ; if it is startedat some time td, then its processing time equals aj bj . The goal is to nd a non-preemptive schedule to minimizethe makespan, i.e., the completion time of the last job. For this problem, Cheng et al. [2] gave an NP-hardness proof, apseudo-polynomial time algorithm, a fully polynomial time approximation scheme (FPTAS), and an on-line algorithmwith a competitive ratio 2 while showing that no on-line algorithm can have a competitive ratio smaller than 2. Mostof their algorithmic results are based on two Knapsack problems subject to covering constraints.

Recall that the FPTAS of the Knapsack problem is based on the dynamic programming approach, hence it is supposedthat all the data are integer. Furthermore, although the FPTAS of the Knapsack problem may run in linear time for agiven error bound , the formulation and solution approach are quite complex. In this note, we give another algorithmwith a worst-case ratio 54 . It is very simple and runs in linear time. Moreover, we do not need to assume that all the dataare integer. So, our algorithm makes a contribution to both the theory and practice of scheduling.

Corresponding author.E-mail addresses: jimkeen@math.zju.edu.cn (M. Ji), mathhey@zju.edu.cn (Y. He), LGTcheng@polyu.edu.hk (T.C.E. Cheng).

0305-0548/$ - see front matter 2005 Elsevier Ltd. All rights reserved.doi:10.1016/j.cor.2005.09.011

M. Ji et al. / Computers & Operations Research 34 (2007) 23962402 2397

We use the worst-case ratio to measure the quality of an off-line approximation algorithm. For an instance I , letCA(I) (or briey CA) denote the makespan produced by an approximation algorithm A, and COPT(I ) (or briey COPT)denote the makespan produced by an optimal algorithm. Then the worst-case ratio of algorithm A is dened as thesmallest number c such that for any instance I , CA(I)cCOPT(I ).

2. The simple linear time algorithm

For the considered problem, Cheng et al. [2] gave an on-line algorithm ON with a competitive ratio 2. To improvethe worst-case ratio of the off-line version, we add a preparatory step before invoking algorithm ON. We denote themodied algorithm by algorithm OFF, which is described as follows.

Algorithm OFF:

1. Re-order the jobs such that b1/a1b2/a2 bn/an. Determine k = min{j |ji=1 ai > d}.2. Process the jobs J1, J2, . . . , Jk1 before d without introducing any idle time between consecutive jobs. Let Ck1

be the nishing time of job Jk1.3. If Ck1 >d bk , then process the jobs Jk, . . . , Jn starting from d without introducing any idle time between

consecutive jobs. Otherwise, process the jobs Jk, . . . , Jn starting from Ck1 without introducing any idle timebetween consecutive jobs.

Denition 1. For a given schedule, we call a job straddling if it is started before d and completed after d, a job earlyif it is completed by d, and a job tardy if its starting time is not earlier than d.

Remark. Step 1 can be done in O(n) time, hence OFF still runs in linear time. In fact, to implement Step 1, we justneed to determine k and the set T1 = {pi |bi/ai < bk/ak, i = 1, . . . , n}. Balas and Zemel [3] studied the Knapsackproblem and presented a linear time method for determining the so-called critical item. Recall that for the Knapsackproblem, we are given n items, each with a prot ai and a weight wj , and a knapsack with capacity C. We wish toput items into the Knapsack such that the total weight of the selected items is not greater than C and the total prot ofthe selected items is maximized. By assuming a1/w1 an/wn, the critical item is dened as the item s such thats = min{j |ji=1 wi >C}. It is obvious that the method for computing the critical item for the Knapsack problem canbe applied to obtain the straddling job in algorithm OFF for our problem. Hence, we can determine k, and thus T1, inlinear time.

Theorem 2. Algorithm OFF has a worst-case ratio of 54 .

We prove the worst-case ratio by contradiction. Suppose that there exists a counterexample that violates our ratio;hence aminimal counterexample (J, d)with the fewest possible jobs should exist. From now on, we assume that we aredealing with the minimal counterexample I = (J, d). The following three lemmas can be shown by simple algebraicmanipulations.

Lemma 3. Let x, a, b be positive numbers satisfying 0x1 and b/ax.We have (a+(1x)b)/(b+(1x)a) 54 .

Lemma 4. Let x, u1, u2, v1, v2 be positive numbers satisfying u2u1 and v1/u1v2/u21.We have u1+v2u2+v1and (v2 + x)/(u2 + x)(v1 + x)/(u1 + x).

Lemma 5. Let a, b and x be positive numbers satisfying x

2398 M. Ji et al. / Computers & Operations Research 34 (2007) 23962402

Fig. 1. Case 1: (i) one of the jobs in {Jk+1, . . . , Jn} is completed after d in the optimal schedule; (ii) all the jobs in {Jk+1, . . . , Jn} are completedby d in the optimal schedule.

I = (J\{Jj }, d = d aj ). It is obvious that COFF (I ) = COFF (I) aj and COPT(I )COPT(I ) aj . Then,COFF (I

)COPT(I )

COFF (I) ajCOPT(I ) aj

COFF (I)

COPT(I )

and hence I is a smaller counterexample, a contradiction.

Lemma 7. In the minimal counterexample, if a job Jj is straddling in an optimal schedule, then it cannot be early inthe OFF schedule.

Proof. Suppose that Jj is straddling in an optimal schedule and early in the OFF schedule. Then we can concludethat aj d, otherwise it cannot be early in the OFF schedule. So it is clear that, in the optimal schedule, there is atleast one job Ji that is processed before Jj (i.e., Ji is early in the optimal schedule). Otherwise, Jj can start at timezero, and hence is completed by d in the optimal schedule since aj d, a contradiction. Then we can obtain a newoptimal schedule by exchanging Jj with Ji , and thus Jj is early too in the new optimal schedule, which contradictsLemma 6.

Proof of Theorem 2. From the rule of algorithm OFF and Lemmas 6 and 7, we know that:

(a) In the OFF schedule, all the jobs in {J1, . . . , Jk1} are early and all the jobs in {Jk+1, . . . , Jn} are tardy while Jkmay be straddling or tardy.

(b) In the optimal schedule, all the jobs in {J1, . . . , Jk1} are tardy and the starting time of each job in {Jk+1, . . . , Jn}must be less than d . Whether the starting time of Jk is less than d in the optimal schedule is unknown.

Three cases are considered according to the assignment of Jk in the OFF schedule and the optimal schedule. Case 1: Jk is straddling in the OFF schedule and tardy in the optimal schedule (see Fig. 1).Let c1 =kj=1 aj , d1 =kj=1 bj , c2 =nj=k+1 aj , d2 =nj=k+1 bj , and suppose d1 = tc1 for some 0 t1.

Because bj /aj bi/ai for any j {1, 2, . . . , k} and i {k + 1, k + 2, . . . , n}, we get d1/c1d2/c2, i.e., d2 tc2. Wethus have

COFF

COPT= c1 + (c2 d2)

max{c2, d} + (c1 d1)c1 + (1 t)c2

max{c2, d} + (1 t)c1 c1 + (1 t)max{c2, d}max{c2, d} + (1 t)c1 . (1)

In addition, we have dCk1 + bk =k1i=1 ai + bkki=1 bi = d1 since Jk is straddling in the OFF schedule. Itfollows that max{c2, d}/c1d1/c1 = t , i.e., max{c2, d} tc1. Combining it with (1) and Lemma 5, we obtain

COFF

COPT c1 + (1 t)tc1

tc1 + (1 t)c1 .

Combining it with Lemma 3, we obtain COFF /COPT 54 , a contradiction.

M. Ji et al. / Computers & Operations Research 34 (2007) 23962402 2399

Fig. 2. Case 2: (i) one of the jobs in {Jk, . . . , Jn} is completed after d in the optimal schedule; (ii) all the jobs in {Jk, . . . , Jn} are completed by d inthe optimal schedule.

Case 2: Jk is straddling in the OFF schedule, and its start time is less than d in the optimal schedule (see Fig. 2).Let c1 =k1j=1 aj , d1 =k1j=1 bj , c2 =nj=k+1 aj , d2 =nj=k+1 bj . Then, we have

COFF

COPT= c1 + ak + (c2 d2)

max{c2 + ak, d} + (c1 d1) (2)

and

dCk1 + bk = c1 + bk (3)since Jk is a straddling job in the OFF schedule. No matter whether max{c2 + ak, d} = c2 + ak or d, from (2), usingthe proof by contradiction, we have

54

d + c1 + 4d2. It follows that4d1 >d + c1 d1. (4)

Combining (3) and (4), we obtain4d1 > 2c1 + (bk d1). (5)

We will easily complete the proof of Case 2 by proving the following Propositions 14.

Proposition 1. c1c2.

Proof. From Eq. (2), we havec1 + ak + c2 d2 = COFF COPT = max{c2 + ak, d} + (c1 d1)c2 + ak + c1 d1 (6)

and thus d1d2. Using the same arguments as in Case 1, we can show that

d1c1 bk

ak d2

c2. (7)

It follows that c1c2.

Proposition 2. c1

2400 M. Ji et al. / Computers & Operations Research 34 (2007) 23962402

Let d1 + ak = t (c1 + ak) for some t, 0 t1, then we haved2 + ak t (c2 + ak). (8)

So by (2), (8) and d1 = t (c1 + ak) ak , we haveCOFF

COPT= c1 + ak + (c2 d2)

max{c2 + ak, d} + (c1 d1) c1 + ak + c2 (t (c2 + ak) ak)

max{c2 + ak, d} + c1 (t (c1 + ak) ak) c1 + ak + (1 t)max{c2 + ak, d}

max{c2 + ak, d} + (1 t)(c1 + ak) . (9)

If c1ak , then from inequality (7) and Lemma 4, we have c1 + bkd1 + ak . Combining this inequality and (3), weknow that

max{c2 + ak, d}c1 + ak

d

c1 + ak c1 + bkc1 + ak

d1 + akc1 + ak = t . (10)

Combining (9), (10) and Lemma 3, we have COFF /COPT 54 , a contradiction. Hence, we have established thatc1 2c1, i.e.,d1 >

12 c1. (12)

By (12), we can suppose d1 = t c1 for some t , 12 < t 1. It implies that d2 t c2 from (7). So from (2), we haveCOFF

COPT= c1 + ak + (c2 d2)

max{c2 + ak, d} + (c1 d1)c1 + ak + (1 t )c2

max{c2 + ak, d} + (1 t )c1= c1 + ak/(2 t

) + (1 t )(c2 + ak/(2 t))max{c2, d ak} + ak/(2 t ) + (1 t )(c1 + ak/(2 t ))

c1 + ak/(2 t) + (1 t )(max{c2, d ak} + ak/(2 t ))

max{c2, d ak} + ak/(2 t ) + (1 t )(c1 + ak/(2 t )) . (13)

It is clear that 1/(2 t )> 23 . So combining it with Lemma 5, we haveCOFF

COPT

c1 + 23ak + (1 t )(max{c2, d ak} + 23ak)max{c2, d ak} + 23ak + (1 t )(c1 + 23ak)

. (14)

Suppose that d akd9 + 23ak(d1/c1 2), we have max{c2, d ak}d akd1 + 26ak(d1/c1 1). It impliesthat max{c2, d ak}(c1 + 23ak)d0/c1 2/3ak , i.e.,

max{c4, d ak} + 23akc1 + 23ak

d1c1

= t . (15)

We thus have COFF /COPT 54 by (14), (15) and Lemma 3, a contradiction. The desired result follows.

Proposition 4. d1 >c1.

M. Ji et al. / Computers & Operations Research 34 (2007) 23962402 2401

Fig. 3. Case 3: (i) all the jobs in {Jk, . . . , Jn} are completed by d in the optimal schedule; (ii) one of the jobs in {Jk, . . . , Jn} are completed after din the optimal schedule.

Proof. From Proposition 3, we have

d ak < d1 + 23ak(

d1c1

1)d1 + 23ak

(bk

ak 1)

= d1 + 23 (bk ak). (16)

It follows from (3) and (16) that c1 + bkd 3/ak since akbk . Combining it with inequality (7), we havebk/akd1/c1 >(3/ak)d1, i.e., bk > 3d1. Substituting this inequality into (5), we can get d1 >c1.

Proposition 4 contradicts the trivial fact that d1c1, therefore we have completed the proof of Case 2.Case 3: Jk is tardy in the OFF schedule, and its start time is less than d in the optimal schedule (see Fig. 3).Let c1 =k1j=1 aj , d1 =k1j=1 bj , c2 =nj=k aj , d2 =nj=kbj .Case 3.1: All the jobs in {Jk, . . . , Jn} are completed by d in the optimal schedule (see Fig. 3(i)).For this case, we suppose d2=tc2 for some t, 0 t1. Using the same arguments as in Case 1, we have d1/c1d2/c2

and d1(d2/c2)c1 = tc1. From the rule of algorithm OFF, we getc1 = Ck1 >d bkd d2c2 d2 = (1 t)c2. (17)

Therefore,COFF

COPT= d + (c2 d2)

d + (c1 d1)c2 + (c2 d2)c2 + (c1 d1)

c2 + (c2 tc2)c2 + (1 t)c1 .

Combining this inequality with (17), we have the following contradiction:COFF

COPT (2 t)c2

c2 + (1 t)(1 t)c2 =2 t

1 + (1 t)2 2

4 22 d bkd d2 = (1 t)d. (18)Therefore,

COFF

COPT= d + (c2 d2)

c2 + (c1 d1)d + (c2 td)c2 + (c1 tc1)

d + (1 t)dd + (1 t)c1 .

Combining this inequality with (18), we haveCOFF

COPT (2 t)d

d + (1 t)(1 t)d =2 t

1 + (1 t)2 2

4 22