17

Click here to load reader

Approximation schemes for parallel machine scheduling problems with controllable processing times

Embed Size (px)

Citation preview

Page 1: Approximation schemes for parallel machine scheduling problems with controllable processing times

Available online at www.sciencedirect.com

Computers & Operations Research 31 (2004) 1565–1581www.elsevier.com/locate/dsw

Approximation schemes for parallel machine schedulingproblems with controllable processing times�

Klaus Jansena, Monaldo Mastrolillib;1;∗

aInstitut f�ur Informatik und Praktische Mathematik, Universit�at zu Kiel, Olshausenstr. 40, Kiel D-24098, GermanybIDSIA, Galleria 2, 6928 Manno, Switzerland

Abstract

We consider the problem of scheduling n independent jobs on m identical machines that operate in par-allel. Each job has a controllable processing time. The fact that the jobs have a controllable processingtime means that it is allowed to compress (a part of) the processing time of the job, in return for com-pression cost. We present the 1rst known polynomial time approximation schemes for the non-preemptivecase of several identical parallel machines scheduling problems with controllable processing times. More-over, we study the problem when preemption is allowed and describe e4cient exact and approximationalgorithms.

Scope and purpose

Most classical scheduling models assume )xed processing times for the jobs. However, in real-life appli-cations the processing time of a job often depends on the amount of resources such as facilities, manpower,funds, etc. allocated to it, and so the processing time can be reduced when additional resources are givento the job. This speed up of the processing time of a job comes at a certain cost. A scheduling problemin which the processing times of the jobs can be reduced at some expense is called a scheduling problemwith controllable processing times. We contribute by presenting new approximation algorithms for this kindof problems.? 2003 Elsevier Ltd. All rights reserved.

� A preliminary version of this paper appeared in the Proceedings of ICALP Workshops 2000 (ARACNE), CarletonScienti1c, Proceedings in Informatics, vol. 8, pp. 179–189.

∗ Corresponding author. Tel.: +41-91-610-86-64; fax: +41-91-610-86-61.E-mail addresses: [email protected] (K. Jansen), [email protected] (M. Mastrolilli).1 Supported by Swiss National Science Foundation project 20-63733.00/1, “Resource Allocation and Scheduling in

Flexible Manufacturing Systems”, and by the “Metaheuristics Network”, grant HPRN-CT-1999-00106.

0305-0548/$ - see front matter ? 2003 Elsevier Ltd. All rights reserved.doi:10.1016/S0305-0548(03)00101-1

Page 2: Approximation schemes for parallel machine scheduling problems with controllable processing times

1566 K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581

1. Introduction

In a scheduling problem with controllable processing times the job processing time can be com-pressed through incurring an additional cost. Scheduling problems with controllable processing timeshave gained importance in scheduling research since the pioneering works of Vickson [1,2]. For asurvey of this area until 1990, the reader is referred to [3]. Recent results include [4–10].

The identical parallel machine scheduling problem is de1ned as follows. We have a set J of njobs, J= {J1; : : : ; Jn}, and m identical machines, M = {1; : : : ; m}. Each job Jj must be processed inan uninterrupted fashion on one of the machines, each of which can process at most one job at atime. We will also consider the preemptive case, in which a job may be interrupted on one machineand continued later (possibly on another machine) without penalty.

The processing time of job Jj lies in an interval [‘j; uj] (with 06 ‘j6 uj). For each job Jj wehave to choose a machine mj ∈{1; : : : ; m}, and j ∈ [0; 1] and get then processing time and cost thatdepend linearly on j:

pj(j) = j‘j + (1− j)uj;

cj(j) = jc‘j + (1− j)cuj :

We refer j as the compression level of job Jj, since the processing time pj(j) of Jj decreases byincreasing j.

Solving a scheduling problem with controllable processing times amounts to specifying an as-signment, = {m1; m2; : : : ; mn}, of jobs to machines (where mj ∈{1; : : : ; m} is the machine job Jj isassigned to), and a selection of the compression levels, = {1; 2; : : : ; n}, that de1nes jobs pro-cessing times pj(j) and costs cj(j). The makespan is the length of the schedule, or equivalentlythe time when the last job is completed. Given an assignment = {m1; m2; : : : ; mn}, and a selection= {1; 2; : : : ; n}, the makespan T ( ; ) is easily computed, i.e.,

T ( ; ) = max16i6m

∑Jj∈J;mj=i

pj(j):

We denote by C() the total cost of , i.e.,

C() =n∑

j=1

cj(j):

Problems. The problem of scheduling jobs with controllable processing times is a bicriteria problem,and we can de1ne the following three optimization problems.

P1. Minimization of C() subject to T ( ; )6 �, for some given value �¿ 0.P2. Minimization of T ( ; ) subject to C()6 �, for some give value �¿ 0.P3. Minimization of a T ( ; ) + �C(), for some parameter �¿ 0.

Known results. The addressed problems are all strongly NP-hard [11] since the special case with1xed processing times is strongly NP-hard [12]. The practical importance of NP-hard problemsnecessitates tractable relaxations. By tractable we mean e4cient solvability, and polynomial timeis a robust theoretical notion of e4ciency. A very fruitful approach has been to relax the notion

Page 3: Approximation schemes for parallel machine scheduling problems with controllable processing times

K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581 1567

of optimality and settle for near-optimal solutions. A near-optimal solution is one whose objectivefunction value is within some small multiplicative “1” factor of the optimal value. Approximationalgorithms are heuristics that in polynomial time provide provably good guarantees on the qualityof the solutions they return. This approach was pioneered by the inMuential paper of Johnson [13]in which he showed the existence of good approximation algorithms for several NP-hard problems.He also remarked that the optimization problems that are all indistinguishable in the theory ofNP-completeness behave very diNerently when it comes to approximability. Remarkable work in thelast couple of decades in both the design of approximation algorithms and proving inapproximabilityresults has validated Johnson’s remarks. The book on approximation algorithms edited by Hochbaum[14] gives a good glimpse of the current knowledge on the subject.

Approximation algorithms for several problems in scheduling have been developed in the last threedecades. In fact it is widely believed that the 1rst optimization problem for which an approximationalgorithm was formally designed and analyzed is the makespan minimization of the identical parallelmachines scheduling problem, this algorithm was designed by Graham in 1966 [15]. This precedesthe development of the theory of NP-completeness.

A polynomial time approximation scheme (PTAS for short) for an NP-hard optimization problemin minimization (or maximization) form is a polynomial time algorithm which, given any instanceof the problem and any given value �¿ 0 (or 0¡�¡ 1), it returns a solution whose value is withinfactor (1 + �) (or (1− �)) of the optimal solution value for that instance.

The main themes of this paper revolve around the design of new polynomial time approximationschemes for the identical parallel machine scheduling problems with controllable processing times.

Nowicki and Zdrzalka [16] consider the preemptive scheduling of m identical parallel machines.They provide a O(n2) greedy algorithm which generates the set of Pareto-optimal points. (A pair( ; ) is called Pareto-optimal if there does not exist another pair ( ′; ′) that improves on ( ; ) withrespect to one of C() and T ( ; ), and stays equal or improves with respect to the other one.) Whenpreemption is not allowed and the machines are not identical, Trick [10] gave a polynomial time2.618-approximation algorithm (i.e., an algorithm that returns a solution whose value is within 2.618times the optimal value) to minimize a weighted sum of the cost and the makespan (see problemP3). The latter result was improved by Shmoys and Tardos [9] by providing a polynomial time2-approximation algorithm. When processing times are 1xed, Hochbaum and Shmoys [17] designeda PTAS for the makespan minimization of the identical parallel machines scheduling problem.

New results. Solving a scheduling problem with controllable processing times amounts to spec-ifying a selection of the processing times and costs, and assigning jobs to machines. If we could1x the processing times and costs of jobs as in some optimal (or near-optimal) solution, then wecould use the algorithm described by Hochbaum and Shmoys [17] for 1xed processing times toobtain a near-optimal solution. Unfortunately, in principle there is an in1nite number of possibleselections, and clearly we cannot consider all the possibilities. However, assume that it is possibleto restrict the set of all possibilities to a “small” set U of “interesting” selections, where with theterms “interesting” selections we mean that a near-optimal solution can be always obtained by usingone out of these alternatives. In this case, we can compute a near-optimal solution just by applyingthe algorithm described in [17] for each selection in U , and retaining the best found solution. Thereturned solution is a near-optimal solution.

In this paper we settle the approximability of the described problems by obtaining the 1rst poly-nomial time approximation schemes for P1, P2 and P3. Our approach follows the intuitive ideas

Page 4: Approximation schemes for parallel machine scheduling problems with controllable processing times

1568 K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581

sketched above. We shows how to compute a polynomial number of “interesting” selections of pro-cessing times and costs. All the other choices can be neglected. Indeed, we prove that a solutionwhose value is within factor (1 + �) of the optimal value can be always computed by using thisrestricted set. The set U of selections and the algorithm described in [17] for 1xed processing timesgive a PTAS for P1. The latter provides a solution with optimal cost and makespan at most (1+ �)�,for any 1xed �¿ 0. (Note that for problem P1, deciding if there is a solution with T6 � is alreadyNP-complete, therefore the best that we can expect, unless P=NP, is to 1nd a solution with costat most the optimal cost and makespan not greater than �(1 + �).)

In Section 3, by using the described PTAS for P1, we present a PTAS for P2 which delivers asolution with cost C()6 � and makespan within factor (1+�) of the optimal makespan. In Section 4a PTAS for P3 is obtained by using again the PTAS for P1 as a basic building block.

An other contribution of this paper is the use of the continuous relaxation of the knapsack problem[18] to get lower and upper bounds and fast optimal and approximation algorithms. In Section 3.2,by using the relaxed version of the knapsack problem, we present a fast greedy algorithm that returnsa solution that is within factor 2 of the optimal solution value for problem P2. In Section 5 wepropose a linear time algorithm to solve optimally problem P1 when preemption is allowed. Thisalgorithm is again based on the continuous knapsack problem and McNaughton’s rule [19]. By usinga similar approach we obtain exact and approximate solutions for the other two preemptive variantsP2 and P3.

2. A PTAS for P1

Our approximation scheme conceptually consists of the following two steps.

1. Fixing processing times and costs: Identify a polynomial sized set U of possible selections ofprocessing times and costs; set U is computed to make sure that there exists a feasible schedulewith optimal cost and makespan at most �(1+�), when jobs processing times and costs are chosenaccording to some selection from U .

2. Scheduling jobs: when processing times and costs for all jobs are 1xed, the problem turns out tobe the classical identical parallel machine scheduling problem subject to makespan minimization.The latter can be solved approximately with any given accuracy in polynomial time [17]. Foreach selection of processing times and costs from set U , apply the algorithm described in [17](processing times and costs of jobs are 1xed according to the considered selection); return thebest found solution.

The total running time of our PTAS is polynomial in the input size. Indeed, it consists of applyingthe polynomial time algorithm described in [17] a polynomial number of times, i.e., one for eachselection of U . Therefore, the description of the 1rst step immediately de1nes a PTAS for P1.

Remark 1. Without loss of generality, we may (and will) assume that the makespan must be atmost 1. This is obtained by dividing all processing times by �. Furthermore, we may assume thatuj6 1 for all jobs j∈ J ; otherwise we can de1ne uj = 1 and adjust the value of cuj to get anequivalent instance. Moreover, we assume, for simplicity of notation, that 1=� is an integral value.

Page 5: Approximation schemes for parallel machine scheduling problems with controllable processing times

K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581 1569

Remark 2. Let c be a positive constant and �′ any positive value. In this paper we present analgorithm that returns a solution with makespan at most (1+c�′)�, and not a solution with makespanat most (1+�)�, as claimed. However, the latter can be easily obtained by setting �′ :=�=c. Therefore,without loss of generality, in the following we describe an algorithm that returns a solution withmakespan at most (1 + O(�))�.

2.1. Selection of processing times and costs

The 1rst step to obtain set U of selections consists of reducing the number of distinct processingtimes that may occur in any feasible solution. We begin by transforming the given instance into amore structured one in which every job can assume at most O

(1� log

n�

)distinct processing times.

We prove that by using this restricted set of choices it is still possible to get a solution with costnot larger than the optimal cost and makespan at most 1 + 2�.

The restricted selection of processing times is obtained as follows.

1. Divide the interval (0,1] into subintervals of length �=n, i.e.,(0;

�n

];( �n; 2

�n

]; : : : ;

((n�− 1) �n; 1]:

2. Let S be the set of values obtained by rounding the following values�n;�n(1 + �);

�n(1 + �)2; : : : ; 1

up to the nearest value between {�=n; 2�=n; : : : ; 1}.3. For each job Jj consider as possible processing times the restricted set Sj of values from S that

fall in interval [‘j; uj].

Note that, in the restricted set, any possible processing time is a multiple of �=n. The describedrestricted selection of processing times is motivated by the following lemma.

Lemma 1. By using the restricted set of processing times the following holds:

• Every possible processing time is equal to k(�=n) for some k ∈{1; : : : ; n=�}, and there areO(1� log

n�

)di>erent processing times.

• If C∗ is the minimum cost when the makespan is at most 1 then, by using the restricted set ofprocessing times, there is a solution with cost and makespan at most C∗ and 1+2�, respectively.

Proof. Let b the cardinality of set S, then �n (1 + �)b−2 ¡ 1 (and �

n(1 + �)b−1¿ 1) and thereforeb − 2¡ log2

n� =log2(1 + �)6 1

� log2n� , for every �6 1. We prove that our transformation may po-

tentially increase the makespan value by a factor of 1+ 2�, while the minimum cost is lower or thesame. Indeed, let pj(j) be any feasible processing time for any given job Jj. It is easy to see thatthere exists a corresponding value pj(j) belonging to the restricted set Sj such that pj(j)6pj(j)(1 + �) + �=n. Now, let H be a set of jobs on one machine with

∑Jj∈H pj(∗j )6 1, as in some

optimal solution, and let ∗j be the corresponding j-values, for Jj ∈H . Then, if we replace eachpj(∗j ) with the corresponding value pj(∗j ) , we obtain a solution with cost at most the optimal

Page 6: Approximation schemes for parallel machine scheduling problems with controllable processing times

1570 K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581

cost and makespan

∑Jj∈H

pj(∗j )6∑Jj∈H

(pj(∗j )(1 + �) +

�n

)6 1 + 2�:

The above lemma allows us to work with instances with O( 1� logn� ) distinct processing times and

costs (note that for each distinct processing time of the restricted set, there is one associated costthat can be computed by using the linear relationship between costs and processing times).

This restriction of the possible processing times, immediately reduces the number of possibleselections: since there are n jobs and each can assume O( 1� log

n� ) distinct processing times and costs,

the number of possible selections is clearly bounded by nO( 1� log n

). Unfortunately, this number is

not polynomial in the input size and further ideas are needed in order to obtain a polynomial sizedset U of selections.In the following we show how to reduce the number of “interesting” selections to a polynomial

number by using a dynamic programming approach.

2.1.1. Reducing the number of interesting selectionsBefore presenting the dynamic programming approach, we start presenting the de1nition of “con-

1guration”, that is necessary for our scope. Then, by using this notion, we give an intuitive idea;the dynamic program formalization follows.

Con�gurations. We call Jj a big job if Jj can assume a processing time greater than �, and a smalljob if Jj can assume a processing time not greater than �. Clearly, we have the following diNerentcases:

(1) ‘j6 �¡uj. In this case Jj can be small or big.(2) ‘j6 uj6 �. In this case Jj is always small.(3) �¡‘j6 uj. In this case Jj is always big.

Note that big jobs have �6 � 1� log

1� �+1 diNerent processing times, since the processing time of

each job cannot be larger than 1 and by our transformation the distinct processing values that aregreater than � are at most � 1

� log1� �+ 1.

Let us denote these � values by p1; p2; : : : ; p�. Let xi denote the total number of big jobs withprocessing times equal to pi, for i = 1; : : : ; �. A con1guration of the processing times for big jobscan be given by a vector (x1; x2; : : : ; x�). Let us call (x1; x2; : : : ; x�) a �-con)guration.Recall that our goal is to 1nd a solution that has optimal cost and makespan that is within 1+O(�).

By Lemma 1, in the transformed instance with a restricted set of possible processing times, we allowthe makespan to be at most 1 + 2�. Now, consider a selection of processing times of big jobs andlet (x1; x2; : : : ; x�) be the corresponding �-con1guration. If

∑�i=1 xipi ¿m(1+2�) then, in any given

assignment of big jobs to machines, there is at least one big job that completes after time 1+2�, i.e.,the makespan is larger than 1 + 2�. In this case we can discard this selection since it is guaranteedthat, whatever is the assignment of big jobs to machines, the makespan is “too” large, i.e., larger

Page 7: Approximation schemes for parallel machine scheduling problems with controllable processing times

K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581 1571

than 1 + 2�. By this observation, we say that a �-con1guration is feasible if

�∑i=1

xipi6m(1 + 2�):

Since pi ¿ �, for i = 1; : : : ; �, a necessary condition of feasibility for any �-con1guration is that

�∑i=1

xi6m(1 + 2�)=�:

Therefore, the number h of feasible �-con1gurations is at most the number of �-tuples of non-negativeintegers with the sum at most m(1 + 2�)=�. The number h(d) of �-tuples with the sum equals to dis known to be h(d) = (d+�−1

�−1 ). Therefore,

h6

m(1+2�)�∑

d=0

(d+ � − 1

� − 1

)=

(m(1+2�)

� + �

):

Since ( xy )6 ( exy )y and �6 1, we see that

h6

(3m� + �

)6

(3m� + 1

� log1� + 2

1� log

1� + 2

)

6

((3m+ 1)(1� log

1� + 2)

1� log

1� + 2

)

6 (4em)1� log 1

�+2:

A feasible con)guration c=(x1; x2; : : : ; x�; x�+1) is a (�+1)-dimensional vector where (x1; x2; : : : ; x�)is a feasible �-con1guration and

x�+1 ∈{0; �=n; 2�=n; : : : ; �n}represents the sum of the chosen processing times for small jobs. The number of diNerent feasible

con1gurations is bounded by $6 h(n2 + 1) = O(n2mO( 1� log 1

)), a polynomial number in the input

size for any 1xed error �¿ 0.The dynamic program. The intuitive idea behind our approach is as follows. Consider two selec-

tions of processing times and costs, s1 and s2, such the total cost of s1 is smaller than that of s2.Moreover, assume that s1 and s2 have the same associated con1guration. We prove that we candiscard s2 since, by using the processing times and costs 1xed as in s1, we can compute a solutionwhose makespan is approximately (i.e., within 1 + O(�) times) the best makespan of s2 (i.e., whenprocessing times and costs are chosen as in s2), and with smaller cost. Therefore, for each feasiblecon1guration we have at most one selection, the one with the lowest cost. Since there is a polynomialnumber of feasible con1gurations, we have also reduced the number of “interesting” selections to apolynomial number, and we are done. In the following we formalize the above intuition and present

Page 8: Approximation schemes for parallel machine scheduling problems with controllable processing times

1572 K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581

a dynamic program which computes for each feasible con1guration the corresponding selection withthe lowest cost.

Intuitively the dynamic program works as follows. Add one job after the other, and for each jobconsider its restricted set of processing times and costs. Each time that a new job is considered,compute all the possible combinations of the job processing times with the previously added jobs,but if there are two or more selections with the same con1guration, then retain the one with thelowest cost and discard the others. The formal description of the dynamic programming is givenbelow.

To simplify the formulation of the dynamic program we use a vector representation of the reducedset Sj of possible processing times for job Jj. Vj is the set of (� + 1)-dimensional vectors de1nedas follows: for each p∈ Sj with p= pi, for some i= 1; : : : ; �, there is a vector v∈Vj such that theith entry of v is set to 1, and the other entries are zeros; otherwise for each small processing timep then the (� + 1)st entry of v is p and the other entries of v are set to zero. Let c(v) denote thecost of v.

For every feasible con1guration c and for every j, 16 j6 n, we denote by COST (j; c) the mini-mum total cost when jobs J1; : : : ; Jj have been assigned processing times according to con1guration c;in case no such assignment exists, COST (j; c)=+∞. It is easy to see that the following recurrenceholds:

COST (1; v) =

{c(v) if v∈V1;

+∞ if v ∈ V1;

COST (j; c) = minv∈Vj :v6c

{c(v) + COST (j − 1; c − v)} for j = 2; : : : ; n:

For each job we have to consider at most O($ · 1� log n� ) combinations. Therefore, the running time

of the dynamic program is O(n3 log n · mO( 1� log 1

)).

Now we show that among all the generated assignments of processing times to jobs there existsa selection A with minimum cost and having a schedule with makespan at most 1 + O(�).Let A∗ denote the selection of processing times according to some optimal solution S∗ when

only the restricted set of processing times is considered (see Lemma 1). Since we consider all thediNerent feasible con1gurations, one of them must be the con1guration corresponding to A∗. Let uscall c∗ this con1guration. Let A denote the selection of processing times with con1guration c∗ ascomputed by our dynamic program. Let L∗ and L be the sum of all processing times according toA∗ and A, respectively. The total cost of A is not greater than the cost of A∗. Furthermore, for eachbig job of A∗ there is a big job of A having the same processing time, and vice versa. Finally,the sum of small job processing times in A∗ has the same value as in A. It follows that L∗ = L.Now, we show that the optimal solution value with processing times according to A is at most1+O(�). Indeed, consider the solution obtained by scheduling 1rst the big jobs as in S∗ and then byadding greedily the small jobs as in the classical list-schedule algorithm [15]. If the machine withthe largest completion time 1nishes with a big job, then we get an optimal solution (with makespanat most 1 + 2� by Lemma 1). Otherwise, let pk be the processing time of a small job Jk that endslast. Then the makespan is equal to sk + pk , where sk is the starting time of job Jk . We see that

Page 9: Approximation schemes for parallel machine scheduling problems with controllable processing times

K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581 1573

sk + pk ¡ L=m + pk = L∗=m + pk6 1 + 3�, by using the classical analysis of the list-schedulealgorithm [15].

Theorem 1. There is a PTAS for P1 that provides a solution with minimum cost and makespanat most (1 + �)�, if a solution with makespan not greater than � exists.

3. A PTAS for P2

Problem P2 requires to compute a solution with minimum makespan and cost at most �. Notethat for some values of � problem P2 might not have a solution. Given a value �¿ 0, we presentan algorithm that either 1nds a schedule of length at most (1 + �) the optimal makespan and costat most �, or it decides that a schedule of cost at most � does not exist.

We embed the PTAS for P1, described in the previous section, within a binary search procedure.Assume, without loss of generality, that the input instance has integral data. Clearly, the value ofthe optimal makespan for problem P2 is in the interval [0; numax], where umax = maxjuj. Thus wecan use UB : = 0 and LB : = numax as initial upper and lower bounds, respectively, for the binarysearch; in each iteration the algorithm performs the following steps:

(a) it uses the PTAS for P1 to 1nd a schedule of minimum cost and length at most 1+ � times thevalue H , where H = (LB+ UB)=2 (if a solution of length H exists);

(b) if the total cost is not greater than �, then update the upper bound to H , otherwise update thelower bound to H + 1.

The algorithm terminates when LB=UB, and outputs the best schedule found. A straightforwardproof by induction shows that, throughout the execution of the binary search, the LB value is nevergreater than the optimal makespan value when the cost is constrained to be at most �. Moreover, ifno schedule with cost at most � is found then a schedule of length at most � does not exist. AfterO(log(numax)) iterations the search converges and we have obtained PTAS for P2. The resultingalgorithm is polynomial in the binary encoding of the input size.

Theorem 2. There is a PTAS for P2 that provides a solution with makespan at most (1+ �) timesthe minimum makespan and cost at most �, if a solution with cost not greater than � exists.

We observe that a lower and upper bounds on the optimal makespan better than 0 and numax,respectively, helps us to improve the e4ciency of the binary search. Moreover, if we knew amakespan value �∈ [T ∗; T ∗(1 + �)], where T ∗ is the optimal makespan according to some optimalsolution, by applying the PTAS for P1 when the makespan is constrained to be at most � (seeSection 2), we would get a solution with makespan at most �(1 + �)6T ∗(1 + O(�)) and cost notgreater than �.In the next sections we provide an approximation algorithm that delivers a solution with makespan

t6 2T ∗ and cost at most � in O(n lnm + m ln2 m) time. A value �∈ [T ∗; T ∗(1 + �)] can befound by applying the previously described binary search on the following � 1

� log2� � values for H ,

t2 (1 + �); t

2 (1 + �)2; : : : ; t. Therefore, by executing the algorithm of Section 2 O(log(1� log1� )) times,

Page 10: Approximation schemes for parallel machine scheduling problems with controllable processing times

1574 K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581

a constant number for any 1xed �, we get a PTAS for P2. This improves the previously describedapproach which requires to apply the PTAS for P1 O(log(numax)) times.

3.1. Lower and upper bounds

In the following we compute lower (LB) and upper (UB) bounds for the optimum makespan valuewhen the total cost must be at most �.

We start analyzing the following arti1cial situation. Consider some optimal solution S∗ and let∗1 ; : : : ; ∗n denote the corresponding j-values. Let us write the corresponding total cost value asC(∗j ) =

∑nj=1 cj∗j +

∑nj=1 cuj , where cj = c‘j − cuj . Let P

∗ =∑n

j=1 pj(∗j ) be the sum of processingtimes in S∗. Clearly, the optimal makespan cannot be larger than P∗. Moreover, it must be at leastP∗=m, which represents the best possible situation in which all machines complete processing atexactly the same time. Therefore P∗ give us lower and upper bounds on the optimal makespanvalue. Unfortunately, we do not know P∗. However, what if we can compute n values 1; : : : ; n,with j ∈ [0; 1] for j = 1; : : : ; n, such that the total sum of processing times P and the total costaccording to the j values are at most P∗ and �, respectively. More formally, 1; : : : ; n satisfy thefollowing constraints

P =n∑

j=1

pj(j)6P∗; (1)

n∑j=1

cj(j)6 � −n∑

j=1

cuj : (2)

(Note that∑n

j=1 cuj is a constant and �−∑nj=1 cuj is non-negative, otherwise no solution with cost at

most � exists.) If we can compute such a value P, then a solution with cost at most � and makespanP exists. Therefore P is an upper bound of the optimal makespan. Moreover, since P6P∗, thenP=m is a lower bound.

We observe that one such P can be obtained by minimizing the sum of processing times subjectthe cost to be at most �. The latter problem reveals to be the continuous relaxation of the knapsackproblem, as explained in the following.

We start observing that if �−∑nj=1 cuj =0 then the processing time of each job Jj must be uj in

any feasible solution with cost at most �, and of course we obtain valid bounds by setting LB=P∗=mand UB=P∗, where P∗=

∑nj=1 uj. Otherwise, if �−

∑nj=1 cuj ¿ 0, we simplify the problem instance

by dividing all processing costs by � −∑nj=1 cuj .

Let xj(16 j6 n) be a non-negative variable. We de1ne vector by setting j = x∗j , wherex∗ = (x∗1 ; : : : ; x∗n) is the optimal solution of the following linear program.

minimize P =n∑

j=1

[xj‘j + (1− xj)uj] (3)

subject ton∑

j=1

cjxj6 1; (4)

06 xj6 1; j = 1; : : : ; n; (5)

Page 11: Approximation schemes for parallel machine scheduling problems with controllable processing times

K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581 1575

where cj = cj=(�−∑n

j=1 cuj ). Note that the optimal solution of the linear program (3)–(5), de1nes a

vector that satis1es constraints (1) and (2). The objective function can be written as P=∑n

j=1 [(‘j−uj)xj] +

∑nj=1 uj, where the second summation is a constant. Let tj = uj − ‘j. An optimal solution

of the previous linear program is optimal also for the following linear program,

maximizen∑

j=1

tjxj (6)

subject ton∑

j=1

cjxj6 1; (7)

06 xj6 1; j = 1; : : : ; n: (8)

The previous LP is a continuous relaxation of the classical knapsack problem that can be solved asfollows [18]: 1rst, sort the jobs in non-increasing tj=cj ratio order, so that, without loss of generality,

t1c1¿

t2c2¿ · · ·¿ tn

cn:

Then assign x∗j = 1 until either (a) the jobs are exhausted or (b) the cost capacity 1 is exactlyused up or (c) it is necessary to set x∗j to a value that is less than 1 to use up the cost capacity 1exactly. Let s the last job that uses up the cost capacity. Set x∗j = 0, when j¿ s. In all three casesan optimal solution is obtained. The optimal solution of (3)–(5) can be carried out in O(n) time bypartial sorting [18].

Lemma 2. If a solution with cost not greater than � exists, then the optimal makespan value whenthe total cost is at most �, is at least P=m and at most P, where P is the optimal solution valueof the linear program (3)–(5).

By dividing all processing times by P, we may (and will) assume that the optimal makespanvalue is within interval [1=m; 1].

3.2. A 2-approximation algorithm for P2

In this section we present a 2-approximation algorithm for problem P2, i.e., an algorithm thatreturns a solution with cost at most � and makespan within 2 times the optimal makespan value T ∗.

Assume that we have an algorithm A(�; �) that given �∈ [1=m; 1] and �, either decides that thereis no schedule with makespan at most � and cost 6 �, or produces a schedule with makespan atmost (2− 2=(m+ 1))� and cost 6 �. Then consider the following set of O(m logm) values,

V =

{1m

(1 +

1m

);1m

(1 +

1m

)2; : : : ; 1

}:

Since 1=m6T ∗6 1, then there are two values from V , a= 1m(1+

1m)

i and b=min{1; 1m(1+

1m)

i+1},such that a6T ∗6 b. It is easy to check that b6T ∗(1 + 1

m), and algorithm A(�; �), when � = b,

Page 12: Approximation schemes for parallel machine scheduling problems with controllable processing times

1576 K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581

returns a solution with makespan at most(2− 2

m+ 1

)�6T ∗

(1 +

1m

)(2− 2

m+ 1

)= 2T ∗

and cost 6 �. Therefore a 2-approximate solution can be found by performing a binary search of �on the values in V . To complete the description of the 2-approximation algorithm we need algorithmA(�; �) that is as follows.

We start observing that, since we are interested in some solution with makespan at most �, wecan transform the given instance into an equivalent one so that, for all jobs Jj ∈J, we have uj6 �.Then, as described in the previous section, solve the continuous relaxation of the classical knapsackproblem and determine the vector = (1; : : : ; n) that minimize the sum P of processing times. IfP ¿m� then there is no solution with makespan at most � and cost �. Otherwise, according to our algorithm works as follows.

Algorithm A(�; �)

1. Assign the m jobs with the largest processing times to diNerent machines. Let k = 1.2. Schedule the remaining jobs as follows. Assign each job (one after another in any arbitrary order)

to machine k until either (a) the jobs are exhausted or (b) the completion time of the last addedjob Jf(k) is greater than �.

3. If the jobs are not exhausted, then let k : = k + 1. If k6m go to step 2, else go to step 4.4. Remove jobs Jf(1); : : : ; Jf(m−1) from the schedule and assign them one after another to a machine

with the currently smallest load.

Since P6m� all jobs are scheduled by the algorithm above. The algorithm runs in O(n+m logm)time.

Theorem 3. If P6m� then algorithm A provides a solution with makespan TA6 (2−2=(m+1))�,where processing times are chosen according .

Proof. We assume that TA ¿� otherwise we are done. Let Jf be a job with the largest completiontime and let sf be the start time of job Jf. Then no machine can be idle at any time prior to sf,since otherwise job Jf would have been processed there. Two situations are possible:

1. Jf is one of the m biggest jobs. In that case the schedule is optimal since pf(f)6 �.2. Otherwise, assume, without loss of generality, that p1(1)¿p2(2)¿ · · ·¿pn(n). The following

inequalities hold,

pf(f)6 minj=1;:::;m

pi(i);

pf(f)6m�−m∑i=1

pi(i);

pf(f)61m

m∑i=1

pi(i):

Page 13: Approximation schemes for parallel machine scheduling problems with controllable processing times

K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581 1577

It follows that pf(f)6 1m

∑mi=1 pi(i)6 1

m(m�− pf(f)), hence pf(f)6m�=(m+ 1). Since P =∑i pi(i)6m�, then

TA = sf + pf(f)61m

∑i �=f

pi(i) + pf(f)

6 �+ (1− 1=m)pf(f)

6 �+ (1− 1=m)m�

m+ 1= �+

m− 1m+ 1

�=(2− 2

m+ 1

)�:

4. A PTAS for P3

Problem P3 consists of computing a schedule which minimizes T+�C, where T is the makespan, Cis the total cost of the schedule and �¿ 0 is a parameter. Using modi1ed cost values c′j(j)=�cj(j),we can restrict us to the case �= 1 without loss of generality.

To explain the polynomial approximation scheme, we 1rst examine an arti1cial situation that weshall use as a tool in analyzing the eventual algorithm. Let us focus on a speci1c instance and aparticular optimal solution SOL∗ with value OPT = T ∗ + C∗, where T ∗ is the makespan value andC∗ the total cost according to SOL∗. Now, assume that we know the value T ∗. Then by applyingthe PTAS for P1 (see Section 2) when the makespan is constrained to be at most T ∗, we get asolution with cost at most C∗ and makespan at most (1 + �)T ∗, i.e., a solution with value at most(1 + �)T ∗ + C∗¡ (1 + �)(T ∗ + C∗), and we are done.

Unfortunately, we do not know the value T ∗. However, in the following we show that we canselect a set T of O( 1� log

m� ) values such that one of these values, say T ′, is at most T ∗+OPT ·� and

at least T ∗. By applying the PTAS for P1 (see Section 2) when the makespan is constrained to be atmost T ′, we get a solution with cost at most C∗ and makespan at most (1+�)T ′6 (1+�)(T ∗+OPT ·�).The objective value of this solution is therefore bounded by

(1 + �)(T ∗ + OPT · �) + C∗ = T ∗ + C∗ + �(T ∗ + OPT (1 + �))

6OPT (1 + 3�) (for �6 1):

Hence, a PTAS for P3 is obtained by calling the PTAS for P1 O( 1� logm� ) times and returning the

best found solution.In conclusion, what it remains to be shown is how to compute set T. This is accomplished in

the following subsection.

4.1. Computing T

We start computing some lower and upper bounds for the minimum objective value OPT . Wede1ne

dj =min[c‘j + ‘j; cuj + uj];

D=∑j∈J

dj:

Page 14: Approximation schemes for parallel machine scheduling problems with controllable processing times

1578 K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581

Consider an optimum schedule with makespan T ∗ and total cost C∗ (where OPT = T ∗ + C∗). Inthis schedule we have ∗j values with cj(∗j ) + pj(∗j )¿dj. Then,

D =∑j∈J

dj

6∑j∈J

cj(∗j ) +∑j∈J

pj(∗j )

6C∗ + mT ∗6mOPT:

Therefore, we have that the optimal objective value OPT is at least D=m.Now we show that a schedule with value at most D always exists. The latter gives us an upper

bound on the optimal value OPT .A solution of value at most D is obtained as follows. Set the compression level j of each job Jj

either to 1 or 0, such that pj(j)+cj(j)=dj. Since cj(j)6dj, the total cost is∑

j∈J cj(j)6∑

j∈Jdj=D. Assign all jobs one after the other to one single machine, then the makespan of the scheduleis equal to

∑j∈J pj(j)6D. Since cj(j) + pj(j) = dj, the objective value of this schedule is

exactly D.Therefore, we have proved that OPT ∈ [D=m;D]. Dividing all processing times and cost values

by D, we have that

1=m6OPT6 1:

Now, recall that our goal is to compute a set T of O( 1� logm� ) values such that one of these

values, say T ′, is at most T ∗ + OPT · � and at least T ∗. We de1ne T to be the following set ofvalues

T={ �m;�m(1 + �);

�m(1 + �)2; : : : ; 1

};

and claim that T has the desired properties. Indeed if T ∗6 �=m, then the lowest element of T,i.e., �=m is at most OPT · �6T ∗ + OPT · �, since 1=m6OPT , and at least T ∗ by assumption. If�m(1 + �)i6T ∗6min{1; �

m(1 + �)i+1}, thenmin

{1;

�m(1 + �)i+1

}6 T ∗(1 + �)

6 T ∗ + OPT · �:Therefore we have proved that in the de1ned set T there is always an element that is at most

T ∗ + OPT · � and at least T ∗. Simple calculations shows that the size of T is O( 1� logm� ) and we

are done.

5. Preemptive problems

The preemptive problems are easy to solve. For instance, an optimal solution for problem P1 canbe delivered as follows. First, solve the following linear program which de1nes the cost and theprocessing times of jobs.

Page 15: Approximation schemes for parallel machine scheduling problems with controllable processing times

K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581 1579

Minimizen∑

j=1

m∑i=1

(cuj xuij + cljx

lij)

s:t:m∑i=1

(xuij + xlij) = 1; j = 1; : : : ; n;

n∑j=1

(ujxuij + ljxlij)6 �; i = 1; : : : ; m;

m∑i=1

(ujxuij + ljxlij)6 �; j = 1; : : : ; n;

xuij; xlij¿ 0 j = 1; : : : ; n; i = 1; : : : ; m:

Let j =∑m

i=1 xuij, j = 1; : : : ; n. It is easy to see that the length of a preemptive schedule cannotbe smaller than

LB=max

max

jpj(j);

1m

n∑j=1

pj(j)

:

A schedule meeting this bound can be constructed in O(n) time by using McNaughton’s rule [19]:1ll the machines successively, scheduling the jobs in any order and splitting jobs into two partswhenever the above time bound is met. Schedule the second part of a preempted job on the nextmachine at zero time. Since pj(j)6LB for all j, the two parts of preempted job do not overlap.Similar arguments hold for P2 and P3.

The most time-consuming part of the previous algorithms is the solution of the linear program.As pointed out in [9] these linear programs fall into the class of fractional packing problems, andtherefore a solution with cost and makespan at most (1 + �) times the required values can be foundby a randomized algorithm in O(n2 log n) expected time, or deterministically, in O(mn2 log n) time.

In the following we present an alternative approach that 1nds the optimal solution for P1 in O(n)time. Regarding P2 and P3, we sketch algorithms that 1nd solutions with only makespan increasedby a factor (1 + �) and in O(n log logm) time.

5.1. Preemptive P1

In Section 3, we described a linear program which 1nds processing times of jobs such that thesum of processing times is minimized and the cost is at most �. Similarly, we can formulate a linearprogram which de1nes jobs processing times by determining the vector (j) such that the total costis minimized, the sum of processing times is at most �m and each processing time is at most �.Therefore, by construction, we have max{maxjpj(j); 1

m

∑nj=1 pj(j)}6 �, and again, a schedule

meeting this bound can be constructed in O(n) time by using McNaughton’s rule [19].Before de1ning the linear program, since we are interested in solution with makespan at most �,

we can set, without loss of generality, the processing time upper bound of each job Jj to min{�; uj}.Of course we have to adjust the value of cuj to reMect this change.

Page 16: Approximation schemes for parallel machine scheduling problems with controllable processing times

1580 K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581

The linear program is the following.

Minimizen∑

j=1

(c‘j − cuj )j +n∑

j=1

cuj

s:t:n∑

j=1

(uj − ‘j)j¿n∑

j=1

uj − �m;

06 j6 1; j = 1; : : : ; n:

The previous LP is a continuous relaxation of the classical knapsack problem in minimization form.The minimization form of the problem can easily be transformed into an equivalent maximizationform and solved as described in Section 3. Therefore, for P1 we can 1nd the optimal solution inO(n) time.

5.2. Preemptive P2

Assume that there is a schedule with makespan and cost equal to T and �, respectively. Then,we can discard all solutions in which there are jobs with processing times larger than T . To dothis, modify the given instance by setting the upper bound of the processing times to min{T; uj}for each job Jj. Of course we have to adjust the value of cuj to reMect this change. Let KP(T; �)denote the linear program (3)–(5), de1ned in Section 3 when makespan and cost are assumed to beat most T and �, respectively (therefore after the preprocessing step described above). If KP(T; �)is infeasible then there is no solution with cost at most � and makespan at most T . Otherwise, let(j) denote the optimal solution of KP(T; �). If 1

m

∑nj=1 pj(j)¿T then there is no solution with

makespan at most T subject to cost at most �, respectively. Therefore, if such a solution exists, thenmax{maxjpj(j); 1

m

∑nj=1 pj(j)}6T , and again, a schedule meeting this bound can be constructed

in O(n) time by using McNaughton’s rule [19].In Section 3 we have shown how to compute the minimum makespan value when the cost is

constrained to be at most �. The latter is obtained by solving KP(T; �) with at most a polynomialnumber of diNerent values for T . Moreover we have also pointed out that we can 1nd a makespanthat is at most �(1 + �) by calling KP(T; �) with at most O(log logm) diNerent values of T .

5.3. Preemptive P3

To solve P3 1rst compute as set T of candidate values for the makespan (as described in section 4)and then solve a LP similar to the one provided for the preemptive P1 that 1nds a processing timeassignment with minimum cost and makespan at most equal to the considered value. Therefore, wecan obtain a schedule with objective function value bounded by C + T (1 + �)6 (C + T )(1 + �).

References

[1] Vickson R. Choosing the job sequence and processing time to minimize total processing plus Mow cost on a singlemachine. Operations Research 1980;28:1155–67.

Page 17: Approximation schemes for parallel machine scheduling problems with controllable processing times

K. Jansen, M. Mastrolilli / Computers & Operations Research 31 (2004) 1565–1581 1581

[2] Vickson R. Two single machine sequencing problems involving controllable job processing times. AIIE Transactions1980;12:258–62.

[3] Nowicki E, Zdrzalka S. A survey of results for sequencing problems with controllable processing times. DiscreteApplied Mathematics 1990;26:271–87.

[4] Chen Z, Lu Q, Tang G. Single machine scheduling with discretely controllable processing times. Operation ResearchLetters 1997;21:69–76.

[5] Cheng T, Shakhlevich N. Proportionate Mow shop with controllable processing times. Journal of Scheduling1999;2:253–65.

[6] Jansen K, Mastrolilli M, Solis-Oba R. Job shop scheduling problems with controllable processing time. In:Proceedings of the Seventh Italian Conference on Theoretical Computer Science, Lecture Notes in Computer Science,vol. 2202. Berlin: Springer, 2001. p. 107–22.

[7] Mastrolilli M. A PTAS for the single machine scheduling problem with controllable processing times. In: AlgorithmTheory—SWAT 2002, Eighth Scandinavian Workshop on Algorithm Theory, Lecture Notes in Computer Science,vol. 2368. Berlin: Springer, 2002. p. 51–9.

[8] Nowicki E. An approximation algorithm for the m-machine permutation Mow shop scheduling problem withcontrollable processing time. European Journal of Operational Research 1993;70:342–9.

[9] Shmoys D, Tardos E. An approximation algorithm for the generalized assignment problem. MathematicalProgramming 1993;62:461–74.

[10] Trick M. Scheduling multiple variable-speed machines. Operations Research 1994;42:234–48.[11] Garey MR, Johnson DS. Computers and intractability; a guide to the theory of NP-completeness. New York: W.H.

Freeman, 1979.[12] Lenstra J, Kan AR, Brucker P. Complexity of machine scheduling problems. Annals of Operations Research

1997;1:343–62.[13] Johnson D. Approximate algorithms for combinatorial problems. Journal of Computer and Systems Sciences

1974;9:256–78.[14] Hochbaum D, editor. Approximation algorithms for NP-hard problems. Boston: PWS Publishing Company; 1995.[15] Graham R. Bounds for certain multiprocessing anomalies. Bell System Technical Journal (BSTJ) 1966;45:1563–81.[16] Nowicki E, Zdrzalka S. A bicriterion approach to preemptive scheduling of parallel machines with controllable job

processing times. Discrete Applied Mathematics 1995;63:237–56.[17] Hochbaum D, Shmoys D. Using dual approximation algorithms for scheduling problems: theoretical and practical

results. Journal of the ACM 1987;34:144–62.[18] Lawler E. Fast approximate algorithms for knapsack problems. In: Proceedings of the 18th Annual Symposium on

Foundations of Computer Science, 1977. p. 206–18.[19] McNaughton R. Scheduling with deadlines and loss functions. Management Science 1959;12:1–12.