9
Theoretical Computer Science 363 (2006) 257 – 265 www.elsevier.com/locate/tcs Improved algorithms for two single machine scheduling problems Yong He, Weiya Zhong , Huikun Gu Department of Mathematics, State Key Lab of CAD & CG, Zhejiang University, Hangzhou 310027, PR China Abstract In this paper, we investigate two single machine scheduling problems. The first problem addresses a class of the two-stage scheduling problems in which the first stage is job production and the second stage is job delivery. For the case that jobs are processed on a single machine and delivered by a single vehicle to one customer area, with the objective of minimizing the time when all jobs are completed and delivered to the customer area and the vehicle returns to the machine, an approximation algorithm with a worst-case ratio of 5 3 is known and no approximation can have a worst-case of 3 2 unless P = NP. We present an improved approximation algorithm with a worst-case ratio of 53 35 , which only leaves a gap of 1 70 . The second problem is a single machine scheduling problem subject to a period of maintenance. The objective is to minimize the total completion time. The best known approximation algorithm has a worst-case ratio of 20 17 . We present a polynomial time approximation scheme. © 2006 Elsevier B.V.All rights reserved. Keywords: Scheduling; Delivery; Worst-case ratio 1. Introduction In this paper, we consider two single machine scheduling problems, which have strong background in supply chain management and manufacture management. The first problem is a scheduling problem with job delivery coordination, which is first proposed by Chang and Lee [2], and can be described as follows: We are given n jobs N ={J 1 ,J 2 ,...,J n } which must be first non-preemptively processed in a manufacturing system and then delivered to respective customers. Job J j , j = 1, 2,...,n needs a processing time of p j in the manufacturing system, and has a size s j which represents the physical space J j occupies when this job is loaded in the vehicle. One vehicle is available to deliver finished jobs in batches, and has a capacity z which means that finished jobs can be arranged to fit in the physical space provided by the vehicle as long as their total size does not exceed z. The vehicle is initially located at the manufacturing facility. All jobs delivered together in one shipment are defined as a delivery batch. A transportation time depending on customer area is associated with each delivery batch. Furthermore, we define a one customer area as a location where a group of customers are located in close proximity to each other. The goal is to find a schedule for processing jobs in manufacturing system and delivering finished jobs to the corresponding customers such that the time required for all jobs in N to be processed and delivered to the respective customer(s) is minimized. To evaluate this goal, we define the makespan of a schedule, denoted by Research supported by National Natural Science Foundation of China (10271110, 60021201). Corresponding author. E-mail address: [email protected] (W. Zhong). 0304-3975/$ - see front matter © 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.tcs.2006.04.014

Improved algorithms for two single machine scheduling problems

  • Upload
    yong-he

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Theoretical Computer Science 363 (2006) 257–265www.elsevier.com/locate/tcs

Improved algorithms for two single machine scheduling problems�

Yong He, Weiya Zhong∗, Huikun GuDepartment of Mathematics, State Key Lab of CAD & CG, Zhejiang University, Hangzhou 310027, PR China

Abstract

In this paper, we investigate two single machine scheduling problems. The first problem addresses a class of the two-stagescheduling problems in which the first stage is job production and the second stage is job delivery. For the case that jobs areprocessed on a single machine and delivered by a single vehicle to one customer area, with the objective of minimizing the timewhen all jobs are completed and delivered to the customer area and the vehicle returns to the machine, an approximation algorithmwith a worst-case ratio of 5

3 is known and no approximation can have a worst-case of 32 unless P = NP. We present an improved

approximation algorithm with a worst-case ratio of 5335 , which only leaves a gap of 1

70 . The second problem is a single machinescheduling problem subject to a period of maintenance. The objective is to minimize the total completion time. The best knownapproximation algorithm has a worst-case ratio of 20

17 . We present a polynomial time approximation scheme.© 2006 Elsevier B.V. All rights reserved.

Keywords: Scheduling; Delivery; Worst-case ratio

1. Introduction

In this paper, we consider two single machine scheduling problems, which have strong background in supply chainmanagement and manufacture management.

The first problem is a scheduling problem with job delivery coordination, which is first proposed by Chang and Lee[2], and can be described as follows: We are given n jobs N = {J1, J2, . . . , Jn} which must be first non-preemptivelyprocessed in a manufacturing system and then delivered to respective customers. Job Jj , j = 1, 2, . . . , n needs aprocessing time of pj in the manufacturing system, and has a size sj which represents the physical space Jj occupieswhen this job is loaded in the vehicle. One vehicle is available to deliver finished jobs in batches, and has a capacityz which means that finished jobs can be arranged to fit in the physical space provided by the vehicle as long as theirtotal size does not exceed z. The vehicle is initially located at the manufacturing facility. All jobs delivered together inone shipment are defined as a delivery batch. A transportation time depending on customer area is associated with eachdelivery batch. Furthermore, we define a one customer area as a location where a group of customers are located inclose proximity to each other. The goal is to find a schedule for processing jobs in manufacturing system and deliveringfinished jobs to the corresponding customers such that the time required for all jobs in N to be processed and deliveredto the respective customer(s) is minimized. To evaluate this goal, we define the makespan of a schedule, denoted by

� Research supported by National Natural Science Foundation of China (10271110, 60021201).∗ Corresponding author.

E-mail address: [email protected] (W. Zhong).

0304-3975/$ - see front matter © 2006 Elsevier B.V. All rights reserved.doi:10.1016/j.tcs.2006.04.014

258 Y. He et al. / Theoretical Computer Science 363 (2006) 257 –265

Cmax, as the time when the vehicle finishes delivering the last batch to the customer site(s) and returns to the machine(s).Then the problem is to find a schedule to minimize the makespan.

As we know, coordination of activities among different stages in the supply chain has become one of the mostimportant topic in production and operations management research in last decade. For the research on the coordinationof production and delivery schedule, one may refer to [2]. Different from traditional scheduling problems whichimplicitly assume that there are infinitely many vehicles for delivering finished products to their destinations so thatfinished products can be transported to customers without delay, the above problem incorporates the delivery plan of avehicle into a manufacturing system. It models a class of the two-stage scheduling problem in which the first stage isjob production and the second stage is job delivery. The focus is on the study of the integration of production schedulingwith delivery of finished products to customers, which measures the customer service level.

Three strongly NP-hard cases of the above problem are considered in [2]: for the case that the manufacturing systemconsists of a single machine and there is one customer area, Chang and Lee presented a polynomial time algorithm H1with a worst-case ratio of 5

3 , while no polynomial time algorithm can have a worst-case ratio of smaller than 32 unless

P = NP. For the case that the manufacturing system consists of two identical machines and there is one customerarea, they presented a polynomial time algorithm H2 with a worst-case ratio of 2. For the case that the manufacturingsystem consists of a single machine and there are two customer areas, they presented a polynomial time algorithm H3with a worst-case ratio of 2, too.

In this paper, we revisit the first case of the above problem, which is denoted by 1 → D, k = 1|v = 1, c = z|Cmax.Here “1 → D, k = 1” means that jobs are first processed on a single machine and then delivered to customer(s) whoare located in one area. “v = 1, c = z” means that there is only one vehicle with capacity z. We will present a modifiedalgorithm MH1 with a worst-case ratio of 3

2 + 170 = 53

35 , which greatly improves the known upper bound of 53 and is

quite close to the lower bound of 32 .

The second considered problem in this paper is a single machine scheduling problem with a machine availabilityconstraint, which can be described as follows: we are given n jobs N = {J1, J2, . . . , Jn} which must be processed ona single machine. Job Jj has a processing time pj , j = 1, 2, . . . , n. All jobs are available at time zero, whereas themachine has a maintenance period during the processing of jobs, i.e., the machine cannot process any job during thegiven time window [R, R + L]. Preemptions are not allowed. Hence a job that is preempted due to the maintenancemust be restarted after the machine is repaired. The objective is to find a schedule such that the total completion timeis minimized. This problem is denoted by 1, h1|| ∑ Ci [6].

Adiri et al. [1] and Lee and Liman [5] showed that the problem 1, h1|| ∑ Ci is NP-hard. They also studied algorithmSPT (shortest processing time) as an approximation algorithm solving this problem. Lee and Liman [5] proved that theworst-case ratio of SPT is 9

7 . Recently, Sadfi et al. [6] proposed a modified algorithm MSPT with a worst-case ratio of2017 . This algorithm is based on a post-optimization of the SPT algorithm by applying a 2-OPT procedure. In this paper,we will extend this idea to a general k, k-exchange procedure. Then we will propose a polynomial time approximationscheme (PTAS) based on this new procedure. Hence our result greatly improves the known result.

2. Problem 1 → D, k = 1|v = 1, c = z|Cmax

This section considers the two-stage scheduling problem with a single machine and one customer area: 1 → D, k =1|v = 1, c = z|Cmax. Let P be the total processing time of all the jobs. Let t be the one-way transportation timebetween the machine and the customer, therefore, each delivery has the same transportation time T = 2t .

2.1. Preliminaries and algorithm description

Property 1 (Chang and Lee [2]). There exists an optimal schedule for the problem 1 → D, k = 1|v = 1, c = z|Cmaxthat satisfies the following conditions:(1) Jobs are processed on the machine without idle time.(2) Jobs assigned to one batch are processed consecutively on the machine.(3) Jobs assigned to one batch can be processed on the machine in any order.(4) Batches are delivered in non-decreasing order of the total processing time of jobs in each batch.

Y. He et al. / Theoretical Computer Science 363 (2006) 257 –265 259

Therefore, only schedules satisfying the above properties are considered further. Also, batches will be indexed anddelivered in non-decreasing order of the total processing time of the jobs in each batch.

Lemma 1 (Chang and Lee [2]). For any schedule satisfying Property 1, if Cmax > P + T , then P1 < T and Cmax =P1 + KT , in which P1 denotes the total processing time of the jobs in the first batch and K denotes the number ofbatches in the schedule.

Since different jobs with different sizes can be delivered in one batch, the packing step can be viewed as a bin-packingproblem.Algorithms FF (first fit) and FFD (first fit decreasing) are two classical algorithms for the bin-packing problem.We will apply them as sub-procedures for solving our problem. Note that algorithms FF and FFD are based on the jobsizes and the vehicle capacity z in this paper.

Lemma 2. For an instance I of the bin-packing problem, let OPT(I ), FF(I ), FFD(I ) be the numbers of used bins inan optimal solution, the solutions yielded by FF and FFD, respectively. We have

(1) (Simchi-Levi [7]) FF(I)� 74 OPT(I );

(2) (Yue [8]) FFD(I )� 119 OPT(I ) + 1.

The following algorithm H1 was proposed by Chang and Lee [2] for solving 1 → D, k = 1|v = 1, c = z|Cmax.

Algorithm H1. (1) Assign jobs to batches by algorithm FFD. Let the total number of resulting batches be b1.(2) Define Pk as the total processing time of the jobs in the kth batch, k = 1, 2, . . . , b1. Reindex these batches such

that P1 �P2 � · · · �Pb1 , and denote the kth batch as Bk .(3) Starting with B1, assign jobs in Bk to the machine, for k = 1, 2, . . . , b1. Jobs within each batch can be sequenced

in an arbitrary order.(4) Dispatch each finished but undelivered batch whenever the vehicle becomes available. If multiple batches have

been completed when the vehicle becomes available, dispatch the batch with the smallest index.

It is clear that the time complexity of H1 is O(n log n). It is shown in [2] that the worst-case ratio of H1 is 53 .

Furthermore, since the bin-packing problem is a special case of our problem, it is impossible to have a polynomial timeapproximation algorithm with a worst-case ratio of 3

2 unless P = NP.Note that there is a point which prevents the worst-case ratio of H1 to be better: H1 assigns jobs to batches by

FFD, which does not take the processing times of jobs into consideration. The total processing time of jobs in thefirst batch may be much larger than that in the optimal solution. Our improved algorithm applies a fully polynomialtime approximation scheme (FPTAS) of the knapsack problem, which enables the vehicle to start delivering jobsearlier. Recall that for any instance of the knapsack problem, we are given n items, each with a profit and a size,and a knapsack with limited capacity. We wish to put items into the knapsack such that the total size of the selecteditems is not greater than the knapsack capacity and the total profit of the selected items is maximized. For this NP-hard problem, among others, Lawler [4] proposed an FPTAS with a time complexity of O(n log(1/�) + 1/�4), where1 − � is the worst-case ratio; and Kellerer and Pferschy [3] also proposed an FPTAS with a time complexity ofO(n min{log n, log(1/�)} + (1/�2) min{n, (1/�) log(1/�)}).

Now we are ready to present our improved algorithm.

Algorithm MH1. (1) Run algorithm H1. Let the obtained schedule be �1 with makespan C1. If b1 �= 3, stop; Else, goto Step 2.

(2) Construct an instance of the knapsack problem as follows: for each job Jj , j = 1, 2, . . . , n, construct anitem with profit pj and size sj , and let the knapsack capacity be z. Run any FPTAS for the knapsack problemwith � = 2

35 , and denote by N1 the set of items put into the knapsack. Reindex all jobs such that N1 is at thehead.

(3) Assign jobs to batches by algorithm FF. Let the total number of resulting batches be b2.(4) Run Steps 2–4 of algorithm H1 except that denote by B ′

k the kth batch, and by P′k the total processing times of

B ′k , k = 1, 2, . . . , b2. Let the obtained schedule be �2 with makespan C2.(5) Compare C1 and C2. Select the smaller one as output.

260 Y. He et al. / Theoretical Computer Science 363 (2006) 257 –265

Remark 3. The jobs corresponding to the items in N1 are assigned to the same batch by algorithm FF in Step 3 ofalgorithm MH1.

When analyzing our algorithm, we use the following:b∗L is the number of batches if the jobs are assigned to batches by an optimal algorithm of the bin-packing problem;

b∗ the number of batches in the optimal schedule for our problem, P ∗ the optimal value of the instance of the knapsackproblem constructed in Step 2, C∗ the optimal makespan for our problem, CMH1 the makespan produced by MH1, ythe total processing time of jobs in the first batch in the optimal solution.

Lemma 4. If there are only two batches in the optimal schedule, P − y�P ∗.

Proof. Since jobs in each batch constitutes a feasible solution for the instance of the knapsack problem, and P − y isthe total processing time of the second batch in the optimal schedule, we have P − y�P ∗. �

Lemma 5. P ′b2

� 3335P ∗, in which P ′

b2denotes the total processing time of jobs in the last batch of �2 (if exists).

Proof. From Remark 3, we know that there exists k, 1�k�b2, such that P′k � 33

35P ∗. Since P ′1 �P ′

2 � · · · �P ′b2

,

P ′b2

�P ′k � 33

35P ∗. �

2.2. Worst-case analysis of algorithm MH1

Lemma 6. If b1 �= 3, CMH1/C∗ < 53

35 .

Proof. In this case, algorithm MH1 is just H1, hence CMH1 = C1. Chang and Lee [2] proved that C1/C∗ � 5

3 . In orderto obtain C1/C

∗ < 5335 , more careful analysis are necessary.

From Lemma 1, we have

C∗ = max{y + b∗T , P + T }. (1)

If C1 = P + T , we have C1 = C∗ clearly, and we are done. Hence, we suppose that C1 > P + T in the following.Then by Lemma 1,

C1 = P1 + b1T and P1 < T. (2)

It is obvious that b∗ �2. Otherwise, b1 = b∗ = 1 and MH1 yields an optimal solution. If b1 �b∗, by (1) and (2), wehave

C1

C∗ � P1 + b1T

y + b∗T<

P1 + b∗Tb∗T

= 1 + P1

T· 1

b∗ < 1 + 1

b∗ � 3

2<

53

35. (3)

Hence, we only need to consider the case that b1 > b∗.Noting that the jobs are assigned to batches according to algorithm FFD in H1, by Lemma 2(2), we have

b1 � 11

9b∗L + 1� 11

9b∗ + 1. (4)

If b∗ = 2, then b1 � 319 < 4. From b1 > b∗ we know b1 = 3, contradicting the Lemma’s assumption b1 �= 3.

Therefore, we suppose b∗ �3 in the following. To obtain the desired worst-case ratio, we distinguish two cases accordingto (1).

Y. He et al. / Theoretical Computer Science 363 (2006) 257 –265 261

Case 1: C∗ = y +b∗T . Then (1) implies y +b∗T �P +T , i.e., P �y + (b∗ − 1)T . Recall that P1 �P2 � · · · �Pb1 .We establish that P1 �P/b1 �(y + (b∗ − 1)T )/b1, and thus

C1

C∗ = P1 + b1T

y + b∗T� ((y + (b∗ − 1)T )/b1) + b1T

y + b∗T

= 1

b1· y + b∗T + (b2

1 − 1)T

y + b∗T

= 1

b1+ 1

b1· (b2

1 − 1)T

y + b∗T

<1

b1+ 1

b1· b2

1 − 1

b∗ . (5)

If b∗ = 3, (4) states that b1 � 429 < 5. Combing it with b1 > b∗, we have b1 = 4. Then from (5), it follows that

C1/C∗ < 3

2 .Similarly, if b∗ = 4, then b1 = 5 and thus C1/C

∗ < 75 ; if b∗ = 5, then b1 = 6, 7 and thus C1/C

∗ < 43 (for b1 = 6)

or C1/C∗ < 53

35 (for b1 = 7); if b∗ = 6, then b1 = 7, 8, and thus C1/C∗ < 9

7 (for b1 = 7) or C1/C∗ < 23

16 (for b1 = 8).

If b∗ �7, (4) implies that b∗ �(9(b1 − 1))/11. Substituting it into (5), we obtain

C1

C∗ <1

b1+ 1

b1· (b2

1 − 1)

9(b1 − 1)/11= 11

9+ 20

9b1<

11

9+ 20

9· 1

8= 3

2, (6)

where the last inequality is from b1 > b∗ �7.Case 2: C∗ = P + T . Then (1) implies C∗ = P + T �y + b∗T > b∗T . Combining it with (4), we have P >

(b∗ − 1)T �( 911b1 − 20

11 )T . As P1 �P/b1, we conclude that

C1

C∗ = P1 + b1T

P + T� (P/b1) + b1T

P + T

= 1

b1· P + T + (b2

1 − 1)T

P + T

= 1

b1+ b2

1 − 1

b1· T

P + T<

1

b1+ b2

1 − 1

b1· T

b∗T

= 1

b1+ b2

1 − 1

b1· 1

b∗ . (7)

Note that (7) is the same as (5). Therefore, the same arguments as those in Case 1 can complete the proof. �

Lemma 7. If b1 = 3, CMH1/C∗ < 53

35 .

Proof. Similarly, we can suppose that b∗ �2. If C1 = P + T or C2 = P + T , then min{C1, C2} = C∗ by (1). Hence,we suppose that C1 > P + T and C2 > P + T . Then by Lemma 1, P1 < T and P ′

1 < T , where P1 and P ′1 are the

total processing times of jobs in the first batches in �1 and �2, respectively.If b1 �b∗, we have shown in Lemma 6 that C1/C

∗ < 32 (see the proof of (3)). Hence, we suppose b1 > b∗. Then

b∗ = 2. Hence, by Lemma 2(1), we have b2 � 74 ∗ 2 = 7

2 , that is, b2 �3. If further b2 �b∗, by similar arguments toshow (3) in the proof of Lemma 6, we can obtain C2/C

∗ � 32 . Hence, we suppose b2 > b∗. Combining it with b2 �3

and b∗ = 2, we know that b2 = 3.b∗ = 2 and (1) states that C∗ = max{y + 2T , P + T }. Two cases are considered as follows.Case 1: C∗ = y+2T . Then y+2T �P +T , and thus P �y+T . From Lemmas 4 and 5, we get P ′

3 � 3335P ∗ � 33

35 (P −y).Noting that P ′

1 �P ′2 �P ′

3, we obtain

P ′1 � P − P ′

3

2� P − (33/35)(P − y)

2= 2P + 33y

70� 2(y + T ) + 33y

70= y

2+ T

35. (8)

262 Y. He et al. / Theoretical Computer Science 363 (2006) 257 –265

Therefore,

C2

C∗ = P ′1 + 3T

y + 2T� y/2 + (T /35) + 3T

y + 2T= (1/2)(y + 2T ) + (2 + 1/35)T

y + 2T<

1

2+ (2 + 1/35)T

2T= 53

35. (9)

Case 2: C∗ = P + T . Then P + T �y + 2T , and thus P �y + T . From Lemmas 4 and 5, we know P ′3 � 33

35P ∗ � 3335

(P − y) > 3335T . By P ′

1 �P ′2 �P ′

3 and P = ∑3i=1 P ′

i , we have P ′1 � 1

2 (P − P ′3) < 1

2 (P − 3335T ). Therefore,

C2

C∗ = P ′1 + 3T

P + T<

(1/2)(P − (33/35)T ) + 3T

P + T

= (1/2)(P + T ) + (5/2 − (33/70))T

P + T

<1

2+ (5/2 − (33/70))T

2T= 53

35. �

Theorem 8. CMH1/C∗ < 53

35 .

Proof. This is a direct conclusion of Lemmas 6 and 7. �

Since both FFD, FF and H1 run in time O(n log n), and the FPTAS of Lawler or Kellerer and Pferschy for theknapsack problem runs in time O(n) when we take � = 2

35 , the time complexity of MH1 is O(n log n), the same as thatof H1.

3. Problem 1, h1|| ∑ Ci

This section addresses the problem 1, h1|| ∑ Ci . To present our improved algorithm, we will propose a local searchprocedure, called k, k-exchange procedure, which is an extension of 2-OPT procedure proposed in [6].

Using the same notations as those in [5,6], denote by S∗ and S an optimal schedule and the schedule yielded byalgorithm SPT (shortest processing time first), respectively. Denote by B the set of the jobs scheduled before themaintenance period in S, and by A the set of the remaining jobs scheduled after it. Denote by X the set consisting ofthe |B| jobs scheduled first in S∗, and by Y the set of the remaining |A| jobs scheduled last. Denote by �∗ and � theidle times on the machine before the maintenance period, respectively, in the schedules S∗ and S.

Definition 9. Let a� |A|, b� |B| and k are positive integers satisfying k� b� a. An k, k-exchange procedure is an

exchange of a jobs in A with b jobs of B in the schedule S, under the constraint that the total processing times of b

jobs in B plus � is no less than the total processing times of a jobs in A. After exchange, the jobs are reordered beforeand after the maintenance in non-decreasing order of their processing times.

Obviously an k, k-exchange procedure is essentially a post-optimization of the SPT schedule using local searchmethod. With this procedure, our improved algorithm, denoted by SPTE can be formulated as follows.

Algorithm SPTE. (1) Process all the jobs according to the SPT rule.(2) For a given positive integer k, try all k, k-exchange procedures to generate new schedules.(3) Choose the best one from the schedules generated in Steps 1 and 2 as output.Clearly, by setting k = 1, the above algorithm becomes MSPT, which was proposed in [6]. Hence SPTE is a

generalization of MSPT. Sadfi et al. showed that MSPT has a worst-case ratio of 2017 . Hence we assume that k�2 in

the following. We will show that SPTE is a PTAS. It shows that local search method is powerful for the consideredproblem.

Denote by S′ the schedule yielded by algorithm SPTE. With straightforward notation, B ′ and A′ represent the jobpartition of S′. Finally, we denote by Ci, C

′i and C∗

i the completion times of job Ji in schedules S, S′ and S∗, respectively.The following Lemmas 10 and 11 are cited from in [6], and Lemma 12 is parallel to Lemma 4 of that paper which

can be shown similarly.

Y. He et al. / Theoretical Computer Science 363 (2006) 257 –265 263

Lemma 10 (Sadfi et al. [6]). ���∗.

Lemma 11 (Sadfi [6]). If (at least) one job of X is scheduled after the maintenance period in the optimal solution,then

n∑i=1

C′i �

n∑i=1

C∗i + (|Y | − 2)(� − �∗). (10)

Lemma 12. If (at least) k + 1 jobs of B are scheduled after the maintenance period in the optimal solution, then

n∑i=1

C∗i �

( |Y |(|Y | + 1)

2+ k + 1

)(� − �∗). (11)

Theorem 13. For any given integer k�2, algorithm SPTE has a worst-case ratio of at most 1 + 2/(5 + 2√

2k + 8),and runs in O(n2k+1). Therefore, SPTE is a PTAS for the problem 1, h1|| ∑ Ci .

Proof. We first prove (10) and (11). Two cases are considered as follows.

Case 1: No k, k-exchange procedure exists. Then the number of jobs from A should be no less than the number ofB, and S′ = S. If B = X, SPT schedule is optimal. If B �= X, in order to process some job(s) from A before themaintenance period, we have to remove at least k + 1 jobs from B. Hence if S is not optimal, then at least one job fromX is processed after the maintenance period in S∗. Hence the condition of Lemma 11 is satisfied, and thus (10) is true.Furthermore, at least k + 1 jobs from B are processed after the maintenance period in S∗, which states the conditionof Lemma 12 is satisfied. It follows that (11) is true.

Case 2: k, k-exchange procedures generate new schedules. Without loss of generality, we suppose that S∗ cannot begenerated by these procedures.

Suppose that the optimal schedule S∗ can be generated by exchanging b′ jobs from B with a′ jobs from A, where|A|�a′ �1 and |B|�b′. Since S∗ cannot be generated by any k, k-exchange procedure, we have b′ > k. It states thatthe condition of Lemma 12 is satisfied. Hence, (11) is true.

Since the processing time of any job from A is no less than that of any job from B, b′ �a′. We distinguish twosubcases according to this inequality.

Subcase 1: b′ > a′. Since S∗ can be generated by exchanging b′ jobs from B with a′ jobs from A, the number ofjobs processed before the maintenance period in S∗ must be |B| − b′ + a′ < |B|. Since |X| = |B|, we conclude thatat least one job from X is scheduled after the maintenance period in S∗. Eq. (10) follows.

Subcase 2: b′ = a′. Then a′ > k�2. For this subcase, the condition of Lemma 11 may not be satisfied, but we showthat (10) is still true assuming all jobs in X are processed before the maintenance period.

Let qA and qB be the total processing time of the biggest k jobs from A in X and the total processing time ofthe biggest k jobs from B in Y , respectively. Let WA and WB be the sets of the other a′ − k jobs of X ∩ A andY ∩ B, respectively. Moreover, let pA and pB be the sums of their processing times. Note that pA �pB by theconstruction of the schedule S. Now we construct a schedule S′′ from S∗ by exchanging the jobs of WA and WB

and processing jobs in SPT order before and after the maintenance period. Let �′′ be the idle time on the machinebefore the maintenance period, X′′ be the set consisting of the |B| jobs scheduled first in S′′, and Y ′′ be the set ofthe remaining |A| jobs scheduled last. Let � = pA − pB �0 for short. Denote by C′′

i the completion times of jobJi in S′′.

By comparing schedules S′′ and S∗ (see Figs. 1 and 2), we have

C∗i �C′′

i , 1� i� |B| − k,

and

C∗i �C′′

i + �, |B| − k + 1� i� |B|,

264 Y. He et al. / Theoretical Computer Science 363 (2006) 257 –265

X �*

pB qB

WBWA

pA qA

Y

Fig. 1. Schedule S∗.

X'' �*

qB pA

WAWB

pB qA

Y''

Fig. 2. Schedule S′′.

where C∗i and C′′

i are the completion times of jobs at position i in S∗ and S′′, respectively. It follows that

|B|∑i=1

C′′i �

|B|∑i=1

C∗i − k�. (12)

On the other hand,

C′′|B|+a′ − C∗

|B|+a′ = (R + L + qB + pA) − (R + L + pB + qB) = �.

It implies that

C′′i �C∗

i + �, |B| + 1� i� |B| + a′ − 1. (13)

and

C′′i = C∗

i + �, |B| + a′ + 1� i�n. (14)

Summing (12)–(14), and by |Y | = n − |B|, we obtain

n∑i=1

C′′i �

n∑i=1

C∗i + (|Y | − k)��

n∑i=1

C∗i + (|Y | − 2)�.

Since pA + qA + �∗ = pB + qA + �′′, we have � = �′′ − �∗ �� − �∗ (due to �′′ ��). Hence

n∑i=1

C′′i �

n∑i=1

C∗i + (|Y | − 2)(� − �∗).

Since SPTE outputs the best schedule among all k, k-exchange procedures and S′′ can be generated by an k, k-exchangeprocedure, we have

n∑i=1

C′i �

n∑i=1

C∗i + (|Y | − 2)(� − �∗),

which is just (10).Now we are ready to get the worst-case ratio. By (10) and (11), we obtain

∑ni=1 C′

i − ∑ni=1 C∗

i∑ni=1 C∗

i

� 2(|Y | − 2)

|Y |(|Y | + 1) + 2k + 2.

Y. He et al. / Theoretical Computer Science 363 (2006) 257 –265 265

Define

f (|Y |) = 2(|Y | − 2)

|Y |(|Y | + 1) + 2k + 2, |Y | > 0.

By taking a derivation of f (|Y |), we can see that it is increasing for |Y |�2 + √2k + 8 and is decreasing for |Y |�2 +√

2k + 8 and hence reaches a maximum at |Y | = 2 + √2k + 8 with

f (2 + √2k + 8) = 2

5 + 2√

2k + 8.

Hence, the worst-case ratio of SPTE is at most 1 + 2/(5 + 2√

2k + 8).It is obvious that there are at most O(n2k) k, k-exchange procedures, and computing the objective function value of

a schedule takes O(n) time. Hence SPTE runs in time O(n2k+1), and is a PTAS for 1, h1|| ∑ Ci . �

References

[1] I. Adiri, J. Bruno, E. Frostig, A.H.G. Rinnooy Kan, Single machine flow-time scheduling with a single breakdown, Acta Inform. 26 (1989)679–696.

[2] Y.C. Chang, C.Y. Lee, Machine scheduling with job delivery coordination, European J. Oper. Res. 158 (2004) 470–487.[3] H. Kellerer, U. Pferschy, A New Fully Polynomial Approximation Scheme for the Knapsack Problem, Lecture Notes in Computer Science,

Vol. 1444, 1998, 123–134.[4] E. Lawler, Fast approximation algorithms for knapsack problems, Math. Oper. Res. 4 (1979) 339–356.[5] C.Y. Lee, S.D. Liman, Single machine flow-time scheduling with scheduled maintance, Acta Inform. 29 (1992) 375–382.[6] C. Sadfi, B. Penz, C. Rapine, J. Błazewicz, P. Formanowicz, An improved approximation algorithm for the single machine total completion time

scheduling problem with availability constraints, European J. Oper. Res. 161 (2005) 3–10.[7] D. Simchi-Levi, 1994, New worst-case results for the bin packing problem, Naval Res. Logist. 41 (1994) 579–585.[8] M. Yue, A simple proof of the inequality FFD(L)� 11

9 OPT(L) + 1 ∀L, for the FFD bin-packing algorithm, Acta Math. Appl. Sin. 7 (1991)321–331.