Operations Research Letters 38 (2010) 123–126
Contents lists available at ScienceDirect
Operations Research Letters journal homepage: www.elsevier.com/locate/orl
Complexity of a scheduling problem with controllable processing times Byung-Cheon Choi a,∗ , Joseph Y.-T. Leung b , Michael L. Pinedo c a
Department of Business, Chungnam National University, 79 Daehakro, Yuseong-gu Daejeon 305-764, Republic of Korea
b
Department of Computer Science, New Jersey Institute of Technology, Newark, NJ 07102, USA
c
Department of Information, Operations & Management Sciences, Stern School of Business, New York University, 44 West 4th Street, New York, NY 10012-1126, USA
article
info
Article history: Received 15 May 2008 Accepted 7 October 2009 Available online 24 October 2009 Keywords: Total weighted completion time Controllable processing time Single machine NP-hard
abstract We consider the problem of scheduling a set of independent jobs on a single machine so as to minimize the total weighted completion time, subject to the constraint that the total compression cost is less than or equal to a fixed amount. The complexity of this problem is mentioned as an open problem. In this note we show that the problem is NP-hard. © 2009 Elsevier B.V. All rights reserved.
1. Introduction Scheduling problems with controllable processing times have been studied extensively; see [4,5] for the most recent surveys. In this note we consider a particular scheduling problem with controllable processing times that can be stated as follows. Suppose we have a set of n independent jobs {1, 2, . . . , n} to be scheduled on a single machine, where job processing times are compressible. Associated with each job j is a normal processing time p0j , a weight wj and a compression rate bj . If job j is compressed by spending an amount uj , then its actual processing time becomes pj = p0j − bj uj . Given P a budget R, our problem is to find a schedule with minimum wj Cj , subject Pto the constraint that the total amount spent on compression, uj , does not exceed the fixed budget R. The complexity of this problem is stated as open in [3,4]. In this note we show that it isP NP-hard. Our result implies also that P the problem of minimizing uj , subject to the constraint that wj Cj does not exceed a given threshold, is also NP-hard. Wan et al. [6] and Hoogeveen and Woeginger [2]P studied a P cj uj has related problem in which the cost function wj Cj + to be minimized. They showed, independently from one another, that their problem is NP-hard [6,2]. On the surface, it may appear that our problem is somewhat easier to solve than their problem. However, this note shows that our problem is NP-hard as well. 2. Problem reduction In this section we will show that the decision version of our problem is NP-complete. We denote our decision problem as
the Weighted Completion Time problem with Controllable Cost (WCTCC). WCTCC: Given two thresholds R and WC , a set of n jobs {1, 2, . . . , n} with the initial processing time of job j equal to p0j , the weight of job j equal to wj , and the compression rate ofP job j equal to bj , is P there a schedule such that wj Cj ≤ WC and uj ≤ R? We will reduce the Equal Cardinality Partition problem to the WCTCC problem. The Equal Cardinality Partition problem is known to be NP-complete; see [1]. The Equal Cardinality Partition problem can be stated as follows. Equal Cardinality Partition: Given 2n integers a1 , a2 , . . . , a2n such P2n that j=1 aj = A, is there a subset I ⊆ {1, 2, . . . , 2n} such that aj = A2 ? Given an instance of the Equal Cardinality Partition problem, we construct an instance of the WCTCC problem as follows. There will be 2n jobs. The initial processing time, weight and compression rate of job j are given as follows. B + aj p0j = B + aj , wj = B + aj and bj = , j = 1, . . . , 2n, M + aj
|I | = n and
P
j∈I
where B = nA3 and M =
Corresponding author. E-mail addresses:
[email protected] (B.-C. Choi),
[email protected] (J.Y.-T. Leung),
[email protected] (M.L. Pinedo). 0167-6377/$ – see front matter © 2009 Elsevier B.V. All rights reserved. doi:10.1016/j.orl.2009.10.011
=
n(2n+1) 3 A . 2n+2
All jobs can be
completely compressed, i.e., the upper bound of uj is
p0j bj
= M+
aj , j = 1, . . . , 2n. The thresholds WC and R are given as WC =
1
(n2 + n)B2 + (n + 1)AB !2 2n 2n X X A 2 + aj + aj and R = nM + . 2
j =1
∗
2n+1 B 2n+2
Note that since
j=1
wj p0j
2
= 1, j = 1, . . . , 2n, the jobs that are not
compressed will always follow the compressed jobs in any order.
124
B.-C. Choi et al. / Operations Research Letters 38 (2010) 123–126
−((|Nkl | + 2)B + A1 )(M + al ) + ((|Nkl | + 1)B + A2 )(M + ak ) ∆ ≤ (B + ak ) (M + ak )(M + al ) −BM + (|Nkl | + 1)ak B − (|Nkl | + 2)al B − ak M + ak A2 − al A1 = (B + ak ) (M + ak )(M + al )
Box I.
Lemma 1. If there is a solution to the Equal Cardinality Partition problem, then there is a solution to the WCTCC problem. Proof. Let I ⊆ {1, 2, . . . , 2n} be such that |I | = n and j∈I aj = A2 . Let I 0 = {1, 2, . . . , 2n} − I. We fully compress every job in I. The upper bound of uj is M + aj for every job in I. Therefore, P A 0 j∈I uj = nM + 2 = R. The jobs in I are not compressed at all and they are scheduled in any order. Without loss of generality, suppose that the jobs in I 0 are scheduled in the order (σ (1), . . . , σ (n)). Then
P
2n X
wj Cj =
X
wj Cj
j∈I 0
j=1
=
n X
wσ (k)
k=1
k X
pσ (j) =
j=1
k=1
=
1 2
n k X X (B + aσ (k) ) (B + aσ (j) )
+
X
j =1
aj =
A 2
and
4
X
+
X
2n X
wj Cj =
j=1
=
1 2 1 2
nB +
A
2
2
a2j <
j∈I 0
+
aj
j =1
2n X
a2j ,
j =1
X
+ nB2 + AB +
X A2 4
! X
+
wj
j∈Nkl ∪{l}
B + al M + al
.
(B + aj ) = (|Nkl | + 2)B + A1
j∈Nkl ∪{k,l}
wj =
X
(B + aj ) = (|Nkl | + 1)B + A2 ,
where A1 =
P
j∈Nkl ∪{k,l}
aj and A2 =
P
j∈Nkl ∪{l}
aj , we have
((|Nkl | + 2)B + A1 )(B + ak ) M + ak ((|Nkl | + 1)B + A2 )(B + al ) . + M + al
∆=−
a2j
! +
X
wj =
j∈Nkl ∪{l}
j∈I 0 2
B + ak M + ak
j∈Nkl ∪{l}
!
(n + n)B + (n + 1)AB + 2
.
and
!2
we have
B + al M + al
Since
j∈I 0
A2
wj
Nkl ∪{k,l}
j∈Nkl ∪{k,l}
X
and p¯ l = pl +
Clearly, compressing job k will cause every job in the schedule to be shifted to the left (and hence completed earlier). Similarly, decompressing job l will cause every job in Nkl ∪ {l} to be shifted to the right (and hence toP be completed later). Therefore, the total wj Cj can be calculated as follows: amount of change (∆) in
∆=−
X ( B + aj ) 2 .
j∈I 0
j∈I 0
2n X
B + ak M + ak
!
Since
|I 0 | = n,
p¯ k = pk −
!2
X ( B + aj )
jobs that follow job l in schedule S. We construct a new schedule S¯ by compressing more of job k and ‘decompressing’ job l; i.e., u¯ k = uk + and u¯ l = ul − , where > 0 and u¯ k and u¯ l are the new amounts spent on the compression of jobs k and l. Clearly, the P2n new schedule is feasible, since j=1 u¯ j = R. Moreover,
X
a2j
< WC .
j∈I 0
There are two cases to consider.
We now show that if there is a solution to the WCTCC problem, then there is a solution to the Equal Cardinality Partition problem. P2n P2n Let S be a schedule such that j=1 wj Cj ≤ WC and j=1 uj ≤ R. Without loss of generality, we may assume that the entire budget P2n R is used for the compression of jobs, i.e., j=1 uj = R. Lemma 2. In the reduced problem, the objective value of the schedule with at least two partially compressed jobs is larger than the objective value of the schedule with at most one partially compressed job. Proof. Consider a schedule S with at least two partially compressed jobs. The jobs in S can be put into three categories: (1) those that are fully compressed, (2) those that are partially compressed, and (3) those that are not compressed at all. For jobs in the first category, their actual processing times have been reduced to zero. Thus, we only need to consider in schedule S jobs in the second and third categories. Without loss of generality, we may assume that these jobs are scheduled in WSPT order and that P2n wj j=1 uj = R, where WSPT order implies a decreasing order of p . j
Clearly, the jobs in the second category are scheduled before the jobs in the third category, in WSPT order. Let jobs k and l be the first and second job, respectively, in schedule S. Let Nkl be all the
Case 1: ak ≥ al . In this case, we have the equation in Box I. Since −(|Nkl | + 2)al B − ak M + ak A2 − al A1 < 0, B = nA3 , +1 M = 2n nA3 , |Nkl | + 1 ≤ 2n and ak < A2 , we have 2n+2
∆<
2 (B + ak ) n (2n + 1) 6 − A + n2 A4 . (M + ak )(M + al ) 2n + 2
+1 2 Since − 2n A + 1 < 0, we have 2n+2
2n + 1 2 (B + ak ) 2 4 ∆< n A − A + 1 < 0. (M + ak )(M + al ) 2n + 2 Case 2: ak < al . In this case, we have B + ak M + ak
−
B + al M + al
=
(M − B)(ak − al ) > 0. (M + ak )(M + al )
Therefore, we have
(B + ak ) (−((|Nkl | + 2)B + A1 ) + ((|Nkl | + 1)B + A2 )) M + ak (B + ak ) = (−B − ak ) < 0. M + ak
∆<
B.-C. Choi et al. / Operations Research Letters 38 (2010) 123–126
From Cases 1 and 2, we have ∆ < 0. This implies that we can decrease the objective value of the schedule by fully compressing job k. By repeating this argument, we can obtain a schedule with at most one partially compressed job. In S, let T be the set of all fully compressed jobs, let P be the set of partially compressed jobs and let U be the set of jobs that have not undergone any compression. By Lemma 2, we may assume that |P | ≤ 1. If |T | ≥ n + 1, then we have
The actual processing time of job k is p k = B + ak − ∆ , where ∆ =
B+ak M +a k
P
2n X
X
wj Cj − ∆
wj Cj =
j =1
=
X
=
j∈T ∪P
This violates our assumption that the entire budget has been used for the compression of jobs. By the above argument, there are only three cases we need to consider: (1) (|T |, |P |, |U |) = (n, 0, n), (2) (|T |, |P |, |U |) = (n, 1, n − 1), (3) (|T |, |P |, |U |) = (n − 1, 1, n). Lemma 3. If there is a solution to the WCTCC problem, then there is a solution to the Equal Cardinality Partition problem.
j∈U ∪{k}
X j∈U ∪{k}
X
−∆
A . 2
P
2n X
wj Cj =
wj p0j
= 1 for
j∈U
j =1
X
2
=
2
X
X
B+
j∈U
(B + aj )2
aj
X (B2 + 2Baj + a2j ) . +
|U | = n,
aj =
j∈U
A
j∈U
2
and
j∈U
A
2
4
+
X
wj Cj =
j =1
1
n X
a2j <
j∈U
2
2
+
j =1
n X
P2n
j =1
(M + aj ) =
j∈T
In other words,
X j∈T ∪{k}
uj = R.
A 2
−
X
A
A2
2
4
j∈T
aj =
B
a2j
−∆
j∈U ∪{k}
X
+
a2j
M + ak
j∈U ∪{k}
1 2
A
aj −
P
aj
B+
2
X
2
2
!
!
A
aj −
j∈U ∪{k}
X
wj Cj = WC +
aj −
j∈U ∪{k}
(n + 1)B −
×
2n+1 B, 2n+2
< WC .
j∈U
, we have
(B + aj ),
j∈U ∪{k}
+
P
j∈U ∪{k}
a2j −
j∈U ∪{k}
aj −
A 2
.
(n + 1)B − 2
B +
ak <
A 2
A 2
!!
B + ak
and
X
nB +
M + ak
aj
j∈U ∪{k}
P
j∈U ∪{k}
X
nB +
M + ak
aj < A, we have
aj
j∈U ∪{k}
P
2ak − 2
aj
B − 2ak
j∈U ∪{k}
B2 − 2AB − A2 2B + A
Also, since 1 2
P2n
j =1
A2 +
+ ak
2
A2
aj
.
aj = A and aj <
n
P j∈U ∪{k}
2n+1 B 2n+2
2
>−
j=1
!
!
B + ak
= >
P 2n
Since M =
!
X
X
j =1
X
A 2
j∈U ∪{k} aj −
!
X
wj .
j∈U ∪{k}
a2j . Therefore,
a2j ,
In this case, let job k be the partially compressed job. Clearly, job k is scheduled in S. Since |T | = n and |P | = 1, P in the first position P we have j∈T uj = nM + j∈T aj < R = nM + A2 . Thus, uk can be calculated as follows:
X
+
aj
B + ak
j =1
!2 aj
P
=
Case 2: (|T |, |P |, |U |) = (n, 1, n − 1).
uk = R −
X
j∈U ∪{k}
−
2n X
(n + n)B + (2n + 2) B + 2
aj
wj Cj = WC + (n + 1)
we have 2n X
X
j =1
−
Since
X
2
j∈U ∪{k}
B+ak M +a k
where
j∈U
!2 X
+
j∈U
1
(B + aj )
X
(n + n)B + (2n + 2)
2
!2
1
! 2
+
2n X
2
X
)
j∈U ∪{k}
!2
all j ∈ U. Therefore, the objective value is calculated as follows:
wj Cj =
a2j
wj .
1
wj Cj =
Since ∆ =
X A (M + aj ) = nM + = R. uj =
(B + 2Baj + 2
The total allocated
The jobs in U are scheduled in an arbitrary order since
2n X
+
aj
j∈U ∪{k}
j∈U ∪{k}
In this case we have j∈T aj = j∈U aj = resources can be calculated as follows:
X
Since |U | = n − 1, we have
Case 1: (|T |, |P |, |U |) = (n, 0, n)
j∈T
X
wj
j∈U ∪{k}
j∈U ∪{k}
Proof. Following the discussion above, we will consider the three cases separately.
j∈T
j∈U ∪{k}
B+
2
X
( B + aj ) 2 − ∆
!2
1
j =1
P
X
+
(M + aj ) < (n − 1)M < R.
wj
( B + aj )
2
. Thus, we have
!2
1
Thus, we may assume that |T | ≤ n. If |T | ≤ n − 2, then we have
X
X
j∈U ∪{k}
j∈T
A 2
aj −
j∈U ∪{k}
j∈U ∪{k}
X (M + aj ) ≥ (n + 1)M > R.
X
125
=−
1 2
A , 2
1+
we have
n 2
n A2 > − A2 . 2
+ .
aj
2
126
B.-C. Choi et al. / Operations Research Letters 38 (2010) 123–126
Thus, since A − 2n X
2 nA
1 n2 A3
+
1 2nA2
+1+
B2 − 2AB − A2
wj Cj > WC +
2 nA
−
where =
2n X
1 n 2 A3
−1−
1 2nA2
)
2(2B + A)
> WC .
Case 3: (|T |, |P |, |U |) = (n − 1, 1, n). Let job k be the partially compressed job in S. Clearly, job k is the P first job scheduled inPS. Since |T | = n − 1A and |P | = 1, j∈T uj = (n − 1)M + j∈T aj < R = nM + 2 . Therefore, uk can be calculated as follows: 2
P
j∈U
Since M =
M + ak
2n+1 B 2n+2
pk =
B + ak
M + ak
j∈T ∪{k}
aj −
B + ak
A
M + ak
2
−
A 2
=
X
2
! −
X
aj
j∈T
.
2
2
P
− !
j∈U
X
.
aj
X
wj Cj + pk
wj Cj =
2
wj
j∈U ∪{k}
! (n + n)B + (2n + 2) 2
2
P
2n X
X
aj <
aj
+
A , 2
X
aj
X
a2j + pk
j∈U
j∈U ∪{k}
j∈U ∪{k}
2n+1 B 2n+2
+ ak
aj
>
B2 2B + A
.
Thus, since A − 1 −
wj Cj > WC +
1 2nA2
> 0 and B = nA3 , we have
B2 2B + A
n
2n2 A5 A − 1 −
2
2(2B + A)
− A2 = WC +
1 2nA2
Acknowledgements Byung-Cheon Choi was supported in part by the Korea Research Foundation Grant KRF-2008-357-D00289. Joseph Y-T. Leung was supported in part by the NSF Grant DMI-0556010. Michael L. Pinedo was supported in part by the NSF Grant DMI-0555999.
B References
wj .
j∈U ∪{k}
we have
wj Cj = WC − (n + 1)
j=1
+
P
ak + 2ak
j∈U
j∈U
X j∈U
+ Since
− (n + 1)B
aj
Theorem 1. The WCTCC problem is NP-complete.
j∈U
!2
P
X
j∈U ∪{k}
j∈U
j=1
we have
By Lemmas 1 and 3, we have the following theorem.
!2 X X X wj . (B + aj )2 + pk (B + aj ) +
1
A , 2
Again, the objective value of the schedule is larger than WC . Summarizing the above three cases, the only schedule with objective value smaller than WC is the one with (|T |, |P |, |U |) = (n, 0, n). All other schedules have objective values larger than WC . Therefore, if the WCTCC problem has a solution, then the Equal Cardinality Partition problem has a solution as well.
aj , we have
Since |U | = n, we have 2n X
and ak <
> WC .
=
(B + aj ) − (n + 1)B + .
j∈U ∪{k}
j =1
j∈U
j∈U
1
!
2
2n X
!
A
aj −
A 2
A
M+
M + ak
B + ak
wj Cj =
.
n
X
j=1
−
> − A2 .
Since job k is scheduled first in S, we have 2n X
aj
2 j = 1 aj
Also, as we showed in Case 2,
p k = B + ak −
j∈T ∪{k}
j =1
P2n
aj
X
(n + 1)B +
2
The actual processing time of job k can be calculated as follows:
P
−
2
!
=
j∈T
j∈T ∪{k}
Since
+
P 2n
M + ak j∈U ∪{k}
B2 + 2B
uj = R.
=
2 j∈U aj
P
j∈U
B + ak
×
B + ak
X
−
2
Thus, we have
X
aj
2
!
A
= WC +
X X A (M + aj ) = M + − aj . j∈T
j =1
In this case, the objective value of the schedule is larger than WC .
uk = R −
1 2
Therefore, we have
n
2
2n2 A5 (A −
= WC +
> 0, we have
− A2
2B + A
j=1
B + ak
A
M + ak
2
A 2
! −
X
aj
B+
j∈U
! −
X j∈U
aj
X
(B + aj ),
j∈U ∪{k}
[1] M.R. Garey, D.S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness, W.H. Freeman, New York, 1979. [2] H. Hoogeveen, G.J. Woeginger, Some comments on sequencing with controllable processing times, Computing 68 (2002) 181–192. [3] A. Janiak, Scheduling in computer and manufacturing systems, Wroclaw University of Technology, Wroclaw, Poland, 2006. [4] A. Janiak, W. Janiak, M. Lichtenstein, Resource management in machine scheduling problems: A survey, Decision Making in Manufacturing and Services 1 (2007) 59–89. [5] D. Shabtay, G. Steiner, A survey of scheduling with controllable processing times, Discrete Applied Mathematics 155 (2007) 1643–1666. [6] G. Wan, B. Yen, C-L. Li, Single machine scheduling to minimize total compression plus weighted flow cost is NP-hard, Information Processing Letters 79 (2001) 273–280.