Penalty cost constrained identical parallel machine scheduling problem

Penalty cost constrained identical parallel machine scheduling problem

Theoretical Computer Science 607 (2015) 181–192 Contents lists available at ScienceDirect Theoretical Computer Science www.elsevier.com/locate/tcs ...

425KB Sizes 2 Downloads 63 Views

Theoretical Computer Science 607 (2015) 181–192

Contents lists available at ScienceDirect

Theoretical Computer Science www.elsevier.com/locate/tcs

Penalty cost constrained identical parallel machine scheduling problem Weidong Li a , Jianping Li a , Xuejie Zhang a , Zhibin Chen b,∗ a b

Yunnan University, Kunming, 650091, PR China Kunming University of Science and Technology, Kunming, 650500, PR China

a r t i c l e

i n f o

Article history: Received 11 November 2014 Received in revised form 30 September 2015 Accepted 2 October 2015 Available online 8 October 2015 Keywords: Scheduling Rejection penalty Approximation algorithms Polynomial time approximation scheme Fully polynomial time approximation scheme

a b s t r a c t We consider a version of parallel machine scheduling with rejection. An instance of the problem is given by m identical parallel machines and a set of n independent jobs, with each job having a processing time and a penalty. A job may be accepted to be processed or be rejected at its penalty. The objective of the problem is to partition the set of jobs into two subsets, the subset of accepted and the subset of rejected jobs, and to schedule the set of accepted jobs such that the makespan is minimized under the constraint that the total penalty of the rejected jobs is no more than a given bound. In this paper, we present a 2-approximation algorithm within strongly polynomial time for the problem. We also present a polynomial time approximation scheme whose running time is O(

1

)

O (nm  2 + mn2 ) for the problem. Moreover, for the case where the number of machines is a fixed constant m, our results lead to a fully polynomial time approximation scheme for the problem. Our result is fairly good in the sense that in a reasonable size of jobs, our FPTAS improves previous best running time from O (nm+2 / m ) to O (1/ 2m+3 + mn2 ). © 2015 Elsevier B.V. All rights reserved.

1. Introduction Given a set of machines and a set of jobs such that each job has to be processed on one of the machines, the classical scheduling problem P  C max is to minimize the makespan. Since Graham [8] designed a classical list scheduling (LS for short) algorithm, which is to assign the next job in an arbitrary list to the first available machine, for the problem, this strongly NP-hard problem has been widely studied for more than four decades. However, as surveyed in Shabtay et al. [20], in many cases, processing all jobs may not be a good strategy. In some systems, a wise decision may be required in advance to partition the set of jobs into a set of accepted and a set of rejected jobs so that some limited production capacities could be used more efficiently. In this paper we consider a generalized version of classical scheduling problem in which a job may be rejected at a certain penalty, and we call this problem Penalty cost constrained identical parallel machine scheduling problem, which was first introduced by Zhang et al. [24]. Given are a set of identical machines M = { M 1 , M 2 , . . . , M m }, a set of jobs J = { J 1 , J 2 , . . . , J n } with a processing time (or size) p j > 0 and a penalty e j ≥ 0 for each J j of J , and a bound B. We wish to partition the set of jobs into two subsets, the subset of accepted and the subset of rejected jobs, and to schedule the set of accepted jobs on the m machines such that the makespan is minimized under the constraint that the total penalty of the rejected jobs is no more than the bound B. Following the convention of Graham et al. [9] as well as Lawler et al.

*

Corresponding author. E-mail addresses: [email protected] (W. Li), [email protected] (J. Li), [email protected] (X. Zhang), [email protected] (Z. Chen).

http://dx.doi.org/10.1016/j.tcs.2015.10.007 0304-3975/© 2015 Elsevier B.V. All rights reserved.

182

W. Li et al. / Theoretical Computer Science 607 (2015) 181–192

[13], we denote this problem and a special case of this problem where the number of machines is a fixed constant m by   P | J j ∈R e j ≤ B |C max and P m | J j ∈R e j ≤ B |C max , respectively. The problem P |



J j ∈R e j

≤ B |C max is a generalized version of the classical scheduling problem P  C max as we just  J j ∈R e j ≤ B |C max can be viewed as a special case of the bicriteria

mentioned, but on the other hand, the problem P |

problem on unrelated parallel machines as defined in Angel et al. [2], where we are given n independent jobs and m unrelated parallel machines with the requirement that when job J j is processed on machine M i , it requires p ij ≥ 0 time units and incurs a cost c ij . The objective of the general bicriteria problem on unrelated parallel machines is to find a schedule obtaining a trade-off between the makespan and the total cost. The general bicriteria problem on unrelated parallel machines as well as its many variants has received a great deal of attention from researchers over the last two decades. For instance, readers are referred to Lin and Vitter [14], Shmoys and Tardos [21], Jansen and Porkolab [12], Angel et al. [2], and so on. Given T , C and  , assume that there exists a schedule with a makespan value of T and a cost of C . Lin and Vitter [14] presented a polynomial time algorithm, which finds a schedule with a makespan of at most (2 + 1 ) T and a cost of at most (1 +  )C . This result was improved by Shmoys and Tardos [21], who proposed a polynomial time algorithm, which finds a solution with a makespan value of at most 2T and with a cost of at most C . It is worthwhile pointing out that the algorithm in Shmoys and Tardos [21] could  imply a 2-approximation algorithm for the problem P | J j ∈R e j ≤ B |C max . However, their algorithm may not be strongly polynomial, as it requires the solution of a linear programming formulation. One of objectives of this paper is devoted to  providing a strongly polynomial 2-approximation algorithm for the problem P | J j ∈R e j ≤ B |C max in Section 2. Based on our 2-approximation algorithm, we also design a polynomial time approximation scheme (PTAS), which finds a solution of  makespan at most (1 +  )OPT for P | J j ∈R e j ≤ B |C max in Section 3. When the number of machines m is a constant, we present a fully polynomial time approximation scheme (FP TAS) with running time of O (1/ 2m+3 + mn2 ) for P m | J j ∈R e j ≤ B |C max in Section 3. As aforementioned, the problem Pm|



J j ∈R e j

≤ B |C max has a strong connection with some bicriteria problems on unrelated parallel machines. Some results  J j ∈R e j ≤ B |C max too. For instance, Jansen and

from these bicriteria problems may lead to FPTAS for the problem P m |

Porkolab [12] designed a FPTAS for the scheduling on unrelated parallel machines. The FPTAS computes a schedule in time O (n(m/ ) O (m) ) with makespan of at most (1 +  ) T and cost of at most (1 +  )C , provided there exists a schedule with makespan of T and cost of C . This approximation ratio was improved by Angel et al. [2], who proposed a FPTAS, that finds a schedule with makespan of at most (1 +  ) T and cost of at most C , if there exists a schedule with makespan of T and cost of C , for the unrelated parallel machines scheduling problem with costs. However, the running time of the FPTAS in Angel et al. [2] is O (n(n/ )m ), which is higher than that in Jansen and Porkolab [12]. As a consequence, the algorithm in  Angel et al. [2] could imply a FPTAS for the problem P m | J j ∈R e j ≤ B |C max . Recently, Zhang et al. [24] has presented a FPTAS with running time of O (nm+2 / m ) for the problem P m |



J j ∈R e j

≤ B |C max . In the case where the number of jobs is

1

relatively large, say n >  , which is a reasonable size of jobs in most of the practical cases, our FPTAS has a better running time of O (1/ 2m+3 + mn2 ). Recently, some variants of the parallel machine scheduling problem with rejection have received considerable attention. Engels et al. [7] studied the objective of minimizing the sum of the weighted completion times of the accepted jobs plus the sum of the penalties of the rejected jobs. The preemptive cases are considered by Hoogeveen et al. [10] and Seiden [18]. The batch cases are studied by Cao and Yang [4] and Lu et al. [15–17]. Cao and Zhang [5] presented a PTAS for scheduling with rejection and job release times, which generalized the result in Bartal et al. [3]. For the single-machine scheduling with rejection, Cheng and Sun [6] designed some FPTAS for the case where the size of a job is a linear function of its starting time under different objectives. Zhang et al. [22] considered the single machine scheduling problem with release dates and rejection. The same authors [23] also considered the problems of minimizing some classic objectives under the job rejection constraint. Shabtay et al. [19] presented a bicriteria approach to scheduling on a single machine with job rejection. More related results can be found in the recent survey in Shabtay et al. [20].  We would like to make a remark that the problem P | J j ∈R e j ≤ B |C max we considered in this paper is closely related to the parallel machine scheduling problem with rejection introduced by Bartal et al. [3], in which the given are m identical parallel machines and a set of n jobs with each job J j characterized by a size p j and a penalty e j , and the objective is to minimize the makespan of the schedule for accepted jobs plus the sum of the penalties of the rejected jobs. Bartal et al. [3] presented a PTAS for the general case and a FPTAS for the case where the number of machines is fixed. Unfortunately, their method can not be generalized to our problem directly, as it may violate the job rejection constraint. The rest of the paper is organized as follows. In Section 2 we design a strongly polynomial 2-approximation algorithm for  the problem P | J j ∈R e j ≤ B |C max and we show that the factor analysis of our algorithm is best possible by providing tight

 e ≤ B |C max .  J j ∈R j As a consequence, Section 3 contains a fully polynomial time approximation scheme (FPTAS) for P m | J j ∈R e j ≤ B |C max . examples. Section 3 is devoted to presenting a polynomial time approximation scheme (PTAS) for P | Finally, Section 4 contains the concluding remarks.

W. Li et al. / Theoretical Computer Science 607 (2015) 181–192

2. A strongly polynomial time approximation algorithm for the problem P |

P|



J j ∈R e j

183

≤ B |C max

As mentioned in the last section, we can derive a 2-approximation algorithm from Shmoys and Tardos [21] for  J j ∈R e j ≤ B |C max . However, this kind of approximation algorithm may not be strongly polynomial as it requires the

solution of a linear programming formulation and this is well-known that there is no strongly polynomial algorithm for solving linear programming so far. So it would be desirable to have strongly polynomial 2-approximation algorithms for the problem P | J j ∈R e j ≤ B |C max . In this section, we shall provide such one algorithm (Algorithm 2).

Let us introduce some notations and terminology before proceeding. An instance I = (M, J , p , e , B ) of the problem  J j ∈R e j ≤ B |C max consists of a number of machines M with |M| = m, a set of jobs J with |J | = n, a nonnegative pair ( p j , e j ) for each job J j ∈ J where p j is the processing time (or size) of J j and e j is the penalty of  J j , and a given bound B. For a set of jobs X ⊆ J , p ( X ) = J j ∈ X p j is the total processing time of jobs in X , and e ( X ) = J j ∈ X e j is the total penalty of jobs in X . We call ( S 1 , S 2 , . . . , S m ; R ), where S i and R are all subsets of J , a schedule for I if the followings P|

hold: S ∪ R = J ; and (i) ∪m i =1 i (ii) S i ∩ S j = ∅, for distinct i , j ∈ {1, 2, . . . , m} and S k ∩ R = ∅ for each k ∈ {1, 2 . . . , m} We further call a schedule ( S 1 , S 2 , . . . , S m ; R ) feasible if e ( R ) ≤ B. Obviously, for i ∈ {1, . . . , m}, S i stands for the set of jobs that have to be processed on machine M i , and R stands for the set of rejected jobs in a feasible schedule ( S 1 , S 2 , . . . , S m ; R ). For 1 ≤ i ≤ m, the completion time C i of machine M i in some fixed schedule equals the total processing time of the jobs that are assigned to M i , and the makespan of the schedule equals max1≤i ≤m {C i }. We call schedule ( S 1 , S 2 , . . . , S m ; R ) optimal if the schedule is feasible and the makespan of the schedule attains the minimum. As usual, when we say OPT is the optimal value for instance I , we mean that there is an optimal schedule for instance I and OPT equals the makespan of this schedule. Note that we allow OPT = +∞ in the case that there is no feasible schedule for instance I . ∗ ; R ∗ ) and assume that we know the maximum size p Now let’s consider an optimal schedule ( S 1∗ , S 2∗ , . . . , S m max of the ∗ }. To motivate the construction of a 2-approximation accepted jobs in the schedule, where p max = max{ p j | J j ∈ ∪m S i =1 i algorithm for the problem, we may have a simple idea that is to reject all jobs with size bigger than p max and other some jobs, if any, as long as the total penalty of the rejected jobs is no more than the given bound B, and then greedily allocate the remaining jobs as LS algorithm does. Fortunately, this simple idea can indeed lead to a 2-approximation algorithm for the problem. Motivated by this, we actually do not need the prior knowledge about the maximum size p max of the accepted jobs in an optimal schedule, as we can try at most n possibilities to meet our purpose of designing a 2-approximation algorithm.  Let us be more precise. Given an instance I = (M, J , p , e , B ) for P | J j ∈R e j ≤ B |C max , reindex, if there is a need, the jobs in J such that p 1 /e 1 ≤ p 2 /e 2 ≤ · · · ≤ pn /en . Note that we assume that e j > 0 for all jobs J j ∈ J throughout the paper, as nfor otherwise, the jobs with penalty of 0 can be all rejected without reducing the given bound. Also we assume that j =1 e j > B, as for otherwise, all jobs should be rejected and OPT = 0, where OPT denotes the optimal value for instance I . It is worth pointing out that any subset  ⊆ J enjoys a nice property under our sorting, i.e.,

pi ei



pj ej

if

i≤ j

(1)

for all jobs J i , J j in . This property shall be used in the proof for the following Lemma 1. For each index k ∈ {1, 2, . . . , n}, consider the following restricted instance Ik = (M, Jk , p , e , B k ) of I :

• • • •

The The The The

number of machines remains the same as in instance I . job set Jk consists of jobs in J with processing time no more than pk , i.e., Jk = { J j ∈ J | p j ≤ pk }. processing time (or size) p j and penalty the same as in instance I . e j of job J j in Jk remain  bound B k of instance Ik is reduced by J j ∈J \Jk e j , i.e., B k = B − J j ∈J \Jk e j .

Let OPT k be the optimal value for instance Ik . If B k < 0, set OPT k = +∞, reflecting the fact that there is no feasible schedule for instance Ik . Otherwise, use the following Algorithm 1 to obtain a feasible schedule for Ik . Algorithm 1. Step 1. Find the maximum index





τk satisfying j≥τk ; J j ∈Jk e j > B k , which implies that j>τk ; J j ∈Jk e j ≤ B k , and reject the jobs in Jk with index bigger than τk . Let Rk = { J j | j > τk , J j ∈ Jk } denote the set of all rejected jobs; Step 2. As in LS algorithm, we repeatedly assign the next job in Jk \ Rk to a machine with currently smallest load. Let F k denote the feasible schedule produced and OUT k the makespan of F k .

Lemma 1. The value of OUT k produced by Algorithm 1 is no more than 2OPT k .

184

W. Li et al. / Theoretical Computer Science 607 (2015) 181–192

Proof. Let Rk∗ be the set of rejected jobs in an optimal schedule for instance Ik . Then, we have e (Rk∗ ) ≤ B k . Since e (Rk ∪ { J τk }) > B k by the definitions of Rk and the choice of { J τk }, we claim that

p (Rk ∪ { J τk }) ≥ p (Rk∗ )

(2)

Indeed, Rk∗ can be viewed as a union of two disjoint sets, i.e., Rk∗ = L Rk∗ ∪ R Rk∗ , where L Rk∗ = { J j ∈ Rk∗ | j < τk } and





R Rk∗ = { J j ∈ Rk∗ | j ≥ τk }, such that L Rk∗ ∩ R Rk∗ = ∅. Obviously, R Rk∗ is the intersection of Rk∗ and Rk ∪ { J τk } , i.e., R Rk∗ =   Rk∗ ∩ Rk ∪ { J τk } . Similarly, we can also view Rk ∪ { J τk } as a union of two disjoint sets, i.e., Rk ∪ { J τk } = R Rk ∪ R Rk∗ , where R Rk = Rk ∪ { J τk } − R Rk∗ , such that R Rk ∩ R Rk∗ = ∅. Note that j ≥ τk for any J j ∈ R Rk . Since e (Rk ∪ { J τk }) > B k ≥ e (Rk∗ ), it follows that e ( R Rk ) > e ( L Rk∗ ). Hence, by the property of any job subset under our sorting (Recall property (1)), we have that

p ( R Rk ) =



pj =

J j ∈ R Rk

≥ e ( R Rk ) · > e ( L Rk∗ ) · ≥ p ( L Rk∗ )

 J j ∈ R Rk

ej ·

pj ej

p τk e τk p τk e τk

Therefore, p (Rk ∪ { J τk }) = p ( R Rk ) + p ( R Rk∗ ) ≥ p ( L Rk∗ ) + p ( R Rk∗ ) = p (Rk∗ ), which justifies (2). Let start j be the time at which job J j starts execution on M i for some i. Let J τ be the last job completed in Algorithm 1 k for instance Ik . Note that J τk is the last job allocated to machines in Algorithm 1 for instance Ik . Thus, we have

OUT k = startτ + p τ k

k

≤ startτk + pk p (Jk ) − p (Rk ) − p τk ≤ + pk ≤

m p (Jk ) − p (Rk∗ )

≤ 2OPT k .

m

+ pk

Here, the first inequality follows from the fact that start τ ≤ startτk and p τ ≤ pk , the second inequality follows from the k k observation that the average load of the assigned jobs before J τk is an upper bound of startτk , the third inequality follows from inequality (2), and the last inequality follows from the fact that the average load and the maximum size of the accepted jobs are the lower bounds of OPT k . 2 Now, Algorithm 2 could be presented as follows. Algorithm 2. Step 1. For each k = 1, 2, · · · , n, construct the restricted instance Ik = (M, Jk , p , e , B k ) of I . Use Algorithm 1 as a subroutine to get a feasible solution F k with objective value OUT k for each Ik . Step 2. Choose the solution F with minimum objective value OUT among { F 1 , . . . , F n }. To facilitate better understanding of Algorithm 2, we demonstrate an example below. Example 1. We are given an instance I for P |



J j ∈R e j

penalties of jobs are given in the following table, where Jobs pj ej

≤ B |C max with two machines, four jobs and B = 3. The sizes and

 denotes a small positive number.

J1 3 3

J2 3 3

J3 3 3

J4 2



In this example, we construct four auxiliary instances. The first auxiliary instance is I1 = (M, J1 ; p , e , B 1 ), where J1 = { J 1 , J 2 , J 3 , J 4 } and B 1 = 3. Obviously, τ1 = 3 and R1 = { J j | j > 3, j ∈ J1 } = { J 4 }, which implies that we have to assign the jobs in J1 \ R1 = { J 1 , J 2 , J 3 } to two machines. Hence, OUT 1 = 6. Similarly, we have OUT 2 = OUT 3 = 6. The last auxiliary instance is I4 = (M, J4 , p , e , B 4 ), where J4 = { J 4 } and B 4 = −6. It implies that OPT 4 = +∞. Hence, by Algorithm 2, the best solution is OUT 1 = 6, i.e. OUT = 6. Theorem 1. The Algorithm 2 is a strongly polynomial time 2-approximation algorithm for the problem P | the ratio is tight.



J j ∈R e j

≤ B |C max , and

W. Li et al. / Theoretical Computer Science 607 (2015) 181–192

185

Proof. By Lemma 1 and the definition of OUT, we have OUT = min{OUT k |k = 1, 2, . . . , n} ≤ 2 min{OPT k |k = 1, 2, . . . , n}. Clearly, OPT = min{OPT k |k = 1 , 2, . . . , n}. Thus, OUT ≤ 2OPT. This shows that the Algorithm 2 is indeed a 2-approximation algorithm for the problem P | J j ∈R e j ≤ B |C max . Clearly, the running time of the Algorithm 2 is O (mn2 ), where m is the number of machines and n is the number of jobs. In Example 1, we have shown that OUT = 6, and it is easy to see that an optimal schedule, with J 1 being rejected, gives that OPT = 3 + 2 . Since lim →0 3+62 = 2, the ratio is tight (for general tight example, see Example 2), completing the proof. 2 Example 2. Consider a tight instance I for P |



J j ∈R e j

≤ B |C max with m machines, m + 2 jobs and B = M ∗ , where M ∗ is a

positive integer. The sizes and penalties of jobs are given in the following table, where Jobs pj ej

J1 M∗ M∗

··· ··· ···

Jm M∗ M∗

J m+1 M∗ M∗

 denotes a small positive number.

J m+2 2



When run on Example 2, Algorithm 2 will give that OUT = 2M ∗ , while an optimal schedule, with J 1 being rejected, gives that OPT = M ∗ + 2 . 3. Approximation schemes In this section, based on the Algorithm 2 in the last section, we are devoted to presenting a PTAS whose running time is O (nm

O(

1

2

)

) for the problem P |



≤ B |C max . Our construction of the PTAS here essentially exploits two facts. J j ∈R e j ≤ B |C max can be transformed into a so-called the corresponding instance,

J j ∈R e j

Firstly, any instance of the problem P |



which has a nice structure and which can be solved to optimality in polynomial time. Secondly, the optimal values of the corresponding instance and the original one enjoy a good property that they are almost equivalent in the sense that the difference of the optimal values of the corresponding instance and the original one can be bounded by the parameters we choose, and hence any algorithm that can solve the corresponding instance to the optimality can be used to construct a desired solution for the original instance. When the number of  machines is fixed, we can solve the corresponding instance even more efficient, and therefore a FPTAS for the problem P m | J j ∈R e j ≤ B |C max can be obtained. 3.1. The corresponding instance In this subsection, we focus on the  construction of the auxiliary instance, the corresponding instance, from any instance J j ∈R e j ≤ B |C max . Our construction is motivated by the work of Alon et al. [1], yet

I = (J , M, p , e , B ) for the problem P |

the difficult part in the construction is to assign appropriate penalties for jobs in the new instance so that the new instance can be solved in polynomial time. Recall that based on what we have developed in Section 2, the Algorithm 2 produces a feasible schedule F with the makespan OUT for instance I . For convenience, let L denote OUT. It is clear from the construction of the algorithm that OPT ≤ L ≤ 2OPT, or equivalently, L /2 ≤ OPT ≤ L, where, as before, OPT denotes the optimal value for instance I . Since L is an upper bound for sizes of all accepted jobs in any optimal schedule for instance I , it follows that we can reject jobs with sizes greater than L and reduce the upper bound B accordingly without loss of generality. Hence, from now on we may assume that p j ≤ L , j = 1, 2, . . . , n, for instance I = (J , M, p , e , B ). Let δ be a small positive number such that 1/δ is an integer. For convenience, the jobs in instance I with sizes > δ L will be called large jobs, and jobs with sizes ≤ δ L will be called small jobs. Let l = 1δ−δ 2 . It should be clear that l is an integer.

We partition the jobs in J into l large job subsets Lk = { J j |(δ + (k − 1)δ 2 ) L < p j ≤ (δ + kδ 2 ) L }, k = 1, 2, . . . , l, and one small job subset S = { J j | p j ≤ δ L }. Sort the jobs in Lk = { J 1k , J 2k , . . . , J |kL | } such that e ( J 1k ) ≥ e ( J 2k ) ≥ · · · ≥ e ( J |kL | ) for each k

k

k ∈ {1, 2, . . . , l}. Sort the jobs in S = { J 1S , J 2S , . . . , J |SS | } such that e ( J 1S )/ p ( J 1S ) ≥ e ( J 2S )/ p ( J 2S ) ≥ · · · ≥ e ( J |SS | )/ p ( J |SS | ). Let ss = p (S ) =



J j ∈S

p j denote the total size of the jobs in S . The corresponding instance Iˆ δ = (Jˆ , M, pˆ , eˆ , B ) with respect

to δ is defined as follows:

• For every large job J j in I with J j ∈ Lk , instance Iˆ δ contains a corresponding job ˆJ j ∈ Lˆ k whose processing time pˆ j equals (δ + kδ 2 ) L for k = 1, 2, . . . , l, and whose penalty eˆ j remains the same, i.e., eˆ j = e j . • For the small job set S , instance Iˆ δ contains a corresponding small job set Sˆ , where the small job set Sˆ consists of  δssL  new jobs, each of size δ L, i.e., Sˆ = { ˆJ 1S , ˆJ 2S , . . . , ˆJ Sss  } with pˆ ( ˆJ Sj ) = δ L, for j = 1, . . . ,  δssL . By the construction, it δL

is not difficult to see that |Sˆ | ≤ |S | + 1. Now, we have to assign the penalty for each job in Sˆ . The penalty of job ˆJ 1S satisfies

186

W. Li et al. / Theoretical Computer Science 607 (2015) 181–192

eˆ ( ˆJ 1S ) =

t 1 −1



S

e( J k ) +

δL −

t1 −1 k =1

p ( J kS )

p ( J tS1 )

k =1

where t 1 is the minimum integer satisfying

eˆ ( ˆJ S ) =

t j −1



j

S

e( J k ) +

jδ L −

t j −1 k =1

p ( J tSj )

k =1

t1

j =1

p ( J kS )

where t j is the minimum integer such that

|S | 

S

e( J k ) −

 δssL −1



p( J S ) ≥ δ L. The penalty of job ˆJ Sj satisfies j

e ( J tSj ) −

t j

satisfies

eˆ ( ˆJ Sss  ) = δL

e ( J tS1 ),

j =1

j −1 

eˆ ( ˆJ qS ),

q =1

p( J S ) ≥ j δ L, for j = 2, 3, . . . ,  δssL  − 1. The penalty of job ˆJ Sss  j δL

eˆ ( ˆJ qS ).

q =1

k =1

Clearly, eˆ (Sˆ ) = e (S ) and eˆ ( ˆJ 1S ) ≥ eˆ ( ˆJ 2S ) ≥ · · · ≥ eˆ ( ˆJ Sss  ), as e ( J 1S )/ p ( J 1S ) ≥ e ( J 2S )/ p ( J 2S ) ≥ · · · ≥ e ( J |SS | )/ p ( J |SS | ). δL

• The machine set is M. • The upper bound is B.

Now we are going to make connections between optimal schedules for Iˆ and (l + 1)-dimensional vectors, so that we can ∗ ; R ∗ ) for I ˆδ handle these schedules even more efficiently and mathematically. Consider an optimal schedule ( Sˆ 1∗ , Sˆ 2∗ , . . . , Sˆ m and let v k denote the number of accepted jobs with size (δ + kδ 2 ) L in the schedule, for k = 0, 1, · · · , l. It is easy to see that ∗ ; R ∗ ). there is a unique (l + 1)-dimensional vector v = ( v 0 , v 1 , · · · , v l ) associated with each optimal schedule ( Sˆ 1∗ , Sˆ 2∗ , . . . , Sˆ m

l

2 Let T denote pˆ (∪m Sˆ ∗ ), the total size of the accepted jobs in the schedule. Clearly, k=0 v k (δ + kδ ) L = T . i =1 i On the other hand, for a given (l + 1)-dimensional vector v = ( v 0 , v 1 , · · · , v l ), there may have several optimal schedules for Iˆ δ such that the vector v = ( v 0 , v 1 , · · · , v l ) is the unique vector associated with them. However, due to the “nice” structure of instance Iˆ in which each job has size (δ + kδ 2 ) L for some k ∈ {0, 1 . . . , l}, if we get two ways to partition Jˆ into ˆ and Rˆ such that Aˆ containing v 0 jobs in Sˆ as well as v k jobs in Lˆk for all k and eˆ ( Rˆ ) ≤ B, then either way is two sets A fine as each way leads to an optimal schedule with the same makespan. So using this kind of vectors to represent optimal schedules that have the same makespan should be appropriate. In other words, if we consider all possible vectors, then no ˆ optimal  schedule will be missed. Moreover, it is obviously that scheduling the job set J on m machines for the problem P | J j ∈R e j ≤ B |C max such that the vector v = ( v 0 , v 1 , · · · , v l ) is the unique vector associated with an optimal schedule of

Iˆ for problem P | problem P  C max .



J j ∈R e j

≤ B |C max is equivalent to scheduling the job set Aˆ on m machines to the optimality for the

Now, let us focus on vectors and make some observations. We call a vector v = ( v 0 , v 1 , · · · , v l ) is feasible if Jˆ admits a ˆ , Rˆ ) such that the followings hold: partition ( A (i) (ii) (iii)

ˆ ∪ Rˆ = Jˆ and Aˆ ∩ Rˆ = ∅; A ˆ contains v 0 jobs in Sˆ and v k jobs in Lˆk , for k = 1, 2, . . . , l; and A eˆ ( Rˆ ) ≤ B.

ˆ ˆ ˆk ˆk ˆk For a given vector v = ( v 0 , v 1 , · · · , v l ), consider jobs ˆJ 1S , ˆJ 2S , · · ·, ˆJ S v 0 ∈ S and J 1 , J 2 , · · · , J v k ∈ Lk , for k = 1, 2, · · · , l. We claim that l  v k ˆ ˆk (1) the vector v = ( v 0 , v 1 , · · · , v l ) is feasible, if and only if, v 0 ≤ |Sˆ |, v k ≤ |Lˆ k | for all k, and k=1 j =1 e ( J j ) +

v 0

j =1

eˆ ( ˆJ S ) ≥ eˆ (Jˆ ) − B. j

ˆ , Rˆ ) be a partition of Jˆ with (i), (ii), The “if” part is obvious. It suffices to show the “only if” part. To this end, let ( A ˆ ˆ ˆ) ≥ and (iii) satisfied at the same time. (i) and (ii) imply that v 0 ≤ |S | and v k ≤ |Lk | for all k. By (iii), we have that eˆ ( A eˆ (Jˆ ) − B. Recall that the jobs in Lˆ k = { J 1k , J 2k , . . . , J |kL | } satisfy eˆ ( J 1k ) ≥ eˆ ( J 2k ) ≥ · · · ≥ eˆ ( J |kL | ), and the jobs in Sˆ satisfy eˆ ( ˆJ 1S ) ≥ eˆ ( ˆJ 2S ) ≥ · · · ≥ eˆ ( ˆJ Sss  ). Hence, we have that δL

l k  v k k=1

eˆ ( ˆJ kj ) + j =1

v 0

k

eˆ ( ˆJ S ) ≥ eˆ ( Aˆ ) ≥ eˆ (Jˆ ) − B. This justifies (1). j =1 j

∗ ; R ∗ ), we claim that When it comes to T , the total size of the accepted jobs in an optimal schedule ( Sˆ 1∗ , Sˆ 2∗ , . . . , Sˆ m

(2) δ L ≤ T ≤ m(1 + 2δ) L and T = (δ + k δ 2 ) L for some k ∈ {0, 1, . . . , m(1+δ22δ)−δ }.

Indeed, let ( Sˆ 1 , Sˆ 2 , . . . , Sˆ m ; Rˆ ) be an arbitrary feasible schedule for Iˆ δ and let t be the index value of machine that attains the makespan of the schedule. Therefore we have pˆ ( Sˆ ∗i ) ≤ pˆ ( Sˆ t ) for all i. On the other hand, we can show that there

is a feasible schedule such that pˆ ( Sˆ i ) ≤ (1 + 2δ) L for all i (the proof of this is postponed in the proof of Lemma 2 in the next subsection), which implies that pˆ ( Sˆ ∗i ) ≤ (1 + 2δ) L for all i and hence that T ≤ m(1 + 2δ) L. So δ L ≤ T ≤ m(1 + 2δ) L

as the size of each job in Iˆ δ is no less than δ L. In view of the construction of Iˆ δ in which the sizes of any two jobs

W. Li et al. / Theoretical Computer Science 607 (2015) 181–192

differ a multiple of δ 2 L, we actually can write T =

{0, 1, . . . ,

m(1 + 2δ) − δ

δ2

187

l

2 2 k=0 v k (δ + kδ ) L = (δ + k δ ) L, where k =

l

k=0

vk − 1

δ

+

l 

kvk ∈

k=0

}, justifying (2).

Now, we can state our main result in this subsection as follows. Theorem 2. There exists an optimal algorithm with a running time of O (nm

O(

1

δ2

)

) for Iˆ δ of P |



J j ∈R e j

≤ B |C max .

Proof. We will show the existence of such an algorithm by a method of exhaustion in the sense that we will correctly solve



1

O( ) any given instance Iˆ δ of P | J j ∈R e j ≤ B |C max in polynomial time O (nm δ2 ) by trying all the possibilities. Our proof here relies heavily on the work of Alon et al. [1]. For any small positive number δ with 1δ being integer, we construct the corresponding instance Iˆ δ = (Jˆ , M, pˆ , eˆ , B ) with respect to δ as we described earlier. Let T be the total size of the accepted jobs in the optimal solution. For any l T ∈ {(δ + kδ 2 ) L |k = 0, 1, · · · , m(1+δ22δ)−δ }, let V T = {v = ( v 0 , v 1 , · · · , v l )| k=0 v k (δ + kδ 2 ) L = T and v is feasible} be the set of

all possible feasible vectors whose total size of the accepted jobs is exactly T . Clearly, |V T | = O (( δT2 L + 1 + l)l ) = O (( 1

1 δ2

1 δ2

m(1+2δ)

δ2

+

1 + δ 2 ) ) = O (m ), as δ is a constant. For any v = ( v 0 , v 1 , · · · , v l ) ∈ V T , we construct an instance Iˆ v for the classical parallel machine scheduling problem P  C max , where Iˆ v contains v 0 small jobs in Sˆ , and v k large jobs in Lˆ k for k = 1, 2, · · · , l, say, Iˆ v contains jobs ˆJ 1S , ˆJ 2S , · · ·,

ˆ ˆ ˆ ˆ ˆJ S ˆk ˆk ˆk v 0 ∈ S and J 1 , J 2 , · · · , J v k ∈ Lk , for k = 1, 2, · · · , l. Denote the set of all jobs in Iv by A v . Now, a theorem of Alon et al. (see Theorem 2.5 in Alon et al. [1] as well as the paper itself for a detailed account) enables us to find an optimal schedule of makespan C v for instance Iˆ v of problem P  C max in time O (n), and definitely the optimal schedule obtained from the ˆ ˆ ˆ method  of Alon et al. together with J \ A v gives us a feasible schedule of the same makespan C v for I of the problem P | J j ∈R e j ≤ B |C max . For a fixed T , try all possible v for T and we will get an optimal schedule corresponding to T whose makespan is C T = minv∈VT C v ; Try all possible values of T and eventually we will get an optimal schedule for Iˆ whose

 = min{C T | T = (δ + kδ 2 ) L , k = 0, 1, · · · , m(1+22δ)−δ }. makespan is OPT δ

It is a routine matter to check that the method described above can be done within O ( time, which is polynomial in the size of input data. 2

m(1+2δ)−δ

δ2

1

· m δ2 · n) = O (nm

O(

1

δ2

)

)

3.2. Corresponding instance versus original instance In this subsection, we study the relationships between the optimal values of the corresponding instance and the original instance. It can be shown that the difference of the optimal values of the corresponding instance and the original one can be bounded by the parameters we choose.

 denote the optimal values for original instance I and the corresponding instance Iˆ δ with respect to δ , Lemma 2. Let OPT and OPT respectively. Then the following holds:

 ≤ OPT + 2δ L ≤ (1 + 2δ) L . OPT ∗ ; R ∗ ) be an optimal schedule for I , where S ∗ denotes the set of jobs processed on machine M , Proof. Let ( S 1∗ , S 2∗ , . . . , S m i i for i = 1, 2, · · · , m, and R ∗ = J \ ∪m S ∗ , the set of rejected jobs. In order to prove the lemma, it suffices to show that a i =1 i

feasible schedule for instance Iˆ δ could be constructed such that the makespan of the schedule is no more than OPT + 2δ L. We construct a schedule ( Sˆ 1 , Sˆ 2 , . . . , Sˆ m ; Rˆ ) for the corresponding instance Iˆ δ as follows, where Sˆ i denotes the set of jobs processed on machine M i , for i = 1, 2, · · · , m, and Rˆ the set of rejected jobs.

• The machine M i processes the first available | S ∗i ∩ Lk | jobs in the list Lˆk , for k = 1, . . . , l. By first available, we mean that unallocated jobs will be allocated to the current machine M i according to their order in the list Lˆ k . Let Qˆ ik denote l the set of these | S ∗i ∩ Lk | processed jobs. So the set of large jobs processed on machine M i is k=1 Qˆ ik . • The machine M i processes sˆ i jobs in Sˆ such that  p (S ∩ S ∗i )  p (S ∩ S ∗i ) (a) sˆ i ∈ { , − 1}; δL δL m ˆ ˆ i ≤ |S | ; (b) i =1 s m ˆ i is as large as possible. (c) subject to (a) and (b), i =1 s  ˆ i denote the set of these sˆ i jobs in Sˆ and let w = m ˆ i . It should be clear that the set of small jobs processed Let W i =1 s ˆ i | = sˆ i . ˆ i with | W on machine M i is W

188

W. Li et al. / Theoretical Computer Science 607 (2015) 181–192

Remark. In view of Lk = { J 1k , J 2k , . . . , J |kL | } with e ( J 1k ) ≥ e ( J 2k ) ≥ · · · ≥ e ( J |kL | ), our construction for Lˆ k , and the choice we k k made, we actually choose (fixed number) jobs with total penalty as large as possible in the same list Lˆk . From the construction above, it is easy to see that we have (1)–(4). l ˆ i , for i = 1, 2, . . . , m. (1) Sˆ i = ( k=1 Qˆ ik ) ∪ W

(2) The total number of large jobs in Lˆk processed on machines M 1 , . . . , M m is m 

| Qˆ ik | =

i =1

m 

| S ∗i ∩ Lk | = |

i =1

m

Si∗ ∩ Lk |.

i =1

(3) The total number of large jobs in l 

| Qˆ ik | =

k =1

l 

| S ∗i ∩ Lk | = |Si∗ ∩

k =1

l

ˆ processed on each single machine M i is

k=1 Lk

l

Lk |.

k =1

(4) The total number of large jobs processed on machines is therefore m l  

| S ∗i ∩ Lk | =

k =1 i =1

l m  

| S ∗i ∩ Lk |.

i =1 k =1

Further more, we have (5) There exists an allocation satisfying the requirements of our construction for ( Sˆ 1 , Sˆ 2 , . . . , Sˆ m ; Rˆ ). It remains to show that we can choose sˆ i small jobs in Sˆ such that (a), (b) and (c) of the second part in our construction are satisfied. Indeed, by definition, it is easy to see that m   p (S ∩ S ∗ ) i

δL

i =1

−1

m  p (S ∩ S ∗i ) δL i =1 m p (S ∩ i =1 S ∗i ) = δL p (S ) ≤ δL  p (S ) ≤ = |Sˆ|. δL



This justifies (5), as we can first choose sˆ i to be the smaller one for all i to attain (a) and (b) at the same time in the construction, and then subject to (a) and (b) we update some sˆ i ’s to be the larger one to attain the maximal. (6) ( Sˆ 1 , Sˆ 2 , . . . , Sˆ m ; Rˆ ) is a feasible schedule for Iˆ δ . To justify (6), in view of the remark of our choice for Qˆ ik , we first notice that m

eˆ (

Sˆ i ) =

i =1

m l  

 ˆ i) eˆ ( Qˆ ik ) + eˆ ( W i =1

=

k =1

m 

l 

(

eˆ ( Qˆ ik )) +

i =1 k =1



l m  

m 

ˆ i) eˆ ( W

i =1

e ( S ∗i ∩ Lk ) + e (S ∩

i =1 k =1

m

S ∗i )

i =1

m

= e ( S ∗i ), i =1

implying that the total penalties of accepted jobs in our constructed schedule for the corresponding instance Iˆ δ is no more than that in optimal schedule for the original instance I . Secondly, in view of the construction for Jˆ with eˆ (Jˆ ) = e (J ), it is easy for us to notice that m

eˆ ( Rˆ ) = eˆ (Jˆ ) − eˆ (

i =1

m

Sˆ i ) ≤ e (J ) − e (

i =1

implying that ( Sˆ 1 , Sˆ 2 , . . . , Sˆ m ; Rˆ ) is feasible.

S ∗i ) = e ( R ∗ ) ≤ B ,

W. Li et al. / Theoretical Computer Science 607 (2015) 181–192

189

(7) For each index i ∈ {1, 2, . . . , m}, the load of machine M i satisfies pˆ ( Sˆ i ) ≤ OPT + 2δ L. Actually, it is not difficult to see that

pˆ ( Sˆ i ) = pˆ (

l

ˆ i) Qˆ ik ) + pˆ ( W

k =1

=

l 

| Qˆ ik |(δ + kδ 2 ) L + sˆi δ L

k =1



l 

| Qˆ ik |(δ + kδ 2 ) L + p (S ∩ S ∗i ) + δ L

k =1

=

l 

| S ∗i ∩ Lk |(δ + (k − 1)δ 2 ) L +

k =1



l 

l 

| S ∗i ∩ Lk |δ 2 L + p (S ∩ S ∗i ) + δ L

k =1

p ( S ∗i ∩ Lk ) + δ L + p (S ∩ S ∗i ) + δ L

k =1

= p ( S ∗i ∩

l

Lk ) + p (S ∩ S ∗i ) + 2δ L

k =1

= p ( S ∗i ) + 2δ L ≤ OPT + 2δ L , where all the equalities follow from simple transformations by definitions and the first inequality follows by noting that p (S ∩ S ∗i ) ∗ δ L  δ L ≤ p (S ∩ S i ) + δ L, the second inequality follows from the fact that l ∗ p ( S i ∩ k=1 Lk ) ≤ OPT ≤ L and the last inequality follows from the definitions

sˆ i δ L =  from

l

∗ ∩L

k=1 | S i

k|

≤ 1/δ , which is derived

of OPT and S ∗i .

Therefore, the makespan of ( Sˆ 1 , Sˆ 2 , . . . , Sˆ m ; Rˆ ) is no more than OPT + 2δ L, which, in turn, is no more than (1 + 2δ) L, completing the proof. 2

 denote the optimal values for original instance I and the corresponding instance Iˆ δ with respect to δ , Lemma 3. Let OPT and OPT respectively. Then the following holds:

 + δ L. OPT ≤ OPT ∗;R ˆ ∗ ) be an optimal solution for Iˆ δ , where Sˆ ∗ denotes the set of jobs processed on machine M i , Proof. Let ( Sˆ 1∗ , Sˆ 2∗ , . . . , Sˆ m i

for i = 1, 2, · · · , m, and Rˆ ∗ = Jˆ \ ∪m Sˆ ∗ , the set of rejected jobs. In order to prove the lemma, it suffices to show that a i =1 i  + δ L. feasible schedule for instance I could be constructed such that the makespan of the schedule is no more than OPT ˆ = ∪m Sˆ ∗ be the set of accepted jobs, sˆ = | Aˆ ∩ Sˆ | the number of accepted small jobs, and qk = | Aˆ ∩ Lˆk | the number Let A i =1 i of accepted large jobs in Lˆk for each k ∈ {1, 2, . . . , l}. Clearly, e ( Rˆ ∗ ) ≤ B. In view of the construction for Sˆ and Lˆ k , in which jobs are sorted in nonincreasing oder according to penalties, we can assume that (1) the first sˆ jobs in Sˆ are accepted as well as the first qk jobs in Lˆ k are accepted for k = 1, 2, . . . , l. In fact, if some small (or large) job with index bigger than sˆ (or qk ) is accepted, then there is a small (or large) job with index less than sˆ (or qk ) in the same list is rejected. Swapping these two jobs results in a feasible schedule with the same makespan, which justifies (1). We construct a schedule ( S 1 , S 2 , . . . , S m ; R ) for instance I as follows, where S i denotes the set of jobs processed on machine M i , for i = 1, 2, · · · , m, and R the set of rejected jobs.

• The machine M i processes the first available | Sˆ ∗i ∩ Lˆk | jobs in the list Lk , for k = 1, 2, . . . , l. Let Q ik denote the set of these | Sˆ ∗i ∩ Lˆ k | processed jobs. So the set of large jobs processed on machine M i is ∪lk=1 Q ik . Note that | ∪m Q ik | = i =1 m | Q | = q . k ik i =1 • The machine M i processes si small jobs in S such that (a) p ( W i ) ≤ (ˆsi + 1)δ L, where W i denotes the set of these si small jobs in S , and sˆ i = | Sˆ ∗i ∩ Sˆ |, the number of small ∗;R ˆ ∗ ); jobs processed on M i in the optimal schedule ( Sˆ 1∗ , Sˆ 2∗ , . . . , Sˆ m m s S S S S ˆ δ L. (b) i =1 W i = { J 1 , J 2 , . . . , J s }, where s is the smallest number satisfying j =1 p ( J j ) ≥ s

190

W. Li et al. / Theoretical Computer Science 607 (2015) 181–192

Note that the second part in the above construction about small jobs is equivalent to saying that there exists a partition

( W 1 , W 2 , . . . , W m ) of { J 1S , J 2S , . . . , J sS } such that p ( W i ) ≤ (ˆsi + 1)δ L, for each i ∈ {1, 2, . . . , m}. By the definitions of s, sˆ and sˆ i , for i = 1, 2, . . . , m, we claim that (2) there indeed exists such an allocation, i.e., the set { J 1S , J 2S , . . . , J sS } can be partitioned into m subsets ( W 1 , W 2 , . . . , m W m ) such that i =1 W i = { J 1S , J 2S , . . . , J sS }, W i ∩ W j = ∅ for i , j in {1, 2 . . . , s}, and p ( W i ) ≤ (ˆsi + 1)δ L, for all i. ) of { J S , J S , . . . , J S } gives that p ( W ) > (ˆs + 1)δ L for some Suppose the contrary: Any partition ( W 1 , W 2 , . . . , W m k s 1 2 k k ∈ {1, 2, . . . , s}. Let ( W 1 , W 2 , . . . , W m ) be a partition of { J 1S , J 2S , . . . , J sS } with max p ( W i ) is minimized. Let k be such an i

index that p ( W k ) attains the maximum and let Max = p ( W k ). Then p ( W k ) > (ˆsk + 1)δ L by the hypothesis. Since (ˆs + 1)δ L > m ˆ δ L by the definition of s, it follows that there is a k such that p ( W k ) < sˆk δ L. Otherwise, p ( W i ) ≥ sˆ i δ L for i =1 p ( W i ) ≥ s m all i ∈ {1, 2, . . . , s} with i = k; together with the hypothesis that p ( W k ) > (ˆsk + 1)δ L, we have s + 1)δ L, i =1 p ( W i ) > (ˆ a contradiction. Now let J k ∈ W k . Set W k = W k \ { J k } and W k = W k ∪ { J k }. By this operation, we get a new partition

) of { J S , J S , . . . , J S } with p ( W ) < Max. If there is still an index l with p ( W ) = Max > (ˆs + 1)δ L, then ( W 1 , W 2 , . . . , W m l s 1 2 k l ) of we can find an index l with p ( W l ) < sˆl δ L. Moving a small job in W l to W l results in a new partition ( W 1 , W 2 , . . . , W m S S S S S { J 1 , J 2 , . . . , J s }. Repeat the procedure, if there is a need, to reach a new partition ( W 1 , W 2 , . . . , W m ) of { J 1 , J 2 , . . . , J sS } such that either maxi p ( W i ) ≤ (ˆsi + 1)δ L, where the sˆ i in RHS stands for some appropriate sˆ i , or maxi p ( W i ) < Max, which contradicts the minimality of maxi p ( W i ) of the partition. In either case, we have a contradiction and the contradiction

justifies (2). Now, it is easy to see that (3) ( S 1 , S 2 , . . . , S m ; R ) is a feasible schedule for I . Indeed, let A be the set of accepted jobs in ( S 1 , S 2 , . . . , S m ; R ). Since the jobs in Lk are sorted in nonincreasing order according to penalties, and the jobs in S are sorted in nonincreasing order according to ratios of penalty to size, the total ˆ ). Hence, penalty of the accepted jobs in the solution ( S 1 , S 2 , . . . , S m ) is at least e ( A

ˆ ) = e ( Rˆ ) ≤ B , e ( R ) = e (Jˆ ) − e ( A ) ≤ e (Jˆ ) − e ( A which justifies (3).  + δ L. (4) For each index i ∈ {1, 2, . . . , m}, the load of machine M i satisfies p ( S i ) ≤ OPT Similarly as the argument we made in Lemma 2, we have that

p ( S i ) ≤ pˆ ( Sˆ i ) + δ L

 + δ L, ≤ OPT where the first inequality follows from the easy observations that p ( J kj ) ≤ pˆ ( ˆJ kj ) and the load of machine M i is increased at

 = max pˆ ( Sˆ i ). Thus, the makespan most δ L by substituting the small jobs, and the second inequality follows from that OPT  + δ L. This completes the proof. of ( S 1 , S 2 , . . . , S m ) is no more than OPT 3.3. Approximation schemes: PTAS for P |



J j ∈R e j

i

2

≤ B |C max and FPTAS for P m |



J j ∈R e j

In this subsection, we present an approximation scheme for the problem P |



≤ B |C max

J j ∈R e j

≤ B |C max . By estimating the run-

ning time of our approximation scheme, we draw two conclusions as follows: 1. Our approximation scheme is a PTAS for the problem P |



2. Our approximation scheme is a FPTAS for the problem P m | For a given instance I of P |



J j ∈R e j

J j ∈R 

e j ≤ B |C max ; and

J j ∈R e j

≤ B |C max , where m is a fixed number.

≤ B |C max and a given positive constant  ∈ (0, 1), our approximation scheme performs

the following. Step 1. Set δ ≤  /6 such that 1/δ is a positive integer. Construct the corresponding instance Iˆ δ with respect to δ from the instance I . ∗ ; R ∗ ); Step 2. Solve instance Iˆ δ to optimality; call the resulting schedule ( Sˆ 1∗ , Sˆ 2∗ , . . . , Sˆ m ∗ ; R ∗ ) into a schedule ( S , S , . . . , S ; R ) for the original instance I as deStep 3. Transform schedule ( Sˆ 1∗ , Sˆ 2∗ , . . . , Sˆ m 1 2 m scribed in the proof of Lemma 3.

Theorem 3. There exists a PTAS with O (nm

O(

1

2

)

+ mn2 ) running time for the problem P |



J j ∈R e j

≤ B |C max .

Proof. For any given constant  ∈ (0, 1), we have δ ≤  /6 such that 1/δ is a positive integer. The above mentioned scheme firstly constructs the corresponding instance Iˆ δ with respect to δ , then secondly solves Iˆ δ to the optimality, and finally obtains a feasible schedule ( S 1 , S 2 , . . . , S m ; R ) for instance I . Based on Lemma 2 and Lemma 3, we have that the objective

W. Li et al. / Theoretical Computer Science 607 (2015) 181–192

191

value of ( S 1 , S 2 , . . . , S m ; R ) is at most OPT + 3δ L, which, by the inequality L ≤ 2OPT, is no more than (1 + 6δ)OPT = (1 +  )OPT. When it comes to running time, by Theorem 1 and Lemma 3, it is not difficult to see that we need O (mn2 ) time for computing L, and no more than O (mn2 ) time for constructing the corresponding instance Iˆ δ as well as for transforming an ∗ ; R ∗ ) for I ˆ into a feasible schedule ( S 1 , S 2 , . . . , S m ; R ) for I . Moreover, by Theorem 2 and optimal schedule ( Sˆ 1∗ , Sˆ 2∗ , . . . , Sˆ m 1

1

O( ) O( ) the fact that δ = 6 , the running time for solving the instance Iˆ δ to optimality is O (nm δ2 ), which is also O (nm  2 ).

Thus, the running time of the scheme is equal to O (nm

O(

1

2

)

+ mn2 ), completing the proof. 2

A closer look at the proof above gives us that the running time of the scheme is actually equal to O (mn2 ) plus the running time of any algorithm for solving instance Iˆ δ . So we may restate Theorem 3 into a more general form as the following. Theorem 4. There exists an approximation scheme for instance I , provided that the instance Iˆ δ with respect to certain δ can be solved to optimality. Moreover, the running time of the scheme is equal to the running time of any algorithm for solving instance Iˆ δ plus O (mn2 ) time. In view of Theorem 4, the improvement for the running time of our approximation scheme could be made either if a better algorithm than what we described in the proof of Theorem 2 for solving instance Iˆ δ can be provided, or a somewhat restricted version of instance Iˆ δ is here for us to handle. A good example is that when the number of machines is fixed, the number of jobs in instance Iˆ δ is bounded. Based  on dynamic programming, we are able to design an optimal algorithm for solving instance Iˆ δ from a instance I of P m | J j ∈R e j ≤ B |C max even more efficient.



≤ B |C max and Iˆ δ the corresponding instance from I with respect to some small constant δ ∈ (0, 1). Then there exists an optimal algorithm whose running time is O ( δ 2m1+3 ) for Iˆ δ . Theorem 5. Let I be an instance of P m |

J j ∈R e j

Proof. Note that the sizes of jobs in Iˆ δ are at least δ L. Following from Lemma 2, the number of accepted jobs in the m(1+2δ) L optimal solution for instance Iˆ δ is at most = ( 1δ + 2)m. The set of accepted jobs contains at most ( 1δ + 2)m jobs δL

in Lˆ k and ( 1δ + 2)m jobs in Sˆ . Hence, we construct a new instance Iˆ1 , which consists of small jobs ˆJ 1S , ˆJ 2S , . . . , ˆJ nS in Sˆ , ˆ0 1 1 k k k ˆ ˆ ˆ where nˆ 0 = min{|S |, ( δ + 2)m}, and large jobs ˆJ 1 , ˆJ 2 , · · · , ˆJ nˆ in Lk , where nˆ k = min{|Lk |, ( δ + 2)m}, for k = 1, 2, . . . , l. k

For convenience, we say that instance Iˆ 1 contains nˆ jobs ˆJ 1 , ˆJ 2 , . . . , ˆJ nˆ , where nˆ = nˆ 0 + nˆ 1 + · · · + nˆ l . For each job ˆJ j in 1 Iˆ δ as well as in Iˆ 1 , let pˆ j and eˆ j denote its size and penalty, respectively. Clearly, nˆ ≤ (l + 1)( 1δ + 2)m = ( 1δ−δ 2 + 1)( δ + 2)m = m O ( δ 3 ). We use an m-dimension vector u = (u 1 , . . . , um ) to denote the loads of m machines, where u i denotes the load of machine M i for i ∈ {1, . . . , m}. For a load vector u = (u 1 , . . . , um ), let  j (u) =  j (u 1 , . . . , um ) be the maximized total penalty of the accepted jobs after the first j jobs have been assigned. For the sake of completeness, we present a modified dynamic programming in Horowitz and Sahni [11] to find an optimal solution for instance Iˆ1 . Algorithm 3. Step 1. Set F0 = {(0, 0, . . . , 0)}. Define (0, 0, . . . , 0) = 0. ˆ set F j = F j −1 , and  j (u) =  j −1 (u). For each u = (u 1 , . . . , um ) ∈  j −1 and i = 1, 2, . . . , m. Step 2. For j = 1, 2, . . ., n, Case a. If u = u + pˆ j ei ∈ F j −1 and  j −1 (u ) ≥  j −1 (u) + eˆ j , then F j = F j , where ei is the standard unit vector whose ith element is one and the remaining elements are all zero; Case b. Else, set F j = F j ∪ {u } and  j (u ) =  j −1 (u) + eˆ j .

 = min{maxi u i | u ∈ Fnˆ and Step 3. Output OPT

nˆ

ˆj j =1 e

− nˆ (u) ≤ B }.

In fact, Algorithm 3 considers all possible cases. Thus, Algorithm 3 can give the optimal value for instance Iˆ1 . Following 2δ 1 from Lemma 2 and the fact that the sizes of jobs in Iˆ1 are integer multiples of δ 2 L, we have |F j | ≤ ( 1+ + 1)m = O ( δ 2m ) δ2

nˆ

ˆ Thus, the running time of Algorithm 3 is O ( for j = 1, 2, . . . , n.

j =1 |F j |m)

= O (ˆn|F j |) = O ( δ 2m1+3 ). 2

Based on Theorem 4 and Theorem 5, we have the following theorem. Theorem 6. There exists a FPTAS with O (1/ 2m+3 + mn2 ) running time for the problem P m |



J j ∈R e j

≤ B |C max .

Proof. It is immediate by noting that O ( δ 2m1+3 ) = O (  2m1+3 ), as m is a constant and δ =  /6 < 1/6.

2

192

W. Li et al. / Theoretical Computer Science 607 (2015) 181–192

4. Concluding remarks In this paper, we consider a version of parallel machine scheduling with rejection, namely, the problem P |



J j ∈R e j



B |C max . We design a strongly polynomial 2-approximation algorithm for it and we show that the factor analysis of our algorithm is best possible. Our algorithm exploits the combinatorial structure of the problem and hence may have room for improvement in the future. It is interesting to design strongly polynomial-time algorithms that achieve even better  approximation factor for the problem P | J j ∈R e j ≤ B |C max , say algorithms with approximation factor of 3/2 or even 4/3.

 e ≤ B |C max , we focus on pre J j ∈R j senting a PTAS for it and as a consequence, a FPTAS for its restricted version P m | J j ∈R e j ≤ B |C max . Our result is fairly Based on our strongly polynomial 2-approximation algorithm for the problem P |

good in the sense that in a reasonably large number of jobs, say n > 1 , our FPTAS improves previous best running time  from O (nm+2 / m ) to O (1/ 2m+3 + mn2 ). It is worth pointing out again that the problem P | J j ∈R e j ≤ B |C max either can be viewed as generalization of the classical problem P  C max , or can be viewed as a special case of the bicriteria problem on unrelated parallel machines introduced in Angel et al. [2]. It would be interesting to generalize our method to the general bicriteria problem on unrelated parallel machines. Acknowledgements We are grateful to the anonymous referees for numerous helpful comments and suggestions which helped to improve the presentation of our work. The work is supported in part by the National Natural Science Foundation of China [Nos. 11301466, 11461081, 61170222, 11101193], the Tianyuan Fund for Mathematics of the National Natural Science Foundation of China [No. 11126315], and the Natural Science Foundation of Yunnan Province of China [Nos. 2011FZ065, 2014FB114]. References [1] N. Alon, Y. Azar, G.J. Woeginger, T. Yadid, Approximation schemes for scheduling on parallel machines, J. Sched. 1 (1998) 55–66. [2] E. Angel, E. Bampis, A. Kononov, A FPTAS for approximating the unrelated parallel machines scheduling problem with costs, in: ESA 2001, in: Lecture Notes in Computer Science, vol. 2161, 2001, pp. 194–205. [3] Y. Bartal, S. Leonardi, A.M. Spaccamela, J. Sgall, L. Stougie, Multiprocessor scheduling with rejection, SIAM J. Discrete Math. 13 (2000) 64–78. [4] Z. Cao, X. Yang, A PTAS for parallel batch scheduling with rejection and dynamic job arrivals, Theoret. Comput. Sci. 410 (2009) 2732–2745. [5] Z. Cao, Y. Zhang, Scheduling with rejection and non-identical job arrivals, J. Syst. Sci. Complex. 20 (2007) 529–535. [6] Y. Cheng, S. Sun, Scheduling linear deteriorating jobs with rejection on a single machine, European J. Oper. Res. 194 (2009) 18–27. [7] D.W. Engels, D.R. Karger, S.G. Kolliopoulos, S. Sengupta, R.N. Uma, J. Wein, Techniques for scheduling with rejection, J. Algorithms 49 (2003) 175–191. [8] R.L. Graham, Bounds for certain multiprocessing anomalies, Bell Syst. Tech. J. 45 (1966) 1563–1581. [9] R.L. Graham, E.L. Lawler, J.K. Lenstra, Optimization and approximation in deterministic sequencing and scheduling: a survey, Ann. Discrete Math. 4 (1979) 287–326. [10] H. Hoogeveen, M. Skutella, G.J. Woeginger, Preemptive scheduling with rejection, Math. Program. 94 (2003) 361–374. [11] E. Horowitz, S. Sahni, Exact and approximate algorithms for scheduling nonidentical processors, J. ACM 23 (1976) 317–327. [12] K. Jansen, L. Porkolab, Improved approximation schemes for scheduling unrelated parallel machines, in: Proceedings of STOS’99, 1999, pp. 408–417. [13] E.L. Lawler, J.K. Lenstra, Kan, A.H.G. Rinnooy, D.B. Shmoys, Sequencing and scheduling: algorithms and complexity, in: Handbooks in Operations Research and Management Science, vol. 4, 1993, pp. 445–452. [14] J.H. Lin, J.S. Vitter,  -Approximation algorithms with minimum packing constraint violation, in: Proceedings of STOS’92, 1992, pp. 771–782. [15] L. Lu, L. Zhang, J. Yuan, The unbounded parallel batch machine scheduling with release dates and rejection to minimize makespan, Theoret. Comput. Sci. 396 (2008) 283–289. [16] L. Lu, T.C.E. Cheng, J. Yuan, L. Zhang, Bounded single-machine parallel-batch scheduling with release dates and rejection, Comput. Oper. Res. 36 (2009) 2748–2751. [17] S. Lu, H. Feng, X. Li, Minimizing the makespan on a single parallel batching machine, Theoret. Comput. Sci. 411 (2010) 1140–1145. [18] S. Seiden, Preemptive multiprocessor scheduling with rejection, Theoret. Comput. Sci. 262 (2001) 437–458. [19] D. Shabtay, N. Gaspar, L. Yedidsion, A bicriteria approach to scheduling a single machine with job rejection and positional penalties, J. Comb. Optim. 23 (2012) 395–424. [20] D. Shabtay, N. Gaspar, M. Kaspi, A survey on offline scheduling with rejection, J. Sched. 16 (2013) 3–28. [21] D.B. Shmoys, E. Tardos, An approximation algorithm for the generalized assignment problem, Math. Program. 62 (1993) 461–474. [22] L. Zhang, L. Lu, J. Yuan, Single machine scheduling with release dates and rejection, European J. Oper. Res. 198 (2009) 975–978. [23] L. Zhang, L. Lu, J. Yuan, Single-machine scheduling under the job rejection constraint, Theoret. Comput. Sci. 411 (2010) 1877–1882. [24] Y. Zhang, J. Ren, C. Wang, Scheduling with rejection to minimize the makespan, in: COCOA 2009, in: Lecture Notes in Computer Science, vol. 5573, 2009, pp. 411–420.