On the complexity of preemptive open-shop scheduling problems

On the complexity of preemptive open-shop scheduling problems

Volume 4, Number 2 ON THE COMPLEXITY OPERATIONS RESEARCH LETTERS OF PREEMPTIVE OPEN-SHOP July 1985 SCHEDULING PROBLEMS C.Y. L I U Department o...

282KB Sizes 8 Downloads 93 Views

Volume 4, Number 2

ON THE COMPLEXITY

OPERATIONS RESEARCH LETTERS

OF PREEMPTIVE

OPEN-SHOP

July 1985

SCHEDULING

PROBLEMS

C.Y. L I U Department of Bushless Administration, National Sun Yat-Sen University, Kao Hsiung, Taiwan, ROC R.L. B U L F I N Department of Industrial Engineering, Auburn University,AL 36849, USA Received January 1985 Revised March 1985

The problem of preemptivelyscheduling a set of n independentjobs on an m-machineopen shop is studied, and two results are obtained. The first indicates that constructing optimal flow-timeschedules is NP-hard for m larger than two. The second result shows that the problem remains NP-hard for the two-processorease when all jobs must be completed by their respective deadlines. open shop * flow time* preemption* NP-hard 1. Introduction

Consider the following open-shop scheduling problem. There are n independent jobs, each of which consists of m operations, that must be processed by m machines. The order in which the operations of a specific job are processed is immaterial. Each job is processed by one machine at a time, and each machine processes one job at a time. A schedule is preemptive if the execution of any operation may be arbitrarily often interrupted and resumed at a later time. It is assumed that no cost or time loss is associated with a preemption. We wish to find the schedule which minimizes flow time. Using the three-field notation of G r a h a m et al. [8], the problem can be denoted as O/pmtn/ECi. Several researchers have investigated open-shop problems when preemption is not allowed [1, 3, 7, 10]. With preemption allowed and the objective to minimize finish time ( O / p m t n / C m a x ) , a polynomial algorithm was developed by Gonzalez and Sahni [7], and later improved by Gonzalez [5]. Cho and Sahni [2] give a network formulation to solve this problem when release times are restricted to two values ( 0 / p m t n , R i ~ {a, b } / Cmax). When the objective is to minimize maximum lateness and each job has a release time

( 0 / p m t n , R i / L m a x ), they also give a linear programming formulation to solve the problem. For the special case 0 2 / p m t n / L m a x , Lawler, Lenstra and Rinnooy Kan [10] provide a linear time algorithm. They also prove that minimizing the number of tardy jobs in a two-machine open shop ( 0 2 / p m t n / E U ~ ) is binary NP-hard. Finding a minimum flow-time preemptive schedule in an open shop with an arbitrary number of machines ( O / p m t n / ~ . C i ) is unary NP-hard, even if all non-zero processing times are the same [6]. However, some open-shop problems have unknown complexity. Lageweg et al. [9] state that 0 2 / p m t n / E C i and 0 3 / p m t n , Ri," 1)i/~..Ti are the minimum and maximum open problems, respectively. If the minimal open problem can be shown to be NP-hard, or if a polynomial algorithm can be found for the maximal open problem, the complexity of this problem class will be established. In this paper, we reduce this gap by proving that both 0 3 / p m t n / E C ~ and 0 2 / p m t n , D i / E C ~ are unary NP-hard.

2. 0.3 /pmtn /~.C i In this section, we show that O 3 / p m t n / ~ . C i is unary NP-hard. To do this, we restate it as the

0167-6377/85/$3.30 © 1985, Elsevier Science Publishers B.V. (North-Holland)

71

Volume 4, Number 2

OPERATIONS RESEARCH LETI'ERS

following language-recognition problem and prove it is unary NP-complete. 3 - O M F T . Given an open shop with three machines, a positive value Z, and a set of jobs with processing times t~, u~, oi, i = 1, 2 . . . . . n on each machine, respectively, is there a preemptive schedule with flow time less than or equal to Z? Consider the following problem: 3 - P A R T I T I O N . Given a set S = (1, 2 . . . . . 3n } and positive integers al, a 2. . . . . a3,,, q with q / 4 < a i < q / 2 for all i ~ S and F . i ~ s a ~ = n q , does S have a partition into n disjoint three-element subsets $1, $2,..., S,, such that 7'.i•s,a ~= q for k - 1,2 . . . . . n? The 3-PARTITION problem is unary NP-complete [4]. Furthermore, the following theorem proves that 3-OMFT is unary NP-complete by reducing 3-PARTITION to 3-OMFT.

July 1985

and Vk~ + V,2 + V, 3 = q.

Figure 1 shows that the three-job sets can be allocated in each time interval of length q. Since t i + u i + v a = q and F.i • skti = F~i • s,Ui = F..j• sVi = q

t i -~ a i ,

i = 1, 2 . . . . , 3 n ,

for all jobs i and three-job sets S k, the algorithm of Gonzalez and Sahni [7] will provide a feasible preemptive schedule for each three-job set in each time interval q. Note that a non-preemptive schedule which completes the jobs in the interval q may not exist; examples demonstrating this are easy to construct. Further, the flow time of the three jobs in the kth interval will be 3 k q and the flow time of the schedule in Figure 1 will be 3(q+2q+ . . . + n q ) . Hence, if there exists a three-element partition of the set S, then there must exist a feasible preemptive schedule of 3O M F T with flow time equal to Z. (Only if) Conversely, suppose no disjoint threeelement partitions exist for S. Assume the completion times of any feasible schedule of 3-OMFT are C 1, C 2 , . . . , C 3 , , with Ci<_ Ci+ 1, i = 1, 2 . . . . . 3n - 1. Let x = C3k_ 2, x l = C3k_ l -- C3k_2, and x2 = C3k C3,_ ~. L e t x l ' be the portion of the processing time of job 3k 1 processed in time interval [0, x], and x2' be defined similarly for job 3k. Therefore,

ui=oi=(q-ai)/2,

i = 1 , 2 . . . . ,3n,

xl+xl'>q,

Theorem 1. 3 - O M F T is unary N P - c o m p l e t e . Proof. Suppose n, q, and a~, a 2. . . . . a3n are specified for the 3-PARTITION problem. The corresponding instance of 3-OMFT can be construtted with 3n jobs and

-

-

-

Z= 3(q+ 2q+... +nq).

and

First, we will show that any feasible schedule of this instance with flow time Z is the optimal schedule. Consider P 3 / p m t n / E C i with pi-- q for i = 1, 2 . . . . . 3n. Since t i + u i + o~ = q for all i, any feasible schedule of the above instance is also a feasible schedule to P 3 / p m t n / E C v Thus P 3 / p m t n / E C ; is a relaxation of 0 3 / p m t n / E C i, and its optimal solution is a lower bound on the optimal solution of 0 3 / p m t n / E C i. Obviously, Z is the minimum flow time for P 3 / p m t n / F ~ C i when p~ = q for i = 1, 2 . . . . . 3n. This indicates that Z is the best possible solution to the above instance. Now we will show that problem 3-OMFT has optimal solution Z if and only if a solution exists to the 3-PARTITION problem. (If) Suppose there exist disjoint three-element partitions of S. Let S k = {kl, k2, k3} and a,l + a,2 + a,3 = q. Then

72

+(q-

3x > 3 ( k - 1 ) q + q + x l ' + x 2 ' , such that C3k_ 2 + C3,_ 1 + C3k = 3x + 2 x l + x2 > 3kq. Thus itis true that C3k_ 2 + C 3 , _ 1 + C3, >_ 3 k q for k -- 1, 2 . . . . . n. If C3k_ 2 + C3,_ 1 + C3k -- 3/~q for k = 1, 2 . . . . . n, then C3k_ 2 = C3,_ 1 = C3k = k q for all k, and S has n disjoint partitions of three-dement subsets which contradicts the assumption. Therefore, at least one k exists with C3k_ 2 + C 3 , _ 1 + C3, > 3 k q such that C~ + C2+ ... + C3,, > 3 ( q + 2q + ... + n q ) = Z . It follows that a schedule exists with flow time no larger than Z, if and only if the job set can be divided into n groups each containing three jobs, M1 M2 M3

i~S1 i~S± iES±

... ~.. ... q

Ukl "[- Uk2 "-]-Uk3

- (q-a,i)

x2+xl+x2'>q

aka ) + ( q -

ak3)/2=q

i~S k iES k i~Sk

... ... ... kq

Fig. 1. A 3-OMFT schedule for Theorem 1.

i~S n i~S,, i~Sn nq

Volume 4, Number 2

OPERATIONS RESEARCH LETTERS

i.e., if and only if 3-PARTITION has a solution. Since 3-PARTITION is unary NP-complete, so is 3-OMFT. []

g=x,

Ui=--O ,

ti=O ,

ui=x,

July 1985 Di=ix+(i-1)q,

l
Di=(i-n)x+(i-n-1)q,

n+l
and 3n short jobs, 3. 0 2 / p m t n , D I / ~ . C i

li=ai_2n ,

In this section, we will show that the two-machine open-shop flow-time problem is unary NPhard when all jobs must be completed by their deadlines, D~. As in the previous section, the problem must first be cast as a decision problem. 2 - O M F T . Given an open shop with two machines, a positive value Z, and a set of n jobs with processing times t i, u i and deadlines Oi, for i = 1, 2 . . . . . n, is there a preemptive schedule in which all jobs are completed before their deadlines a n d flow time is less than or equal to Z? As in the last section, 3-PARTITION will be reduced to the open-shop problem under consideration. The instance of 2-OMFT to be constructed consists of two job types, long jobs and short jobs. To minimize flow time, short jobs must be scheduled earlier than the long jobs. However, each long job must be completed before its deadline. Thus, in the best schedule, the positioning of long jobs will leave n slots of size q (see Figure 2) which will be used to test if 3-PARTITION has a solution. The 3n short jobs will fill slots created by the long jobs. To ensure that the short jobs have to be completed as early as possible, we will assume the processing time of the long jobs is much longer than the slot size q. The proof of the following theorem will demonstrate that appropriate values of q, Z and job processing times can be chosen to make the arguments work.

ui~-bi_2n ,

Di = oo,

2n+ l
where x>(5qn 2+qn)/2,

bi= 2q/3 .a i

and Z = 2 Y]~ ( i x + ( i -

iffil

1 ) q ) + 3 Y~. i ( x + q ) . iffil

We prove that this instance has flow time less than or equal to Z if and only if S has three-element disjoint partitions. (If) Suppose S has three-element partitions. Jobs are scheduled as-in Figure 2. Job k and job n + k, k = 1, 2 , . . . , n, start at time (k - 1)(x + q) and are completed at time k x + ( k - 1)q on each machine. This yields n time slots of size q for scheduling short jobs. In each n slot place three short jobs with processing times on the first machine corresponding to the three elements of each partition. Suppose Y'~ t i = q iESk

fork=l,

2 . . . . . n,

then Y'~ u i = ~-~ ( t i + u i ) +

E

ti=q.

Proof. Suppose n, q, and a 1, a 2. . . . . a3,, are given as specified for the 3-PARTITION problem. The corresponding instance of 2-OMFT can be constructed with 2n long jobs,

A feasible preemptive schedule exists for allocating these three short jobs in a time slot of size q [7]. Hence, Figure 2 is a feasible schedule, and the bound of Z is not exceeded by the schedule flow time. (Only if) Conversely, suppose there exists no disjoint partition of S into three-element subsets. Let the completion times of any feasible schedule of 2-OMFT be C1, C2. . . . . C5,,. Since k x is the earliest possible completion time for job k and job n + k , k = 1 , 2 , . , • , n, then EkffilCk 2, > 2E~.x(kx).

M1 M2

i~S, i~S,,

Theorem 2. 2 - O M F T is unaly NP-complete.

1 n

i~S 1 i~S 1 x

x+q

... ...

k n+k

k(x+q)-q

iES k iES k k(x+q)

... ...

n 2n

n(x+q)-q

n(x+q)

Fig. 2. A 2-OMFT schedule for Theorem2. 73

Volume 4, Number 2

OPERATIONS RESEARCH LETTERS

Due to the long-job deadlines, the 3n short jobs are scheduled in the intervals [k(x + q ) - q, k ( x + q)], k = 1, 2 . . . . . n, of length q between the long jobs. By the problem definition, if the sum of any three a~'s is less than q, then the sum of the corresponding three b~'s is greater than q and vice versa; if either sums to exactly q, then so does the other. Therefore, no more than three jobs can be scheduled in any interval, and unless there is a 3-partition for the a;'s, exactly three jobs cannot be scheduled in every interval. If a 3-partition does exist, then we know that

July 1985

4. Conclusions We have investigated the problem of preemptively scheduling an open shop to minimize flow time. We have shown that the problem is unary NP-hard for m > 3. It remains so when there are two machines and job deadlines. Although this does not completely close the gap of open problems for this class, it does reduce the problems from twenty to four, leaving 0 2 / p m t n , R~/~T~ as the maximal open problem.

511

E

Acknowledgment

c,>3 E kx.

i--2n+l

k-1

However, since it is assumed a 3-partition does not exist, at least one interval must contain fewer than three jobs, and one short job will be delayed at least as long as the processing time of a long job, x. This gives a bound on total completion time of the short jobs of 5n Z C~>3 k x + x . i--2n+1 k-1 Now 5n

I|

n

E Ci> 2 E kx-~ 3 E k x + x i=l k--1 k~l > 5 ~ kx + (5q. 2 + q . ) / 2 k-1 >5~kx+2q~.(k-1)+3q~k=Z, k-1 k-1

k~l

and the flow time must be greater than the bound Z. Thus we can conclude 2-OMFT has a solution if and only if 3 - P A R T I T I O N has a solution. Since 3 - P A R T I T I O N is unary NP-complete, 2-OMFT must be unary NP-complete. [] For the two-processor case, the preemptive schedule is really non-preemptive (see [8]), and this establishes the NP-completeness of 02/D~/EC~, duplicating a result of Achugbue and Chin [1].

74

This research was partially supported by a grant from the Engineering Experiment Station, Auburn University.

References [1] J.O. Achugbue and F.Y. Chin, "Scheduling the open shop to minimizemean flowtime", SIAM.]'. Comput.9, 306-311 (1982). [2] Y. Cho and S. Sahni, "Preemptive scheduling of independent jobs with release and due times on open, flow and job shops", Oper. Res. 29, 511-522 (1981). [3] T. Fia[a, "An algorithm for the open-shop problem", Math. Oper. Res. 8, 100-109 (1983). [4] M.R. Garey and D.S. Johnson, Computersand Intractability, W.H. Freeman, San Francisco, CA, 1979. [5] T. Gonzalez,"A note on open-shoppreemptiveschedules", IEEE Trans. Computers (:-28, 782-786 (1979). [6] T. Gonzalez,"Unit execution time shop problems", Math. Oper. Res. 7, 57-66 (1982). [7] T. Gonzalez and S. Sahni, "Open-shop scheduling to minimize finish time", J. Assoc. Comput. Mack 23, 665-679 (1976). [8] R.L. Graham, E.L. Lawler, J.K. Lenstra and A.H.G. Rinnooy Kan, "Optimization and approximation in deterministic sequencing and scheduling: A survey", Ann. Discrete Math. 5 287-326 (1979). [9] B.J. Lageweg, E.L. Lawler,J.K. Lenstra and A.H.G. Kinnooy Kan, "Computer-aided complexity classification of deterministic scheduling problems", Report BW 138/81, Stichting Mathematisch Centrum, Amsterdam, The Netherlands, 1981. [10] E.L. Lawler, J.K. Lenstra and A.H.G. Rinnooy Kan, "Minimizing maximum lateness in a two-machine open shop", Math. Oper. Res. 6, 153-158 (1981).