Operations Research Letters Parallel machine ... - Semantic Scholar

16 downloads 1454 Views 692KB Size Report
Oct 4, 2009 - Parallel machine scheduling with nested job assignment restrictions ... c Department of Mathematics and Computer Science, TU Eindhoven, ...
Operations Research Letters 38 (2010) 47–50

Contents lists available at ScienceDirect

Operations Research Letters journal homepage: www.elsevier.com/locate/orl

Parallel machine scheduling with nested job assignment restrictions Gabriella Muratore a , Ulrich M. Schwarz b , Gerhard J. Woeginger c,∗ a

Department of Technology Management, TU Eindhoven, P.O. Box 513, 5600 MB Eindhoven, The Netherlands

b

Institut für Informatik, Christian-Albrechts-Universität zu Kiel, 24098 Kiel, Germany

c

Department of Mathematics and Computer Science, TU Eindhoven, P.O. Box 513, 5600 MB Eindhoven, The Netherlands

article

info

Article history: Received 16 October 2008 Accepted 21 September 2009 Available online 4 October 2009

abstract We derive a polynomial time approximation scheme for a special case of makespan minimization on unrelated machines. © 2009 Elsevier B.V. All rights reserved.

Keywords: Scheduling Approximation algorithms Restricted assignment

1. Introduction

open problem in the area of machine scheduling (see for instance Schuurman and Woeginger [4]).

Scheduling with job assignment restrictions. Consider n independent jobs J1 , . . . , Jn that are to be scheduled on m parallel (but not necessarily identical) machines M1 , . . . , Mm . Every job Jj can only be processed on a certain subset M (Jj ) of the machines, and on those machines it takes pj time units of uninterrupted processing to complete. All jobs are available for processing at time 0. The goal is to schedule the jobs on the machines such that the maximum job completion time Cmax is minimized. This problem is called scheduling with job assignment restrictions, and we will denote it by R | pij ∈ {pj , ∞} | Cmax ; see Lawler, Lenstra, Rinnooy Kan and Shmoys [1] for more information on the standard three-field scheduling notation. The approximability behavior of problem R | pij ∈ {pj , ∞} | Cmax is not fully understood: The results of Lenstra, Shmoys and Tardos [2] yield a polynomial time approximation algorithm with worst case ratio 2 for the more general scheduling problem R k Cmax ; this is also the strongest known positive approximability result for problem R | pij ∈ {pj , ∞} | Cmax . On the negative side, [2] prove that (unless P = NP) one cannot reach any worst case ratio better than 3/2 for R | pij ∈ {pj , ∞} | Cmax in polynomial time. Ebenlendr, Krcal and Sgall [3] extend this negative result even to the highly restricted special case where |M (Jj )| = 2 holds for all jobs. The exact location of the approximability threshold between 3/2 and 2 is totally unclear, and forms an outstanding

Special cases with ordered and nested machine sets. Hwang, Chang and Lee [5] and Glass and Kellerer [6] discuss special cases of R | pij ∈ {pj , ∞} | Cmax where the family of sets M (Jj ) carries certain nice combinatorial structures. In one of these special cases, the machine sets M (Jj ) are totally ordered by inclusion:



Corresponding author. E-mail addresses: [email protected] (G. Muratore), [email protected] (U.M. Schwarz), [email protected] (G.J. Woeginger). 0167-6377/$ – see front matter © 2009 Elsevier B.V. All rights reserved. doi:10.1016/j.orl.2009.09.010

For any two jobs Jj and Jk , either M (Jj ) ⊆ M (Jk ) or M (Jj ) ⊇ M(Jk ). This special case arises for instance in the assignment of computer programs to processors, where each program has a memory requirement and where each processor has a memory capacity. A program can only be assigned to processors with sufficiently large memories. Clearly, if the processing requirement of Jj is larger than the processing requirement of Jj , then M (Jj ) ⊆ M (Jk ). Hwang, Chang and Lee [5] derived a polynomial time approximation algorithm with worst case ratio 2 − 1/(m − 1) for this totally ordered special case. Glass and Kellerer [6] improved the worst case ratio to 3/2, and finally Ou, Leung and Li [7] came up with a polynomial time approximation scheme. Glass and Kellerer [6] also discuss another special case of R | pij ∈ {pj , ∞} | Cmax where the machine sets M (Jj ) are nested. (Note that the totally ordered special case as discussed above forms a subproblem of the nested special case.) For any two jobs Jj and Jk , either M (Jj ) ∩ M (Jk ) = ∅, or M (Jj ) ⊆ M(Jk ), or M (Jj ) ⊇ M(Jk ). This special case arises for instance in the drying stage of flour mills in the United Kingdom; see Glass and Mills [8]. Glass and Kellerer [6] derive a polynomial time approximation algorithm

48

G. Muratore et al. / Operations Research Letters 38 (2010) 47–50

with worst case ratio 2 − 1/m for this nested special case. The existence of a polynomial time approximation scheme for the nested special case is posed as an open research problem in the conclusions section of [6]. Our result. We derive a polynomial time approximation scheme for the special case of R | pij ∈ {pj , ∞} | Cmax where the machine sets M(Jj ) are nested. Our result generalizes the approximation scheme of [7] and answers the open problem of [6]. Our approach is heavily built on the ideas of Hochbaum and Shmoys [9] and Alon, Azar, Woeginger and Yadid [10]. The note is structured as follows. Section 2 summarizes several easy observations on an auxiliary packing problem in trees. Section 3 shows how to simplify a scheduling instance into a socalled rounded instance, and Section 4 shows how to solve this rounded instance in polynomial time. Section 5 wraps things up and presents the approximation scheme. 2. Trees and packings Tree structures will play a central role in our investigations. As usual, a rooted tree T = (V , E ) is a connected acyclic graph, where the edges in E correspond to father–son relations between the vertices in V . With the exception of one distinguished vertex (that is called the root), every vertex in V has a unique father; the root has no father. The vertices without sons are called leaves. The descendants of a vertex v are vertex v itself, the sons of v , the sons of its sons, and so on. Every vertex v ∈ V contains a set of items with positive real sizes. The overall size of all items in vertex v is tv . The maximum item size in the tree is tmax (note that generally tmax will not coincide with the maximum of the numbers tv ). A leaf u may additionally contain (at most) one bin of capacity cu . We consider packings of the items into the bins where the items in vertex v can only be packed into bins in descendant leaves of v . Such a packing is called strong if the bin in leaf u receives items of overall size at most cu . And a packing is called weak if the bin in leaf u receives items of overall size at most cu + tmax . The lemmas in the rest of this section establish some basic relations between weak and strong packings, and the following capacity condition (*): (*) For every vertex v the sum of the values tw over all descendants w of v is greater than or equal to the sum of the bin capacities cu over all descendant leaves u of v . Lemma 2.1. If there exists a strong packing of the items into the bins, then (*) holds.  Lemma 2.2. If (*) holds, then there exists a weak packing of the items into the bins. Proof. The proof is by induction on the overall number k of items in the tree. The case k = 0 is trivial. In the inductive step, consider a tree with k + 1 items. There exists a path v = v1 , v2 , . . . , v` = u from some vertex v to some descendant leaf u of v with the following properties: (i) Vertex v contains at least one item. (ii) The leaf u contains a bin. (iii) None of the intermediate vertices v2 , . . . , v`−1 contains an item. We select an arbitrary item in vertex v , remove it from v , and put it into the bin in leaf u. We distinguish two cases on the size t of this item. If t ≤ bu , then we reduce the bin capacity in leaf u to bu − t, and apply the inductive assumption. If t > bu , then we remove the bin from leaf u, and apply the inductive assumption.  Lemma 2.3. Assume that all items in the tree are of identical size and that all bin capacities are multiples of this size. If (*) is satisfied, then there exists a strong packing of the items into the bins. Proof. Under the given conditions, the packing in the inductive proof of Lemma 2.3 will never overpack a bin. 

3. Definition of the rounded instance We now return to the scheduling problem, and we consider an arbitrary instance I of the nested special case of R | pij ∈ {pj , ∞} | Cmax . We enumerate all machine sets M (Jj ) occurring in this instance, and we add every missing one-element machine set and also the set {M1 , . . . , Mm } to this enumeration. We organize these machine sets in a tree T = (V , E ):

• Every vertex v corresponds to a set of machines M(v) in the enumeration. The leaves correspond to the one-element machine sets, and the root corresponds to {M1 , . . . , Mm }. • A vertex u is the son of a vertex v if M(u) ⊂ M(v) and if there is no other vertex w with M (u) ⊂ M (w) ⊂ M (v) (we stress that ‘⊂’ denotes the proper subset relation). Note that vertex u is a descendant of vertex v if and only if

M (u) ⊆ M(v). Note also that for any non-leaf vertex v the set M (v) is the disjoint union of all the machine sets associated with

the sons of v . Furthermore, we associate with every vertex v ∈ V the set J (v) of those jobs Jj for which M (Jj ) coincides with M (v). To get a nicer tree, we next perform the following restructuring procedure over and over again: As long as there exists a vertex v with at least three sons v1 , . . . , v` , create a new vertex u that corresponds to the set M (v1 ) ∪ M (v2 ). This new vertex u is then a new son of v and the new father of v1 and v2 . The corresponding job set J (u) is empty. Eventually, we will reach a binary tree T , that is, a tree in which every non-leaf vertex has exactly two sons. This binary tree consists of m leaves and of m − 1 non-leaf vertices. The optimal makespan of scheduling instance I is denoted as Opt (I ). The approximation algorithm of Lenstra, Shmoys and Tardos [2] yields in polynomial time a bound A with Opt (I ) ≤ A ≤ 2 Opt (I ).

(1)

Next, let α be some fixed positive integer. A job Jj is called big if pj > A/α , and otherwise it is called small. We introduce a so-called rounded instance I # (α) for instance I that is defined as follows:

• Every big job Jj in every set J (v) is replaced by a corresponding job Jj# whose processing time p#j equals pj rounded up to the

next integer multiple of A/α 2 . Note that pj ≤ p#j ≤ (α + 1)pj /α . • For every vertex v in the tree, let S (v) denote the total processing time of the small jobs in J (v), and let S # (v) denote the value of S (v) rounded up to the next integer multiple of A/α . The small jobs are replaced by S # (v)α/A new jobs each of length A/α . Note that in instance I # (α) the processing times of all jobs are integer multiples of A/α 2 . The following two lemmas illustrate that the optimal makespans of instances I and I # (α) are very close to each other. Lemma 3.1. Let Σ be a schedule for instance I with makespan C . Then there exists a schedule Σ # for instance I # (α) with makespan C# ≤

α+1 3 C + A. α α

(2)

Proof. In schedule Σ , replace every big job Jj by its rounded counterpart Jj# in I # (α). Let Si denote the total processing time of the small jobs on machine Mi , and let Si# denote the value Si rounded up to the next integer multiple of A/α . Replace the small jobs by 2 + Si# α/A empty slots of size A/α . We claim that these empty slots can accommodate all small jobs of length A/α in instance I # (α). Indeed, consider some fixed vertex v in the binary tree T , and let m(v) = |M (v)| denote the number of machines (= the number of leaves) in the underlying subtree. Note that this subtree consists of exactly 2m(v) − 1 vertices. Let β denote the total length of all

G. Muratore et al. / Operations Research Letters 38 (2010) 47–50

small jobs in all descendants of v in instance I, and let β # denote the total length of the corresponding small jobs in instance I # (α). The construction of the rounded instance yields

β # ≤ β + (2m(v) − 1)A/α.

(3)

Let γ denote the total size of all empty slots on all machines in descendant leaves of v . Note that the quantity β is also the sum of all values Si on all machines Mi in descendant leaves of v in schedule Σ . The definition of the empty slots yields #

γ # ≥ β + 2m(v)A/α.

(4)

The inequalities in (3) and (4) together yield β ≤ γ . Now Lemma 2.3 implies that all small jobs of length A/α in instance I # (α) can be fitted into the empty slots, and this then yields the desired schedule Σ # . Finally, let us analyze how the makespan changes, when we move from schedule Σ to schedule Σ # . The rounding of the big jobs increases a machine load by a factor of at most (α + 1)/α . The replacement procedure for the small jobs adds at most 3A/α to the machine load. This exactly yields the bound in (2).  #

#

Lemma 3.2. Let Σ # be a schedule for instance I # (α) with makespan C # . Then there exists a schedule Σ for instance I with makespan C ≤ C# +

1

α

A.

(5)

Proof. In schedule Σ # , replace every big job Jj# by the corresponding big job Jj in I. On every machine in Σ # , replace every small job by an empty slot of size A/α . We claim that these empty slots can accommodate all small jobs in instance I. Consider some fixed vertex v in the tree. Exactly as in the proof of Lemma 3.1, let β denote the total length of all small jobs in all descendants of v in instance I, and let β # denote the total length of the corresponding small jobs in instance I # (α). The construction of the rounded instance yields β ≤ β # . Since β # is also the overall size of the empty slots in the descendants of v , Lemma 2.2 implies that there exists a weak packing of the small jobs in instance I into the empty slots. Since all small jobs are of length at most A/α , the weak packing increases the load of every machine by at most A/α . This yields the desired schedule Σ .  4. Solution of the rounded instance Throughout this section we will assume that the integer α is a fixed constant that does not depend on the input. Our goal is to design a fast algorithm for the rounded instance I # (α). Recall from the preceding section that in such a rounded instance I # (α), all job processing times are integer multiples of A/α 2 lying in the range from A/α to A. We represent subsets of the jobs in instance I # (α) as vectors Eλ = (λα , . . . , λα2 ) where the non-negative integer λk denotes the number of jobs in the subset whose processing time equals kA/α 2 . We stress that this representation ignores the machine sets M (Jj ).

E equals The total processing time of the jobs in λ

Pα 2

2 k=α λk · kA/α , E and will be denoted as p(λ). Since the overall number of jobs is n, 2 there are at most O(nα ) vectors that represent job sets. We denote the set of all such vectors by Λ, and we observe that the cardinality of Λ is polynomially bounded in the input size. For any vertex v in the tree representation of instance I # (α), the set J (v) of jobs Jj with E . Here is the central M(Jj ) = M(v) is encoded by the vector λ(v)

definition for a dynamic program:

E∈ Definition 4.1. For any vertex v in the tree and for any vector λ Λ, we consider schedules that processthe jobs in the descendants

49

E on the machines in M(v). All jobs in descenof v and the jobs in λ dants of v must obey the assignment restrictions imposed by the E may go on any machine in M(v). sets M (Jj ), whereas the jobs in λ E denotes the minimum makespan over all such The value f (v, λ) schedules. E . We Our goal is to compute and to tabulate all values f (v, λ) start in the leaves of the binary tree T , and work our way towards the root. A father is only handled after all its sons have already been handled. First we consider the cases where v is a leaf. Then M (v) consists of a single machine, and the only possible schedule assigns E∈Λ all jobs to this single machine. Hence, for any leaf v and any λ we have E + λ). E = p(λ(v) E f (v, λ)

(6)

And if v is a non-leaf vertex with sons v1 and v2 , then

E = min max{f (v1 , µE1 ), f (v` , µE` )} : µE1 , µE2 ∈ Λ, f (v, λ) 

E . µE1 + µE2 = λE + λ(v)

(7)

Since the cardinality of Λ is polynomially bounded in the input size, the minimum in (7) can easily be computed in polynomial time. In the end, the optimal makespan for the rounded instance I # (α) can be extracted from the root vertex r which corresponds to the set {M1 , . . . , Mm } of all machines: Opt (I # (α)) = f (r , ∅). Theorem 4.2. For any fixed integer α , the rounded scheduling instances I # (α) can be solved in polynomial time.  5. The approximation scheme Finally, let us put things together and derive the desired PTAS. Consider some fixed real number ε with 0 < ε < 1. For a given instance I of R | pij ∈ {pj , ∞} | Cmax with nested machine sets, we perform the following three steps (S1 through S3) to get an approximation algorithm with worst case ratio 1 + ε . (S1) Define a positive integer α ∗ := d9/εe. Compute the instance I # (α ∗ ) from I. (S2) Use Theorem 4.2 to solve instance I # (α ∗ ) to optimality, and call the resulting optimal schedule Σ # . (S3) Transform schedule Σ # into a schedule Σ for the original instance I as described in the proof of Lemma 3.2. # Let Cmax and Cmax denote the makespan of schedule Σ # and of # schedule Σ , respectively. Since Cmax is the optimal makespan of # ∗ instance I (α ), Lemma 3.1 with C = Opt (I ) implies # Cmax ≤

α+1 3 Opt (I ) + A. α α

This inequality together with Lemma 3.2 and (1) then yields 1 α+1 4 α+9 A≤ Opt (I ) + A ≤ Opt (I ). α α α α Since (α + 9)/α ≤ 1 + ε , this yields the desired guarantee on the # + Cmax ≤ Cmax

quality of the approximation. Theorem 5.1. The special case of R | pij ∈ {pj , ∞} | Cmax with nested machine sets possesses a polynomial time approximation scheme.  Acknowledgements This research was supported by the Netherlands Organisation for Scientific Research (NWO), grant 639.033.403, by the EU Research Project 015964 (AEOLUS: Algorithmic Principles for Building Efficient Overlay Computers) and by BSIK grant 03018 (BRICKS: Basic Research in Informatics for Creating the Knowledge Society).

50

G. Muratore et al. / Operations Research Letters 38 (2010) 47–50

References [1] E.L. Lawler, J.K. Lenstra, A.H.G. Rinnooy Kan, D.B. Shmoys, Sequencing and scheduling: Algorithms and complexity, in: S.C. Graves, A.H.G. Rinnooy Kan, P.H. Zipkin (Eds.), Logistics of Production and Inventory, in: Handbooks in Operations Research and Management Science, vol. 4, North-Holland, Amsterdam, 1993, pp. 445–522. [2] J.K. Lenstra, D.B. Shmoys, E. Tardos, Approximation algorithms for scheduling unrelated parallel machines, Mathematical Programming 46 (1990) 259–271. [3] T. Ebenlendr, M. Krcal, J. Sgall, Graph balancing: A special case of scheduling unrelated parallel machines, in: Proceedings of the 19th ACM–SIAM Symposium on Discrete algorithms, SODA’2008, 2008, pp. 483–490. [4] P. Schuurman, G.J. Woeginger, Polynomial time approximation algorithms for machine scheduling: Ten open problems, Journal of Scheduling 2 (1999) 203–213.

[5] H.C. Hwang, S.Y. Chang, K. Lee, Parallel machine scheduling under a grade of service provision, Computers and Operations Research 31 (2004) 2055– 2061. [6] C.A. Glass, H. Kellerer, Parallel machine scheduling with job assignment restrictions, Naval Research Logistics 54 (2007) 250–257. [7] J. Ou, J.Y.T. Leung, C.L. Li, Scheduling parallel machines with inclusive processing set restrictions, Naval Research Logistics 55 (2008) 328–338. [8] C.A. Glass, H.R. Mills, Scheduling unit length jobs with parallel nested machine processing set restrictions, Computers and Operations Research 33 (2006) 620–638. [9] D.S. Hochbaum, D.B. Shmoys, Using dual approximation algorithms for scheduling problems: Theoretical and practical results, Journal of the ACM 34 (1987) 144–162. [10] N. Alon, Y. Azar, G.J. Woeginger, T. Yadid, Approximation schemes for scheduling on parallel machines, Journal of Scheduling 1 (1998) 55–66.