Jrl Syst Sci & Complexity (2007) 20: 529–535
SCHEDULING WITH REJECTION AND NON-IDENTICAL JOB ARRIVALS∗ Zhigang CAO · Yuzhong ZHANG
Received: 24 November 2005 / Revised: 30 March 2007
Abstract In this paper, we address the scheduling problem with rejection and non-identical job arrivals, in which we may choose not to process certain jobs and each rejected job incurs a penalty. Our goal is to minimize the sum of the total penalties of the rejected jobs and the maximum completion time of the processed ones. For the off-line variant, we prove its NP-hardness and present a PTAS, and for the√on-line special case with two job arrivals, we design a best possible algorithm with competitive . ratio ( 5+1) 2 Key words Non-identical job arrival, on-line, rejection, scheduling.
1 Introduction Scheduling problems have been widely studied in the last two decades. For traditional research, it is always assumed that we have to process all the jobs. In the real world, however, we can make a higher-level decision, i.e., we can break the assumption by rejecting certain jobs. It’s not hard for the readers to find examples in the industrial and commercial fields to justify this breaking. To reject a job, of course, we should pay a corresponding penalty. For simplicity, we call the scheduling problem with rejection SR. Compared with traditional problems, relatively few researchers have concentrated on SR. As to the makespan criterion. Y. Bartal et al.[1] study the off-line version as well as the on-line version on identical parallel machines; later, the uniform machines variant is considered: Y. He et al.[2] present the best possible on-line algorithms for the two-machine case and a special three-machine case; H. Hoogeven et al.[3] and S. S. Seiden[4] also consider the preemptive version on parallel machines. As to the total weighted completion times criterion, D. W. Engels et al.[5] address the offline version and L. Epstein et al.[6] pay attention to the on-line version for a unit-weight-unitprocessing-time special case. S. Sengupta[7] also discusses the maximum lateness criterion. Zhigang CAO Institute of Systems Science, Academy of Mathematics and Systems Science, Chinese Academy of Sciences, Beijing, 100080, China;School of Operations Research and Management Science, Qufu Normal University, Rizhao, Shandong 276826, China. Email:
[email protected]. Yuzhong ZHANG School of Operations Research and Management Science, Qufu Normal University, Rizhao, Shandong 276826, China. email:
[email protected]. ∗ The research is supported by National Natural Science Fundation of China under Grant NO. 10671108 and Province Natural Science Foundation of Shandong under Grant NO. Y2005A04.
530
ZHIGANG CAO · YUZHONG ZHANG
We note that SR is in essence bi-criteria, thus there are the following four models for us to study: (P1) To minimize F1 + F2 ; (P2) To minimize F1 subject to F2 ≤ a; (P3) To minimize F2 subject to F1 ≤ b; (P4) To identify the set of Pareto-optimal points for (F1 , F2 ); Where F1 is the total penalties of the rejected jobs, and F2 the original objective function. All the research (almost all of the ones cited above) concentrates on the (P1) model, and to the best of our knowledge, no one has considered any SR model with non-identical job arrivals. In the rest ofP this paper, we will discuss the (P1) model for SR with arbitrary job arrivals 1|rej, rj |Cmax + j∈R ej , following the notation of G. Graham et al.[8] . Specifically, it can be formulated as follows: We are given a list of jobs {J1 , J2 , · · · , Jn }, or {1, 2, · · · , n} for short. Each job Jj is associated with a processing time pj , a penalty ej , and an arrival time rj , before which it can not be scheduled. We also denote by A the set P of accepted or scheduled jobs and by R the set of rejected ones. Our goal is to minimize Cmax + j∈R ej , where Cmax is the maximum completion time among the accepted jobs. As the scheduling for accepted jobs is trivial, our work is actually to decide the set A and R. We always assume that the jobs are indexed in the non-decreasing order of their arrival times and there are in total m distinct arrival times 0 = r1 < r2 < · · · < rm . i Still we denote by Li (1 ≤ i ≤ m) the set of jobs with arrival Ptime r . In the next section, we first verify that 1|rej, rj |Cmax + j∈R ej is NP-hard in the ordinary sense even when m = 2. And based on the work of G. J. Woeginger[9] , we present a PTAS (Polynomial Time Approximation Scheme); In Section 3, we discuss the on-line special case with m = 2 and complete this paper by designing an algorithm ON with the best possible √ competitive ratio ρ = 5+1 . 2
2 The Off-Line Variant 2.1 The NP-Hardness We prove the NP-hardness by reduction from the 0/1-knapsack problem: we are given a set of n positive integers (vj , wj ) and a positive integer B , where vj s are called values, wj s are called weights, and B is the weight any threshold U , does there exist an index P bound. GivenP set K ⊆ {1, 2, · · · , n} such that j∈K vj ≥ U and j∈K wj ≤ B? P Theorem 1 1|rej, rj |Cmax + j∈R ej is NP-hard, even when m = 2. Proof Given any instance IP of 0/1-knapsack problem, as described above, we construct an 0 instance I of 1|rej, rj |Cmax + j∈R ej : there are n + 1 jobs in total, at time 0, there arrive n jobs with p1 = M wi , e1 = v1 ; p2 = M w2 , e2 = v2 ; · · · ; pn = M wn , en = vn , where M is big enough. At time r = M B, there arrives only one job with pn+1 = 1 and en+1 = +∞. Obviously, this construction can be done in polynomial time. Let R(π) denote the set of rejected jobs in π, we are going to verify that: P Pn 0 I has a feasible schedule π such that Cmax (π) + j∈R(π) ej ≤ M B + 1 + j=1 vj − U ⇔ I P P has a solution K such that j∈K vj ≥ U and j∈K wj ≤ B. Suppose P π is a candidate, Pn then: 1) Jn+1Pis accepted, thus Cmax (π) is at least M B + 1 and therefore j∈R(π) ej ≤ j=1 vj − U , i.e. vj ≥ U , where A denotes the set of accepted j∈A P P jobs arriving at 0; 2) j∈A pj ≤ M B. In fact, if j∈A pj > M B, as each processing time is an
SCHEDULING WITH REJECTION
531
P integral multiple of M , we have j∈A pj ≥ (B + 1)M the hypothesis, since M P , which violatesP is quite a big number. Simply let K = A, we have j∈K vj ≥ U and j∈K wj ≤ B. The converse can be shown similarly. 2.2 An FPTAS for Fixed m G. J. Woeginger[9] presents us with a framework to derive an FPTAS for a DP-simple problem from a specially structured dynamic programming. The technique relied on in this framework is the so-called trimming-the-state-space . His main result is that a DP-benevolent optimization problem has an FPTAS. In this subsection, we will check that the problem in our consideration with fixed m is in fact DP-benevolent and thus has an FPTAS. To verify that some DP-simple optimization problem is DP-benevolent, Woeginger proves that we only need to check that it fulfills certain conditions. To list and explain all the conditions in this paper is quite boring, it will occupy too much unnecessary space. Here we present only the brief checking, and to the interested readers, they can consult [9] for the details. We will check that this problem is ex-benevolent. The dynamic programming. Let α = 3 and β = m + 1. For k = 1, 2, · · · , n, define the input vector Xk = [pj , lj , ej ], where lj is the index of rj , i.e., rj = rlj . A state S = [E, T1 , T2 , · · · , Tm ] in Sk encodes a partial schedule for the first k jobs J1 , J2 , · · · , Jk : E is the total penalties of all the rejected jobs and Tj is the total processing time of the accepted jobs in Lj , 1 ≤ j ≤ m. The set F consists of two functions F1 and F2 : F1 (pk , lk , ek , E, T1 , T2 , · · · , Tm ) = [E, T1 , T2 , · · · , Tlj + pk , · · · , Tm ], F2 (pk , lk , ek , E, T1 , T2 , · · · , Tm ) = [E + ek , T1 , T2 , · · · , Tm ]. Intuitively speaking, F1 accepts Jk and F2 rejects it. The initial state space is set to S0 = {[0, 0, · · · , 0]} and finally, G[E, T1 , T2 , · · · , Tm ] can be computed in a constant time as follows: Find the last nonzero component in the state vector, say Tl . Let G1 = T1 , and Gi = max{Gi−1 , ri } + Ti (2 ≤ i ≤ l), then G[E, T1 , T2 , · · · , Tm ] = Gl + E. The ex-benevolence. Let D = [1, 1, · · · , 1]. F1 and F2 are both vectors of linear functions with nonnegative coefficients, thus Condition C.5 is satisfied; Condition C.3 i) can be easily checked with g = 1; the statements i), ii) and iii) in Condition C.4 are trivially true; finally, statement iv)Pin Condition C.4 is fulfilled since each component in the state vector can be n bounded by j=1 (pj + ej ). Hence P we have: Theorem 2 1|rej, rj |Cmax + j∈R ej possesses an FPTAS, when the number of job arrivals m is fixed. Following Woeginger, we will call this algorithm Algorithm TDP in the next subsection. 2.3 A PTAS for the General Case In this subsection, by the so-called rounding-the-input-data technique, we will present a PTAS for the general case with arbitrary m, i.e., m may be a variable related with n. Algorithm TDP can still derive us a (1 + ²)-approximation, however, the running time will be exponential. Thus, the only setback is m and we merely have to round {r1 , r2 , · · · , rm } into a constant (related with 1/² of course), at the expense of another reasonable accuracy error. For any inputting instance I, we construct m auxiliary instances I1 , I2 , · · · , Im . Each instance Ik (1 ≤ k ≤ m) consists of k groups of jobs L1k , L2k , · · · , Lkk and for any Lik (1 ≤ i ≤ k), it contains exactly the same jobs as Li except that all these jobs arrive at a new time rik = b
2r i c²r k (²r k )
2
.
532
ZHIGANG CAO · YUZHONG ZHANG
Denote by sk the first job whose arrival time is larger than rk , our algorithm is described as follows: Algorithm RR 1. Input any instance I; 2. For k = 1 to m do 3. Construct Ik and call Algorithm TDP to find a (1 + ²/2)−approximation πk , whose objective value is fk ; 4. EndFor Pn 5. Compute min {fk + j=sk ej : 1 ≤ k ≤ m}, and suppose πk0 obtains this value; ∗ 6. Output the original πk0 as a solution to I, in which the accepted jobs in πk0 are accepted and all the others are rejected. Then we have the following theorem, whose proof is easy and Pleft to the readers. Theorem 3 Algorithm RR is a PTAS for 1|rej, rj |Cmax + j∈R ej .
3 The On-Line Variant In this section, we will discuss the on-line variant with two job arrivals 0 and r, which is √ unknown until new jobs arrive at this time. For simplicity, we denote 5+1 by ρ. First of all, 2 we will give a lower bound. P Theorem 4 1|rej, rj |Cmax + j∈R ej does not possess any on-line algorithm with competitive ratio less than ρ, even when there are two job arrivals. Proof If not, suppose A is a counterexample. At time 0, one job J1 arrives with p1 = 1, e1 = ρ − 1. case 1 If A accepts J1 , then at time r = 1 it arrives J21 with p21 = 1, e21 = ². Thus the objective value obtained by A is at least 1+² while the optimal one is ρ−1+². (1+²) ( ρ − 1 + ²) → ρ(² → 0), contradicting the hypothesis of A; case 2 If A rejects J1 , then at time r = 1 it arrives J22 with p22 = ², e22 = 1. Thus the objective value obtained by A is at least ρ and the optimal one is 1 + ². ρ/(1 + ²) → ρ(² → 0), still a contradiction. Before stating our algorithm ON , we’d like to introduce some notations.S We will use L1 and L2 to denote the set of jobs arriving at 0 and r, respectively. L = L1 L2 . We denote by OP T (L) and OP T (L1 ) the optimal objective values for L and L1 , respectively, ON (L) and ON (L1 ) are defined as the objective values for L and L1 obtained by Algorithm ON . We also denote by C on the maximum completion time of the accepted jobs in L1 by Algorithm ON . and 4on = max{0, r − C on }. Algorithm ON 1. For the jobs in L1 , accept the ones with pj ≤ ρej and reject the others; 2. For the jobs in L P2 : P 2.1 If 4on + ρ j∈L2 min{pj , ej } ≥ j∈L2 ej , then reject all the jobs; else: 2.2 Accept the ones with pj ≤ ρej and reject the others.
533
SCHEDULING WITH REJECTION
Let π1opt be a partial optimal schedule for L1 , π opt = (π1opt , π2opt ) be an optimal schedule for 0 L, where π1opt is the corresponding partial schedule for L1 and π2opt is that for L2 . Similarly the schedule obtained by ON is π on = (π1on , π2on ). We assume without loss of generality that all the accepted jobs in L1 are scheduled before the accepted ones in L2 , in π on as well as in π opt . and π opt both accept as many jobs as possible. We also assume that π1opt 0 The following propositions are straightforward: a) π1opt accepts the jobs with pj ≤ ej and rejects the ones with pj > ej ; 0 b) One of the following conditions holds: b1) π2opt rejects all the jobs; b2) π2opt rejects the ones with pj > ej and accepts the ones with pj ≤ ej ; c) In any case, π1opt accepts all the jobs with pj ≤ ej and π2opt rejects all the jobs with pj > ej ; d) If condition (b1) holds, then π1opt = π1opt 0 ; P P e) In the second step of Algorithm ON , if 4on + ρ j∈L2 min{pj , ej } < j∈L2 ej , then at least one job in L2 is accepted. Theorem 5 The competitive ratio of Algorithm ON is ρ. opt opt opt opt on on on Proof Denote by Aon 1 , A2 , A1 , A2 the set of jobs accepted by π1 , π2 , π1 , π2 , respecopt opt on on tively. And denote by R1 , R2 , R1 , R2 the corresponding sets of rejected jobs. case 1 L2 = φ. Then: X X ON (L) = pj + ej j∈Aon 1
³
X
= ³
j∈R1on
opt j∈Aon 1 ∩A1
X
≤
X
pj +
´ ³ ej +
j∈R1on ∩R1opt
X
pj +
opt j∈Aon 1 ∩A1
X opt j∈Aon 1 ∩R1
´
X
ej +
j∈R1on ∩R1opt
´
X
pj +
ej
j∈R1on ∩Aopt 1
X
ρej +
opt j∈Aon 1 ∩R1
(ρ − 1)pj
j∈R1on ∩Aopt 1
≤ ρOP T (L). P P case 2 L2 6= φ and 4on + ρ j∈L2 min{pj , ej } ≥ j∈L2 ej . Thus, π2on rejects all the jobs in L2 . case 2.1 π2opt also rejects all the jobs in L2 . By Proposition d), applying the result of case 1 verifies this subcase trivially. case 2.2 π2opt accepts at least one job in L2 . P opt opt on Let 4opt , on pj ≥ 4 1 = max{0, r − Cmax (π1 )}; it’s not hard to see that 41 + j∈Aopt 1 ∩R1 on in fact, we only have to show this inequality in the case 4 > 0, which can be obtained by P P opt on j∈Aon pj + 4 . Therefore: j∈Aopt pj + 41 ≥ r = 1
1
OP T (L) =
X
ej +
j∈R1opt
=
X
³ X
j∈Aopt 1
ej +
j∈R1opt
=
³ X
j∈R1opt
pj + 4opt 1 + X
on j∈Aopt 1 ∩A1
ej +
X on j∈Aopt 1 ∩A1
´ pj +
X
ej +
j∈R2opt
X
X
pj + 4opt 1 +
on j∈Aopt 1 ∩R1
pj + (2 − ρ)
pj
j∈Aopt 2
X on j∈Aopt 1 ∩R1
X j∈R2opt
ej +
´ pj + (ρ − 1)
X
pj
j∈Aopt 2
X on j∈Aopt 1 ∩R1
pj
534
ZHIGANG CAO · YUZHONG ZHANG
X
+4opt 1 + ≥
³ X
X
ej +
j∈R2opt
X
ej +
j∈R1opt
pj
j∈Aopt 2
on j∈Aopt 1 ∩A1
³ +(ρ − 1)
X
´
X
pj + (ρ − 1)
ej
on j∈Aopt 1 ∩R1
pj + 4opt 1 +ρ
on j∈Aopt 1 ∩R1
X
X
ej + ρ
j∈R2opt
´ pj
j∈Aopt 2
³ ´ X ≥ (ρ − 1)ON (L1 ) + (ρ − 1) 4on + ρ min{pj , ej } j∈L2
³ X ´ ≥ (ρ − 1) ON (L1 ) + ej j∈L2
1 = ON (L) ρ P P case 3 L2 6= φ and 4on + ρ j∈L2 min{pj , ej } < j∈L2 ej . By Proposition e), π2on accepts at least one job in L2 , thus X X ON (L) = ON (L1 ) + 4on + pj + ej . j∈Aon 2
j∈R2on
case 3.1 π2opt rejects all the jobs in L2 . By Proposition d), X OP T (L) = OP T (L1 ) + ej . j∈L2
Thus, we only have to show that X
4on +
j∈Aon 2
this follows from
X
pj ≤ ρ
j∈Aon 2
and
X
X
pj +
ej ≤ ρ
j∈R2on
X
X
ej ,
j∈L2
min{pj , ej }
j∈Aon 2
pj ≤ ρ
j∈R2on
X
min{pj , ej }.
j∈R2on
case 3.2 π2opt accepts at least one job in L2 . Similar to case 2.2, we have OP T (L) ≥
´ X X 1 1 ³ on 4 +ρ pj + ρ ej . ON (L1 ) + ρ ρ opt opt j∈A2
Combining with
X j∈Aon 2
pj +
X
ej ≤ ρ
j∈R2on
we complete this subcase and the whole proof.
³ X j∈Aopt 2
pj +
j∈R2
X j∈R2opt
´ ej ,
SCHEDULING WITH REJECTION
535
References [1] Y. Bartal, S. Leonardi, A. Marchetti-Spaccamela, J. Sgall, and L. Stougie, Multiprocessor scheduling with rejection, SIAM Journal of Discrete Maths, 2000, 13(1): 64–78. [2] Y. He and X. Min, On-line uniform machine scheduling with rejection, Computing, 2000, 65(1): 1–12. [3] H. Hoogeveen, M. Skutella, and G. J. Woeginger, Preemptive scheduling with rejection, Lecture Notes in Computer Science, 2000, 1879: 268–277. [4] S. S. Seiden, Preemptive multiprocessor scheduling with rejection, Theoretical Computer Science, 2001, 262(1): 437–458. [5] D. W. Engels, D. R. Karger, S. G. Kolliopoulos, S. Sengupta, R. N. Uma, and J. Wein, Techniques for scheduling with rejection. Lecture Notes in Computer Science, 1998, 1461: 490–501. [6] L. Epstein, J. Noga, and G. J. Woeginger, On-line scheduling of unit time jobs with rejection: minimizing the total completion time. Operations Research Letters, 2002, 30(6): 415–420. [7] S. Sengupta, Algorithms and approximation schemes for mimimum lateness/tardiness scheduling with rejection, Lecture Notes in Computer Science, 2003, 2748: 79–90. [8] R. L. Graham, E. L. Lawler, J. K. Lenstra, and A. H. G. Rinnooy Kan, Optimization and approximation in deterministic sequencing and scheduling, Annals of Discrete Mathematics, 1979, 5: 287–326. [9] G.J. Woeginger, When does a dynamic programming formulation guarantee the exitence of an FPTAS? INFORMS Journal on Computing, 2000, 12(1): 57–74.