Sunteți pe pagina 1din 7

THE NP-HARDNESS OF THE SINGLE

MACHINE COMMON DUE DATE


WEIGHTED TARDINESS PROBLEM
YUAN Jinjiang
May 17, 2016
Abstract
In this paper we prove that the single machine common due date
weighted tardiness problem is NP-hard
Key words. Due date, tardiness, NP-complete

Introduction

The well-known single machine weighted tardiness problem can be described


as follows. Let n jobs J1 , J2 , ..., Jn and a single machine which can handle
only one job at a time be given. Each job Ji is to be processed without interruption on the machine with an integer processing time pi , a due date di
and a unit tardiness cost wi (1 i P
n). All jobs are available at time
n
zero, and processing finishes at time
i=1 pi . For a given processing order
(sequence) = ((1), (2), ..., (n)), of the jobs, the completion time of job
Pi
J(i) is C(i) = j=1 p(j) , and its tardiness is T(i) = max{0, C(i) d(i) }.
The objective of the general case is toP
find a processing order which minin
mizes the total tardiness cost f () = i=1 w(i)P
T(i) . When all job weights
n
wi (1 i n) are equal, the case of minimizing i=1 T(i) is called the total
tardiness problem. When
Pnall job due dates di = d(1 i n) are equal, the case
of minimizing f () = i=1 w(i) T(i) is called the common due date weighted
tardiness problem (abbreviated as CDDWT problem). And in the latter case, if
J(i0) is the first
tardiness under the processing order , then
Pnjob which causes
P
f () = T(i0) ( i=i0 w(i) ) + i0+1ijn P(i) w(j) . This formula will be used
in the next section.
Lawer and Lenstra et al. showed that the complexity of the weighted tardiness
problem is NP-hard. Jianzhong Du and Jeseph Y-T. Leung proved that the
total tardiness problem is also NP-hard. The question of whether the CDDWT
problem can be solved in polynomial time a pseudo-polynomial dynamic programming algorithm for determining an optimal solution whose computation
time is bounded by n2 d. This paper shows that CDDWT problem is NP-hard.

NP-Hardness Proof

In this section we prove that the CDDWT problem is NP-hard by showing that
the corresponding decision problem is NP-complete. This decision problem can
be stated as follows: Given an instance Ji , pi , wi , di = d(1 i n) of the
CDDWT problem and a positive number P
y > 0, is there a processing order
n
= ((1), (2), ..., (n)) such that f () = i=1 w(i) T(i) y ?
To show that the decision problem of the CDDWT problem is NP-complete,
we use the NP-complete equal size 2-partition problem for our reduction. The
equal size 2-partition problem can be stated
P2t as follows: Given a set of 2t positive
integers A = {ai , a2 , ..., a2t } such that i=1 ai = 2B
there a partition
Pis even, is P
of A into A1 and A2 such that |A1 | = |A2 | = t and aiAi ai = aiA2 ai = B ?
Lemma 2.1 Suppose li , l2 , ..., lm are positive numbers. Then,

0<

m
X
li ) 2
li lj (

i=1

1ijm

Lemma 2.2 Suppose l1 , l2 , ..., lm , F are positive numbers, L=

1
m(m + 1)F 2 + (m + 1)F L <
2

Pm

i=1 li .

Then,

(F + li )(F + lj )

1ijm

1
m(m + 1)F 2 + (m + 1)F L + L2
2

Proof.
X
1
(F + li )(F + lj ) = m(m + 1)F 2 + (m + 1)F L +
2

1ijm

li lj

1ijm

By using Lemma 2.1 we complete the proof.


Theorem 2.1 The decision problem of the CDDWT problem is NP-complete.
Proof. The decision problem is clearly in class NP. For a given instance A =
1 P2t
ai of the equal size 2-partition problem (without
{a1 , a2 , ..., a2t }. B =
2 i=1
loss of generality, we suppose t 2 and B 5 in the sequel), we construct an
instance of the decision problem as follows:
n = 2t + 1;
pi = wi = 2B 3 + 2ai , 1 i 2t;
pn = 1, wn = B 3 ; d = 2tB 3 + 2B;
y = B 3 + d + 2t(t + 1)B 6 + 4(t + 1)B 4 + 4B 2 .
2

The reduction can be done in polynomial time. We show in the following that
the instance of the equal size 2-partition problem has a solution if and only if
the instance of the decision problem has a solution.
Firts,Pif there is P
a partition of A into A1 and A2 such that | A1 |=| A2 |= t
and nAi ai = aiA2 ai = B, we define a processing order satisfying the
following conditions:
{J(i) |1 i t} = {Ji |ai Ai };
J(t+1) = Jn ;
{J(i) |t + 2 i n} = {Ji |ai A2 };
Since
t
X

p(i) =

ai Ai

i=1

pi =

(2B 3 + 2ai ) = 2tB 3 + 2B = d,

aiA1

We have T(i) = 0, for 1 i t. Furthermore,


T(t+1) = pn = 1;
i
X
=1+
P(t+1+j) ,

T(t+1+i)

1 i t.

j=1

Hence
n
X

f () =

w(i) T(i)

1=t+1

= T(t+1) (

n
X

i=t+1

= B3 +

n
X

w(i) ) +

P(i) w(j)

t+2ijn

P(i) +

i=t+2

P(i) P(j)

t+2ijn

Using the fact that


n
X

a(i) =

i=t+a

ai = B,

aiA2

we can get
n
X

P(i) = d.

i=t+2

According to Lemma 2.2, we have


X
P(i) P(j)
t+2ijn

(2B 3 + 2a(t+1+i) )(2B 3 + 2a(t+1+j) )

1ijt

2t(t + 1)B 6 + 4(t + 1)B 4 + 4B 2 .


Thus we get
f () B 3 + d + 2t(t + 1)B 6 + 4(t + 1)B 4 + 4B 2 = y
and is a solution of the instance of the decision problem.
Secondly, if the instance of the equal size 2-partition problem has no solution,
we will assert that the instance of the decision problem has no solution. This
can be shown in the following.
Remark 1 For any subset S {J1 , J2 , ..., J2t }, we have
X

pi < d,

when|S| < t;

pi > d,

when|S| > t.

JiS

X
JiS

In fact, when |S| < t, we have


X

pi =

JiS

(2B 3 + 2ai ) (t 1)(2B 3 ) + 4B < 2tB 3 + 2B = d;

JiS

When |S| < t, we have


X
JiS

pi =

(2B 3 + 2ai ) > (t + 1)(2B 3 ) > 2tB 3 + 2B = d.

JiS

P
Remark 2 There is no subset S {J1 , J2 , ..., J2t } such that JiS
P pi = d. In
fact, by Remark 1, if there is a subset {J1 , J2 , ..., J2t } such that JiS pi = d,
then |S| = t.
Since
X
JiS

pi =

(2B 3 + 2ai ) = 2tB 3 + 2

JiS

= d 2B + 2

X
JiS

ai

JiS

ai

P
We
P have JiS
Pai = B. Define A1 = {ai |Ji S}. Then, |A1 | = |S| = t
and aiAi ai = JiS ai = B. This is contrary to our hypothesis that the
instance of the equal size 2-partition problem has no solution.
Now we begin to prove that the instance of the decision problem has no solution.
To do this, we only need to prove that f () > y for any processing order .
Given a processing order there are two possibilities for Jn , i.e. either Cn d
or Cn > d.
Case 1. Cn d.
Without loss of generality, we can suppose that Jn is the last job under
which does not cause tardiness. According to Remark 1, there are two possible
subcases:
either n = (t + 1) or n = (t).
Pt+2
If n = (t + 1), then T(t+2) > 2B 3 2B + 1 because C(t+2+i) = i=1 P(i) >
1 + (t + 1)(2B 3 ) = d + 2B 3 2B + 1. Denote li = 2a(t+2+i) , 1 i t 1, L =
Pt1
Pt1
3
i=1 li . From the fact that T(t+2) +
i=1 p(t+2+i) = d + 1 = 2tB + 2B + 1,
3
we have
1. Noting that d,pi (1 i 2t) are all even,
Pn T(t+2) + L = 2B + 2B + P
n
and i=t P(i) d + 1. we have i=t+2 P(i) d + 2. Hence, according to
Lemma 2.2, we have
f () =

n
X

w(i) T(i)

i=t+2

= T(t+2) (

n
X

i=t+2

= T(t+2) (

w(i) ) +

n
X

P(t+2+i) W(t+2+j)

1ijt1

P(i) ) +

i=t+2

T(t+2) (d + 2) +

P(t+2+i) P(t+2+j)

1ijt1

(2B 3 + li )(2B 3 + lj )

1ijt1
3

> T(t+2) (2T B + 2B + 2) + 2t(t 1)B 6 + 2tB 3 L


= T(t+2) (2B + 2) + 2t(t 1)B 6 + 2tB 3 (2B 3 + 2B + 1)
(2B 3 2B + 2)(2B + 2) + 2t(t + 1)B 6 + 4tB 4 + 2tB 3
= 2t(t + 1)B 6 + 4(t + 1)B 4 + 2(t + 2)B 3 4B 2 + 4
= y + 3B 3 8B 2 2B + 4 > y
Pt
If n = (t), then T(t+1) > 0. Denote li = 2a(t+1+i) , 1 i t, L = i=1 li .
Pt
From the fact that T(t+1) + i=1 P(t+1+i) = d+1, we have T(t+1) +L = 2B+1.
Hence, according to Lemma 2.2, we have

f () =

n
X

w(i) T(i)

i=t+1

= T(t+1) (

n
X

i=t+1

= T(t+1) (

n
X

w(i) ) +

P(t+1+i) w(t+1+j)

1ijt

P(t+i) ) +

i=t+1

P(t+1+i) P(t+1+j)

1ijt

> T(t+1) (2(t + 1)B 3 ) +

(2B 3 + li )(2B 3 + lj )

1ijt
3

> 2(t + 1)B (2B + 1 L) + 2t(t + 1)B 6 + 2(t + 1)B 3 L


= 2t(t + 1)B 6 + 4(t + 1)B 4 + 2(t + 1)B 3
= y + B 3 4B 2 2B > y
Case 2. Cn d.
Suppose that the first job which causes tardiness under is J(i0) . According
to Remark 2, we have J(j0) 6= Jn . Noting d, pi (1 i 2t) are all even, we
have T(i0) 2. Let J(j0) = Jn ; then j0 i0 . We define a new processing
order as follows:
(i) = (i),

(j) = (j),

for

i < i0 ;

for

j > j0 ;

for

i0 k j0

(i0) = (j0) = n;
(k + 1) = (k),

According to Remark 2, it is easy to see T (i0) = 0. Furthermore, we have


T (i) = T(i) = 0,

for

i < i0 ;

T (j) = T(j) ,

for

j > j0 ;

T (k+1) = T(k) + 1,

for

i 0 k j0

Hence

f ( ) f () =

j01
X

w(k) w(j0) T(j0)

k=i0

j01
X

p(k) B 3 (1 + T(i0) +

k=i0

j01
X

p(k) )

k=i0+1

p(i0) B 3 (1 + T(i0) )
2B 3 + 2a(i0) B 3 (1 + 2)
< 4B B 3 < 0

This implies thatf () > f ( ).


Under processing order , Cn d. By the discussion of Case 1, we have
f () > f ( ) > y.
To sum up the above arguments, we obtain the following conclusion.
Theorem 2.2 The single machine common due date weighted tardiness problem is NP-hard.

Conclusion Remarks

The general weighted tardiness problem has three sets of parameters: processing times, weights, and due dates. There are 8 variations, depending on which
(maybe any) of these parameters are common for all jobs. The complexity of
the 8 cases are shown as follows.
(1)The (general) weighted tardiness problem is NP-hard.
(2)The weighted tardiness problem with common weight is NP-hard.
(3)The weighted tardiness problem with common due date is NP-hard.
(4)The weighted tardiness problem with common processing time is in class P.
(5)The weighted tardiness problem with common weight and common due date
is in class P.
(6)The weighted tardiness problem with common weight and common processing time is in class P.
(7)The weighted tardiness problem with common due date an common processing time is in class P.
(8)The weighted tardiness problem with common parameters is clearly in class
P.

S-ar putea să vă placă și