Improved Bounds for Sum Multicoloring and Scheduling Dependent Jobs with Minsum Criteria Rajiv Gandhi∗
Magn´ us M. Halld´orsson†
Guy Kortsarz†
Hadas Shachnai‡
Abstract We consider a general class of scheduling problems where a set of dependent jobs needs to be scheduled (preemptively or non-preemptively) on a set of machines so as to minimize the weighted sum of completion times. The dependencies among the jobs are formed as an arbitrary conflict graph. An input to our problems can be modeled as an instance of the sum multicoloring (SMC) problem: Given a graph and the number of colors required by each vertex, find a proper multicoloring which minimizes the sum over all vertices of the largest color assigned to each vertex. In the preemptive case (pSMC), each vertex can receive an arbitrary subset of colors; in the non-preemptive case (npSMC), the colors assigned to each vertex need to be contiguous. SMC is known to be no easier than classic graph coloring, even in the case of unit color requirements. Building on the framework of Queyranne and Sviridenko (J. of Scheduling, 5:287-305, 2002 ), we present a general technique for reducing the sum multicoloring problem to classical graph multicoloring. Using the technique, we improve the best known results for pSMC and npSMC on several fundamental classes of graphs, including line graphs, (k + 1)-claw free graphs and perfect graphs. In particular, we obtain the first constant factor approximation ratio for npSMC on interval graphs, on which our problems have numerous applications. We also improve the results of Kim (SODA 2003, 97–98 ) for npSMC of line graphs and for resource-constrained scheduling.
∗
Department of Computer Science, Rutgers University, Camden, NJ 08102. E-mail: {rajivg,guyk}@camden.rutgers.edu. † Department of Computer Science, University of Iceland, IS-107 Reykjavik, Iceland. E-mail:
[email protected]. ‡ Department of Computer Science, The Technion, Haifa 32000, Israel. E-mail:
[email protected]. Part of this work was done while the author was on leave at Bell Laboratories, Lucent Technologies, 600 Mountain Ave., Murray Hill, NJ 07974.
1
1
Introduction
We consider a general class of problems in which jobs that utilize non-sharable resources need to be scheduled (preemptively or non-preemptively) on multiple machines. Scheduling any job j depends on whether another job sharing resources with j is being scheduled. The dependencies among the jobs are modeled by an arbitrary conflict graph, in which the vertices represent the jobs, and an edge between two vertices means that the corresponding jobs cannot be scheduled simultaneously. Then the problem of scheduling dependent jobs can be formulated as a coloring problem: a proper coloring of the conflict graph partitions the set of jobs to subsets of non-conflicting jobs. Thus, when all jobs have the same (unit) execution time, we get a graph coloring problem, and when the execution times are arbitrary, we get a graph multicoloring problem. In this work, we focus on the sum of completion times measure. For unit-length jobs, this is known as the chromatic sum or sum coloring (SC) of the conflict graph. Let G = (V, E) be the P conflict graph. Given a coloring ψ of G, the sum coloring of ψ is given by SC(G, ψ) = v ψ(v). The minimum chromatic sum of G is given by SC(G) = minψ SC(G, ψ). In the weighted case, each P vertex v has a weight, wv , and we need to minimize v wv ψ(v) over all proper colorings. An instance of a multicoloring problem is a pair (G, x), where G = (V, E) is a graph, and x is a vector of color requirements (or lengths) of the vertices. A multicoloring of G is an assignment ψ : V → 2N , such that each vertex v ∈ V is assigned a set of xv distinct colors, and adjacent vertices receive non-intersecting sets of colors. Denote by fv (ψ) = maxi∈ψ(v) i the largest color assigned to v P by a multicoloring ψ. The sum multicoloring (SMC) of ψ on G is SMC(G, ψ) = v∈V fv (ψ). The SMC problem is to find a multicoloring ψ, such that SMC(G, ψ) is minimized. In the weighted case, we P want to minimize v∈V wv fv (ψ), over all proper multicolorings ψ. When all the color requirements are equal to 1, the problem reduces to SC. A multicoloring, ψ, is called non-preemptive if the colors assigned to each vertex v are contiguous, i.e., if for any v ∈ V , (maxi∈ψ(v) i) − (mini∈ψ(v) i) + 1 = xv . We denote this version of the problem by npSMC; the preemptive problem, where each vertex v can receive any set of xv colors, is denoted by pSMC. Scheduling dependent jobs, and the resulting variants of the sum (multi)coloring problem, have numerous applications, in particular on interval graphs. The following practical scenarios yield instances of our problems on this natural subclass of graphs. Session scheduling on a path: In a path network, pairs of nodes need to communicate, for which they need use of the intervening path. If two paths intersect, the corresponding sessions cannot be held simultaneously. In this case, it would be natural to expect the sessions (i.e., “jobs”) to be of different lengths, leading to the sum multicoloring problem on interval graphs. Storage allocation: Storage allocation in a warehouse involves minimizing the total distance traveled by a robot [W97]. Goods are checked in and out at known times; thus, goods that are not in the warehouse at the same time can share the same location. We represent each of the goods by an interval on the line, which gives the time interval in which it is available at the warehouse. Numbering the storage locations by their distance from the counter, the total distance corresponds to sum coloring the intervals formed by the goods. VLSI design: In the wire-minimization problem [NSS99], terminals lie on a single vertical line (each terminal is represented by an interval on this line), and with unit spacings are vertical bus
2
lanes. Pairs of terminals are to be connected via horizontal wires on each side to a vertical lane, with non-overlapping pair utilizing the same lane. With the vertical segments fixed, the wire cost corresponds to the total length of horizontal segments. Numbering the lanes in increasing order of distance from the terminal line, lane assignment to a terminal corresponds to coloring the terminal’s interval by an integer. The wire-minimization problem then corresponds to sum coloring an interval graph. Other applications of sum (multi)coloring include traffic intersection control, session scheduling in local-area networks and compiler design (a comprehensive survey appears in [BHK+ 00]). Instances of SMC on line graphs and, more generally, on (k + 1)-claw free graphs, are derived mainly from applications that involve resource constrained scheduling. Our results apply also to permutation graphs, which model, e.g., train scheduling problems.
1.1
Our Results
We present (in Section 2.1) a general technique for reducing SMC to the classic graph (multi)coloring problem. Using the technique, we improve the best known results for pSMC and npSMC on several fundamental classes of graphs, including line graphs, (k + 1)-claw free graphs and perfect graphs. In particular, we obtain the first constant factor approximation ratio for npSMC on interval graphs. Our improved bound of 7.682 for npSMC of line graphs is achieved by a simple greedy algorithm (see in Section 3.1). The previous best ratio of 10, achieved by an algorithm of Kim [K-03], involved solving an LP with an exponential number of constraints. While our main focus is on minimizing the sum of completion times of the jobs, our technique can be applied to other minsum optimization problems, such as resource constrained scheduling (RCS). In RCS, we have a set of jobs, each requesting up to k resources; jobs that need to utilize the same resource cannot be processed simultaneously. We say that a resource has completion time i if the last job utilizing this resource completes at time i. Our goal is to find a non-preemptive schedule that minimizes the sum of completion times of all the resources. We show (in Section 4) that our technique yields an approximation ratio of 2e · k ≈ 5.437k. This improves the best ratio known of 8k − 7 given in [K-03], for any k ≥ 3. For simplicity, in formulating our results it is implicitly assumed that the number of machines is “unbounded”. The technique can, however, be applied in a system with any given number of machines, with slightly weaker performance ratios. Due to space constraints, we relegate this description to Appendix A. Also, we formulate our results for the unweighted case, and show (in Section 4) how to generalize the results for the weighted versions of the problems. Relation to Min-sum Set Cover Our results include an approximation ratio of 3.591 for sum coloring of perfect graphs. This improvement upon the previous ratio of 4 (of [BBH+ 98]) is of particular interest, due to the relation of SC to the min-sum set cover problem. The input to min-sum set cover consists of a universe U and a collection of subsets S = {Si }, Si ⊆ U. A feasible S solution is an ordered sub-collection of subsets S 0 = {S10 , S20 , . . .}, such that i Si0 = U. We say that u ∈ U has cover time i if Si0 is the first subset in the order of S 0 to include u. The goal is to minimize the sum of cover times over all the elements of U. Feige et al. [FLT-02] showed that min-sum set cover admits a 4-approximation and that, unless P=NP, for any constant > 0, there is no (4−)-approximation. Observe that SC is a special case of min-sum set cover, in which S is the
3
collection of all independent sets in G. Hence, our 3.591-approximation implies that the min-sum set cover problem in its full generality is provably harder to approximate than SC on perfect graphs. Techniques Our general approximation technique builds on the framework of Queyranne and Sviridenko [QS-02] for scheduling jobs with release times on parallel machines. As in [QS-02], we divide the time line into intervals of geometrically increasing size (see also [HSW-96, HSSW-97]), using randomized starting points (as introduced in [CP+ 96]), and approximate the classic makespan problem on each block. Note, however, that the results in [QS-02] do not apply to arbitrary conflict graphs. The class of problems studied in [QS-01, QS-02] include shop scheduling (open shop and job shop) and entail a different optimization criteria than SMC. (As shown in [GHKS04], open shop scheduling is in fact a special case of the data migration problem [K-03].)
1.2
Related Work
The SC problem was introduced in [K89] and the SMC problems in [BHK+ 00]. Table 1 summarizes the known results for SC, pSMC and npSMC in various classes of graphs. New bounds given in this paper are shown in boldface. In each of these entries, we give in parenthesis the previous best known bound for the problem. Entries marked with · follow by inference, either by using containment of graph classes (interval graphs are perfect), or by SC being a special case of SMC. When omitted, [BBH+ 98] is the references for SC and [BHK+ 00] for SMC. Also, in the table below, c represents some constant.
General graphs Perfect graphs Interval graphs Bipartite graphs Planar graphs Trees k + 1-claw free k-sets Line graphs
SC u.b. l.b. · n1− 3.591 (4) c > 1 [BK98] 1.796 [HKS03] c > 1 [G01] 27/26 [G+ 02] c > 1 [BK98] PTAS [HK02] NPC [HK02] 1 [K89] k k 2 NPC
pSMC n/ log2 n 5.436 (16) 5.436 (7.184) 1.5 PTAS [HK02] PTAS [HKP+ 03] k k 2
SMC npSMC n/ log n O(log n) 11.273 (O(log n)) 2.8 PTAS [HK02] 1 [HKP+ 03] 1.796k2+.5 (4k 2−2k) [HKS03] 3.591k+.5 (6k−2) [K-03] 7.682 (10) [K-03]
Table 1: Known results for sum (multi-)coloring problems There is a wide literature on parallel machine scheduling with the objective of minimizing the sum of completion times. These works generally deal with scheduling independent jobs, or allow for precedence constraints which are directed dependencies. The undirected conflict graphs considered here require quite different treatment. Some work has been done on resource-constrained scheduling. Kubale [K-96] studied the complexity of scheduling biprocessor tasks. They also investigate special classes of graphs, and showed that npSMC of line graphs of trees is NP-hard in the weak sense. Afrati et al. [AB+ 00] gave a polynomial time approximation scheme for the problem that we consider, minimizing sum of completion times of dedicated tasks. However, their method applies only to the case where the total 4
number of processors is a fixed constant. Coffman et al. [CG+ 85] analyzed the makespan version of npSMC of line graphs, which arises in the file transfer problem. They showed that a class of greedy algorithms yields a 2-approximation and gave a (2 + )-approximation for a version with more general resource constraints. Kim [K-03] gave an LP formulation of the npSMC problem on line graphs and intersection graphs of k-sets,1 improving the earlier bounds of [HKS03]. The paper presents also a ratio of 8k − 7 for the RCS problem with k resources.
2
Sum Multicoloring via Makespan Approximations
In this section we describe and analyze our main approximation technique. Later, we show how to obtain our results by applying the general technique to specific classes of graphs, and to the different variants of the sum multicoloring problem that we consider here.
2.1
Algorithms and Implementation
Our technique uses two components: (i) a lower bound, fv∗ , on the completion time of the vertex v in an optimal solution, for any v ∈ V ; a parameter d ≥ 1, which indicates how well the lower bound captures the optimal value; (ii) a (makespan) multicoloring algorithm A with performance ratio ρ, for some ρ ≥ 1. Given the fv∗ values, the algorithm schema, ALG, breaks the time line (or the color sequence 1, 2, . . .) into intervals. We use in the partition two parameters: α, chosen uniformly at random from [0, 1), and a constant β > 1 (to be optimized). Let ck = β α+k , for k = 0, 1, . . . , L, where cL ≥ maxv xv . The intervals induce a partition of the graph into blocks V` = {v ∈ V : c`−1 < fv∗ ≤ c` }, ` = 1, . . . , L, of vertices whose completion times (fv∗ ) fall in the respective interval. We then apply the makespan multicoloring algorithm on each block in sequence. We show that when this is possible, our algorithm attains a ratio of d · eρ ≈ 2.718dρ for pSMC, 1.796dρ + 0.5 for npSMC, and 1.796dρ for SC. The lower bounds, fv∗ , can be obtained either by solving a linear program, or by using an approximation algorithm for the preemptive sum multicoloring problem. This results in two algorithms described below. As shown in Section 2.2, we can unify the analyses of the two algorithms, once we guarantee that each satisfies certain properties. LP-based Algorithm One way to obtain the fv∗ values is by solving the LP relaxation of an integer programming formulation of the problem. (Such LP relaxations have been used in the past in scheduling independent jobs; see, e.g., [W-85, Q-93, S-96].) Before we describe our LPbased algorithm, we give some underlying properties of this algorithm. Let OP T be the cost of an P optimal solution, and OP T ∗ = v fv∗ the total of the lower bounds fv∗ . Also, we denote by ω(H, x) the maximum weight of any clique in a subgraph H, i.e., largest sum of color requirements. For a P subset U of vertices, let x(U ) = u∈U xu . We require that the following properties be satisfied: (P1) OP T ∗ ≤ OP T . (P2a) maxv∈V` fv∗ ≥ ω(V` , x)/d, for some d ≥ 1, for all 1 ≤ ` ≤ L. (P2b) There is a multicoloring algorithm, A, that approximates the makespan of any 1
We give the precise definition in Section 3.1.
5
graph in the given graph class within a ρ factor of the weighted clique size, and in particular, A(V` , x) ≤ ρ · ω(V` , x), for ` = 1, 2, . . . , L. (1) We formulate sum multicoloring with an integer program that uses linear ordering variables (see, e.g., [P-80, HSSW-97]). For any edge uv ∈ E, there is a variable δuv ∈ {0, 1}, such that δuv = 1 if u precedes v in the schedule, and 0 otherwise. Let N (v) denote the set of neighbors of v in G, and C1 , . . . , CNv denote the maximal cliques in N (v). The constraints (2) follow from the requirement that the vertices in any clique C are assigned disjoint sets of colors; thus the completion time fv of a vertex v in a clique C is at least the sum of the color requirements of the vertices in C that completed before v plus that of v itself. (LP )
minimize
X
fv
v∈V
subject to:
∀v ∈ V, 1 ≤ r ≤ Nv : fv ≥ xv +
X
xu δuv
(2)
u∈Cr
∀uv ∈ E
: δuv + δvu = 1
In the linear relaxation of LP, we allow fv to take non-integral values ≥ 1. We denote by fv∗ the value of fv in an optimal LP solution. Note that the program is equally valid for the preemptive and non-preemptive variants. The next lemma shows that the above LP formulation satisfies property (P2a) with d = 2. It is based on a result of [K-03] (Lemma 2.3), attributed to [HSSW-97]. The proof is given in appendix. ω(V` , x) Lemma 2.1 For any 1 ≤ ` ≤ L, maxv∈V` fv∗ ≥ . 2 ∗ In particular, since maxv∈V` fv ≤ c` , this implies that c` ≥ ω(V` , x)/2 for ` = 1, . . . , L. We now summarize the steps of the LP-based algorithm with parameters β, α > 1. Algorithm ALGLP (i) Solve the linear program LP to obtain the fv∗ values. (ii) Partition the vertices in the graph to the blocks V1 , V2 , . . . by their fv∗ values. (iii) Color the blocks in sequence using a non-preemptive multicoloring algorithm A which satisfies Property (P2b); that is, suppose that the last color used for the block V` is col` , then A starts coloring the block V`+1 with col` + 1. Applying an Approximation Algorithm for pSMC An alternative way of obtaining the infeasible solution, fv∗ , is to use the preemptive solution when solving the non-preemptive problem. In this case, we replace (P2a) and (P2b) by the following properties. (P2a0 ) There is a d-approximation algorithm for pSMC, for some d ≥ 1. (P2b0 ) There is non-preemptive multicoloring algorithm, A, that approximates the makespan of any graph in the given graph class within a ρ factor of the number of colors used by a preemptive multicoloring, and in particular, A(V` , x) ≤ ρ · pMC(V` , x), for ` = 1, 2, . . . , L. 6
(3)
We now summarize the steps of the algorithm based on the approximation for pSMC. The algorithm gets as parameters the values β, α > 1. Algorithm ALGPRE (i) Apply to G a d-approximation algorithm for pSMC. Let fvpre be the completion time of v ∈ V . Set for any v ∈ V , fv∗ = fvpre /d, (ii) Partition the vertices in the graph to the blocks V1 , V2 , . . . by their fv∗ values. (iii) Color the blocks in sequence using a non-preemptive multicoloring algorithm A which satisfies Property (P2b0 ).
2.2
Analysis
We use in the analysis the following notation. Recall that the (multi)chromatic number χ(G) of a graph G is the minimal number of colors required for (multi)coloring the vertices in G properly. In scheduling terms, this is the minimal total length (or makespan) of any legal schedule. We use the notation pMC, npMC for the preemptive and non-preemptive versions of this problem, respectively. Let `v denote the block into which v falls ( `v is a function of α). Let t` denote the number of colors used by the multicoloring algorithm A on block `. If we apply algorithm ALGLP , then by properties (P2a) and (P2b), t` ≤ ρω(V` , x) ≤ ρdc` . (4) Similarly, if we use ALGPRE , we have that tl ≤ ρ · pMC(V` , x) ≤ ρ maxv∈V` fvpre = ρd maxv∈V` fv∗ ≤ ρdc` . We proceed to analyze our algorithm schema, ALG, without making any assumptions on the algorithm used (i.e., the analysis applies for both ALGLP and ALGPRE ). Denote by f˜v the last color (completion time) of a vertex v by our algorithm schema ALG. This color is the sum of the makespans of the colorings of the previous blocks, plus the completion time P 0 fv0 of v within the current block, i.e. f˜v = `−1 r=1 tr + fv . Bound for pSMC We first consider a general scenario, that captures, e.g., the preemptive case. We trivially bound the last color of v ∈ V` under A by the total number of colors used, i.e., fv0 ≤ t` . Hence, we get for each vertex independently that f˜v ≤
` X
tr ≤
r=1
and ALG(V, x) =
X
v∈V
f˜v ≤ d · ρ
d · ρβ α+`+1 , β−1
X β α+`v +1
β−1
v∈V
=d·ρ·
(5)
β X c` , β − 1 v∈V v
(6)
where `v is the block in which v is colored and c` is the largest color in block `. We now select α uniformly at random from [0, 1). Then `v and c` are also random variables. The proof of the following lemma is given in the Appendix. Lemma 2.2 For any β > 1 and v ∈ V , E[c`v ] = choices of α.
7
β−1 ∗ ln β fv ,
where the expectation is over the random
Recall that OP T ∗ =
∗ v fv .
P
Combining (6) with Lemma 2.2 we get that
E[ALG(V, x)] ≤ dρ
β X β−1 ∗ β fv ≤ dρ OP T ∗ . β − 1 v∈V ln β ln β
The function f (β) = β/ ln β is minimized when β = e ≈ 2.718. This gives the following. Theorem 2.3 There is a (d · eρ)-approximation algorithm for pSMC. Bound for npSMC In the non-preemptive case, we may use the schedule output by algorithm A for V` either directly or reversed. In the reverse order, any vertex v, whose last color is fv , is colored with (t` − fv + 1), (t` − fv + 2), . . . , (t` − fv + xv ). By selecting the order that yields the better weighted average completion time, we may assume that on average, each job is at least halfway through completion at the half-way mark for V` . That is, on average, for any vertex v ∈ V` , fv0 ≤ (t` + xv )/2. Thus, we have f˜v ≤
`−1 X
r=1
tr +
t` xv + 2 2
`−1 β α+` X ≤ d·ρ + β α+r 2 r=0
!
+
xv 2
1 1 xv + + 2 β−1 2 β+1 xv = d · ρ · c` + 2(β − 1) 2
≤ d · ρβ α+`
(7)
(8)
Combining (8) with Lemma 2.2 we have E[ALG(V, x)] =
X
E[f˜v ] ≤ d · ρ
v∈V
= d·ρ
β+1 X x(V ) E[c`v ] + 2(β − 1) v 2
β+1 x(V ) OP T ∗ + 2 ln β 2
The function f (β) = (β + 1)/ ln β is minimized when β = γ ≈ 3.59112, for a ratio of dγρ/2 + 0.5. Note that the above schema can be derandomized, by partitioning the interval (0, 1] to smaller intervals; we can then search for the best value for α in these intervals, to within desired precision. We summarize in the next result. Theorem 2.4 There is a (dγρ/2 + 0.5)-approximation algorithm for npSMC, where γ ≈ 3.59112. Deterministic and simultaneous approximation If we make do without randomization, we can still obtain reasonable bounds that translate to simultaneous approximations of makespan and weighted completion time. By the definition of V` , fv∗ > β α+`−1 . Then, from (5) we obtain, for each vertex v, a bound of β2 f˜v ≤ d · ρ . fv∗ β−1 This is optimized when β = 2, Theorem 2.5 There is an algorithm that approximates simultaneously pSMC (npSMC) and pMC (npMC), to within factor 4dρ. 8
Sum coloring approximation When the graph has unit color requirements, we get the SC problem. For this case, we obtain a slight improvement. The proof of the next theorem is given in the Appendix. Theorem 2.6 There is a (dγρ/2)-approximation algorithm for SC, where γ ≈ 3.59112.
3
Approximating Sum Multicoloring
We now apply our technique to the npSMC problem on several classes of graphs. We use both the preemptive approximation and the LP-based algorithm.
3.1
Approximating npSMC
Line graphs Here we can apply both the LP and the preemptive relaxations with equal performance ratio, but the latter is both combinatorial and more efficient. A greedy 2-approximation algorithm for pSMC on line graphs is presented in [BHK+ 00] (that holds also in the weighted case). Thus, we can apply algorithm ALGPRE , with d = 2. For non-preemptive multicoloring line graphs, we use the greedy algorithm of [CG+ 85] that schedules each job as early as possible (i.e. colors each vertex with the smallest possible colors), breaking ties arbitrarily. This ensures that each vertex is always waiting for a neighbor until it is scheduled to completion. The completion time of a vertex is then at most the sum of the lengths of its neighbors, which is at most twice the length of the larger clique involving the vertex (see [CG+ 85]). Thus, in this case, we have ρ = 2. Now, using Theorem 2.4, we get a performance bound for line graphs. Theorem 3.1 There is a 7.683-approximation algorithm for npSMC on line graphs. This improves on the recent factor of 10 by Kim [K-03] and the factor of 12 obtained by a combinatorial (greedy) algorithm in [HKS03]. Observe that the non-preemptive algorithms are all measured in terms of the preemptive optimum. Intersection graphs of k-sets Resource-bounded scheduling when each job uses at most k resources is modeled by graphs that are intersection graphs of sets of size at most k. For each resource r, the vertices using that resource form a clique Cr . Then, for any v ∈ V , N (v) can be partitioned into at most k maximal cliques. We can extend the LP-based strategy for line graphs to intersection graphs of k sets. In this case, the non-preemptive greedy multicoloring algorithm of [CG+ 85] uses at most kω colors, where ω is the maximal size of any of the resource cliques. Thus, it suffices to consider only cliques induced by individual resource, and not those cliques formed by interplay of a collection of resources. In other words, the clique constraints in LP need only involve the resource-cliques, therefore the number of constraints in polynomial. Hence, we obtain a non-preemptive solution with d = 2 and ρ = k, and by Theorem 2.4, we get Theorem 3.2 There is a (3.591k + 0.5)-approximation for npSMC on intersection graphs of k-sets. This improves on the ratio of 6k − 2 of [K-03]. (k+1)-claw free graphs The combinatorial strategy for line graphs can be generalized for (k+1)claw free graphs, albeit with a worse ratio function than for LP-based algorithm for intersection
9
graphs of k-sets. The sorted greedy algorithm of [BHK+ 00] yields a ratio of k for pSMC in (k + 1)claw free graphs, resulting in a preemptive relaxation with d = k in our schema. Also, as above, the makespan algorithm has performance ratio ρ = k. Thus, we get Theorem 3.3 There is a combinatorial (1.796k 2 + 0.5)-approximation for npSMC on (k + 1)-claw free graphs. Interval graphs The npMC problem on interval graphs is better known as dynamic storage allocation. Gergov gave an algorithm that uses at most 3ω(G) colors [G-99]. The number of maximal cliques in an interval graph is at most n. Thus, LP has a polynomial number of constraints and we can use it to obtain a multicoloring satisfying (P1) and (P2a), with d = 2. We can also use the approximation of the preemptive solution of [HKS03] as a relaxation with d = 7.184. Applying Theorem 2.4, we obtain the first constant approximation factor for this problem. Theorem 3.4 There is an 11.273-approximation and a combinatorial 38.7-approximation for npSMC on interval graphs.
3.2
Approximating pSMC
Perfect graphs On perfect graphs, LP can be solved in polynomial time, even though the number of constraints may be exponential, because there is a polynomial time separation algorithm: given a solution f for LP , we can test in polynomial time whether all the constraints are satisfied. For a vertex v ∈ V , we set, for each neighbor u ∈ N (v), x0u = xu δuv . We can now find the maximum weight clique in N (v) with respect to x0 , since any subgraph of G is perfect. Then, we can test in polynomial time whether fv satisfies the constraint (2) by checking whether the inequality holds for this maximum weight clique. (For more details, see e.g., [Q-93].) The solution for LP yields a multicoloring ψ ∗ that satisfies (P1) and (P2), with d = 2. The multicoloring problem pMC on perfect graphs is solvable in polynomial time, within arbitrary desired precision, as shown in [GLS-93], yielding our ρ = 1 + O(1/n). Applying Theorems 2.3 and 2.6, we improve on the previous best factors of 16 for pSMC [BHK+ 00] and 4 for SC [BBH+ 98]. Theorem 3.5 There is a 2e ≈ 5.436-approximation for pSMC and a 3.592-approximation for SC on perfect graphs.
4
Extensions
Weights Note that vertex weights can be added in our LP formulation, to get the fractional values fv∗ that satisfy (P1) and (P2) for the weighted minsum objective. We then apply as before for each block ` the makespan algorithm A. Release times Our technique can be applied also in the case where each job Jj has a release time, rj . In this case, in the LP formulation we add for any vertex v the constraint fv ≥ rv + xv . This ensures that, for any v ∈ V` , rv ≤ c` . Hence, when applying the makespan algorithm, A, we P α+` ). This is attained by taking β = 2, which start scheduling the vertices in V` at max( `−1 r=1 tr , β slightly increases the performance bounds that we obtained for ALG, both in the preemptive and the non-preemptive case. Theorem 4.1 ALG attains a ratio of dρ1.5/ ln 2 ≈ 2.16dρ for npSMC and dρ2/ ln 2 ≈ 2.89dρ for pSMC instances with release times. 10
Resource Constrained Scheduling Recall that in RCS, the resources are represented as cliques in our conflict graph G. Let C denote the set of maximal cliques in G, then RCS can be formulated as the following linear program. (LP − RCS) subject to:
P
minimize fCˆ ˆ C∈C ∀Cˆ ∈ C, ∀v ∈ Cˆ
: fv ≥ xv +
X
xu δuv
ˆ u∈C
∀Cˆ ∈ C, ∀v ∈ Cˆ ∀uv ∈ E
: fC ≥ fv : δuv + δvu = 1
(9) (10)
This corresponds to only the last vertex of each clique contributing to the objective function in the npSMC problem. Our analysis in the preemptive case was separate for each vertex, bounding the cost for the vertex only by the last color used in that block. Thus, we obtain an approximation ratio of 2e · k for RCS. This improves on the previous ratio of 8k − 7 presented by Kim [K-03], for any k ≥ 3. For k = 2, the ratio of 10.45 is worse than the best known approximation ratio of 5.055 [GHKS04], but is achieved by a polynomial-size linear program. Acknowledgments. We thank Moses Charikar and Chandra Chekuri for helpful comments and suggestions.
References [AB+ 00] F. Afrati, E. Bampis, A. Fishkin, K. Jansen, and C. Kenyon. Scheduling to minimize the average completion time of dedicated tasks. FSTTCS ’00. [BBH+ 98] A. Bar-Noy, M. Bellare, M. M. Halld´ orsson, H. Shachnai, T. Tamir. On chromatic sums and distributed resource allocation. Inf. Comp. 140:183–202, 1998. [BHK+ 00] A. Bar-Noy, M. M. Halld´ orsson, G. Kortsarz, H. Shachnai, and R. Salman. Sum multicoloring of graphs. J. Algorithms 37(2):422–450, 2000. [BK98] A. Bar-Noy and G. Kortsarz. The minimum color-sum of bipartite graphs. J. Algorithms, 28:339– 365, 1998. [CP+ 96] S. Chakrabarti, C. A. Phillips, A. S. Schulz, D. B. Shmoys, C. Stein and J. Wein. Improved scheduling algorithms for minsum criteria. ICALP ’96, 875–886. [CG+ 85] E. G. Coffman, Jr., M. R. Garey, D. S. Johnson and A. S. LaPaugh. Scheduling file transfers. SIAM J. Comput. 14:744–780, 1985. [FLT-02] U. Feige, L. Lov´ asz, P. Tetali. Approximating min-sum set cover. APPROX’02, 94–107. [G-99] J. Gergov. Algorithms for compile-time memory allocation. SODA’99. [G+ 02] K. Giaro, R. Janczewski, M. Kubale and M. Malafiejski. A 27/26-approximation algorithm for the chromatic sum coloring of bipartite graphs. APPROX ’02, 131–145. [G01] M. Gonen. Coloring Problems on Interval Graphs and Trees. M.Sc. thesis, The Open Univ., Tel-Aviv, 2001. [GHKS04] R. Gandhi, M. M. Halld´ orsson, G. Kortsarz and H. Shachnai, Approximating non-preemptive open-shop scheduling and related problems. ICALP ’04. [GLS-93] M. Gr¨ otschel, L. Lov´ asz and A. Schrijver. Geometric Algorithms and Combinatorial Optimization. Springer-Verlag, 1993.
11
[HSW-96] L. A. Hall, D. B. Shmoys, and J. Wein. Scheduling to minimize average completion time: Off-line and on-line algorithms. SODA’96, 142–151. Jan 1996. [HSSW-97] L. A. Hall, A. Schulz, D. B. Shmoys, and J. Wein. Scheduling to minimize average completion time: Off-line and on-line approximation algorithms. Math. Operations Research 22:513–544, 1997. [HK02] M. M. Halld´ orsson and G. Kortsarz. Tools for multicoloring with applications to planar graphs and partial k-trees. J. Algorithms 42(2), 334–366, 2002. [HKP+ 03] M. M. Halld´ orsson, G. Kortsarz, A. Proskurowski, R. Salman, H. Shachnai, and J. A. Telle. Multicoloring trees. Inf. Computation 180(2):113–129, 2003. [HKS03] M. M. Halld´ orsson, G. Kortsarz, H. Shachnai. Sum coloring interval and k-claw free graphs with application to scheduling dependent jobs. Algorithmica 37:187–209, 2003. [J-97] K. Jansen. The optimum cost chromatic partition problem. CIAC ’97, 25–36. [K-03] Y. A. Kim. Data migration to minimize the average completion time, SODA’03. [K-96] M. Kubale. Preemptive versus non preemptive scheduling of biprocessor tasks on dedicated processors. European J. Operational Research 94:242–251, 1996. [K89] E. Kubicka. The chromatic sum of a graph. PhD thesis, Western Michigan, 1989. [NSS99] S. Nicoloso, M. Sarrafzadeh and X. Song. On the sum coloring problem on interval graphs. Algorithmica 23:109–126,1999. [P-80] C. N. Potts. An algorithm for the single machine sequencing problem with precedence constraints, Math. Prog. Stud. 13, 78–87, 1980. [Q-93] M. Queyranne. Structure of a simple scheduling polyhedron. Math. Prog. 58:263–285, 1993. [QS-01] M. Queyranne, M. Sviridenko. A 2 + -approximation algorithm for generalized preemptive open shop problem with minsum objective. J.Alg. 45:202-212, 2002. [QS-02] M. Queyranne, M. Sviridenko. Approximation algorithms for shop scheduling problems with minsum objective. J. Scheduling 5:287-305, 2002. [S-96] A. S. Schulz. Scheduling to minimize total weighted completion time: Performance guarantees of LP-based heuristics and lower bounds. IPCO ’96, 301–315. [W97] G. Woeginger. Private communication, 1997. [W-85] L. Wolsey. Mixed Integer Programming Formulations for Production Planning and Scheduling Problems. Invited talk at 12th ISMP, MIT, 1985.
12
A
Scheduling Dependent Jobs on Parallel Machines
In the following we describe how our technique can be applied for scheduling a set of n dependent jobs on m identical machines. As before, we get as input the conflict graph of the jobs, G. Our problem of minimizing the sum of completion times can be formulated as the following integer program. (LP (m))
minimize
X
fv
v∈V
∀S ⊆ V
subject to:
:
X
(x(S))2 + 2m
P
xv fv ≥
v∈S
∀v ∈ V, 1 ≤ r ≤ Nv : fv ≥ xv +
X
v∈S
xu δuv
x2v
(11) (12)
u∈Cr
∀uv ∈ E
: δuv + δvu = 1
In the linear programming relaxation we allow fv ≥ 1. For a subset of vertices S ⊆ V and a vertex v ∈ S, we denote by Pv (S) the set of vertices in S whose coloring is completed no later than fv∗ in ψ ∗ ; that is, Pv (S) = {u ∈ S | fu∗ ≤ fv∗ }. The above program satisfies the next lemma, due to [HSSW-97]). x(Pv (S)) Lemma A.1 For any v ∈ V and a subset of vertices S ⊆ V , fv∗ ≥ . 2m We note that on the classes of graphs that we study LP (m) can be solved in polynomial time. This follows from the fact that, given an optimal solution, we can use the separation algorithm of [Q-93] to test whether all the constraints in (11) are satisfied; the other set of constraints may be either of polynomial size, or exponential, in which case we apply the separation algorithm described in Section 3.2. We now describe our algorithm, ALG, distinguishing between the preemptive and non-preemptive case. Preemptive scheduling In the preemptive case, we solve LP (m) and partition the time axis as before, to the intervals (β α+`−1 , β α+` ]. For any ` ≥ 1, we multicolor V` using a ρ-approximation algorithm for the pMC problem; that is, we initially assume that we have unbounded number of machines; then, we ‘fix’ the preemptive schedule of V` , by partitioning each color class Ig to b|Ig |/mc sets of size m, and at most one set of size smaller than m. By that, we ensure that at most m jobs are processed at any given time. Let t` be the total number of colors used after we fix the schedule of V` . Now, we schedule V` after V`−1 , in the next t` time units. In analyzing our algorithm, we first upper bound the number of colors used by A after we fix the schedule of V` . Using (1), we have that t` = A(V` , x) ≤ ρ ω(V` , x) +
x(V` ) x(V` ) ≤ d · ρβ α+` + . m m
(13)
Let V`− = ∪`r=1 Vr denote the set of jobs scheduled up to (and including) the `-th block. Recall that f˜v is the completion time of v under ALG. Then,
X
v∈V`
f˜v =
` X X
v∈V` r=1
tr ≤
X d · ρβ α+`+1
v∈V`
13
β−1
+
x(V`− ) m
(14)
By Lemma A.1,
x(V`− ) ≤ 2 · fV∗` ≤ 2βα+` . m
Hence, overall we get that ALG(V, x) =
X
f˜v ≤ d · ρ
v∈V
X β α+`+1 |V` | `≥1
β−1
X
+2
β α+` = (d · ρ
`≥1
X β + 2) β α+` β−1 `≥1
(15)
Randomizing on α we have that E[ALG(V, x)] ≤ OP T ∗ (d · ρ
β 2(β − 1) + ), ln β ln β
and taking β = e we get the next result. Theorem A.2 There is a (dρ + 2(e − 1))-approximation algorithm for the preemptive minsum of completion times of dependent jobs on m parallel machines, where d is as given in (P2a), ρ is the approximation ratio of algorithm A for preemptive makespan, and e ≈ 2.718 is the base of the natural logarithm. Non-preemptive scheduling In the non-preemptive case, it may not be possible to ’fix’ the schedule of V` , i.e., transform a schedule with ‘unbounded’ number of machines to one that uses at most m machines at any time. Thus, when scheduling the jobs in V` , we assume that A is an approximation algorithm for the makespan problem on m machines. Theorem A.3 Let A be a ρ-approximation algorithm for the non-preemptive makespan problem on m parallel machines; then, ALG achieves the approximation ratio (dγρ/2 + 0.5) to the nonpreemptive minsum of completion times, where d is as given in (P2a), and γ ≈ 3.59112. Note that we apply here ALG with possible reverse of the schedule. We decide on reversing the schedule for each machine separately.
B
Some proofs
Proof of Lemma 2.1 Let C be a clique in G. Let fv be the completion time of v ∈ C in the solution for LP . Indeed, C \ {v} ⊆ N (v). From LP , we get that X
xv fv ≥
X
xv (xv +
X
x2v
v∈C
v∈C
= ≥
xu δuv )
u∈C,u6=v
v∈C
P
X
v∈C
+
X
(xv xu δuv + xv xu δvu )
u,v∈C
x2v + ( 2
P
u∈C
xu )2
(16)
Now, let C` be a maximum weight clique in V` , and let v` be the vertex in C` with the largest P completion time in V` , fv∗` . From (16), we have that u∈C` xu fu ≥ x(C` )2 /2 = ω(V` , x)2 /2. We P P also have that u∈C` xu fu ≤ fv∗` u∈C` xu = fv∗` x(C` ) = fv∗` ω(V` , x).
14
Proof of Lemma 2.2 By the definition of `v , c`v −1 = β α+`v −1 < fv∗ ≤ β α+`v = c`v . Let us write fv∗ = β x , i.e. x = logβ fv∗ . Let yv = `v + α − x and note that yv is in the range [0, 1). We may write yv = (α − x) mod 1. The values fv∗ and x are fixed and independent of α. Thus, when α is chosen uniformly at random from [0, 1), yv is also uniformly distributed in [0, 1). The random variable β yv then has expected value Z 1 β−1 β t dt = E[β yv ] = . ln β 0 Hence, E[c`v ] = E[β `v +α ] = E[β `v +α−x ] · β x = Proof of Theorem 2.6 X
β−1 ∗ f . ln β v
(17)
Continuing from (7), we have β f˜v ≤ dρ|V` |(
v∈V`
= dρ|V` |(
α+`
+
2
`−1 X
β α+r ) +
r=0
1 X xv 2 v∈V `
β α+` β` − 1 1 X + βα )+ xv 2 β−1 2 v∈V `
= dρ|V` |(β α+`
β+1 βα 1 X − )+ xv . 2(β − 1) β − 1 2 v∈V `
Thus, ALG(V, x) =
X
f˜v ≤ dρ
v∈V
β + 1 α+` βα |V | |V` | β − + . 2(β − 1) α−1 2 `≥1
X
Hence, applying Lemma 2.1, we have E[ALG(V, x)] =
X
E[f˜v ] ≤ dρ
v∈V
β+1 1 |V | E[c`v ] · − + 2(β − 1) β − 1 2
X v
β+1 dρ|V | |V | β+1 = dρ · OP T ∗ − + ≤ dρ · OP T ∗ . 2 ln β β−1 2 2 ln β The last inequality follows from the fact that have studied, d ≥ 2.
ρd β−1
15
> 1/2, since ρ ≥ 1, β < 5, and in the cases we