Preemptive Scheduling of Independent Jobs on Identical Parallel Machines Subject to Migration Delays

Similar documents
Single Machine Scheduling with a Non-renewable Financial Resource

P C max. NP-complete from partition. Example j p j What is the makespan on 2 machines? 3 machines? 4 machines?

University of Twente. Faculty of Mathematical Sciences. Scheduling split-jobs on parallel machines. University for Technical and Social Sciences

Scheduling Parallel Jobs with Linear Speedup

Optimal on-line algorithms for single-machine scheduling

On Machine Dependency in Shop Scheduling

Complexity of preemptive minsum scheduling on unrelated parallel machines Sitters, R.A.

Polynomial Time Algorithms for Minimum Energy Scheduling

Polynomially solvable and NP-hard special cases for scheduling with heads and tails

Approximation Schemes for Scheduling on Parallel Machines

Multiprocessor jobs, preemptive schedules, and one-competitive online algorithms

Scheduling Linear Deteriorating Jobs with an Availability Constraint on a Single Machine 1

On Preemptive Scheduling on Uniform Machines to Minimize Mean Flow Time

Approximation Schemes for Parallel Machine Scheduling Problems with Controllable Processing Times

Complexity analysis of the discrete sequential search problem with group activities

Algorithm Design. Scheduling Algorithms. Part 2. Parallel machines. Open-shop Scheduling. Job-shop Scheduling.

The Power of Preemption on Unrelated Machines and Applications to Scheduling Orders

APPROXIMATION ALGORITHMS FOR SCHEDULING ORDERS ON PARALLEL MACHINES

Improved Bounds on Relaxations of a Parallel Machine Scheduling Problem

Machine scheduling with resource dependent processing times

Throughput Optimization in Single and Dual-Gripper Robotic Cells

Online Scheduling with Bounded Migration

A Framework for Scheduling with Online Availability

Complexity analysis of job-shop scheduling with deteriorating jobs

2 Martin Skutella modeled by machine-dependent release dates r i 0 which denote the earliest point in time when ob may be processed on machine i. Toge

Single Machine Scheduling with Generalized Total Tardiness Objective Function

An approximation algorithm for the minimum latency set cover problem

Combinatorial Algorithms for Minimizing the Weighted Sum of Completion Times on a Single Machine

On-line Scheduling to Minimize Max Flow Time: An Optimal Preemptive Algorithm

Ideal preemptive schedules on two processors

1 Ordinary Load Balancing

MINIMIZING SCHEDULE LENGTH OR MAKESPAN CRITERIA FOR PARALLEL PROCESSOR SCHEDULING

Improved Bounds for Flow Shop Scheduling

Memorandum COSOR 97-23, 1997, Eindhoven University of Technology

APTAS for Bin Packing

Online algorithms for parallel job scheduling and strip packing Hurink, J.L.; Paulus, J.J.

Completion Time Scheduling and the WSRPT Algorithm

Preemptive Online Scheduling: Optimal Algorithms for All Speeds

A polynomial-time approximation scheme for the two-machine flow shop scheduling problem with an availability constraint

On-line Bin-Stretching. Yossi Azar y Oded Regev z. Abstract. We are given a sequence of items that can be packed into m unit size bins.

A PTAS for Static Priority Real-Time Scheduling with Resource Augmentation

Approximation algorithms for scheduling problems with a modified total weighted tardiness objective

Lecture 2: Scheduling on Parallel Machines

Multi-agent scheduling on a single machine to minimize total weighted number of tardy jobs

The Constrained Minimum Weighted Sum of Job Completion Times Problem 1

A Robust APTAS for the Classical Bin Packing Problem

Bin packing and scheduling

Algorithms. Outline! Approximation Algorithms. The class APX. The intelligence behind the hardware. ! Based on

A New Approach to Online Scheduling: Approximating the Optimal Competitive Ratio

Deterministic Models: Preliminaries

Properties of optimal schedules in Preemptive Shop Scheduling

Operations Research Letters

Complexity and Algorithms for Two-Stage Flexible Flowshop Scheduling with Availability Constraints

Scheduling linear deteriorating jobs with an availability constraint on a single machine

Approximation schemes for parallel machine scheduling with non-renewable resources

A PTAS for Static Priority Real-Time Scheduling with Resource Augmentation

Approximation Algorithms for Scheduling with Reservations

Discrete Applied Mathematics. Tighter bounds of the First Fit algorithm for the bin-packing problem

A note on proving the strong NP-hardness of some scheduling problems with start time dependent job processing times

8 Knapsack Problem 8.1 (Knapsack)

Online Scheduling of Parallel Jobs on Two Machines is 2-Competitive

Partition is reducible to P2 C max. c. P2 Pj = 1, prec Cmax is solvable in polynomial time. P Pj = 1, prec Cmax is NP-hard

A lower bound for scheduling of unit jobs with immediate decision on parallel machines

Two Processor Scheduling with Real Release Times and Deadlines

Single machine scheduling with forbidden start times

This means that we can assume each list ) is

Approximation Schemes for Job Shop Scheduling Problems with Controllable Processing Times

An FPTAS for parallel-machine scheduling under a grade of service provision to minimize makespan

bound of (1 + p 37)=6 1: Finally, we present a randomized non-preemptive 8 -competitive algorithm for m = 2 7 machines and prove that this is op

Parallel machine scheduling with batch delivery costs

Computers and Intractability. The Bandersnatch problem. The Bandersnatch problem. The Bandersnatch problem. A Guide to the Theory of NP-Completeness

Computers and Intractability

The Open Shop Scheduling Problem

arxiv: v1 [cs.ds] 29 Jul 2014

A lower bound on deterministic online algorithms for scheduling on related machines without preemption

Basic Scheduling Problems with Raw Material Constraints

Multi-Operation Multi-Machine Scheduling

Using column generation to solve parallel machine scheduling problems with minmax objective functions

Low-Complexity Algorithms for Sequencing Jobs with a Fixed Number of Job-Classes

Lecture 4 Scheduling 1

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

Bi-objective approximation scheme for makespan and reliability optimization on uniform parallel machines

Scheduling chains of operations on a batching machine with disjoint sets of operation compatibility

Approximation Algorithms for scheduling

Scheduling and fixed-parameter tractability

Embedded Systems Development

Deciding Emptiness of the Gomory-Chvátal Closure is NP-Complete, Even for a Rational Polyhedron Containing No Integer Point

Approximation Schemes for Scheduling on Uniformly Related and Identical Parallel Machines

International Journal of Industrial Engineering Computations

IBM Research Report. Minimizing Makespan in No-Wait Job Shops

S. ABERS Vohra [3] then gave an algorithm that is.986-competitive, for all m 70. Karger, Phillips and Torng [] generalized the algorithm and proved a

Using column generation to solve parallel machine scheduling problems with minmax objective functions

The 2-valued case of makespan minimization with assignment constraints

Convex Quadratic and Semidefinite Programming Relaxations in Scheduling

ALTERNATIVE PERSPECTIVES FOR SOLVING COMBINATORIAL OPTIMIZATION PROBLEMS

A robust APTAS for the classical bin packing problem

SPT is Optimally Competitive for Uniprocessor Flow

Conditional Hardness of Precedence Constrained Scheduling on Identical Machines

Average-Case Performance Analysis of Online Non-clairvoyant Scheduling of Parallel Tasks with Precedence Constraints

Lower Bounds for Smith s Rule in Stochastic Machine Scheduling

Transcription:

Preemptive Scheduling of Independent Jobs on Identical Parallel Machines Subject to Migration Delays Aleksei V. Fishkin 1, Klaus Jansen 2, Sergey V. Sevastyanov 3,andRené Sitters 1 1 Max-Planck-Institute für Informatik, 66123 Saarbrücken, Germany {avf, sitters}@mpi-sb.mpg.de 2 Institute of Computer Science, University of Kiel, 24118 Kiel, Germany kj@informatik.uni-kiel.de 3 Sobolev Institute of Mathematics, 630090 Novosibirsk, Russia seva@math.nsc.ru Abstract. We present hardness and approximation results for the problem of scheduling n independent jobs on m identical parallel machines subject to a migration delay d so as to minimize the makespan. We give a sharp threshold on the value of d for which the complexity of the problem changes from polynomial time solvable to NP-hard. We give initial results supporting a conjecture that there always exists an optimal schedule in which at most m 1 jobs migrate. Further, we give a O(n) time O(1+1/ log 2 n)-approximation algorithm for m = 2, and show that there is a polynomial time approximation scheme for arbitrary m. Keywords: scheduling, identical machines, preemption, migration delay. We consider the problem of scheduling independent jobs on identical parallel machines subject to migration delays so as to minimize the makespan. Formally, there are m machines, M 1,M 2,...,M m which are used to process n jobs, J 1,J 2,...,J n. Each job J j (j =1,...,n) has a processing time p j. Each machine can process at most one job at a time, and each job can be processed by at most one machine at a time. Preemptions with a migration delay d are allowed, that is, the processing of any job J j on a machine M i can be interrupted and resumed at any later time on M i, and at least d time units later if J j migrates to another machine M k. The goal is to schedule the jobs so as the makespan is minimized. By extending the three-field notion [1,2], we denote this problem by α pmtn(delay = d) C max,whereα is either Pm (fixed number m of machines), or P (arbitrary number of machines). In classical scheduling models the migration of a job is done without any delay constraint. However, in production planning, for example, it is natural to reserve some time for the transition of a product from one machine to another. Most of the work has been done within two short-term visits at MPI für Informatik in Saarbrücken, supported in part by the EU project CRESCCO and the Russian Foundation for Basic Research (grant no. 05-01-00960). G.S. Brodal and S. Leonardi (Eds.): ESA 2005, LNCS 3669, pp. 580 591, 2005. c Springer-Verlag Berlin Heidelberg 2005

Preemptive Scheduling of Independent Jobs 581 Simply the transportation of the product takes time, but also technical issues might make it necessary to wait for some time; a heated product might need to cool down first, or a product needs to dry before its next operation can start. We refine the classical model of identical machines by adding a delay constraint d, which is independent of the job and machines. Our model generalizes two elementary identical machine scheduling problems. If the delay is zero, we obtain the preemptive problem, P pmtn C max,whichcan be solved efficiently by McNaughtons s wrap around rule [3]. On the other hand, for large enough delay d no job will migrate in the optimal schedule. In this case we obtain the non-preemptive problem P C max which is strongly NP-hard [4]. An intringueing question is what happens for the intermediate values of d. When is the problem hard? Is there a simple rule, like McNaughton s rule, which solves the problem? Is there a good approximation algorithm? Known Results. The two-machine non-preemptive problem, P 2 C max,isnphard [4]. There is an exact pseudo-polynomial time algorithm for Pm C max [5]. Regarding approximations, there is a polynomial time approximation scheme (PTAS) for the general problem, P C max [6], that is, a family of approximation algorithms {A ε } ε>0 such that given an instance of the problem A ε finds a solution within a factor of (1 + ε) from the optimum in time polynomial in the size of the input for fixed ε. Our problem is closely related to the problem of scheduling unit-length jobs with precedence constraints and equal communication delays, P prec, p j = 1,c jk = d C max, where a precedence relation between two jobs J j and implies that job always starts after job J j completes, and at least d time units later if the jobs are processed on different machines. If in our problem all preempted parts are integral, then we obtain an instance of the above problem with chains-like precedence constraints, P chains, p j =1,c jk = d C max. The version of unit communication delays, P prec, p j =1,c jk = 1 C max, is well studied. Regarding approximations, Hanen & Munier [7] presented a (7/3 4/(3m))-approximation algorithm. Lenstra & Veltman [8] showed that there is no (5/4 ε)-approximation algorithm unless P = NP.Improvingthese bounds remains one of most challenging problems in scheduling theory [9]. Far less is known for the general version with large communication delays. Engels et al. [10] considered a version of the problem with tree-like precedence constraints and general communication delays, P tree, p j =1,c jk,iq C max,wherec jk,iq depends on the pair of machines (i, q) and the pair of jobs (j, k). They showed that there is a polynomial time algorithm if all c jk,ik are bounded by some constant. As soon as communication delays are considered as part of the input, the problem becomes harder to solve. Afrati et al. [11] showed that the two-machine problem with tree-like precedence constraints and equal communication delays, P 2 tree, p j =1,c jk = d C max, is NP-hard. Engels [12] showed that the singlemachine problem problem with chain-like precedence constraints and just two possible delays, P 1 prec, p j =1,c jk {0,d} C max,isnp-hard. Our Results. In this paper we add a migration restriction to the classical model of scheduling on identical machines. We present hardness and approximation

582 A.V. Fishkin et al. results. In Section 1 we show that the sub-problem of P pmtn(delay = d) C max with delay d at most p max can be solved in linear time, where p max = max n j=1 p j, L = n j=1 p j,and = max{p max,l}. Further, we show that for any constant ε>0 the sub-problem of P pmtn(delay = d) C max with d larger than (1 + ε) times( p max ) is NP-hard in strong sense. In Section 2 we investigate properties of the optimal schedule. We show that there always exists an optimal schedule which yields at most one preemption for the two-machine problem, P 2 pmtn(delay = d) C max, and an optimal schedule which yields at most two migrations for the three-machine problem, P 3 pmtn(delay = d) C max. This leads to two exact pseudo-polynomial time algorithms for the problems. We conjecture that there always exists an optimal schedule which yields at most m 1 migrations for Pm pmtn(delay = d) C max. Further, we show that for any instance of P pmtn(delay = d) C max there exists an optimal schedule in which no machine is idle before its completion time. In Section 3 we give an algorithm which finds near-optimal solutions for any instance of the two-machine problem. The algorithm outputs an optimal schedule if delay d is at most (1 2/ log 2 n), and otherwise, it finds a schedule of length at most (1 + 1/ log 2 n)timesthe optimum. The running time of the algorithm is linear in the number of jobs, n. Finally, in Section 4 we give a polynomial time approximation scheme (PTAS) for the general problem, P pmtn(delay = d) C max. As mentioned above, our model is closely related to scheduling with communication delays. Most of the results presented can be directly translated for the problem, P chains, p j =1,c jk = d C max. No results for this model with large communication delays were known before. 1 Complexity Let p max =max n j=1 p j be the maximum processing time and L = n j=1 p j/m be the average machine load. We define =max{p max, p j /m}. Wehavethe following bounds OPT + p max 2, (1) where OPT denotes the optimum. McNaughton s Rule. Recall that any instance with d =0canbesolvedbyusing McNaughton s wrap around rule [3]: Select the jobs one by one in some order and sequentially fill up the schedules of machines M 1,M 2,...,M m within the time interval [0, ]. If on a current machine M i there is no enough room for the next in turn job, first complete the schedule of M i, and only then move the rest of the job to the beginning of the schedule of the next machine M i+1.the procedure outputs a schedule of length δ in O(n) time. By adopting this, we can provide the following result. Theorem 1. The sub-problem of P pmtn(delay =d) C max with delay d at most p max can be solved by using McNaughton s rule in O(n) time. Proof. If = p max,thend = 0 and McNaughton s rule gives an optimal schedule of length. If = L = n j=1 p j/m, then McNaughton s rule gives a schedule

Preemptive Scheduling of Independent Jobs 583 of length L. ConsideranyjobJ j which gets preempted and migrates from a machine M i to machine M i+1. The gap between the part of job J j on machine M i and the other part of J j on machine M i+1 is exactly L p j, which is at least L p max d. Hence, the delay constraint is satisfied. The running time is linear in the number of jobs, n. Hardness. Next, we provide hardness results for our problem. We reduce from the strongly NP-hard problem α-partition [13]: Instance: k α positive numbers e 1,e 2...,e α k,e Z + such that α k e i = k E and E/(α +1)<e i <E/(α 1) for all i =1,...,α k. (2) i=1 Question: Is there a partition of {1, 2,...,α k} into k disjoint subsets N 1, N 2,..., N k such that i N l e i = E for all l =1,...,k? (3) Theorem 2. For any constant ε>0 the sub-problem of P pmtn(delay = d) C max with delay d at least (1 + ε) times ( p max ) is NP-hard in strong sense. Proof. Givenaninstanceofα-PARTITION, we construct an instance of our problem as follows. We let the number of machines m = α k, thenumberof jobs n = m + k, and the migration delay d = E/(α 1). Next, we define m large jobs J j (j =1,...,m) with processing times p j =2E e j,andandk small jobs J j (j = m +1,...,m+ k) of equal processing length p m+1 =... = p m+k = E. Then, the average machine load L is equal 2E, which is at least p max.thus,we have that = L. One can see that the above construction can be completed in time polynomial in k and α. In the following we show that an instance of α-partition yields the YES -answer if and only if the constructed instance of our problem yields a schedule of length L. Assume that we have a schedule of length L. Sinced = E/(α 1) and L =2E = E +(α 1)d <E+ α d, we can conclude that each small job migrates at most (α 1) times. On the other hand, from (2) we have that d = E α 1 >e i (i =1,...,m), which implies that no large job migrates. Hence, in order to have a schedule of length L, each machine should process at least one small job for some time whereas each small job can be processed by at most α machines. Since there are m = α k machines and k small jobs, each small job is processed by exactly α machines and no machine processes two different small jobs. This gives a feasible solution for the given instance of α-partition. Similarly, one can also see that any feasible solution for an instance of α-partition leads to a schedule of length L for the constructed instance of our problem.

584 A.V. Fishkin et al. In the instance we have that d = E α 1 = α +1 α 1 E α +1 < α +1 α 1 e min = ( 1+ 2 ) ( p max ), α 1 where e min =min m j=1 e j, = L =2E and p max =max m+k j=1 p j =2E e min. So, for any fixed ε>0 one can find a fixed α Z + 2 such that α 1 ε. Hence, the sub-problem with d (1 + ε)( p max ) consists the above instance and, thereby, is NP-hard in strong sense. 2 Properties of the Optimal Schedule Theorem 3. For any instance of the two-machine problem P 2 pmtn(delay = d) C max there exists an optimal schedule with at most one migration. Proof. Given an optimal schedule of length OPT, we construct a new optimal schedule of as follows. Let L i (i =1, 2) be the total load of the jobs which completely run on machine M i in the given optimal schedule without migrations. We reschedule the jobs of L 1 within interval [0,L 1 ]onm 1 and the jobs of L 2 within interval [OPT L 2, OPT] on M 2, respectively. No preemptions and migrations for these jobs are made, see Fig 1a. M 1 M 2 L 1 OP T 0 1 0 1 M 1 M 2 OP T p k OP T 00 11 00 11 00 11 0000 1111 00 11 0000 1111 0000 1111 0000 1111 0000 1111 a) L 2 b) Fig. 1. Rescheduling on two machines Next we reschedule the jobs which migrate in the given optimal schedule by using McNaughton s wrap around rule within still available intervals [L 1, OPT] and [0, OPT L 2 ]. This completes the construction. The length of the schedule is OPT. There is at most one job which gets preempted and migrates from M 2 to M 1. Assume w.l.o.g. that there is one job which migrates in the constructed schedule, see Fig 1b. This job is scheduled in the end of [L 1, OPT] on machine M 1, and in the beginning of [0, OPT L 2 ]onm 2. The time gap between the two parts of is exactly OPT p k.since also migrates in OPT, we have that p k + d is at most OPT. Hence, the delay constraint is satisfied. The constructed schedule is optimal. There exit instances for which the number of preemptions and the number of migrations must differ in the optimal schedule. Consider the following example. There are three large jobs J 1,J 2,J 3 and one small job J 4. such that =(p 1 +

Preemptive Scheduling of Independent Jobs 585 p 2 + p 3 + p 4 )/3 =2d + p 4 and p 1 = p 2 = p 3. Then, in order to get a schedule of length, the small job should migrate two times, and one large job should be preempted one time. Hence, there are two migrations and three preemptions. Theorem 4. For any instance of the P 3 pmtn, delay = d C max there exists an optimal schedule with at most two migrations. Proof. Given an optimal schedule of length OPT we construct a new optimal schedule in two steps. We first construct a pseudo-schedule of length OPT which may be infeasible, and then turn this into a feasible schedule. Let L i (i =1, 2, 3) be the total load of the jobs which completely run on machine M i in the given optimal schedule without migrations. Assume w.l.o.g that L 1 L 2 L 3.WeplacethejobsofL i (i =1, 2, 3) within [0,L i ]onm i, respectively. No preemptions and migrations for these jobs are made. M 1 M 2 M 3 M 1 M 2 M 3 L 1 L 2 L 3 a) L 1 01 01 01 01 00000 11111 00000 11111 111111 00000 11111 111111 00000 11111 M 1 M 2 M 3 L 2 M 1 b) M 2 M 3 L 1 00000 11111 00 11 00000 11111 00 11 00000 11111 00 11 00000 11111 00 11 1111110000 1111110000 111111 L 2 0000 1111 1111110000 1111111 000 111 1111111 000 111 1111111 L 3 111 000 1111111 111 000 c) 1111111 1111111 1111111 0 1111111 0 0 0 1 1 0 1 0 1 0 1 1 0 d) Fig. 2. Rescheduling on three machines Next we place the jobs which migrate in the given optimal schedule. We order these jobs by non-decreasing lengths. Then we select the jobs one by one in this order and use McNaughton s wrap-around rule. We first place the jobs on machine M 2 within interval [L 2, OPT], then on machine M 1 within [L 1, OPT], and finally on M 3 within [L 3, OPT]. This gives a pseudo-schedule of length OPT. If there is at most one migration in the pseudo-schedule, then the proof follow directly from the proof of Lemma 3. In the following we assume that there are exactly two migrations, and modify the schedule so as to satisfy the delay constraints. Assume that there is a job which is processed on all three machines, see Fig. 2a. Due to the rescheduling procedure, we can conclude that the processing time p k of is larger than (OPT L 2 )+(OPT L 1 ). Since L 1 L 2 L 3, job must migrate at least two times in the given optimal schedule. The delay constraint implies that p k +2d is at most OPT. Hence, we can modify the schedule as shown in Fig 2b.

586 A.V. Fishkin et al. Now assume that there is one job whichisprocessedonmachinesm 2 and M 1, and one job whichisprocessedonmachinesm 2 and M 3, see Fig. 2c. Since jobs and both migrate in OPT, the delay constraint implies that p k + d OPT and p k + d OPT. Hence, we can modify the schedule as shown in Fig 2d. Conjecture 1. For any instance of Pm pmtn, delay= d C max there exists an optimal schedule with at most m 1migrations. One can see that a simple rule, like McNaughton s rule, cannot be used to find the optimal schedule of the preempted jobs, even if almost all information on the optimal schedule is given. Notice also that, unlike the problem with preemptions but delays, there might be more than two preempted jobs on a machine, and an optimal schedule might have to preempt the same job more than once. In fact, even more complicated structures can be constructed. Theorem 5. For any instance of the general problem P pmtn(delay = d) C max there exists an optimal schedule in which no machine is idle before its completion time. Proof. Let σ be a schedule with minimizes the following three objectives in the given order: the makespan, the sum of all completion times, and minus the sum over all jobs of the mean completion times, where the mean completion time of a job is the average time at which it is processed. Assume w.l.o.g. that machine M 1 is idle in σ at some time t, i.e. no job is processed on M 1 in the interval ]t ε, t[ forsomeε>0, and M 1 does process some job at a later moment. We assume w.l.o.g that d ε. LetjobJ j be the first job that is processed after time t on M 1.IfJ j is entirely processed on M 1 or is not processed on any machine before time t, then we can reduce its completion time by ε without increasing the makespan or changing the schedule of any other job. If job J j is processed before time t ε, then we remove the last ε units of J j that were processed before time t ε, and process it on M 1 between t ε and t. Wehaveincreased the average completion time of J j by a small amount without increasing the completion time of any job. Hence, σ is not optimal for the given objectives. This gives a contradiction. 3 Two Machines: A Near-Optimal Schedule in Linear Time We show that for the two machine problem, P 2 pmtn(delay = d) C max,anear optimal solution can be found in O(n) time. First we introduce some notation. We assume that jobs J 1,J 2,...,J n (n 2) are numbered in non-increasing order of their processing times p 1... p n.so,wehave =min{p 1, n j=1 p j/2} as a lower bound on the optimum OPT. We use I k (k =1,...,n)todenotethe set of k largest jobs {J 1,J 2,..., }. Taking the jobs of I k as an instance of the

Preemptive Scheduling of Independent Jobs 587 non-preemptive problem P 2 C max,weusec k to denote its optimum, and S k to denote its optimal (non-preemptive) schedule. Then, we have that C 1 C 2... C n. Lemma 1. If C n =, thenopt =. In the other case, let k {1, 2,...,n} and C k > } and let γ =max{,. p k + d}. Then,. =min{k k OPT = min{γ,c k }. (4) Proof. ThefirstisimmediatesinceS n is a feasible schedule and is a lower bound on OPT. For the other case let us show that C k 1 OPT C k. The lower bound follows from C k 1 OPT. To justify the upper bound, it suffices to take the schedule S k and complete it to a feasible schedule for the original problem with length equal to C k by just assigning the remaining ( small ) jobs to the less loaded machine. The optimal schedule should clearly have length not greater than C k. It is clear that OPT cannot be strictly less than C k,ifnojobj i I k migrates. On the other hand, if some of them migrate, OPT cannot be less than γ =max{,. p k + d}. Thus, we have the following lower bound on the optimum: OPT min{γ,c k }. (5) Let us show that, in fact, (5) holds as an equality. Indeed, if min in the right part of (5) is attained at C k, then we can easily achieve it via constructing a schedule of length C k (without preemption), as shown above. Alternatively, if γ<c k, we construct a schedule of length γ as follows: take the schedule S k 1 (it has length C k 1 and no preemptions); put the job to an arbitrary machine (let it be M 1 ) theschedulelength becomes at least C k ; divide the job into two parts, making the load of machine M 1 to be equal to γ; the (positive) remainder of the job migrates to machine M 2 ; put the remaining jobs ( +1,...,J n ) on machine M 2. Clearly, the resulting schedule is feasible and its length is equal to γ. Theorem 6. There exists an algorithm which for any instance of the twomachine problem P 2 pmtn(delay = d) C ( max with) n jobs (a) solves the problem to the optimum if delay d is at most 1 2 log 2 n, and (b) otherwise, it provides either an optimal schedule or an approximate non-preemptive schedule S of length at most ( C max (S) 1+ 1 ) OPT. (6) log 2 n The running time of the algorithm is linear in the number of jobs, n.

588 A.V. Fishkin et al. Proof. Put k := log 2 n. Then p k 2 k 2. (7) log 2 n Observe that we can extract the set of jobs I k (i.e., the set of the largest k jobs) from the whole set {J 1,J 2,...,J n } in O(n) time by means of the standard technique [14], after which its items can be renumbered in non-increasing order of processing times (p 1... p k )ino(log n log log n) =o(n) time.afterthis we can compute all optimums {C 1,...,C k } in O(2 k )=O(n) time by the direct enumeration of all subsets of the set {1, 2,...,k }. Next we compare C k and. IfC k >, we can conclude that k k,and that k can be found in O(log n) comparisons of values {C i i =1,...,k } with. Next we construct the optimal schedule (of length OPT = min{γ,c k }), using the schedules S k 1 and S k as described in the proof of the previous lemma. If C k (and hence, k >k ), then in the case d + p k we have OPT =, and the optimal schedule can be obtained by the completion of the schedule S k up to a whole schedule using the linear-time McNaughton s algorithm. Alternatively, if d + p k >, and therefore (from (7)), ( d> p k 1 2 ), log 2 n we take the schedule S k and complete it to a whole non-preemptive schedule for the original instance using the simple list-scheduling algorithm (with the remaining jobs sequenced in an arbitrary order). It can be seen that the length of schedule S meets an upper bound C max (S) + 1 2 p k for some k>k,which implies C max (S) + 1 2 p k. (8) The desired bound (6) follows from (8) and (7). 4 A Polynomial Time Approximation Scheme Here we give an outline of a polynomial time approximation scheme (PTAS), that is, a family of approximation algorithms {A ε } ε>0 such that given an instance of the problem A ε finds a solution within a factor of (1 + ε) fromthe optimum in time polynomial in the size of the input for fixed ε. Our approach to approximation is to perform several transformations that simplify the input problem without dramatically increasing the objective value, so that the final result is amenable to a fast enumeration solution. As before, p max =max n j=1 p j, L = n j=1 p j/m, =max{p max, p j /m}, and OPT 2. We assume w.l.o.g. that 1/ε 4isintegral. Cleaning Up. Our first transformation cleans up the instance. The idea is to separate the set of jobs we say that a job J j is large if p j >ε, small otherwise. We drop all small jobs from the instance, and add them later to the schedule.

Preemptive Scheduling of Independent Jobs 589 From now on we are interested in obtaining a near-optimal schedule for the large jobs. Since n j=1 p j m, we can conclude that there are at most 2m/ε large jobs. A job which migrates k times is split into k +1 parts which we call operations. Our next transformation gives a lower bound on the value of d,aswellasanupper bound on the maximum number of operations (migrations) of a large job. Lemma 2. With 1+2ε loss, we can assume that the value of d is at least 2ε, and hence, each large job consists of at most 2/ε operations. Proof. If d 2ε, we can construct a schedule as follows. We first use Mc- Naughton s wrap-around rule on the set of large jobs, ignoring all migration constraints. This gives a pseudo-schedule of length in which at most m 1 large jobs migrate. Next, we use the structure of the schedule. We move the parts of the jobs which run in the end of the schedule by d so that to satisfy all migration constraints. This completes a feasible schedule of length + d (1 + 2ε), which is at most (1 + 2ε)OPT. If d 2ε, then each job can migrate at most OPT/d times. From OPT 2, each job can consist of at most 1/ε +1 2/ε operations. Rounding. By applying our main transformation we round all values in our problem to some discrete points, that is very useful for further enumeration. For simplicity, we write Oj h to denote the hth operation of job J j,whereaswewrite p h j and Sh j to denote the processing time and starting time of operation Oh j.we can bound operation sizes as follows. Lemma 3. With 1+ε loss, we can assume that the processing time of each operation p h j is at least ε4 /4. Proof. Given an optimal schedule of length OPT we scale it by 1 + ε. Thetime reserved for each operation Oj h is then (1 + ε)ph j. Next, we move the start time of Oj h so far that this creates an idle time gap of size εph j before its start time. For each large job J j, there are at most 2/ε 1 operations. Hence, there is at least one big operation of J j with processing time p j /(2/ε) =εp j /2. We can conclude that there is an idle time gap of size at least ε 2 p j /2 ε 3 /2. Thus, we can take the operations of job J j with sizes at most ε 4 /4, which sum up to at most ε 4 (2/ε) /4 =ε 3 /2 total size, and then put them together into the idle gap. We go over all jobs performing the above procedure. In the end, there is no operation with size less than ε 4 /4. We increased the schedule length by εopt. Next we round all values to O(1/ε 5 ) possible discrete points. Lemma 4. With 1+2ε loss, we can round up all values so that the delay d {4/ε 4, 4/ε 4 +1,...,16/ε 5 }, all operation sizes p h j {16/ε, 16/ε +1,...,8/ε5 }, and all starting times S h j {0, 1,...,16/ε5 }. Proof. Given an optimal schedule of length OPT we scale it by 1 + ε. Thetime reserved for each operation Oj h is then (1 +ε)ph j. Next, we move the start time of Oj h so far that this creates an idle time gap of size εph j before its start time. Since

590 A.V. Fishkin et al. p h j ε4 /4, this gap is at least 2ε 5 /4. Next, we use one part of this gap with size ε 5 /4 to round p h j, and the other part with the same size to round Sh j so that their values turn to some integer multiples of ε 5 /4. Similar, we round the value of d to an integer multiple of ε 5 /4. The procedure increases the schedule length by 2εOPT. Further, we divide all values by ε 5 /4whereε (0, 1/4]. Since d [ε, 2(1+ 4ε) ], each p h j [ε4 /4, (1 + 4ε) ], and each S j [0, 2(1 + 4ε) ], we obtain the claimed bounds. Enumeration. One can see that Lemmas 2 and 4 shape a schedule for the set of large jobs: (i) there are O(1) unit time slots (ii) each large job J j forms O(1) operations Oj h (iii) each operation Oj h can eventually fill O(1) time slots but it completely runs on one machine. This information is enough to find a nearoptimal schedule by a brute-force enumeration. Omitting technical details, we can state the following result. Lemma 5. In m O(1) time we can find a feasible schedule for the large jobs which length is at most (1 + O(ε))OPT. Though we aim at the existence of a PTAS, we can provide some nice enumeration techniques which replace m O(1) by a clean bound. Adding the Small Jobs. Now we complete the obtained schedule of the large jobs by adding the small jobs in a greedy manner. We select the small jobs one by one and preemptively schedule them on the machines as soon as possible and without migrations. We use preemptions each time when the current machine is busy processing a large job. There is no small job migrates in the schedule, and theschedulelengthisatmost(1+o(ε))opt + ε, whichis(1+o(ε))opt. In overall, we obtain the following final result. Theorem 7. For any instance of P pmtn(delay = d) C max and any positive accuracy ε, one can find a schedule of length at most (1+ε)OPT in O(m f(ε) +n) time, where f( ) is some function independent of the number of jobs n and the number of machines m. Proof. In the algorithm we need to separate the jobs into small and large ones, round all values, and perform the enumeration procedure. The first two steps can be completed in O(n) time. The enumeration procedure can be run in m O(1) time. References 1. Graham, R.L., Lawler, E.L., Lenstra, J.K., Rinnooy Kan, A.H.G.: Optimization and approximation in deterministic scheduling: A survey. Annals of Discrete Mathematics (1979) 287 326 2. Lawler, E.L., Lenstra, J.K., Rinnooy Kan, A.H.G., Shmoys, D.B.: Sequencing and scheduling: Algorithms and complexity. In: Logistics of Production and Inventory. Volume 4 of Handbooks in Operation Research and Management Science. North- Holland, Amsterdam (1993) 445 522

Preemptive Scheduling of Independent Jobs 591 3. McNaughton, R.: Scheduling with deadlines and loss functions. Management Science 6 (1959) 4. Karp, R.M.: Recucibility among combinatorial problems. In: Complexity of Computer Computations. Plenum Press, New York (1972) 5. Rothkopf, M.H.: Scheduling independent tasks on parallel processors. Management Science 12 (1966) 347 447 6. Hochbaum, D.S., Shmoys, D.: A polynomial approximation scheme for scheduling on uniform processors: using the dual approximation approach. SIAM Journal on Computing 17 (1988) 539 551 7. Hanen, C., Munier, A.: An approximation algorithm for scheduling dependent tasks on m processors with small communication delays. Discrete Applied Mathematics 108 (2001) 239 257 8. Hoogeveen, J.A., Lenstra, J.K., Veltman, B.: Three, four, five, six, or the complexity of scheduling with communication delays. Operations Research Letters 16 (1994) 129 137 9. Schuurman, P., Woeginger, G.J.: Polynomial time approximation algorithms for machine scheduling: Ten open problems. Journal of Scheduling 2 (1999) 203 213 10. Engels, D.W., Feldman, J., Karger, D.R., Ruhl, M.: Parallel processor scheduling with delay constraints. In: SODA. (2001) 577 585 11. Afrati, F.N., Bampis, E., Finta, L., Milis, I.: Scheduling trees with large communication delays on two identical processors. In: Euro-Par. (2000) 288 2295 12. Engels, D.W.: Scheduling for hardware-software partitioning in embedded system design. PhD thesis, Massachusetts Institute of Technology, Cambridge, USA (2000) 13. Garey, M.R., Johnson, D.S.: Computers and intractability: A guide to the theory of NP-completeness. Freeman, San Francisco, CA (1979) 14. Blum, M., Floyd, R., Pratt, V., Rivest, R., Tarjan, R.: Time bounds for selection. J. Comp. System Sci. (1973)