Approximation algorithms for scheduling parallel machines with capacity constraints

Approximation algorithms for scheduling parallel machines with capacity constraints∗ Lin Chen1 Klaus Jansen2 Wenchang Luo3 Guochuan Zhang1 1 2 Colle...
Author: Kristian Owens
1 downloads 0 Views 275KB Size
Approximation algorithms for scheduling parallel machines with capacity constraints∗ Lin Chen1 Klaus Jansen2 Wenchang Luo3 Guochuan Zhang1 1

2

College of Computer Science, Zhejiang University, Hangzhou, 310027, China [email protected], [email protected] Department of Computer Science, Christian-Albrechts-University Kiel, 24098 Kiel, Germany

3

[email protected] Department of Mathematics, Ningbo University, Ningbo, 315211, China [email protected]

Abstract In this paper, we consider the classical scheduling problem on parallel machines with capacity constraints. We are given m identical Pmmachines, where each machine k can process up to ck jobs. The goal is to assign the n ≤ k=1 ck independent jobs on the machines subject to the capacity constraints such that the makespan is minimized. This problem is a generalization of the c-partition problem where ck = c for each machine. The c-partition problem is strongly NP-hard for c ≥ 3 and the best known approximation algorithm of which has a performance ratio of 4/3 due to Babel et al.[2]. For the general problem where machines could have different capacities, the best known result is a 1.5-approximation algorithm with running time O(n log n +m2 n) [13]. In this paper, we improve the previous result substantially by establishing an efficient polynomial time approxi2 2 mation scheme (EPTAS) whose running time is 2O(1/ log (1/) log log(1/)) + O(n log n log log n). The key idea is to establish a non-standard ILP (Integer Linear Programming) formulation for the scheduling problem, where a set of crucial constraints (called proportional constraints) is introduced. Such constraints, along with a greedy rounding technique, allow us to derive an integer solution from a relaxed fractional one without violating constraints. Keywords. Scheduling; Approximation algorithms; Capacity constraints

1

Introduction

We consider a scheduling problem with machine capacity constraints (SMCC). There are m identical P machines, where each machine k can process at most ck jobs. The goal is to schedule n ≤ m k=1 ck independent jobs on these machines such that the makespan is minimized subject to the capacity constraints. The SMCC problem has many real-world applications, such as distributing students in a university [19], crew scheduling in airline industries [17]. It is also of practical interests in the optimization of assembly lines for printed circuit boards (PCB) [16]. The cardinality constraint is actually a very natural and important consideration in combinatorial optimization and has received considerable much attention. We refer readers to a nice survey of this topic [4]. ∗

Research was supported in part by Chinese Scholarship Coucil

1

The classical scheduling problem without capacity constraints is one of the well-studied NPhard problems in combinatorial optimization and computer science. For this problem, Hochbaum and Shmoys [8] give a polynomial-time approximation scheme (PTAS), which, given any instance I, outputs a schedule of length (1+)OP T (I) in time bounded by some polynomial in the length of the input |I|. An efficient polynomial time approximation scheme (EPTAS) which runs in f (1/)poly(|I|) is later given by Alon et al. [1] where the function f is doubly exponential in 1/. Such a result 3 2 is further improved recently by Jansen in [11], where an EPTAS that runs in 2O(1/ log (1/)) + O(n log n) time is presented. As a consequence, an EPTAS with a similar running time is expected for scheduling with capacity constraints. Previous work. The special case of the SMCC problem where machines have a uniform capacity, i.e., ck = c, is also know as the c-partition problem. Kellerer and Woeginger [15] first analyze the performance of LPT for c = 3 and show a worst-case ratio of 4/3 − 1/(3m). This result is improved later by Kellerer and Kotov [14], where a 7/6-approximation algorithm is given. For an arbitrary c, a 4/3-approximation algorithm is provided in [2]. As for the SMCC problem where there could be different capacities for machines, Dell’Amico [5] analyzes its lower bounds and gives heuristic algorithms. Woeginger [18] devises an FPTAS when the number of machines is fixed. Later Zhang et al. [19] present a 3-approximation algorithm by applying the iterative rounding method proposed by Jain [9]. Subsequently, a 2-approximation algorithm is designed by Barna and Aravind [3] to solve the problem in a more general setting, i.e., the unrelated machine scheduling problem with capacity constraints. Very recently, Kellerer and Kotov [13] give a 1.5-approximation algorithm. Our contribution. In this paper we consider the SMCC problem and provide a non-standard ILP (Integer Linear Programming) formulation for it. In this ILP we introduce a set of special constraints which we call as proportional constraints. An interesting fact is that, such constraints are unnecessary for the ILP formulation, but if we relax the integer variables, then they provide additional properties of the fractional solution. With a greedy rounding technique, we are able to round such a fractional solution into an integral one. With the above-mentioned ILP formulation, we are able to prove the following theorem. Theorem 1 There is an EPTAS for the problem of scheduling n jobs on m machines with capacity 2 2 constraints that outputs a (1+)-approximation solution in 2O(1/ log (1/) log log(1/)) +O(n log n log log n) time. Briefly speaking, the algorithm is carried out in three steps. First, we design an algorithm called Best-Fit schedule for the SMCC problem. The Best-Fit schedule returns a (2 + )-approximation solution in O(n log n(log log n + log(1/))) time. It is implemented first to provide an initial value T in [OP T, 3OP T ] (by choosing  = 1). Using this value we scale the processing times of jobs in the standard way. Notice that we aim to derive an EPTAS whose running time is nearly linear in n, yet all the previously known constant ratio approximation algorithms [3][13][19] run in Ω(n2 ) time in the worst case, and could not be used to compute such an initial value. Second, we introduce the proportional constraints and establish an ILP for the SMCC problem based on the scaling of jobs. Using the Best-Fit schedule in step 1 as a subroutine and also the special structure of the fractional solution based on the proportional constraints, we are able to relax the majority of integer variables in the M ILP . The relaxation of the M ILP contains only

2

constant number of integer variables, and could be solved efficiently using Kannan’s algorithm [12]. Indeed, an EPTAS is already achievable now, except that the running time is still large (which is O(1/) approximately 22 poly(n)). The third step is to modify the (relaxed) M ILP we derive in the second step so that we can solve it in a more efficient way. The key idea is to reduce the number of fractional variables and integer variables at the cost of a slight increase in the makespan. The remainder of the paper is organized as follows. In Section 2, we give some preliminaries along with an ILP formulation for the SMCC problem. In Section 3, we present the Best-Fit schedule. Then in Section 4, we show how to derive an EPTAS through a special ILP formulation. In Section 5, we show how to further reduce the number of fractional and integer variables in the 2 2 M ILP we have derived so that it could be solved in 2O(1/ log (1/) log log(1/)) + O(n log n log log n) time.

2

Preliminaries

As described in Zhang et al. [19], we have the following standard integer linear program (ILP) formulation for the SMCC problem: minimize t n X pj xjk ≤ t, subject to k=1 n X j=1 m X

(1) 1≤k≤m

(2)

xjk ≤ ck ,

1≤k≤m

(3)

xjk = 1,

1≤j≤n

(4)

1 ≤ j ≤ n, 1 ≤ k ≤ m

(5)

k=1

xjk ∈ {0, 1},

Here pj is the processing time of job j, and xjk = 1 indicates that job j is on machine k, otherwise xjk = 0. If ck > n for some k, we just change it to n since no schedule could assign more thanPn jobs on this machine. For simplicity we use n ˆ to denote the original number of jobs and let nP = m j=1 cj by adding n−ˆ n dummy jobs with processing time of 0. We replace the inequalities (3) by nj=1 xjk = ck for k = 1, 2, . . . , m. Note that dummy jobs do not contribute to the makespan, but each of them takes up a machine capacity of 1. Since ck ≤ n ˆ and m ≤ n ˆ , it can be easily seen that n ˆ≤n≤n ˆ2.

3

Best-Fit Schedule

In this section we provide our Best-Fit Schedule that returns a (2 + )-approximate solution in O(ˆ n log n(log log n + log(1/))) time. Throughout this section, we sort the m machines such that 1 ≤ c1 ≤ c2 ≤ · · · ≤ cm , and the Pm n (= j=1 cj ) jobs that 0 ≤ p1 ≤ p2 · · · ≤ pn . For simplicity we call a job as a zero job if its processing time is zero, and call it as a nonzero job otherwise. The basic idea of this algorithm is simple: each time we pick one machine, say machine 1, and try to assign it exactly c1 consecutive jobs in the job sequence (recall that they are in nondecreasing order of processing times) such that the load of this machine (the total processing time of jobs on

3

it) could be slightly larger than the optimal makespan but not much, then we close this machine, delete scheduled jobs from the job list and consider the next machines in the same way. Formally speaking, we have the following lemma: Lemma 1 If there is a feasible solution for the following linear system LPr : n X

≤ tk

1≤k≤m

xjk = ck

1≤k≤m

pj xjk j=1 n X j=1

m X

xjk = 1

1≤j≤n

k=1

0 ≤ xjk ≤ 1

1 ≤ j ≤ n, 1 ≤ k ≤ m

then an integer solution satisfying: n X

pj xjk ≤ tk + pmax

1≤k≤m

j=1 n X j=1 m X

xjk = ck

1≤k≤m

xjk = 1

1≤j≤n

k=1

xjk ∈ {0, 1}

1 ≤ j ≤ n, 1 ≤ k ≤ m

could be obtained in O(ˆ n log n) time, where pmax = maxj {pj } = pn . Proof. We will prove it by induction on m. When m = 1, this result is trivially true. Suppose this lemma holds for m = m0 . Consider the problem when m P = m0 + 1. ∗ 1 pj ≤ t1 , because if Let xjk be the feasible solution for LPr . For machine 1, we know that cj=1 the smallest c1 jobs sum greater than t1 then there would be noPfeasible solution for P LPr . P +c1 −2 τ +c1 −1 If nj=n−c1 +1 pj > t1 , then there exists an index τ such that τj=τ p ≤ t and pj > j 1 −1P j=τ n t1 , we put jobs from τ to τ + c1 − 1 on machine 1. Otherwise we have j=n−c1 +1 pj ≤ t1 , and we put the biggest c1 jobs on machine 1, in this case let τ = n − c1 + 1. Notice that we could not determine the value of τ directly through binary search. The summation of c1 nonzero jobs costs Ω(c1 ) time, c1 zero jobs on it. Then P yet we might end up by putting in the worst case we use at least Ω( k ck ) time, which could be Ω(ˆ n2 ). To avoid the above problem, we determine τ in the following way. Suppose i is the least index such that pi > 0, and κ is the integer such that 2κ−1 < c1 ≤ 2κ . We then test one by one the sets of jobs STl = {pi , pi+1 , · · · , pi+2l−1 −1 } for l = 1, 2, · · · , κ, to see if their total processing Pi+2l−1 −1 times sum greater than t1 . Let L(STl ) = pj , if there exists some l0 ≤ κ such that j=i l −1 0 L(STl0 −1 ≤ t1 < L(STl0 )), then τ ≤ i + 2 − c1 + 1, and we then apply binary search on τ . For the binary search, we need to test at most dlog ne values of τ , and for each value, the summation

4

from pτ to pτ +c1 −1 takes at most O(2l0 −1 ) computations since there are at most 2l0 −1 nonzero jobs as τ ≤ i + 2l0 −1 − c1 + 1. Meanwhile the computation for L(ST1 ) to L(STl0 ) takes at most O(2l0 ) time. Thus in all, we put at least 2l0 −2 nonzero jobs on machine 1 in O(2l0 log n) time. Otherwise, L(STκ ) ≤ t1 , then τ + c1 − 1 ≥ i + 2κ−1 − 1. Again we apply binary search on τ and sum the processing times of c1 jobs for each value of τ , this consumes O(c1 log n) time, and the computation for L(ST1 ) to L(STκ ) takes O(2κ+1 ) time. Meanwhile as τ + c1 − 1 ≥ i + 2κ−1 − 1 we would put at least 2κ−1 nonzero jobs on machine 1. In all, the above procedure determines τ in at most O(4φ log n) time if it puts φ nonzero jobs on machine 1. Let S1 = {j|job j is put on machine 1}, and cˆ1 be the number of nonzero jobs on machine 1, we will show that the following linear system LPr0 : X pj xjk ≤ tk 2 ≤ k ≤ m0 + 1 j6∈S1

X

xjk = ck

2 ≤ k ≤ m0 + 1

xjk = 1

j 6∈ S1

j6∈S1 0 +1 m X

k=2

0 ≤ xjk ≤ 1

j 6∈ S1 ,

2 ≤ k ≤ m0 + 1

still admits a feasible solution, then according to the induction hypothesis, an integer solution satisfying X pj xjk ≤ tk + pmax 2 ≤ k ≤ m0 + 1 j6∈S1

X

2 ≤ k ≤ m0 + 1

xjk = cj

j6∈S1 0 +1 m X

j 6∈ S1

xjk = 1

k=2

xjk ∈ {0, 1}

j 6∈ S1 ,

2 ≤ k ≤ m0 + 1

could be constructed in O((ˆ n −ˆ c1 ) log n) time. Since at most O(ˆ c1 log n) time is needed to determine jobs that are put on machine 1, in all O(ˆ n log n) time is needed to construct the integer solution for all machines and Lemma 1 follows immediately. The following part of this proof is devoted to show that LPr0 admits a feasible solution, indeed, we will construct such a solution from x∗jk . P +c1 −1 P Notice that we have τj=τ pj ≥ nj=1 x∗j1 pj (this inequality holds strictly if τ < n − c1 + 1). Rewrite it as τ +c τ −1 n 1 −1 X X X ∗ αj pj ≥ xj1 pj + x∗j1 pj , j=τ

j=1

j=τ +c1

P −1 ∗ P where αj = 1−x∗j1 for j = τ, · · · , τ +c1 −1. For simplicity, let αl = τj=1 xj1 and αu = nj=τ +c1 x∗j1 , P −1 ∗ P define pl and pu as αl pl = τj=1 xj1 pj and αu pu = nj=τ +c1 x∗j1 pj (pl = pτ −1 if αl =0, and pu = pτ +c1 if αu = 0). Thus,

5

τ +c 1 −1 X

αj pj ≥ αl pl + αu pu ,

j=τ τ +c 1 −1 X

αj = αl + αu .

j=τ

Now it can be easily seen that in order to construct a feasible solution for LPr0 , we only need to exchange αl pl and αu pu that are scheduled on machine 1 in the solution x∗jk with αj pj (τ ≤ j ≤ τ + c1 − 1) that are distributed among other machines. Suppose we have found ξj , ηj such for each j such that τ ≤ j ≤ τ + c1 − 1, ξj + ηj = αj , Pthat Pτ +c τ +c1 −1 1 −1 ξj pu + ηj pl ≤ αj pj , and moreover, ξj = αu , ηj = αl , then starting from the j=τ j=τ solution x∗jk , we exchange jobs like this: if βj pj (τ ≤ j ≤ τ + c1 − 1) (βi > 0) is scheduled on some machine, say k(k ≥ 2), then we move βj pj to machine 1 and put instead, or more precisely, put

Pn ∗ βj j=τ +c1 xj1 pj P (ξ n ∗ j αj j=τ +c xj1

βj αj (ξj pu

+ ηj pl ) on machine k

Pτ −1

+ ηj

1

∗ j=1 xj1 pj P τ −1 ∗ j=1 xj1

) on k. By doing so, the completion

time of machine k doesn’t increase while the total fractional number of jobs on it remains the same, and thus a fractional solution for LPr0 is constructed. Next we prove that such desired ξj and ηj do exist by constructing them. If αu = 0, then setting P ηj = αj and ξj = 0 is enough. Else if αl = 0 and αu = nj=τ +c1 x∗j1 6= 0, then τ < n − c1 + 1, P +c1 −1 αj pj > αl pl + αu pu . Therefore, in the following we assume it yields a contradiction with τj=τ P +c1 −1 αj pj > αl pl + αu pu . We distinguish three cases that αu 6= 0 and αl 6= 0, this implies that τj=τ and determine ξj and ηj (τ ≤ j ≤ τ + c1 − 1) recursively as follows. Case 1. If

j−1 j−1 X X pj − pl pu − pj αj ≤ αu − ξw and αj ≤ αl − ηw , pu − pl pu − pl w=τ w=τ

then let ξj = αj

pj − pl pu − pj and ηj = αj . pu − pl pu − pl

Case 2. If Case 1 holds for any j ≤ j0 − 1, while αj0 P 0 −1 p −p that satisfying αj0 pju0−pll > αu − jw=τ ξw ), then let ξj0 = αu −

jX 0 −1

pj0 −pl pu −pl

> αu −

Pj0 −1 w=τ

ξw (j0 is the first index

ξw , ηj0 = αj0 − ξj0 .

w=τ

For j0 < j ≤ τ + c1 − 1, let ξj = 0 and ηj = αj . Note that in both Case 1 and Case 2, we have ξj + ηj = αj , ξj pu + ηj pl = αj pj , for j ≤ j0 − 1, and ξj + ηj = αj , ξj pu + ηj pl ≤ αj pj , for j ≥ j0 . P 0 −1 p −p Case 3. Case 1 holds for any j ≤ j0 − 1, while αj0 puu −pjl0 > αl − jw=τ ηw . We show that this case is impossible. P 0 −1 P 0 −1 P +c1 −1 P +c1 −1 αj pj > αl pl +αu pu we have (αl − jw=τ ηw )pl +(αu − jw=τ ξw )pu < τw=j αw pw . From τj=τ 0 Pj0 −1 Pj0 −1 Pj0 −1 pu −pj0 With αj0 pu −pl > αl − w=τ ηw we can deduce (αl − w=τ ηw )pl +[αj0 −(αl − w=τ ηw )]pu > αj0 pj0 . P +c1 −1 P 0 −1 P 0 −1 Furthermore, with αl = τi=τ αj −αu and (αl − jw=τ ηw )pl +[αj0 −(αl − jw=τ ηw )]pu > αj0 pj0 ,

6

P +c1 −1 P 0 −1 P 0 −1 αw pw , which is a contradiction ξw )pu > τw=j ηw )pl + (αu − jw=τ we can derive (αl − jw=τ 0 (note that pu ≥ pj for any τ ≤ j ≤ τ + c1 − 1). Thus Case 3 never happens, which means the ξj and ηj defined above satisfyPwhat we expect, +c1 −1 i.e., for each j (τ ≤ j ≤ τ + c1 − 1), ξj + ηj = αj , ξj αu + ηj αl ≤ αj pj , and τj=τ ξj = αu , Pτ +c1 −1 ηj = αl . 2 j=τ Given the above lemma, a simple algorithm BF S could be derived. We choose t1 = t2 = · · · = tm = t. Then through binary search we find the minimum t = t0 such that the application of the algorithm in the above lemma do not fail. Notice that as long as t ≥ OP T the linear system LPr admits a feasible solution, thus t0 ≤ OP T and our Best-Fit schedule returns a feasible solution with makepan no more than OP T + pmax , which is of 2-approximation and the overall running time is O(n log n log(npmax )). Specifically, if we choose some constant c0 = 1/δ, and scale the numbers between pmax and npmax into S = {pmax , (1 + δ)pmax , (1 + δ)2 pmax , · · · , (1 + δ)ω pmax } with ω = dlog1+δ ne ≤ c0 log n, then we can apply binary search on the numbers in S instead. A schedule of length at most OP T (2 + δ) could be determined in O(ˆ n log n log(c0 log n)) time.

4 4.1

An efficient polynomial time approximation scheme Establishing M ILP (t)

The algorithm of the above section could provide us with some integer T satisfying OP T ≤ T ≤ 3OP T in O(ˆ n log n log log n) (by setting c0 = 1) time, and given  > 0, we would formulate an M ILP in this section that for any fixed t satisfying T /3 ≤ t ≤ T , it either determines there is no feasible schedule with makespan no more than t, or produces a solution with makespan no more than t(1 + ), in which all the split jobs have tiny processing times. We now scale the processing time of jobs using T in the standard way. For simplicity we assume µ = 1/ to be an integer greater than 10, and let λ = dlog1+ µe. Let SVb = {T (1 + ), T (1 + )2 , · · · , T (1 + )λ } and SVs = {T 2 , T 2 (1 + ), · · · , T 2 (1 + )λ } be the sets of scaled processing times. For each job whose processing time is larger than T , we round it up to be its nearest value in SVb , and call it as a big job. The remaining jobs are then called small jobs. We define containers. For each φ such that 1 ≤ φ ≤ µ, we define a φ-container which contains exactly φ jobs, and is denoted by a (λ + 2)-tuple (ν0 , ν1 , · · · , νλ , φ), where νi ≤ φ (1 ≤ i ≤ λ) is i the number of big jobs with rounded processing Pλ time T (1 + ) for 1 ≤ i ≤ λ in this container. Except for these big jobs, there are also φ − i=1 νi small jobs in this container, we compute their P average processing time (their total processing time divided by φ − λi=1 νi ) and then round this value up to be its nearest value in SVs . We use ν0 to represent such a scaled average processing time. Specifically, if there is no small job in a container, then ν0 = T 2 . The reason for the introduction of containers is that the optimum solution could always be seen as a schedule for m containers and the remaining small jobs. To see why, consider each machine with capacity φ where 1 ≤ φ ≤ µ − 1. Obviously all jobs on this machine could be represented by a φ-container. Meanwhile consider machine k with ck ≥ µ. Obviously the largest µ jobs on this machine could be represented through a µ-container. Since there are at most µ big jobs on each machine, the remaining (ck − µ) jobs on this machine are all small jobs. P Moreover, for each container (ν0 , ν1 , · · · , νλ , φ) where 1 ≤ φ ≤ µ, we define λκ=1 νκ T (1 + )κ + P ν0 (φ − λκ=1 νκ ) as the load of this container. Suppose tk is the load of machine k in the optimum solution (of the unrounded instance), then if we use the load of the container on this machine to

7

Figure 1: Container

substitute the total processing time of corresponding jobs, the new load of machine k becomes t0k ≤ tk (1 + ) + µT 2 ≤ OP T (1 + 4). We classify small jobs into two parts. A small job which is contained in one of the containers in the optimum solution is called an inner small job, otherwise it is an outer small job. Our above analysis implies the following observation: Observation. There exists a feasible schedule of makespan at most OP T (1 + 4) such that 1. For 1 ≤ φ ≤ µ − 1, there is one φ-container on each machine of capacity φ. 2. There is one µ-container on each machine whose capacity is at least µ. 3. Each big job is in one of the containers. 4. Each small job is either inside some container as an inner small job, or is scheduled as an outer small job. We denote the above solution as Sol∗ . See Figure 1 as an illustration. Here for simplicity µ = 3 (but notice that in our proofs µ ≥ 10). In the above figure there are 9 jobs on a machine (of capacity 9), and the largest 3 jobs form a 3-container. Among the 3 jobs, there are two big jobs and one small job, and this small job is an inner small job. The remaining 6 small jobs are outer small jobs. The introduction of all the above notions, e.g., φ-containers (the standard containers for scheduling problems usually do not take into account of small jobs), inner and outer small jobs, seems to complify the original problem in an unnecessary way. However, these notions are crucial for us to introduce the proportional constraints into the construction of an M ILP for this problem, and through such constraints, we are then able to relax these integer variables. Before establishing the M ILP , we have the following estimation on the number of different containers. Lemma 2 The number of all different containers is bounded by 2O(µ log log µ) . Proof. Notice that for each 1 ≤ φ ≤ µ, among ν1 to νλ there could be at most φ ≤ µ non-zero coordinates ina φ-container. To choose all the nonzero ones out of λ coordinates gives rise to at  P most µφ=1 φλ ≤ λ+1 possibilities. µ For each possibility, since all the nonzero coordinates add up to at most µ, there could be at  µ−1 most φ−1 different assignments of values for those φ nonzero coordinates, thus in all there could   Pµ µ−1 be at most λµ λ+1 µ ( φ=1 φ−1 ) different kinds of containers. To estimate the number, we use the following simple lemma.  p Lemma 3 For any integers p ≥ 1 and q ≥ 1, pq p ≤ (eq) . 8

Proof. Given the fact that ex ≥  (pq)p p Thus pq p ≤ p! ≤ (eq) . Thus we have λµ Lemma 2.

λ+1 µ

xn n!

 Pµ ( φ=1

for x > 0, we have en ≥

µ−1 φ−1



nn n! .

2

) ≤ (log µ)O(µ) ≤ 2O(µ log log µ) , which completes the proof of

2

We sort φ-containers in non-increasing order of their loads and denote by ~viφ = (ν0φ (i), ν1φ (i), · · · , νλφ (i), φ) the i-th one. Specifically, for µ-containers, we also denote the i-th µ-container as ~vi = (ν0 (i), ν1 (i), · · · , νλ (i), µ) (i.e., ~viµ = ~vi , νκµ (i) = νκ (i)) for simplicity and use Γi to denote its load. To simplify our notation, we use GMφ (1 ≤ φ ≤ µ − 1) to denote the set of machines with capacity exactly φ, and GMµ the set of machines with capacity greater than or equal to µ. We further renumber the machines so that GMµ is made up of machine 1 to machine m0 = |GMµ |, and µ ≤ c1 ≤ c2 ≤ · · · ≤ cm0 . All the containers could then be classified similarly into µ groups with GCφ (1 ≤ φ ≤ µ) being the set of all φ-containers. Meanwhile, containers could also be classified into (λ + 1) groups according to the first coordinate of their tuples, i.e., we define GSl = {~viφ |ν0φ (i) = T 2 (1 + )l , 1 ≤ φ ≤ µ, 1 ≤ i ≤ |GCφ |} for 0 ≤ l ≤ λ. We first set up an ILP for the SMCC problem, in which the following integer variables are used: ziφ : an integer variable denoting the number of the i-th φ-container (i.e., ~viφ ) that are used. yik : a 0 − 1 integer variable for the µ-container ~vi . If yik = 1, then one container of ~vi is on machine k, otherwise yik = 0. xijk : a 0 − 1 integer variable for outer small jobs. If yik = 1, job j is on machine k and is not inside the container ~vi , then xijk = 1. Otherwise xijk = 0. wjl : a 0 − 1 integer variable for inner small jobs. If job j is an outer small job, then wjl = 0 for any 0 ≤ l ≤ λ. Otherwise job j is an inner small job, and is contained in some container. If this container is in group GSκ for some 0 ≤ κ ≤ λ, then wjκ = 1, wjl = 0 for l 6= κ. Let Nκ be the number of big jobs with rounded processing time T (1 + )κ for 1 ≤ κ ≤ λ, n0 be the number of small jobs, and we sequence them as p1 ≤ p2 ≤ · · · ≤ pn0 . Given any fixed t (T /3 ≤ t ≤ T ), we formulate an ILP (t) as follows.

9

|GCφ |

(1)

X

ziφ = |GMφ |,

1≤φ≤µ

i=1 0

(2)

m X

yik = ziµ ,

1 ≤ i ≤ |GCµ |

k=1 |GCµ |

(3)

X

1 ≤ k ≤ m0

yik = 1,

i=1

(4)

µ |GC X Xφ |

νκφ (i)ziφ = Nκ ,

1≤κ≤λ

φ=1 i=1 0

(5)

n X

1 ≤ i ≤ |GCµ |, 1 ≤ k ≤ m0

xijk = (ck − µ)yik ,

j=1 0

(6)

n X

pj xijk ≤ (t − Γi )yik ,

1 ≤ i ≤ |GCµ |, 1 ≤ k ≤ m0

j=1

(7)

|GCµ | m0 X X

xijk +

i=1 k=1

(8)

n0 X

wjl = 1,

µ X φ=1

X

X

pj wjl ≤ T 2 (1 + )l

j=1

(10) ziφ = 0

(φ − µ X φ=1

if

λ X

λ X

X i:~viφ ∈GSl ∩GCφ

(11)

0≤l≤λ

(φ −

λ X

νκφ (i))ziφ ,

0≤l≤λ

κ=1

νκφ (i)T (1 + )κ + ν0φ (i)(φ −

κ=1

ziφ

νκφ (i))ziφ ,

κ=1

i:~viφ ∈GSl ∩GCφ

n0

(9)

1 ≤ j ≤ n0

l=0

wjl =

j=1

λ X

λ X

νκ ) > t

κ=1

∈ N, yik , xijk , wjl ∈ {0, 1}.

We check these constraints. Constraint (1) shows that for 1 ≤ φ ≤ µ, the number of φ-containers used equals to the number of machines in group GMφ . Constraints (2) and (3) ensure that there is exactly one µ-container on each machine of group GMµ , and the total number of container ~vi that are used is ziµ . Constraint (4) shows that each big job is contained in one of the containers. As to constraints (5) and (6), notice that yik is either 0 or 1, thus for each k there could be exactly one i such that yik = 1, while yi0 k = 0 for i0 6= i. Then from constraint (5), we know that xi0 jk = 0. So, constraints (5) and (6) actually show that for each machine k of group GMµ , the total number of jobs scheduled won’t exceed ck , and the total processing time won’t exceed t. Constraint (7) implies that each small job is scheduled, either as an inner small job or as an outer one. Constraints (8) and (9) are for inner small jobs. Both sides of the constraint (8) equals to the total number of inner jobs we use. The left side of constraint (9) is the exact total processing time of all the inner small jobs, while the right side is an upper bound of it (notice that we have round up the average processing time of inner small jobs in each container). Constraint (11) ensures that every container we use is feasible in the sense that its load won’t exceed t.

10

It can be easily seen that once we set t = t0 ≥ OP T (1 + 4), then Sol∗ satisfies all the above constraints and is thus a feasible solution for ILP (t0 ). Thus, the smallest t such that ILP (t) admits a feasible solution is no greater than OP T (1 + 4). Here the constraints (5) and (6) are the so-called proportional constraints we mention before. We remark that if yik are restricted to be 0 − 1 integer variables, then there are actually other formulations which can be much simpler. However, in order to solve the programming, we need to relax most of the integer variables so that there are only a constant number of integer variables, and these proportional constraints become crucial for the relaxation, as we will show in Lemma 5. Consider ILP (t). By replacing the constraints xijk , wjl ∈ {0, 1} with 0 ≤ xijk ≤ 1 and 0 ≤ wjl ≤ 1, we derive a mixed integer linear programming and denote it as M ILP (t). Obviously any feasible solution of ILP (t) is a feasible solution for M ILP (t), thus the minimum integer t such that M ILP (t) admits a feasible solution is also no greater than OP T (1 + 4). Furthermore, we have the following lemma. Lemma 4 Given a feasible solution of M ILP (t) with t = t∗ , a feasible schedule for the SMCC problem with makespan no more than t∗ + T  could be constructed in O(ˆ n log n) time. Proof. Let Sol be the solution of M ILP (t∗ ). Notice that in such a solution there is one container on each machine, and all big jobs are contained in containers, thus through Sol we know directly which big job is on which machine. Let c¯k be the number of big jobs on machine k, t¯k be the total processing time of these big jobs on machine k, and again let p1 , p2 · · · , pn0 be the processing times of all the small jobs. Then we know the following LP admits a feasible solution. 0

n X

pj xjk ≤ t∗ − t¯k

1≤k≤m

j=1 0

n X

xjk = ck − c¯k

1≤k≤m

j=1 m X

1≤j≤n

xjk = 1

k=1

1 ≤ j ≤ n0 , 1 ≤ k ≤ m

0 ≤ xjk ≤ 1

Here xjk denotes the fraction of job j on machine k, which is of the same meaning as the xjk of the LP in the preliminary (see Section 2). Now we apply Lemma 1, an integer solution could be derived in O(ˆ n log n) time and its makespan ∗ is bounded by (t + T ) since now pmax = max1≤j≤n0 pj ≤ T . 2 With the above lemma, we only need to find the minimum t such that M ILP (t) admits a feasible solution. Through binary search, we need to determine whether M ILP (t) admits a feasible solution for each fixed t. However, we could not solve the M ILP (t) directly in polynomial time since the number of integer variables in it is not a constant (which is O(m)). Thus, we need to further relax its integer variables.

4.2

Relaxing M ILP (t)

We replace the constraint yik ∈ {0, 1} in M ILP (t) to be 0 ≤ yik ≤ 1, and call such a relaxed M ILP (t) as M ILPr (t). The whole subsection is devoted to show the following lemma. 11

Figure 2: Example

Lemma 5 Given a feasible solution of M ILPr (t) for t = t∗ , a feasible solution of M ILP (t) with t = t∗ could be constructed. Before the proof we give some notations as well as some intuitive ideas about why this lemma is true. Recall that there are m0 = |GMµ | machines with capacity no less than µ and they are renumbered as machine 1 to machine m0 . The constraints (2) and (3) ensure that the number of µcontainers used is m0 , and they are on these machines, one for each. In the following part of this subsection we only consider these µ-containers and machines in GMµ , thus for simplicity we just call them as containers and machines. We prove this lemma through iteratively rounding of the solution for M ILPr (t∗ ). Indeed, our rounding procedure only moves containers and outer small jobs among machines ∗ , z φ∗ , w ∗ be the given solution for M ILP (t∗ ). Since without using new containers. Let x∗ijk , yik r i jl ziµ∗ are integers, suppose the m0 containers used are containers ~vh1 , ~vh2 , · · · , ~vhm0 with Γh1 ≥ Γh2 ≥ · · · ≥ Γhm0 , then, in the integer solution we construct at the end of the proof we re-schedule these containers among machine 1 to m0 in a greedy way such that hk is on machine k for 1 ≤ k ≤ m0 . Notice that µ ≤ c1 ≤ c2 ≤ cm0 , thus a container with a larger load is always on a machine with a smaller capacity. To get a straightforward idea about why such a rounding is possible, we consider a simple case where there are only two machines, machine 1 and machine 2. We assume that µ ≤ c1 ≤ c2 . Obviously two containers are used. For simplicity we denote them as container A and B, and let ΓA and ΓB be their loads respectively. See Figure 2 as an illustration of the solution for M ILPr (t). Now yA,1 fraction of container A is on machine 1, and yA,2 fraction of container A is on machine 2. Let t1 and t2 be the load of machine 1 and 2 respectively and we assume t1 ≤ t2 , then it can be easily seen that the current makespan is t∗ = t2 . Assume that ΓA ≥ ΓB , then as we mention before, we need to move the whole container A onto machine 1. Now we need to select (c1 − µ) jobs out of the outer small jobs onto machine 1. Notice that a small job might be split such that part of it is in containers, so for each small job j, only uj = xA,j,1 + xB,j,1 + xA,j,2 + xB,j,2 fraction of it belongs to outer small jobs. To select (c1 − µ) outer small jobs ontoPmachine 1 means that we need to choose u0j (u0j ≤ uj ) fraction of job j onto machine 1 such that j u0j = c1 − µ. Container B along with the remaining (fractions of) jobs are then put onto machine 2. simplicity, we call the set Su made up of u0j (u0jP≤ uj ) fraction of job j and satisfies that P For 0 0 j uj = c1 − µ as an outer subset, and define L(Su ) = j pj uj as the load of this outer subset. 12

Suppose we put some outer subset Su onto machine 1 and let t01 be the new load of this machine, then in order not to increase the makespan we need to make sure that t1 ≤ t01 ≤ t2 . To see why, suppose t01 < t1 , then the new load of machine 2 is t1 + t2 − t01 > t2 , which means the makespan is increased. Similarly if t01 > t2 , the makespan is also increased. Now the question is that, does there exist an outer subset Su∗ so that its load is in [t1 − ΓA , t2 − ΓA ]? The existence of such an outer subset is actually ensured by the proportional constraints. Indeed, to show the existence of such an outer subset, we only need to prove the following two claims. 1. There exists an outer subset whose load is less than or equal to t2 − ΓA . 2. There exists an outer subset whose load is greater than or equal to t1 − ΓA . why claim 1 holds, consider xA,j,1 and xA,j,2 . From constraint (6) we know that P To see P j xA,j,1 P + j xA,j,2 P = (c1 − µ)yA,1 + (c2 − µ)yA,2 . As c1 ≤ c2 and yA,1 + yA,2 = 1, we know directly that j xA,j,1 + j P xA,j,2 ≥ c1 −P µ. Meanwhile according to constraint (7) the total processing time of these jobs is j pj xA,j,1 + j pj xA,j,2 ≤ (t∗ − ΓA )yA,1 + (t∗ − ΓA )yA,2 = t∗ − ΓA = t2 − ΓA . c1 −µ P Thus by setting u0j = P xA,j,1 + j xA,j,2 (xA,j,1 + xA,j,2 ), the load of this outer subset is no greater j than t2 − ΓA . (6) we P know that P P claim 2 holds, consider xA,j,1 and xB,j,1 . From constraint P To see why p x + x = c − µ. Since the load of machine 1 is t , x + 1 1 j j A,j,1 j B,j,1 j A,j,1 Pj pj xB,j,1 = tP 1 − ΓA yA,1 − ΓB yB,1 . Given that ΓA ≥ ΓB and yA,1 + yB,1 = 1, we know directly that j pj xA,j,1 + 0 =x p x ≥ t − Γ . Thus by setting u + x , the load of this outer subset is no less j 1 B,j,1 A A,j,1 B,j,1 j j than t1 − ΓA . To see why the existence of Su∗ is ensured by the two claims, we prove the following lemma. Lemma 6 Let a, b be any real numbers such that a ≤ b. Suppose x ≥ a and y ≤ b, then there exists some θ ∈ [0, 1] such that a ≤ θx + (1 − θ)y ≤ b. Proof. If x ≤ b, then choosing θ = 1 is enough. Else if y ≥ a, then choosing θ = 0 is enough. Otherwise, x > b and y < a. Then the linear function f (θ) = θx + (1 − θ)y satisfies that f (0) < a and f (1) > b, and there exists some θ0 such that a ≤ f (θ0 ) ≤ b. 2 (1)

Thus, suppose Su1 satisfies claim 1 and Su2 satisfies claim 2, furthermore, uj

fraction of job j

(2) uj

is in Su1 and fraction of job j is in Su2 . Then by setting x = L(Su1 ), y = L(Su2 ), a = t1 − ΓA and b = t2 − ΓA , we can compute the θ satisfying Lemma 6. Thus, consider the outer subset made (1) (2) up of θuj + (1 − θ)uj fraction of job j, this is the Su∗ we desire. The idea of the above analysis will be implicitly used in our following proof. As we have seen, the proportional constraints play a key role in our proof. If there are more than two machines, the moving of each container should be accompanied by the altering of the corresponding xijk so that the proportional constraints are always satisfied. Proof. The proof is a constructive one. Recall again that we only consider machine 1 to machine m0 and all the containers we mention afterwards refer to µ-containers. ∗ while keeping other variables intact. Specifically, Throughout the rounding, we alter x∗ijk and yik ∗ ∗ we alter xijk and yik only in two ways. One is to move jobs from some machine to another. We either move outer small jobs as indicated by x∗ijk or move containers. 13

The other way is to re-assign small jobs to containers. Notice that yik could be fractional, thus there might be several fractions of containers on the same machine. For simplicity, if x∗ijk > 0, then we say x∗ijk fraction of job j is assigned to container i. By re-assigning, we could change x∗ijk to x∗ijk − δ (δ ≤ x∗ijk ) while let x∗i0 jk become xi0 jk + δ for some i0 , which means now a fraction δ of job j on machine k is assigned to a new container i0 . We need to ensure that constraints (1) to (11) are never violated during our rounding procedure. ∗ Notice that if we only carry out the above mentioned two methods to alter variables, then ziφ∗ , wjl P|GCµ | Pm0 P 0 m ∗ ∗ won’t change. Moreover, i=1 k=1 xijk and k=1 yik as a whole won’t change either, so to ensure that constraints (1) to (11) are never violated, we only need to ensure that constraints (3), (5) and (6) are never violated. Now we will describe our rounding procedure. We focus on machine 1. Suppose after applying h for M ILP . the rounding procedure for some times we arrive at some feasible solution xhijk and yik r h If among the containers used the one with the largest load is on machine 1, then yi1 are already h and xh forever. Then we could simply renumber 0 − 1 variables and we close machine 1 and fix yi1 ij1 machines so the remaining machines are machines 1 to m0 − 1, and again focus on the first machine. h < 1, then there exists Otherwise we suppose without loss of generality that z1h > 0 and 0 ≤ y11 h h h h of container a machine w with y1w > 0. If y11 + y1w ≤ 1, we would try to move the fraction y1w h fraction out of y h of container 1. 1 to machine 1, otherwise it’s enough by moving only 1 − y11 1w h h Define η = min{y1w , 1 − y11 }. To ensure (3), we exchange η fraction of container 1 on machine w 0 = y h + η, y 0 = y h (1 − α) with the same fraction of other containers on machine 1, i.e., we let y11 11 i1 i1 η 0 h 0 h h for i > 1 where α = P η yh = 1−y h , and meanwhile y1w = y1w − η, yiw = yiw + αyi1 . It can be i>1

i1

11

easily verified that by doing so (4) is satisfied on both machine 1 and w. If we could then alter h becomes 1, or we have successfully moved the xhijk so that (5) and (6) are satisfied, then either y11 fraction of container 1 on another machine to machine 1, and thus carry on such a procedure at h would become 1. most m0 times y11 h to y 0 would actually be accomplished in several steps, The above mentioned altering from yi1 i1 h (i > 1). Assume without loss of generality that and in each step we only consider one of those yi1 y21 > 0, then let h+1 h+1 h h h = y21 (1 − α), = y11 + αy21 , y21 y11 h+1 h+1 h h h h = y2w + αy21 . = y1w − αy21 , y2w y1w h are kept intact, then (4) is satisfied, and we then need to change xh on the two All the other yik ijk machines so that (5) and (6) are also satisfied. Consider the following simple altering of xh1j1 , xh2j1 , xh1jw and xh2jw . h+1 h h h xh+1 1j1 = αx2j1 + x1j1 , x2j1 = (1 − α)x2j1 , h+1 h h h h h h h xh+1 1jw = x1jw (1 − αy21 /y1w ), x2jw = x2jw + αy21 /y1w x1jw .

By altering them this way we don’t actually move jobs between machine 1 and w, but rather re-assign outer small jobs on the two machines, so the total number of jobs along with total h+1 h h processing times on the two machines remain unchanged. Also notice that xh+1 2j1 /x2j1 = y21 /y21

14

h+1 h h and xh+1 1jw /x1jw = y1w /y1w , so it follows directly that 0

(12)

n X

0

xh+1 2j1

=

n X

h+1 c1 y21 ,

j=1

(13)

n0 X

j=1 0

pj xh+1 2j1



≤ (t −

n X

h+1 Γ2 )y21 ,

j=1

(14)

n0 X

h+1 xh+1 1j1 = c1 y11

h+1 xh+1 1jw = cw y1w

j=1 n0 X

h+1 xh+1 2jw = cw y2w ,

j=1

h+1 ∗ pj xh+1 1jw ≤ (t − Γ1 )y1w

j=1

P 0 Pn0 Pn0 h+1 h+1 h+1 ∗ We could also conclude that nj=1 pj xh+1 j=1 pj x2jw + j=1 pj x1jw = 2jw ≤ (t − Γ2 )y2w , since Pn0 P 0 n h h j=1 pj x2jw + j=1 pj x1jw , thus 0

n X

0

pj xh+1 2jw

=

j=1

n X

0

pj xh2jw

j=1

+

n X

h h pj xh1jw αy21 /y1w

j=1

h h h h ≤ (t∗ − Γ2 )y2w + (t∗ − Γ1 )y1w αy21 /y1w h+1 ≤ (t∗ − Γ2 )y2w

The last P inequality follows from t∗ − Γ1 ≤ t∗ − Γ2 . 0 h+1 ∗ So if nj=1 pj xh+1 1j1 ≤ (t − Γ1 )y11 , then we have successfully derived a new feasible solution of M ILPr . P 0 h+1 ∗ Otherwise nj=1 pj xh+1 1j1 > (t − Γ1 )y11 , and we would have to exchange outer small jobs on machine 1 with w, and meanwhile re-assign them. h+1 h Let yik be defined as before. First we define again xh+1 2j1 = (1 − α)x2j1 , then for each outer h h small job j on machine 1, there is a fraction of αx2j1 left. We put θαx2j1 onto machine w, where θ ∈ [0, 1] is a parameter that to be fixed later. Then we re-assign the remaining fraction (1−θ)αxh2j1 for each j to container 1. Pn0 Since in all j=1 θαxh2j1 jobs are moved to machine w, we then need to move the same number P 0 of jobs from machine w back to machine 1. Among the nj=1 xh1jw outer small jobs on machine w, P 0 P 0 yh suppose we move ϕ nj=1 xh1jw = nj=1 θαxh2j1 , it follows that ϕ = ccw1 yhη 1−y21h θ ∈ [0, 1]. 1w

11

h y21 η h h y1w ), then adding up the fraction of ϕx1jw that is 1−y11 yh − ccw1 θ) 1−y21h yhη xh1jw left for each j, and we re-assign them 11 1w

h Meanwhile we set xh+1 1jw = x1jw (1 −

moved out, there is still a fraction of (1 to container 2. The above discussion implies that we set xh+1 ijk as follows

h h h xh+1 1j1 = (α − θα)x2j1 + x1j1 + ϕx1jw , h xh+1 2j1 = (1 − α)x2j1 , h h h xh+1 1jw = x1jw (1 − αy21 /y1w ), h h xh+1 2jw = x2jw + θαx2j1 + (

h y21 η − ϕ)xh1jw . h 1 − y11 y1w

And again the same argument shows that inequalities (12) to (14) are also satisfied. 15

We then set

Pn0

h+1 j=1 pj x1j1

0

n X

h+1 = (t∗ − Γ1 )y11 . This is possible since

0

pj xh+1 1j1

=

j=1

n X

n0

0

(α −

θα)pj xh2j1

+

j=1

n X

pj xh1j1

h η X c1 y21 θ pj xh1jw + h h cw 1 − y11 y1w j=1

j=1

is linear in variable θ. AndP if θ = 0, then we actually do not exchange outer small jobs between 0 h+1 ∗ machine 1 and w, and thus nj=1 pj xh+1 1j1 > (t − Γ1 )y11 . If θ = 1, simple computation shows that Pn0 h+1 h+1 c1 h ∗ ∗ h j=1 pj x1j1 ≤ (t − Γ1 )(y11 + cw αy21 ) ≤ (t − Γ1 )y11 . Thus there exists some θ ∈ [0, 1], such P 0 h+1 ∗ that nj=1 pj xh+1 1j1 = (t − Γ1 )y11 . P 0 h+1 ∗ Now we only need to prove for such a θ, nj=1 pj xh+1 2jw ≤ (t − Γ2 )y2w . Consider machine 1. 0

h+1 Γ1 (y11



h y11 )

+

h+1 Γ2 (y21



h y21 )

n X

+

h+1 h h (xh+1 1j1 + x2j1 − x1j1 − x2j1 )pj

j=1 n0

=

h+1 t∗ y11



h+1 t∗ y11



h Γ1 y11



h Γ1 y11



X

0

pj xh1j1



h α(Γ2 y21

+

j=1

n X

xh2j1 pj )

j=1



− (t −

h Γ1 )y11



h α[Γ2 y21

h + (t∗ − Γ2 )y21 ]=0

The total processing time of jobs on machine 1 doesn’t decrease, then the total processing time jobs on machine w doesn’t increase. 0

h+1 Γ2 y2w

+

n X

pj xh+1 2jw

j=1 0



h Γ2 y2w

+

n X

0

0

pj xh2jw

+

h Γ1 y1w

+

j=1

n X

pj xh1jw

X

Pn0

h+1 j=1 pj x2jw

pj xh+1 1jw

n0

h h pj xh2jw + αy21 Γ1 + αy21

j=1

Then it follows



n X j=1

j=1

n0 h = Γ2 y2w +



h+1 Γ1 y1w

1 X h y1w

h+1 pj xh1jw ≤ t∗ y2w

j=1

h+1 ≤ (t∗ − Γ2 )y2w , and we complete our proof.

2

With the above lemma, given a feasible solution of M ILPr (t∗ ), a feasible solution of M ILP (t∗ ) could be constructed in the following way. The integer variables ziφ of M ILP (t∗ ) are taking the same value of that in M ILPr (t∗ ). For each 1 ≤ φ ≤ µ − 1, we put (arbitrarily) a φ-container on a machine with capacity φ. Then we schedule µ-containers greedily as Lemma 5 implies, i.e., we put the µ-container with a larger load onto a machine (in GMµ ) with a smaller capacity, as we have mentioned in the proof. Such a schedule actually determines the value of yik in M ILP (t∗ ) in O(m) time. By fixing the value of all the integer variables in M ILP (t∗ ) in this way, it becomes a linear programming and Lemma 5 implies that it admits a feasible solution. Notice that now an EPTAS for the SMCC problem is already available since M ILPr (t) only contains constant number of integer variables (which is 2O(µ log log µ) ), and thus could be solved in polynomial time. Applying the Kannan’s algorithm [12], the running time is approximately O(1/) 22 poly(n). 16

5

Solving M ILPr (t)

The key idea in this section is to modify the M ILPr (t) so that it contains much fewer integer and fractional variables. Notice that M ILPr (t) contains 2O(1/ log log (1/)) different integer variables (one for each type of container) and 2O(1/ log log (1/)) mn fractional variables, our goal is to first reduce the number of its fractional variables (and also the number of constraints) to O(1/3 log(1/) log2 n), 2 2 and then split the modified M ILP into 21/ log (1/) log log(1/) small M ILP so that in each of them, the number of integer variables is bounded by O(1/ log2 (1/)). As the Kannan’s algorithm runs in dO(d) poly(s) time, where d is the number of integer variables in the M ILP , and s the length of the input. Applying it, the running time for each small M ILP 2 2 instance we derive is 2O(1/ log (1/) log log(1/)) poly(1/, log n).

5.1

Reducing the number of fractional variables

We first round up the load of each µ-container, say, Γi , to be its nearest value in the set {T } ∪ SVb , ¯ i . According to the rounded value we then classify all the µ-containers into (λ+1) and denote it as Γ different groups, with the h-th (0 ≤ h ≤ λ) group GLh consisting of containers with rounded load ¯ i ≤ Γi + T . exactly T (1 + )h . Notice that Γ We then round up the processing times of small jobs. Let c = max{c1 , c2 , · · · , cm } ≤ n and SVr = {T /c, T (1 + )/c, · · · , T (1 + )q /c}, where q = dlog1+ ce ≤ µ log n. For any small job j, we round up pj to be its nearest value in SVr and denote it as p¯j . ¯ i , and each pj ≤ T  with p¯j , we derive a new mixed By substituting each Γi in M ILPr (t) with Γ ¯ r (t). integer programming and denote it as M ILP P 0 If M ILPr (t) admits a feasible solution for t = t0 ∈ [T /3, T ], then we know that nj=1 pj xijk ≤ P 0 ¯ i )yik . This means (t0 − Γi )yik , and it follows that nj=1 p¯j xijk ≤ (1 + )(t0 − Γi )yik ≤ (t0 + 2T  − Γ ¯ the solution of M ILPr (t0 ) is also feasible for M ILP r (t0 + 2T ). ¯ r (t0 ) is also feasible for M ILPr (t0 ), thus in the Meanwhile, any feasible solution for M ILP ¯ following part we P focus on solving M ILP P r (t). Define xhjk = i:~vi ∈GLh xijk , yhk = i:~vi ∈GLh yik , and substitute constraints (3),(4),(6), (7),(8),(13) ¯ r (t) with in M ILP

17

0

(2)0

m X

yhk =

(3)0

ziµ , 0 ≤ h ≤ λ

i:~vi ∈GLh

k=1 λ X

X

yhk = 1, 1 ≤ k ≤ m0

h=0 0

(5)0

n X

xhjk = (ck − µ)yhk , 0 ≤ h ≤ λ, 1 ≤ k ≤ m0

j=1 0

(6)0

n X

p¯j xhjk ≤ (t − T (1 + )h )yhk , 0 ≤ h ≤ λ, 1 ≤ k ≤ m0

j=1 0

(7)0

λ X m X

xhjk +

λ X

wjl = 1, 1 ≤ j ≤ n0

(11)0

h=0 k=1 l=0 φ zi ∈ N, xhjk , yhk , wjl

(12)0

xhjk = yhk = 0,

≥ 0.

if GLh = ∅ (1)

By substituting these constraints we establish a new M ILP and denote it as M ILPr (t). Simple (1) ¯ calculations show that P any feasible solution of PM ILP r (t) leads to a feasible solution of M ILPr (t) according to xhjk = i∈GLh xijk , yhk = i∈GLh yik . Thus the minimum integer t such that (1)

M ILPr (t) admits a feasible solution is at most OP T (1 + 4) + 2T . (1)

¯ r (t) Lemma 7 Given a feasible solution of M ILPr (t) for some t = t0 , a feasible solution of M ILP for the same t = t0 could be derived, and moreover, their integer variables have the same value. (1)

Proof. Let yhk , xhjk , ziφ , wjl be the solution of M ILPr (t0 ). Then for i ∈ GLh we define xijk = 0 if xhjk = 0, and yik = 0 if yhk = 0. Otherwise xijk

ziµ

µ, i:~vi ∈GLh zi

= xhjk P

yik = yhk P

ziµ

µ. i:~vi ∈GLh zi

It could be easily verified that such xijk and yik along with ziφ , wjl make a feasible solution of ¯ r (t0 ). M ILP 2 (1)

We further modify M ILPr (t). We partition machines into different groups, with each group containing machines of similar capacities. Let GJξ (0 ≤ ξ ≤ q) be the group of small jobs with rounded processing time of T (1+)ξ /c. We partition machines of GMµ into groups according to their capacities. Let GMη0 = {k|ck = µ−1+η} 0 for 1 ≤ η ≤ µ and GMµ+η = {k|µ + µ(1 + )η−1 ≤ ck < µ + µ(1 + )η } for 1 ≤ η ≤ q. We define new variables yhη , wξl and xhξη for each ξ and η, and replace (2), (3), (5), (6), (7), ¯ r (t) as follows. (8), (9), (11) in M ILP

18

(2)00

q+µ X η=1

(3)00

λ X

X

|GMη0 |yhη =

ziµ ,

0≤h≤λ

i:~vi ∈GLh

|GMη0 |yhη = |GMη0 |,

1≤η ≤q+µ

h=0

(5)00

(6)00 (7)00

q X

xhξη = (

X

ξ=0

k∈GMη0

Pq

+ )ξ

ξ=0 T (1

c q+µ λ X X

xhξη +

q X

(9)00

µ−1 X

X

(φ −

0≤ξ≤q

i

c

λ X

νκφ (i))ziφ , 0 ≤ l ≤ λ

κ=1

φ=1 i:~v φ ∈GSl ∩GCφ

q X T (1 + )ξ ξ=0

wξl = |GJξ |,

0 ≤ h ≤ λ, 1 ≤ η ≤ q + µ

l=0

wξl =

ξ=0

0 ≤ h ≤ λ, 1 ≤ η ≤ q + µ

xhξη ≤ (t − T (1 + )h )|GMη0 |yhη ,

λ X

h=0 η=1

(8)00

ck − |GMη0 |µ)yhη ,

wξl ≤ T 2 (1 + )l

µ X φ=1

X i:~viφ ∈GSl ∩GCφ

(φ −

λ X

νκφ (i))ziφ ,

0≤l≤λ

κ=1

(11)00 ziφ ∈ N, 0 ≤ yhη ≤ 1, 0 ≤ xhξη ≤ |GMξ0 |, 0 ≤ wξl ≤ |GMξ0 | (12)00 yhη = 0 xhξη = 0

if GLh = ∅ or GMη0 = ∅ if GLh = ∅

or GMη0 = ∅

or GJξ = ∅

(2)

Denote the above M ILP as M ILPr (t). We have the following lemma. (1)

(2)

Lemma 8 Given a feasible solution of M ILPr (t) for some t = t0 , a feasible solution of M ILPr (t) with t = t0 (1 + 2) could be derived. (2)

(1)

Proof. We construct the solution of M ILPr (t0 (1 + 2)) from that of M ILPr (t). P We always set wξl = j∈GJξ wjl . And during our construction, we only move jobs between P P P machines in the same group while maintaining λh=0 xhξη = k∈GMη0 j∈GJξ xijk all the time, 00 00 00 00 thus we only need to (6) and (7) . P consider P constraints (3) , (4) , P We set xhξη = k∈GMη0 j∈GJξ xhjk and yhη = k∈GM 0 yhk /|GMη0 | for 1 ≤ η ≤ µ (yhη = 0 if GMη0 = ∅). Since machines in these groups have the same capacity, such a setting simply implies that we merge machines of each group into one machine, and every job is still assigned to its original 00 container. It can be easily seen that constraints (4)00 , (6)00 and P (7) hold. 0 Consider η ≥ µ + 1. For each η, we still set yhη = k∈GMη0 yhk /|GMη | (again yhη = 0 if GMη0 = ∅), and thus (3)00 and (4)00 are satisfied. P P P (1) (1) Let xhξη = k∈GMη0 j∈GJξ xhjk at first, then we have directly qξ=1 T (1 + )ξ /cxhξη ≤ (t0 − P P (1) T (1 + )h )|GMη0 |yhη , however, τh = qξ=1 xhξη = k∈GMη0 (ck − µ)yhk might not equal to θh = P ( k∈GMη0 ck − |GMη0 |µ)yhη , we would then need to reassign jobs to containers. 19

P P P Let ∆h = τh − θh ≤ (µ + µ(1 + )η−µ−1 )|GMη0 |yhη , since h τh = h θh = k∈GMη0 (ck − µ), P we know that h ∆h = 0. If ∆h > 0, we take out ∆h jobs (from jobs assigned to container h) by setting θh (1) xhξη = xhξη ∗ . τh D+

All the (fractions of) jobs we take out are then assigned to containers with ∆h < 0. Let = {h|∆h > 0}, D− = {h|∆h < 0}, for each h ∈ D− , we set xhξη =

(1) xhξη

X x(1) |∆h | sξη ∆s . τs s∈D− |∆s | +

+P

s∈D

P P P Using the fact that s∈D− |∆s | = s∈D+ ∆s , it could be easily verified that for h ∈ D− , ξ xhξη = θh . We now check their total processing times. X T (1 + )ξ /cxhξη ξ

P h

≤ (t0 − T (1 + )

)|GMη0 |yhη

+ |∆h |

s∈D+

P

(1)



T (1 + )ξ xsξη ∆τss

s∈D−

|∆s |

P ξ (1) Notice that ξ T (1 + ) xsξη /τs is the average processing time of jobs originally assigned to container s on machines in group GMη0 . For any machine k, if ysk > 0, then the average s

(1+) )ysk processing time of jobs assigned to container s on machine k is no greater than (t0 −T . (ck −µ)ysk η−µ−1 0 Since ck ≥ µ + µ(1 + ) for k ∈ GMη , the average processing time of jobs assigned to

container s on machines in group GMη0 is thus no greater than So, X T (1 + )ξ /cxhξη

t0 −T (1+)s µ+µ(1+)η−µ−1 −µ

≤ p¯ =

t0 . µ(1+)η−µ−1

ξ h

≤ (t0 − T (1 + )

)|GMη0 |yhη

P ¯∆s + p + |∆h | Ps∈D s∈D+ ∆s

≤ (t0 − T (1 + )h )|GMη0 |yhη + (µ + µ(1 + )η−µ−1 )|GMη0 |yhη p¯ ≤ (t0 + 2t0  − T (1 + )h )|GMη0 |yhη

2 (2)

Thus the minimum integer that M ILPr 2T )(1 + 2) ≤ OP T (1 + 13).

admits a feasible solution is at most (OP T (1 + 4) +

(2)

(1)

Lemma 9 Given a feasible solution of M ILPr (t) for some t = t0 , a feasible solution of M ILPr (t) for t = t0 (1 + ) could be derived, and moreover, their integer variables have the same value. (1)

Proof. We construct a solution of M ILPr (t0 (1 + )) in the following way.

20

k ∈ GMη0

yhk = yhη , xhjk

wjl = wξl /|GJξ |, xhξη ck − µ P = , |GJξ | k∈GMη0 ck − |GMη0 |µ

j ∈ GJξ j ∈ GJξ , k ∈ GMη0 ,

X

ck < |GMη0 |µ

k∈GMη0

j ∈ GJξ , k ∈ GMη0 ,

xhjk = 0,

X

ck = |GMη0 |µ.

k∈GMη0

P 0 P 0 If ck = µ, then xhjk = 0 for any h and j, thus nj=1 xhjk = (ck − µ)yhk and nj=1 p¯j xhjk ≤ [(1 + )t0 − T (1 + )h ]yhk follows directly. Otherwise, for any k ∈ GMη0 , 0

n X j=1 n0 X j=1

xhjk =

q X

|GJξ |

ξ=0

p¯j xhjk =

q X

xhξη ck − µ P = (ck − µ)yhη = (ck − µ)yhk |GJξ | k∈GMη0 ck − |GMη0 |µ

T (1 + )ξ /c|GJξ |

ξ=0

xhξη ck − µ P |GJξ | k∈GMη0 ck − |GMη0 |µ

(ck − µ)|GMη0 | ≤ (1 + )(t0 − T (1 + )h )yhk 0 k∈GMη0 ck − |GMη |µ

≤ (t0 − T (1 + )h )yhη P

≤ [(1 + )t0 − T (1 + )h ]yhk . (1)

Thus constraints (5)0 and (6)0 are satisfied, other constraints of M ILPr (t0 (1 + )) are easy to verify. 2 (2)

In all, based on our above lemmas, the minimum t such that M ILPr (t) admits a feasible (2) solution is at most OP T (1 + 13). Meanwhile, given a feasible solution of M ILPr (t∗ ), and suppose in this solution ziφ = ziφ∗ , then by setting ziφ in M ILPr (t∗ (1 + )) as the same value, this mixed integer programming becomes a linear programming, and there exists a feasible solution for it. (2) Notice that there are only O(1/3 log(1/) log2 n) fractional variables (and constraints) in M ILPr (t), O(1/ log log (1/)) but 2 integer variables, the next step is to handle those integer variables.

5.2

Reducing the number of nonzero integer variables (2)

We use the idea of Jansen[10] to handle the integer variables. We ’cut’ the M ILPr into a series of small M ILP instances, each of which contains much fewer number of integer variables. To do this, similar to [10], we need the result of Eisenbrand and Shmonin [7] about integer cones int − cone(X) = {ξ1 x1 + · · · + ξt xt |t ≥ 0; x1 , · · · , xt ∈ X; ξ1 , · · · , ξt ∈ Z≥0 }, where X ⊂ Rm is a finite set. Theorem 2 [7] Let X ⊂ Zm be a finite set of integer vectors and let b ∈ int − cone(X). Then ¯ ⊂ X such that b ∈ int − cone(X) ¯ and |X| ¯ ≤ 2m log (4mM ) where M = there exists a subset X maxx∈X ||x||∞ .

21

In our problem, ξi corresponds to integer variables ziφ (and t the number of the variables), and xi to the coefficients of these variables. For simplicity let t = T tˆ in M ILPr (t). (2) Now we divide T /c on both sides of (6)00 and (9)00 , M ILPr (T tˆ) is a mixed-integer programming with O(1/3 log(1/) log2 n) fractional variables, and its largest coefficient is bounded by O(n). ∗ , w ∗ and z φ∗ of M ILP (2) (T tˆ∗ ), we consider the constraints where Given a feasible solution x∗hξη , yhη r i ξl φ ∗ integer variables zi are involved. For t = T tˆ , we set ziφ to be zero beforehand if its corresponding containers are not valid (violating (11)00 ). Among the remaining integer variables, any ziφ satisfying (2) the following constraints are also feasible for M ILPr (T tˆ∗ ). |GCφ |

(1)

X

ziφ = |GCφ |,

1≤φ≤µ

i=1

(2)00

X

zi =

∗ , yhη

0≤h≤λ

η=1

i:~vi ∈GLh

(4)

q X

µ |GC Xφ | X

νκφ (i)ziφ = Nκ ,

1≤κ≤λ

φ=1 i=1

(8)00

µ X

X

(φ −

φ=1 i:~v φ ∈GSl ∩GCφ

κ=1

µ X

λ X

i

(9)00

λ X

X

φ=1 i:~v φ ∈GSl ∩GCφ i

(φ −

κ=1

νκφ (i))ziφ

=

q X

∗ , wξl

0≤l≤λ

ξ=1

νκφ (i))ziφ

=

µ−1 X

X

φ=1 i:~v φ ∈GSl ∩GCφ i

(φ −

λ X

νκφ (i))ziφ∗ , 0 ≤ l ≤ λ

κ=1

Notice that the right sides of all the above equalities are fixed, and the total number of these constraints is O(1/ log(1/)), and the largest coefficient is µ, thus applying Theorem 2, there is an integer solution of the above system in which there are at most O(1/ log2 (1/)) variables taking nonzero values. Thus we can conclude that for tˆ satisfying T tˆ ≥ OP T (1 + 13) + T , there is always a feasible (2) solution for M ILPr (T tˆ) in which only O(1/ log2 (1/)) integer variables are nonzero. And we guess out these integer variables through enumeration, which gives rise to at most  O(1/ log log (1/))  2 2 2 ≤ 2O(1/ log (1/) log log(1/)) 2 O(1/ log (1/)) possibilities. (2) For each possibility, we set all the other integer variables in M ILPr (T tˆ) to zero, and derive a small M ILP instance in which there are only O(1/ log2 (1/)) integer variables, O(1/2 log(1/) log2 n) fractional variables, and its largest coefficient bounded by O(n). For each of such small M ILP instances, we find the smallest tˆ such that it admits a feasible solution through binary search. We know there exists at least one such a small M ILP instance where the T tˆ we found is no greater than OP T (1 + 13) + T  ≤ OP T (1 + 16). According to Kannan’s algorithm, the overall running 2 time for each of the small M ILP instance is 2O(1/ log (1/)) poly(s), where the length of the input s is bounded by poly(1/, log n).

22

2

2

Thus, to solve all the 2O(1/ log (1/) log log(1/)) small M ILP instances, the overall running time 2 2 is 2O(1/ log (1/) log log(1/)) poly(1/, log n) + O(ˆ n) where O(ˆ n) is the time needed to round the processing time of each nonzero job, and log n ≤ 2 log n ˆ as n ≤ n ˆ2. 2 log2 (1/) log log(1/)) O(1/ By comparing poly(1/, log n ˆ ) with 2 , the running time could also be 2 log2 (1/) log log(1/)) O(1/ bounded by 2 + poly(1/, log n ˆ ) + O(ˆ n). Similar arguments are also used by Jansen[10] and Downey et al[6]. Still, poly(1/, log n ˆ ) ≤ (1/)ω + logω n ˆ for some constant integer ω. The fact that (1/)ω ≤ 2 2 ω O(1/) 2 and log n ˆ ≤ O(ˆ n) implies that we could further bound the running time by 2O(1/ log (1/) log log(1/)) + O(ˆ n).

References [1] Alon, N., Azar, Y., Woeginger, G.J., Yadid, T.: Approximation schemes for scheduling on parallel machines. Journal of Scheduling 1, 55–66, (1998) [2] Babel, L., Kellerer, H., Kotov, V.: The k-partitioning problem. Mathematical Methods of Operations Research 47, 59–82 (1998) [3] Barna, S., Aravind, S.: A new approximation technique for resource-allocation problems. Proceedings of the 1st Annual Symposium on Innovations in Computer Science, pp. 342–357 (2010) [4] Bruglieri, M., Ehrgott, M., Hamacher, H.W., Maffioli, F.: An annotated bibliography of combinatorial optimization problems with fixed cardinality constraints. Discrete Applied Mathematics 154, 1344–1357 (2006) [5] Dell’Amico, M., Lori, M., Martello, S., Monaci, M.: Lower bounds and heuristic algorithms for the ki -partitioning problem. European Journal of Operational Research 171, 725–742 (2004) [6] Downey, R., Fellows, M., Stege, U.: Parameterized complexity: A framework for systematically confronting computational intractability, in Contemporary Trends in Discrete Mathematics, From DIMACS and DIMATIA to the Future, 49–99 (1999) [7] Eisenbrand, F., Shmonin, G.: Caratheodory bounds for integer cones, Operations Research Letters 34, 564–568 (2006) [8] Hochbaum, D.S., Shmoys, D.B.: Using dual approximation algorithms for scheduling problems: theoretical and practical results. Journal of the ACM 34, 144–162 (1987) [9] Jain, K.: A factor 2 approximation algorithm for the generalized Steiner network problem. Combinatorica 21, 39–60 (2001) [10] Jansen, K.: An EPTAS for scheduling jobs on uniform processors: Using an MILP relaxation with a constant number of integral variables. SIAM Journal on Discrete Mathematics 24, 457–485 (2010) [11] Jansen, K., Christina, R.: Scheduling jobs on identical and uniform processors revisited. In: Roberto Solis-Oba, Giuseppe Persiano (eds.) WAOA 2011. LNCS, vol. 7164, pp. 109–122. Springer, Heidelberg (2012) [12] Kannan, R.: Minkowski’s convex body theorem and integer programming. Mathematics of Operations Research 12, 415–440 (1987) 23

[13] Kellerer, H., Kotov, V.: A 3/2-approximation algorithm for ki -partitioning. Operations Research Letters 39, 359–362 (2011) [14] Kellerer, H., Kotov, V.: A 7/6-approximation algorithm for 3-partitioning and its application to multiprocessor scheduling. Information Systems and Operational Research 37, 48–56 (1999) [15] Kellerer, H., Woeginger, G.: A tight bound for 3-partitioning. Discrete Applied Mathematics 45, 249–259 (1993) [16] Magazine, M.J., Ball, M.O.: Sequencing of insertions in printed circuit board assembly. Operations Research 36, 192–201 (1988) [17] Rushmeier, R.A.. Hoffman, K.L.. Padberg, M.: Recent advances in exact optimization of airline scheduling problems. Technical Report, George Mason University, (1995) [18] Woeginger,G.: A comment on scheduling two parallel machines with capacity constraints. Discrete Optimization 2, 269–272 (2005) [19] Zhang, C., Wang, G., Liu, X., Liu, J.: Approximating scheduling machines with capacity constraints. In: Xiaotie Deng, John E. Hopcroft, Jinyun Xue (eds.) FAW 2009. LNCS, vol. 5598, pp. 283–292 Springer, Heidelberg (2009)

24

Suggest Documents