25
Tools for Multicoloring with Applications to Planar Graphs and Partial k -Trees Magn´ us M. Halld´orsson Guy Kortsarz November 30, 2001 Abstract We study graph multicoloring problems, motivated by the scheduling of dependent jobs on multiple machines. In multicoloring problems, vertices have lengths which determine the number of colors they must receive, and the desired coloring can be either contiguous (non-preemptive schedule) or arbitrary (preemptive schedule). We consider both the sum-of-completion times measure, or the sum of the last color assigned to each vertex, as well as the more common makespan measure, or the number of colors used. In this paper, we study two fundamental classes of graphs: planar graphs and partial k-trees. For both classes, we give a polynomial time approximation scheme (PTAS) for the multicoloring sum, for both the preemptive and non-preemptive cases. On the other hand, we show the problem to be strongly NP-hard on planar graphs, even in the unweighted case, known as the Sum Coloring problem. For non-preemptive multicoloring sum of partial k-trees, we obtain a fully polynomial time approximation scheme. This is based on a pseudo-polynomial time algorithm that holds for a general class of cost functions. Finally, we give a PTAS for the makespan of a preemptive multicoloring of partial k-trees that uses only O(log n) preemptions. These results are based on several properties of multicolorings and tools for manipulating them, which may be of more general applicability. Preliminary version appears in APPROX ’99 [HK99]. Iceland Genomics Corp., Snorrabraut 60, IS-105 Reykjavik, Iceland. E-mail: [email protected] . Dept. of Computer Science, Rutgers The State University of New Jersey, Camden, NJ E-mail: [email protected] .

Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

Tools for Multicoloring with Applications to Planar Graphs and

Partial k-Trees∗

Magnus M. Halldorsson† Guy Kortsarz‡

November 30, 2001

Abstract

We study graph multicoloring problems, motivated by the scheduling of dependent jobs onmultiple machines. In multicoloring problems, vertices have lengths which determine the numberof colors they must receive, and the desired coloring can be either contiguous (non-preemptiveschedule) or arbitrary (preemptive schedule). We consider both the sum-of-completion timesmeasure, or the sum of the last color assigned to each vertex, as well as the more commonmakespan measure, or the number of colors used.

In this paper, we study two fundamental classes of graphs: planar graphs and partial k-trees.For both classes, we give a polynomial time approximation scheme (PTAS) for the multicoloringsum, for both the preemptive and non-preemptive cases. On the other hand, we show theproblem to be strongly NP-hard on planar graphs, even in the unweighted case, known as theSum Coloring problem. For non-preemptive multicoloring sum of partial k-trees, we obtaina fully polynomial time approximation scheme. This is based on a pseudo-polynomial timealgorithm that holds for a general class of cost functions. Finally, we give a PTAS for themakespan of a preemptive multicoloring of partial k-trees that uses only O(logn) preemptions.

These results are based on several properties of multicolorings and tools for manipulatingthem, which may be of more general applicability.

∗Preliminary version appears in APPROX ’99 [HK99].†Iceland Genomics Corp., Snorrabraut 60, IS-105 Reykjavik, Iceland. E-mail: [email protected].‡Dept. of Computer Science, Rutgers – The State University of New Jersey, Camden, NJ

E-mail: [email protected].

Page 2: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

1 Introduction

In multiprocessor systems certain resources may not be shared concurrently by some sets of jobs.Scheduling dependent jobs on multiple machines is modeled as a graph coloring problem, whenall jobs have the same (unit) execution times, and as graph multicoloring for arbitrary executiontimes. The vertices of the graph represent the jobs and an edge in the graph between two verticesrepresents a dependency between the two corresponding jobs that forbids scheduling these jobs atthe same time.

An instance to multicoloring problems is a pair (G, x), where G = (V, E) is a graph, and x is avector of color requirements (or lengths) of the vertices. For a given instance, we denote by n thenumber of vertices, by p = maxv∈V x(v) the maximum color requirement. A multicoloring of G isan assignment ψ : V → 2N , such that each vertex v ∈ V is assigned a set of x(v) distinct colorsand adjacent vertices receive non-intersecting sets of colors.

A multicoloring ψ is called non-preemptive if the colors assigned to v are contiguous, i.e. if forany v ∈ V , (maxi∈ψ(v) i) − (mini∈ψ(v) i) + 1 = x(v). If arbitrary sets of colors are allowed, thecoloring is preemptive. The preemptive version corresponds to the scheduling approach commonlyused in modern operating systems [SG98], where jobs may be interrupted during their executionand resumed at a later time. The non-preemptive version captures the execution model adoptedin real-time systems where scheduled jobs must run to completion.

One of the traditional optimization goals is to minimize the total number of colors assigned toG. In the setting of a job system, this is equivalent to finding a schedule minimizing the time withinwhich all the jobs have been completed. Such an optimization goal favors the system. However,from the point of view of the jobs themselves, another important goal is to minimize the averagecompletion time of the jobs.

We study multicoloring graphs in both the preemptive and non-preemptive models, underboth the makespan and sum-of-completion times measures defined as follows. Denote by fψ(v) =maxi∈ψ(v) i the largest color assigned to v by multicoloring ψ. The multisum of ψ on G is

SMC(G, ψ) =∑

v∈Vfψ(v) .

Minimizing the makespan is simply minimizing maxvfψ(v). The problem of finding a preemptive(non-preemptive) multicoloring with minimum sum (makespan) is denoted p-sum (p-makespan),while the non-preemptive version is np-sum (np-makespan, respectively). When all the color re-quirements are equal to 1, the makespan problem is simply the usual coloring problem, while thesum versions reduce to the well-known sum coloring (SC) problem.

The Sum Multicoloring (SMC) problem has numerous applications, including traffic intersectioncontrol [B92, BH94], session scheduling in local-area networks [CCO93], compiler design and VLSIrouting [NSS99].

1.1 Related work

The p-makespan problem is also known as weighted coloring [GLS88] or minimum integer weightedcoloring [X98]. Grotschel, Lovasz, and Schrijver [GLS88] gave a polynomial time algorithm onperfect graphs. For many classes of perfect graphs, preemptive multicoloring with the makespanobjective can be translated to the ordinary coloring problem. A vertex v with color-requirementx(v) is replaced by a clique C(v) of size x(v) (connecting a copy of v to a copy of u if u andv are connected in G). This reduction is polynomial if p is polynomial in n, but can often bedone implicitly for large values of p. In the context of makespan this reduction preserves optimumsolution. Such reduction is possible for families of graphs closed under cliqueing; e.g. chordal (andthus interval graphs). For a faster multicoloring algorithm on chordal graphs see [H94].

1

Page 3: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

The p-makespan problem is NP-hard even when restricted to hexagon graphs (which are planargraphs) [MR97], while a 4/3-approximation is known [NS97]. The hexagon graphs are importantfor their use in cellular networks. The problem is polynomial solvable on outerplanar graphs [NS97],and trivial on bipartite graphs (cf. [NS97]).

Non-preemptive multicoloring has been studied in several context. On interval graphs it cor-responds to the Dynamic Storage Allocation problem, for which the best approximation known is5 [Ger96]. On line graphs, it forms the basis of the Minimum File Transfer Scheduling problem,which is approximable within 2.5 [Cof85].

The sum coloring problem was first directly studied in [KS89], followed by [KKK89]. Re-cent research has concentrated on finding approximation algorithms and proving hardness results[BBH+98, BK98, HKS01]. The paper [BBH+98] addressed general graphs, bounded degree graphs,and line graphs, and the paper [BK98] studied bipartite graphs. For partial k-trees, Jansen [J97]gave a polynomial algorithm for the Optimal Chromatic Cost Problem (OCCP) that generalizesthe sum coloring problem. See [HKS01] for a recent summary of known results.

The paper most relevant to our study is [BHK+98], where the np-sum and p-sum problems arethoroughly studied and the following results presented, among others. A constant factor approxima-tion is given in the preemptive case for graphs where the Maximum Independent Set (MIS) problemis polynomially solvable (e.g. perfect graphs), while an O(ρ)-approximation holds for graphs whereMIS is ρ-approximable. In the non-preemptive case, an O(logn)-approximation is given for graphswhere MIS is polynomial solvable, which translates to an O(ρ · logn)-approximation when MIS

is ρ-approximable. Further results are given for bipartite, bounded-degree, and line graphs. In[HK+99], efficient exact algorithms for np-sum are given for trees and paths, while a polynomialtime approximation scheme (PTAS) is given for the preemptive case. In [HKS01], constant factorapproximation is given for np-sum on line graphs and k-claw free graphs.

In [BBH+98] it was proven that if there exists an f(n)-approximation algorithm for the sumcoloring problem for a given hereditary class of graphs, then there exists a g(n)-approximationalgorithm for Graph Coloring on the same class of graphs, where g(n) = O(f(n) logn). If furtherf(n) = Ω(nc) for some c > 0, then g(n) = O(f(n)). Based on the hardness result for the minimumcoloring problem, from [FK98], this indicates that the sum coloring problem cannot be approxi-mated within n1−ǫ, for any ǫ > 0, unless NP = ZPP [BBH+98, FK98]. For bipartite graphs, thesum coloring problem is NP-hard to approximate within some factor c > 1, unless P = NP [BK98].Clearly, these limitations carry over to the sum multicoloring problems.

1.2 Our results

We continue the line of work initiated in [BHK+98]. A problem has a polynomial-time approxima-tion scheme (PTAS) if it can be approximated in polynomial time within 1 + ǫ, for any constantǫ > 0. If in addition, the complexity of the scheme is polynomial in both n and 1/ǫ, it has a fullypolynomial approximation scheme (FPTAS).

Partial k-trees: In Section 3 we deal with multicoloring problems on partial k-trees, graphswhose treewidth is bounded by k. We design a general algorithm CompSum for that goal,that outputs an optimum solution for np-makespan and np-sum on partial k-trees in timeO(n · (p · logn)k+1). Note that the algorithm is only pseudo-polynomial, namely does notrun in polynomial time for large p. The same algorithm solves p-sum and p-makespan onpartial k-trees in polynomial time when p is small (O(logn/ log logn)).

In Section 4, we give PTASs for both p-makespan and p-sum, that hold for any p. Therespective running times are nO(k2/ǫ3) for the p-makespan problem, and nO(k2/ǫ5) for thep-sum problem. These schemes satisfy the additional property that only O(logn) preemptions

2

Page 4: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

are used. These results are applied in the approximation of planar graphs. We also give anFPTAS for the non-preemptive case, with a running time of O(n2k+3ǫ−(k+1)).

Planar graphs: In Section 5, we give PTASs for p-sum and np-sum on planar graphs. The runningtimes are nO(1/ǫ5) in the preemptive case, and n · exp(ln lnn + exp(O(ǫ−1 log ǫ−1)2)) in thenon-preemptive case. This also implies the first PTAS for the sum coloring problem. Thesealgorithms are complemented with a matching NP-hardness result for sum coloring.

For both p-sum and np-sum, the previously best known bounds on planar graphs and partialk-trees were fixed constant factors [BHK+98].

In order to establish our results, we have derived in Section 2 a number of tools for analyzingand manipulating general multicoloring instances, which could be useful for further research:

• Bounds on the number of colors used by any optimal (multisum) solution, and transformationsthat reduce this number at a relatively small cost to the objective function.

• Scaling and rounding transformations, that allow reductions of the problems to instances withsmall color requirements.

• Partitions of the instances into subinstances of relatively uniform color requirement. Thisinvolves a lemma that generalizes the Markov inequality and may be of independent interest.

The preemptive and non-preemptive cases turn out to require different treatments. Non-preemptiveness restricts the form of valid solutions, which helps dramatically in designing efficientexact algorithms. On the other hand, approximation also becomes more difficult due to these re-strictions. The added dimension of lengths of jobs, whose distribution can be arbitrary, introducesnew difficulties into the already hard problems of coloring graphs. Perhaps our main contributionlies in the techniques of partitioning the multicoloring instance, both “horizontally” into segmentsof the color requirements (Section 4) and “vertically” into subgraphs of similar length vertices(Section 5).

2 Properties and tools for multicolorings

Multicolorings have certain features and complications that distinguish them from (uni)colorings.In unit-length instances, all vertices are created equal and need only a single value as a color.In multicoloring instances, vertices not only need multiple value, but their requirements can bearbitrarily varied. Thus, greedy approaches, e.g., can fail quite dramatically, because short jobscannot afford to wait for intermediate jobs which in turn cannot wait for long jobs. What we needis a toolbox for managing and manipulating these weighted instances.

After giving key definitions in Section 2.1, we study in Subsection 2.2 the number of colorsneeded in optimal and approximate sum multicolorings. This is crucial for limiting our search forappropriate colorings.

We then study how and to what extent we can reduce the instances to ones with small colorrequirements. This is done via classical approaches from scheduling theory involving rounding andscaling the color requirements. As elsewhere in this paper, we have on top of the usual schedulinginstance a graph structure that must be taken into account.

An orthogonal reduction technique that we develop involves partitioning the vertex set accordingto the color requirements. Each set in the partition contains nodes with color requirements in agiven interval, and these intervals are carefully chosen so that, intuitively speaking, the averagecolor requirement in each set is much lower than the smallest color requirement in the followingset. Using scaling, this allows us to reduce the problem to that on instances with small maximum

3

Page 5: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

color requirements, with confidence that the solutions for the small jobs will not unduly delay thelong jobs. The formation of this partition involves a generalization of Markov inequality, whichmay be interesting in its own right.

2.1 Notation

A multicoloring instance I = (G, x) consists of a graph G and color requirements vector x, but wemay also use G to refer to the instance. Let S(G) =

v x(v) be the sum of the color requirementsof the vertices. More generally, for a set of numbers X , let S(X) denote

xi∈X xi. Let pmin denoteminv x(v) and recall that p denotes the maximum color requirement. Let τ(G) = p/pmin denotethe ratio between the maximum and minimum color requirements of vertices in G. When all thecolor requirements x(v) are divisible by q, let I/q denote the instance resulting from dividing eachx(v) by q.

The minimum multisum (or multicoloring sum) of a graph G, denoted by pSMC(G), is the min-imum SMC(G, ψ) over all multicolorings ψ. We denote the minimum contiguous (non-preemptive)multisum of G by npSMC(G). The minimum number of colors in an ordinary uni-valued coloringof G (i.e. ignoring the color requirements) is denoted by χ(G). We denote by µ(I) the minimummakespan, i.e. the number of colors required to preemptively multicolor I = (G, x). We letOPT (G)denote the cost of the optimal solution, for the respective problem at hand.

Utilizing the relationship between coloring problems and scheduling problems, we view ouralgorithms as procedures that color in (synchronous) rounds. Each round involves one time unit,and colors some independent set (whose vertices have not been fully colored) by some color.Definition 2.1 When a vertex v is not colored in a given round, we say that the vertex is delayedby the independent set chosen in this round.In particular, the finish time f(v) equals x(v) plus the total delay of v.

2.2 Bounding the number of colors needed

We can bound the number of colors used by any optimal sum multicoloring. In this subsection,multicolorings can be either preemptive or non-preemptive. We note that coloring the graph withminimum number of colors does not always help in solving even the SC problem. For instance,while bipartite graphs can be colored with two colors, there exist bipartite graphs (in fact, trees)for which any optimal solution for the sum coloring problem uses Ω(logn) colors [KS89]. We showhere that this ratio bound is also tight in the multicoloring case.

Lemma 2.1 (Color count) At most n/2i vertices remain to be completed after 2iµ(G) rounds ofan optimal sum multicoloring, for any i = 1, . . . , logn.

Proof. Suppose the claim fails, in which case let i0 be the smallest value for i for which it fails.Then, at most n/2i0−1 vertices remain after step X = 2(i0 − 1)µ(G). The delay during the next2µ(G) rounds is at least 2µ(G) per vertex, or strictly more than 2µ(G) · n/2i0 = µ(G) · n/2i0−1 intotal.

Consider the alternative coloring, that colors all vertices not completed at stepX by µ(G) colors.For that, we use an arbitrary minimum makespan coloring with colors X + 1, . . . , X + µ(G). Thedelay caused is at most µ(G) per vertex, or µ(G)n/2i0−1 in total. This contradicts the assumptionthat the coloring above was optimal (namely, it is better to use in the last 2µ(G) rounds this trivialalgorithm).

It follows from Lemma 2.1 that an optimal sum multicoloring uses at most p + 2µ(G) logncolors, since after 2µ(G) logn rounds, at most one vertex can remain.

Corollary 2.2 An optimal sum multicoloring uses at most p+ 2µ(G) logn colors.

4

Page 6: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

Note that for O(1)-colorable graphs, µ(G) = O(p), even in the non-preemptive case. Indeed,we can fully color each color-class one after the other, getting at most O(p · χ(G)) = O(p) delayper vertex.

Remark: In the appendix, we will see that the color-count lemma holds for a general familyof objective functions.

Another corollary concerns the number of colors in approximate solutions. Note that this is anexistence result.Lemma 2.3 There is a 1+ ǫ-approximate solution for the sum multicoloring problems that uses atmost O(µ(G) log(k/ǫ)) colors, on a k-colorable graph.

Proof. Let i = log(k/ǫ). Use the first 2iµ(G) colors of an optimal sum multicoloring, followed by aµ(G)-coloring of the remaining vertices. At most n/2i vertices remained after the first 2iµ(G) colors.Thus, the additional cost caused by the second part is at most µ(G)n/2i = ǫµ(G)n/k ≤ ǫS(G).The last inequality follows as µ(G) ≤ kp.

Rounding and scaling instances

Here we present general methods for reducing p while paying a small price in the approximationfactor. One of the main tool we use is the following scaling lemma.

Lemma 2.4 (Preemptive scaling.) Let ǫ > 0 and c = cǫ be large enough. Let I = (G, x) bea multicoloring instance where for each v, x(v) is divisible by q and x(v)/q ≥ c · lnn. Then, themakespan of I and I/q are related by

µ(I) ≤ q · µ(I/q) ≤ (1 + ǫ) · µ(I). (1)

Proof. The first inequality of (1) is verified as follows. Use an optimum coloring of I/q for coloringI , by repeating q times each color class of I/q. Observe that the number of colors used for eachvertex v is q ·x(v)/q = x(v) as required. In addition, the total number of colors used is bounded byq ·µ(I/q), hence the inequality. We now prove the second inequality using a probabilistic argument.

Consider an optimum makespan solution OPT (I). We shall form a solution ψ for I/q. Includeeach color class of OPT (I) into ψ with probability (1+ǫ2)/q (with ǫ2 to be determined later). Theexpected makespan (which is the expected number of independent sets selected) is ((1+ǫ2)/q)·µ(I).So, by Markov inequality (cf. [MR95]), the makespan is at most ((1 + ǫ2)(1 + ǫ3)/q) · µ(I), withprobability at least 1 − 1/(1 + ǫ3).

For this solution to be legal for I/q, we need to show that each vertex v gets at least x(v)/qcolors. We show that this holds with non-zero probability. The number of colors each v gets is abinomial variable with mean (1 + ǫ2) · x(v)/q ≥ (1 + ǫ2) · c · logn. For a binomial variable X withmean ζ, and for any δ, 0 ≤ δ ≤ 1, Chernoff bound (cf. [MR95]) gives that

Pr(X < (1− δ)ζ) ≤ exp(−δ2 · ζ/2).

By choosing c = 4(1+ ǫ2)/ǫ22, we bound the probability that v receives fewer than x(v)/q colors by

1/n2. Hence, with probability at least 1 − 1/(1 + ǫ3) − 1/n, all vertices get their required numberof colors, and simultaneously the makespan is at most (1 + ǫ3) · (1 + ǫ2) · µ(I)/q. Therefore, thereexists a coloring of I/q achieving these properties.

Select ǫ2 and ǫ3 so that (1 + ǫ2)(1 + ǫ3) = (1 + ǫ). We then form a coloring for I by repeatingq times each color class of the coloring for I/q. The resulting makespan is at most (1 + ǫ)µ(I),yielding Inequality (1).

5

Page 7: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

A modification of this lemma yields a similar bound for the preemptive multisum. This involvesbounding separately for every vertex the probability that the finish time in the coloring of vertexI/q is greater than (1 + ǫ)/q times its finish time in the optimal sum coloring of I .

Corollary 2.5 Let ǫ > 0 and c = cǫ be large enough. Let I = (G, x) be a multicoloring instancewhere for each v, x(v) is divisible by q and x(v)/q ≥ c · lnn. Then, the multisums of I and I/q arerelated by

pSMC(I) ≤ q · pSMC(I/q) ≤ (1 + ǫ) · pSMC(I). (2)

An important consequence of the above lemma when minimizing the preemptive makespan isthat at a small price, we may assume p is only logarithmic in n.

Lemma 2.6 (Logarithmic length) Consider the p-makespan problem in k-colorable graphs. Forany ǫ it is possible to reduce the instance I to an instance I so that:

1. The maximum color requirement in I is p = O(1/ǫ3 · logn).

2. A ρ-ratio solution ψ to I can be transformed into a ρ(1 + ǫ)-ratio solution of I.

3. The number of preemptions in the final transformed solution for I is logarithmic in n.

Proof. Let c′ be a constant larger than both 2k and cǫ/2 of Lemma 2.4. Let ω = ⌊lg p⌋ + 1 denotethe number of bits needed to represent p, and let α = ⌈lg(c′/ǫ) + log logn+ 1⌉. Let q = 2ω−α. Weshall partition the color requirements x into two parts x′ and x′′, yielding instances I ′ = (G, x′)and I ′′ = (G, x′′) such that x(v) = x′(v) + x′′(v). More specifically, x′ is derived by zeroing in xthe ω − α less significant bits, and x′′ = x modulo 2ω−α represents the less significant bits in x.Intuitively, it does not cause a large delay to schedule x′′ first so that only color requirements x′

remain. This follows as x′′ is small relative to x′. Now, note that x′ are all divisible by 2ω−α. Wethen use Lemma 2.4 to scale down the x′ into α bits numbers and solve it and derive a solution forx.

Observe that 2ω ≤ 2p, and thus q = 2ω−α ≤ ǫ2ω/(2c′ logn) ≤ ǫp/(c′ logn). Consider theinstance I = I ′/q with color requirements x′ divided by q. Given a solution ψ for I, a solution toI is composed as follows. I ′′ is scheduled non-preemptively by any graph k-coloring of G. Later,we take the schedule of ψ and repeat each independent set q times. As it is easily seen that theresulting schedule is feasible for I the reduction is completed.

We now show the required properties. By the Scaling Inequality (1), the makespan of theresulting schedule of I ′ is bounded by q · µ(I ′/q) ≤ (1 + ǫ/2)µ(I ′). Also, if c′ ≥ 2k, the makespan ofthe k-coloring of I ′′ is at most kpǫ/c′ < (ǫ/2)p < (ǫ/2)µ(I). Thus, the makespan of the combinedschedule of I is at most a 1+ǫ factor from optimal. The length p of the longest task in I is at most2α = O(c′/ǫ · logn). Since the graph is k-colorable, µ(I) ≤ pk = O(logn). Finally, the number ofpreemptions used in the reduction overall is at most pk + k = O(c′/ǫ · logn).

Thus, when seeking an approximate preemptive makespan multi-coloring of a graph, one canas a first step make p logarithmic in n at a very small cost. We believe that this reduction may beof independent interest. It will be used in Section 4 on partial k-trees.

For the p-sum problem, such a logarithmic reduction is not in sight. We prove a weaker resultthat transforms p to a value polynomial in n at a low cost.

Lemma 2.7 (Linear lengths) In the p-sum problem on O(1)-colorable graphs, one may assumethat p = O(n/ǫ) at the cost of increasing the cost of the solution by at most a 1 + ǫ factor.

6

Page 8: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

Proof. Let ǫ1 be a number to be determined later. Choose j such that ⌈n/ǫ1⌉ ≤ ⌊p/2j⌋ ≤ 2·⌈n/ǫ1⌉,and put x′ = ⌊x/2j⌋. The number x′ gives (roughly) the log(n/ǫ1) most significant bits in x. The“small part” of the color requirements xs = x− x′ · 2j sum to at most O(ǫ1 · p). This follows since

p

xs≥ n

2ǫ1, (3)

for any x.Now the schedule is described. Let Is be the instance induced by the color requirements x−x′·2j.

Choose a minimum coloring of G, and schedule first Is non-preemptively one color-class after theother. We separate the cost incurred into two parts: The sum of the color contribution of thesmall numbers, and the delay inflicted on the large numbers. Regarding the color-sum of the smallnumbers, it follows from Inequality (3) that since the graph is O(1)-colorable, this cost (which isbounded by O(1) times the sum of the small numbers) is at most O(ǫ1 · p) = O(ǫ1 · S). In addition,this coloring of the small numbers gives a delay for the large part of the numbers. The numberof colors used in coloring the small numbers is bounded by (an order of) the maximum color-requirement in the small part of the numbers. By Inequality (3) this is bounded by O(ǫ1 · p/n) =O(ǫ1 · S/n) incurring an O(ǫ1 · S) delay for the remaining vertices. Now, removing the zeros fromthe remaining (“large”) numbers, we get an instance with color requirements x′ with maximumof O(1/ǫ1 · n). We now solve this instance with the assumed algorithm, and take q copies of eachresulting set. Now, with an appropriate choice of ǫ1, we get by Corollary (2.5) that only a (1 + ǫ)increase in the cost is incurred.

It is interesting to note that this means that our approximation will hold even when color require-ments are super-polynomial and optimal solutions may not be polynomial representable. Also, forgeneral graphs, a similar argument follows with p = O(n · χ(G)).

In the non-preemptive case, scaling can be done without error.

Lemma 2.8 (Exact non-preemptive scaling) Let I = (G, x) be a non-preemptive multicolor-ing instance where for each v, x(v) is divisible by q. Then,

q · npSMC(I/q) = npSMC(I). (4)

Proof. Let ψ∗(I) be an optimal np-sum coloring of I , and let Ci be the set of vertices coloredwith color i. By induction, the finish time of any vertex in ψ∗(I) is a multiple of q. Now, considerthe coloring ψ formed by every q-th color of ψ∗, ψ = Cq , C2q, . . .. Then, ψ is a proper coloring ofI/q. Hence, npSMC(I/q) ≤ npSMC(I)/q. On the other hand, given a coloring of I/q, we can form acoloring of I by repeating each color q times. Thus, npSMC(I) ≤ q · npSMC(I/q).

Rounding non-preemptive instances The non-preemptive case is easier to round-and-scale,as we can reduce the minimum length down to a constant while paying only a slight overheadfactor. Let I/q = (G, x′) be the instance obtained by x′(v) = ⌊x(v)/q⌋. Recall that pmin denotesminv x(v).

Lemma 2.9 (Non-preemptive rounding) Let I = (G, x) be a multicoloring instance, and ǫ > 0given. Suppose pmin ≥ 3/ǫ and suppose we can approximate np-sum on I/q within ratio ρ, wheneverq = O(ǫpmin). Then, we can approximate np-sum on I within ratio (1 + ǫ)ρ.

Proof. Let ǫ1 to be determined, and let q = ⌈ǫ1pmin⌉. Let x′(v) = ⌊x(v)/q⌋ and let I/q = (G, x′)be the corresponding instance. Given a multicoloring ψ′ of I/q, form a schedule ψ′′ by repeatingeach color of I/q q times. Observe that each x′(v) ≥ 1/ǫ1, for each vertex v. Note that q · x′(v) ≥x(v)− (q − 1) ≥ (1− ǫ1)x(v).

7

Page 9: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

Let t = ⌊(1 − ǫ1)/ǫ1⌋. We finally form a schedule ψ, by repeating once every 2t-th color classof ψ′′, i.e. if ψ′′ consists of the sequence of independent sets C1, C2, . . . ,, then ψ consists of all ofthese sets, along with double occurrences of the sets Ci·2t, i = 1, 2, . . .. Since each job is of lengthat least t, the number of colors they receive is multiplied by 1 + 1/t. Hence, ψ(v) contains at least

qx′(v)(1 + 1/t) ≥ (1− ǫ1)x(v)(1 + 1/t) ≥ x(v)

colors.The finish time of v in ψ is at most (1 + 2/t)ψ′′(v) = (1 + 2/t)qψ′(v). Then, the multisum of

ψ′′ is at most(1 + 2/t)qOPT (I/q) ≤ (1 + 2/t)OPT (I).

Set ǫ = 2/t = 2⌊(1− ǫ1)/ǫ1⌋ satisfies the lemma.

We shall be using this lemma for partial k-trees when the ratio of maximum to minimum colorrequirement is relatively small.

2.3 Partitioning into subgraphs of relatively uniform color requirement

The main technique introduced here involves splitting the instance into subgraphs in which allvertices have similar color requirements.

Call a class G of graphs hereditary if any induced subgraph of a member of the class is also amember. Let SMC refer to either p-sum or np-sum. Recall that τ(G) denotes the ratio p/pmin.

Theorem 2.10 Let n, q = q(n) and σ be given. Suppose that for any G in a hereditary class Gthat has at most n vertices and has τ(G) ≤ q, we can approximate SMC within a factor 1 + ǫ(n)using σ ·p(G) colors in time t(n). Then, we can approximate SMC on any graph in G within a factor1 + ǫ(n) + σ/

√ln q using at most 2σ · p(G) colors in O(t(n)) time.

We shall later see how to approximate np-sum efficiently on planar graphs with τ relativelysmall. That, combined with the above theorem, then yields a PTAS for np-sum on planar graphs.We first prove two lemmas.

Markov inequality shows that at most 1/ℓ fraction of the elements of a set X = x1, x2, . . . , xnof non-negative numbers are greater than ℓ times the average value x (cf. [MR95]). Define g(x) tobe the number of xi greater than or equal to x, i.e. g(x) = |xi : xi ≥ x|. Then, Markov inequalitycorresponds to

g(ℓ · x) ≤ 1

ℓxn.

Rewriting t = ℓn, and x = S(X)/n, it corresponds to

g(t) ≤ S(X)

t,

which holds for every t ≥ 0. It is easy to show it to be tight for any fixed value of t but notfor multiple values of t simultaneously. We show that if we are free to choose t from a range ofvalues, the resulting bound on the tail is improved by a logarithmic factor. We state this first foran arbitrary function f .

Lemma 2.11 Let r and s be real numbers, s < r, and let f be a function defined on [s, r]. Then,for some t ∈ [s, r],

tf(t) ≤ 1

ln(r/s)

∫ r

sf(x)dx.

8

Page 10: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

Proof. Let t be the value x in the interval [s, r] that minimizes xf(x). Then,

∫ r

sf(x)dx =

∫ r

sxf(x) · 1

xdx ≥ tf(t)

∫ r

s

1

xdx = tf(t) ln(r/s). (5)

A weaker version of the lemma gives perhaps the most indicative improvement on Markovinequality. It uses the fact that g is positive and integer-valued. Its bound can be shown to betight.

Corollary 2.12 There is a t, s ≤ t ≤ r, such that

g(t) ≤ 1

ln(r/s)· S(X)

t.

Proof. Define the indicator functions Ii(x) as 1 where x ≤ xi and 0 elsewhere. Thus, g(x) =∑

i Ii(x). Then,∫ ∞

0g(x)dx =

i

∫ ∞

0Ii(x)dx =

i

xi = S(X). (6)

From Lemma 2.11 we have that tg(t) ≤ 1ln(r/s)

∫∞0 g(x)dx = 1

ln(r/s)S(X).

We use Lemma 2.11 to partition the instance into compact segments with good average weightproperties.

Proposition 2.13 Let X = x1, . . . , xn be a set of non-negative reals, and let q be a naturalnumber. Then, there is a polynomial time algorithm that generates a sequence of integral breakpointsbi, i = 1, 2, . . ., with

√q ≤ bi+1/bi ≤ q, such that

m∑

i=1

g(bi) · bi ≤1

ln√qS(X).

Proof. Let b0 be the smallest xi value, and inductively let bi be the breakpoint obtained by theLemma 2.11 on the set Xi = xj : xj ≥ bi−1 with s = bi−1 · √q and r = bi−1 · q. Terminate thesequence once bi exceeds the maximum length p.

Since bi ≥ bi−1√q, we have that bi ≥ qi/2, and the loop terminates within 2 logq p iterations. In

each iteration, the ratio r/s is at least√q. By Lemma 2.11,

bi · g(bi) ≤1

ln√q

∫ bi−1q

bi−1

√qg(x)dx.

Note that bi ≥ bi−1√q and thus the intervals [bi−1

√q, bi−1q) are disjoint. Hence,

i

big(bi) ≤1

ln√q·∑

i

∫ bi−1q

bi−1√qg(x)dx ≤ 1

ln√q

∫ ∞

0g(x)dx =

S(X)

ln√q.

The algorithm that finds the bi partition can be easily implemented in linear time.

Proof of Theorem 2.10.Our approximation algorithm for an arbitrary graph G in G is as follows:

1. Find breakpoints b1, b2, . . . of the color requirements x(v1), . . . , x(vn) by Proposition 2.13 forthe given value of q.

2. Partition G into subgraphs Gi, induced by Vi = v : bi−1 ≤ x(v) < bi, for which τ(Gi) ≤ q.

9

Page 11: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

3. Solve instances (Gi, x) independently (by the algorithm assumed in Theorem 2.10) and sched-ule them in that order.

The reason why we can schedule the subgraphs Gi in order is that we have ensured with our choiceof breakpoints that the smaller jobs don’t delay the longer jobs much.

The cost of the multicoloring is derived from two parts: the sum of the costs of the subproblems,and the delay costs incurred by the colorings of the subproblems. We consider separately the delaycaused by each Gi. Namely, the total delay is broken into the delays caused by each individualsubproblem. For each subproblem, the delay occurred is reflected by the number of colors used inthis subproblem, times the number of yet uncolored vertices (namely, the number of colors usedtimes the total number of vertices included in later problems which are vertices of higher lengths).The number of colors used in Gi is assumed to be O(σ · bi), while g(bi) represents the number ofvertices delayed. By Proposition 2.13, this combined cost is thus O( σ√

ln q· S(G)).

The cost of subproblem i is, by assumption, at most (1 + ǫ(n))OPT (Gi). Thus, the sum of thecosts of the subproblems, excluding the delay is

i(1 + ǫ(|Gi|))OPT (Gi) ≤ (1 + ǫ(n))OPT (G).The total cost of the coloring is thus at most (1 + ǫ(n) + O( σ√

ln q))OPT (G). The total number of

colors used is at most∑

i σbi ≤ σ∑∞i=0 p/q

i = (1 + 1/(q − 1))σ · p.

3 Exact multicolorings of partial k-trees

In this section, we study exact algorithms for multicoloring partial k-trees, particularly for np-sum.We note that the results here hold for a fairly general type of a cost function or measure thatincludes makespan and multisum functions. The definition of this family in its most general formis deferred to the appendix. The algorithm is described for the sum of completion time measure,while slight changes give a solution for the makespan measure.

The scenario is as follows. We are given a family F of colorings, and we look for the best coloringin this family. A trivial example would be for the family F to contain all possible colorings. Thismay, however, not be tractable. Instead, F may contain a family of coloring of some restrictiveform where the best one is only an approximation of the optimum coloring. The family F must beuniformly well behaved in the sense that F must contain a good approximation for any instance.Hence, F cannot be too small.

The algorithm CompSum we present below follows a path similar to [J97] and is described forthe sake of completeness. As we deal with graphs of fixed treewidth, which are k + 1-colorable,we may assume by Corollary 2.2 that the number of colors used by an optimal coloring is at mostc · p · logn, where c ≤ 2k + 3. We assume without loss of generality that the graph contains noisolated vertices.

Partial k-trees are graphs that can be represented by the following tree structure. In a treedecomposition, we are given a collection X of at most n = |V | subsets Xi ⊆ V of vertices. Eachsubset Xi contains at most k+1 vertices. In addition, the subsets Xi are the vertices in a supertree,T (X , E) with the following properties.

(I)Edge-covering property: The subsets Xi cover the edges of G, namely, for each (v, u) ∈ E,there exists a subset Xi ∈ X such that v, u ∈ Xi.

(II)Connectivity: For every vertex v, the subtree induced by the subsets Xj containing v isconnected.

The vertices of the partial k-tree correspond to the nodes of the supertree, and two vertices areadjacent if they are both contained in some set Xi. Trees are partial 1-trees, where the edges form

10

Page 12: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

the sets Xi. Partial k-trees draw their usefulness from their susceptibility to dynamic programmingsolutions. This uses the fact that it is possible to decompose the problem cleanly: if we delete allk + 1 elements of a set Xi from the instance, we break the graph into disjoint components.

It is well known (see, e.g., [J97]) that a small modification in this tree structure, allows to keepthe above properties and extend it with the following properties. It is possible to root T such that

1. T is a binary tree.

2. If supervertex Xi has a single child Xj, then ||Xi| − |Xj|| = 1 and Xi ⊆ Xj or Xj ⊆ Xi.

3. If supervertex Xi has two children Xk and Xj, then Xi = Xk = Xj.

The algorithm CompSum follows the prototypical dynamic programming paradigm on trees.Each node in the supertree involves up to k+1 vertices in the graph. For every meaningful coloringof these vertices, we compute the cost of the cheapest consistent coloring of the subtree rootedat the node. The computation proceeds bottom-up, with each node depending only on valuescomputed at its children.

For every Xi, let Ti be the tree rooted by Xi, and let Ui =⋃

Xj∈TiXj. Let gi : Xi → 2Z

+

, gi ∈ Fbe a function that assigns x(v) colors to the vertices v ∈ Xi. Namely, gi is some multicoloring ofthe set Xi. Denote by Rgi

(v) this set of colors assigned to v by gi.Define Mi(gi) to be the minimum SMC value of all multicolorings gi (in F) that extend gi to the

vertices in Ui. Formally, let Qi be the set of functions gi : Ui → 1, . . . , c · p · logn, gi ∈ F withgi(v) = gi(v), for all v ∈ Xi. Denote

Mi(gi) = mingi∈Qi

SMC(Ui, gi).

These values are computed in a bottom-up manner. In a leaf Xi we have for any function gi

Mi(gi) =

SMC(Xi, gi), if Rgi(v) ∩Rgi

(u) = ∅ for all u, v ∈ Xi s.t. (u, v) ∈ E,∞, otherwise.

In what follows, we consider only functions gi that correspond to legal colorings of Xi, namely,Rgi

(v) ∩Rgi(u) = ∅ for all u, v ∈ Xi & (u, v) ∈ E.

Now, consider an internal node Xi, with a single childXj in the tree. Assume first thatXi ⊆ Xj.Let v = Xj\Xi. Given a function gi, let Lgi

be the set of legal colorings forXj that are consistentwith gi on Xi. (We show later that we can bound the cardinality of Lgi

by a natural parameter ofthe family F .) In this case,

Mi(gi) = mingi∈Lgi

Mj(gi).

Otherwise, we have Xj ⊆ Xi. Let v = Xi \Xj. In this case, for a function gi giving values toXi, let gi be the restriction of gi to Xj. By previous computation, we know Mj(gi); the optimumextension of Xj to Uj . Then

Mi(gi) = Mj(gi) + fgi(v).

Namely, we add the finish time given to v by gi to the minimum color-sum over UjFinally, we have the case of Xi with two children Xj and Xk. Note that by the Connectivity

property, Uj ∩ Uk = Xi. Let gi be a function on Xi(= Xk = Xj). By previous computation, weknow that values Mj(gi) and Mk(gi), the costs of the respective functions extending gi optimallyto respectively Uk and Uj . By adding these together, we have accounted for the cost of coloring allof Ui, but doubly counted the finish times of vertices in Xi. Thus,

Mi(gi) = Mj(gi) +Mk(gi) −∑

v∈Xi

fgi(v).

11

Page 13: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

We note that by the edge-covering property, all the finite values Mt(gi) for the root Xt rep-resent legal colorings gi of all the vertices of G. Hence the minimum multicolor sum is given bymingi

Mt(gi). It is easy to compute the actual minimum coloring from the above.The CompSum algorithm requires only slight changes to find the optimum makespan of the

partial k-trees.

Analysis The following parameter is used in measuring the running time of the procedure. Wedenote by D = D(F , v) the number of different colorings v has among the family F . Let D(F)denote maxvD(F , v). “Good” families F are ones with D(F) small.

Let us now estimate the time complexity. We need to compute Mi(gi) for all the appropriatefunctions gi. For a given function gi, the required time is O(k) per edge in the supertree. Thenumber of different functions gi on Xi is bounded by Dk+1, since each of the at most k+1 verticesin Xi has at most D different colorings. Since the number of vertices of T is bounded by n, theresulting complexity is bounded by O(n · Dk+1).

Definition 3.1 A family F of colorings is searchable if, for each vertex, the number of differentcolorings for v is polynomial and they can be generated in polynomial time.

Theorem 3.1 Given a searchable family F , CompSum can find either the optimum multisum orthe optimum makespan in time O(nDk+1).

Remark: The main problem with the above time complexity is that the number D may be verylarge. In particular, while we know that the number of non-redundant non-preemptive colorings ofa vertex are fewer than (2χ(G)+ 1)p, where χ(G) denotes the chromatic number of G, the numberof preemptive colorings may be as large as

(p lognp

)

, or exponential in p.

3.1 Two corollaries

Our first result is for np-sum on partial k-trees. In this case, by Corollary 2.2, the number ofpossible colorings of a vertex v, D(v), is bounded by D = O(k · p · logn), since we only need tospecify the first color with the rest of the colors being consecutive.

Corollary 3.2 The np-sum and np-makespan problems admit an exact algorithm for partial k-treesthat runs in O(n · (kp logn)k+1) time.

For the special case of trees, i.e. 1-trees, np-sum can be solved in time O(np) and O(n2) [HK+99].It is not clear if an algorithm exists for partial k-trees that does not depend on p, but it is likelythat the polynomiality and log factors could be improved.

In general, the situation in the preemptive case seems harder, as great many colorings are possi-ble for a single vertex. However, consider the case of preemptive coloring when color requirementsare small, which may be a reasonable restriction. We know by Corollary 2.2 that the number ofcolors used by an optimum solution for p-sum on partial k-trees is at most O(p · logn). For eachvertex we need to choose up to p colors in the range 1, . . . , O(p · logn). The number of differentpossible preemptive assignments of colors to a vertex v is

(O(p·logn)p

)

. This is polynomial in n dueto the bound on p when p = O(logn/ log logn). Hence, the following corollary.

Corollary 3.3 The p-sum and p-makespan problems on partial k-trees admit polynomial solutionsin the case p = O(logn/ log logn), k fixed.

4 Approximate multicolorings of partial k-trees

We show in this section that one can obtain near-optimal solutions to p-makespan on partial k-treeswith the additional property of using few preemptions. This leads to a good approximation of p-sum,

12

Page 14: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

that also uses few preemptions. First, we give a still better approximation for the non-preemptivecase.

4.1 FPTAS for np-sum on partial k-trees

The algorithm CompSum is polynomial only when p is polynomially bounded. We now shownp-sum can in general be approximated within a very small ratio. The same can be shown to holdfor np-makespan.

Theorem 4.1 np-sum admits a fully-polynomial time approximation scheme (FPTAS) on partial k-trees

that runs in (n/ǫ)O(k) time.

Proof. Let ǫ be given and let q = ⌊ǫp/n2⌋. We may assume that q ≥ 1, as otherwise algorithmCompSum yields an exact solution in polynomial time by Corollary 3.2.

The algorithm is as follows. Form a new instance I ′ = (G, x′) by rounding the color requirementsof the input I = (G, x) upwards to the nearest multiple of q. Apply the algorithm CompSum onthe quotient instance I ′/q, and obtain an optimal solution to I ′/q. By Lemma 2.8, this also givesan optimal solution to I ′ formed by repeating each color q times.

To analyze the same solution for I , let us first relate solutions of I ′ to those of I . Given asolution of I , we can form a solution of I ′ by repeating q times, for each node v, some color classcontaing v. The combined delay caused by repeating a single color class is at most qn. In total,we must repeat (at most) n color classes, one per each vertex. Thus, the total additional cost isbounded above by qn2. Hence,

OPT (I) ≤ OPT (I ′) ≤ OPT (I) + qn2 ≤ OPT (I) + ǫp ≤ (1 + ǫ)OPT (I).

Thus, the solution produced by our algorithm is within a factor of 1 + ǫ from optimal.The time complexity of the method is polynomial in p/q ≈ n2/ǫ, amounting toO((n2ǫ−1 logn)k+1 =

O(n2k+3ǫ−(k+1)).

4.2 PTAS for p-makespan using O(log n) preemptions

Preemptions are a resource that may be desirable to conserve. From the point of view of a scheduler,a preemption is likely to cost some overhead in changing to and from an active state. Limited useof preemptions is also preferable for our multisum approximations, in hindsight of our algorithms;in a sense, such colorings have low entropy.

In our case we can bound the number of rounds when some vertex turns active, and refer tothis as the maximum number of preemptions per vertex.

Theorem 4.2 The p-makespan problem on partial k-trees, k fixed, admits a PTAS that usesO(logn) preemptions per vertex and runs in time nO(k2/ǫ3).

The theorem follows immediately from Lemma 4.3 below along with Theorem 3.1. A family ofcolorings will here be said to be universal if it depends only on n, p, and a given k-partition of then vertices. Universal families do not depend on the actual structure of the graph, nor on the colorrequirements.

Lemma 4.3 There is a searchable universal family of multicolorings F with D(F) polynomial inn, such that for any k-colorable graph G, F includes a coloring that approximates the makespan ofG by a 1 + ǫ factor. Additionally, the number of preemptions per vertex used by any coloring in Fis O(logn).

Proof. We recall the family in the proof of Lemma 2.6. The instance I is split into an instance I ′′

and an instance I , where I has p = O(logn/ǫ). A coloring of I corresponds to a non-preemptivecoloring of I ′′ and after that a coloring of I repeated q = 2ω−α times (see the lemma). Now, count

13

Page 15: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

the number of possible colorings of a vertex v. Recall that the maximum color-requirement in I ′′ isbounded by kpǫ/c < (ǫ/2)p. Further, I ′′ is colored non-preemptively one color class after the other.Hence, we can assign in advance pǫ/c fixed (disjoint) colors to each color-class (independent of theinstance). Hence, for the first (roughly) ǫ/2µ(I) colors the coloring is independent of the instance(depends only on k and p) and is of one of (only) k types. What determines D is thus the coloringof I. Now,

D(F , v) ≤(

p · kp

)

≤ 2pk = nO(kc/ǫ1) = nO(k/ǫ3).

Taking q consecutive copies of each color does not affect this bound.

It may seem somewhat surprising that such a universal coloring can approximate simultaneouslyall the multicoloring instances. It should be clear from the proof that the different colorings of agiven vertex can be computed efficiently.

4.3 PTAS for p-sum using O(log n) preemptions

We now give a PTAS for the sum measure, building on the makespan result.

Theorem 4.4 The p-sum problem on partial k-trees admits a PTAS using O(logn) preemptionsper vertex with a running time of nO(k2/ǫ5).

This theorem follows immediately from the following lemma. The existence of a family with Dpolynomial means that we can use CompSum to find the desired coloring.

Lemma 4.5 There is a searchable universal family of multicolorings F with D polynomial in n,such that for any k-colorable graph G, F includes a schedule that approximates p-sum(G) within1 + ǫ. Additionally, each coloring in F has O(logn) preemptions per vertex.

We show this by transforming an optimum p-sum solution to an approximate solution with thedesired restricted structure that colorings in F have. The exact schedule is divided into segments,and each segment considered as a makespan instance, for which we use the restricted approximatesolutions of Lemma 4.3. We also want to ensure that the coloring of each vertex is limited toa compact interval. Thus, we delete all very small and very large colors assigned to the vertex,and schedule them in small blocks in between the intermediate segments. This will ensure thatonly constant number of segments are active for any given vertex, and therefore there is a 1 + ǫ-approximate searchable family of colorings for the graph.

Proof. Let ǫ4 and ǫ5 be small values to be chosen later, and let ǫ′ = ǫ5/k. Partition the colors1, 2, . . . into geometrically increasing segments, where the length di of the i-th segment Li isdi = (1 + ǫ4)

i (ignoring round-off). The set M(v) = (ǫ′/2)x(v), . . . , (2/ǫ′)x(v) is the area of thecolor space to which we want to confine the coloring of v. Let ψ∗ be an optimal p-sum schedule ofG. Let x′(v) = |ψ∗(v) \M(v)|, and xi(v) = |ψ∗(v) ∩ Li ∩M(v)|. Thus, we obtain instances (G, x′)and (G, xi), i = 1, 2, . . ., that partition the instance (G, x). Namely, x(v) = x′(v) +

i xi(v).Our coloring ψ will consist of segments, each containing a main block for treating xi and k

round-robin blocks for the remaining color requirements x′. The size of the main block is (1+ ǫ5)di,and the size of each of the k round-robin blocks is ǫ′di, for a total segment size of (1 + 2ǫ5)di. The

starting point of segment i is therefore zi = (1 + 2ǫ5)∑i−1j=1 dj = (1 + 2ǫ5)

(1+ǫ4)i

2+ǫ4.

Since (G, xi) could be colored properly in di = (1 + ǫ4)i colors, we can obtain by Lemma 4.3 a

schedule ψi of (G, xi) with makespan at most (1 + ǫ5)di, which we use in the main block.At most one of the k sets of round-robin blocks is used for any given vertex v. For that purpose,

we make use of a k-coloring of G, Υ : V → 0, 1, . . . , k−1. For each vertex v, and for each segmenti, exactly one (more precisely, the one indexed by Υ(v)) of the round-robin blocks is used to satisfythe x′(v) requirements.

14

Page 16: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

Let a = miniLi 6= ∅ = log1+ǫ4(ǫ′/2)x(v) be the index of the smallest segment with a non-

empty main block. Similarly, let b = maxiLi 6= ∅ be the index of the largest such segment.The set of colors assigned to v can be specified precisely as follows. For a set S of integers and

integer t, define the set [S + t] = x+ t : x ∈ S. Then,

ψ(v) =b⋃

i=a

[ψi(v) + zi] ∪ [1, 2, . . . , ǫ′di + (zi + (1 + ǫ5)di + Υ(v)ǫ′di)].

The round-robin block is offset by zi, the beginning of segment i, (1 + ǫ5)di, the size of the mainblock, and Υ(v)ǫ′di, the combined size of the previous round-robin blocks.

ψψψ

L L L L L L2 3 4 5 61

543

Figure 1: Transformation of ψ∗(v) to ψ(v)

We illustrate the construction in Figure 1 for a 2-colorable graph. The upper block shows ψ∗(v)cut into segments Li. Here, a = 3 and b = 5, so segments L3 through L5 are transformed into mainblocks ψ3(v) through ψ5(v) in ψ(v). The second of two round-robin blocks are used in segments 3through 5 for satisfying x′(v), which here amounts to the the colors used in L1 and L2.

We first verify that this forms a valid coloring of (G, x). The coloring is proper for each ψi,and thus for the corresponding parts of ψ(v). Also, two vertices u and v use the same round-robinsegment, then it must be that Υ(u) = Υ(v), so they are non-adjacent and their colorings do notconflict.

We now argue that the round-robin blocks used cover the remaining color requirements x′(v).We may allocate more colors than necessary, but that does not hurt. Observe that the round-robin blocks available to v are a ǫ′ fraction of the size of the corresponding main blocks. Thevalue x′(v) is composed of two parts: values of ψ∗(v) less than (ǫ′/2)x(v) and those greater than(2/ǫ′)x(v). Consider first the small values. Let r be the smallest number such that

∑qi=1 di ≥ x(v),

i.e. r = ⌈log1+ǫ4 x(v)⌉. The round-robin segments allocated to v in segments 1, 2, . . . , r then containspace for ǫ′x(v) elements. Thus, the segments a, a+ 1, . . . , r contain space for at least (ǫ′/2)x(v)elements, since

∑ri=1 di ≥ 2

∑a−1i=1 di. Therefore, since b ≥ r, the small values do not delay the

coloring of v in ψ, independent of how v was colored by ψ∗,Consider now the case when x′(v) contained some large values of ψ′. Thus, the index of the

largest segment containing a non-empty main block is b = log1+ǫ4(2/ǫ′)x(v). Then, the round-

robin blocks available to v in segments 1, 2, . . . , b contain space for 2x(v) elements. Hence, those insegments a, a+ 1, . . . , b contain space for at least x(v) elements.

The finish time of a vertex v in ψ(v) depends on two factors: its final segment in ψ∗(v), andits location within that segment of ψ(v). The segments expand from ψ∗(v) to ψ(v) by a factor of1 + 2ǫ5. The colors that a vertex receives within a segment is beyond our control, as the segmentsare handled as makespan instances where only the maximum number of colors used is relevant. Thismay delay the vertex by what amounts the full size of the last segment in which it was colored, orǫ4x(v). Hence, fψ(v) is bounded above by (1 + 2ǫ5 + ǫ4)fψ∗(v).We choose ǫ4 = ǫ5 = ǫ/3 to ensurefψ(v) ≤ (1 + ǫ)fψ∗(v).

15

Page 17: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

The number of segments used, b−a+1, is at most log1+ǫ4(2/ǫ′) x(v)ǫ′x(v) = log1+ǫ4(2/ǫ

′)2, which is

O(1/ǫ· log 1/ǫ). In each of these segments a vertex v has O(1/ǫ3 · logn) preemptions, by Lemma 4.3.Hence, the total number of preemptions for each vertex is O(1/ǫ4 · log 1/ǫ · logn). Let F denotethe family of all possible legal colorings in the above restricted form. Thus, in a way similar toLemma 4.3, D(F , v) is polynomially bounded in n.

5 Sum multicoloring planar graphs

We give a PTAS for both preemptive and non-preemptive cases on planar graphs, starting withthe easier preemptive case. For this, we rely heavily on the result obtained in the previous sectionfor partial k-trees. We match them with an NP-hardness result for the unit-length Sum Coloringproblem.

The results hold also for other classes of graphs that are constant colorable and can be parti-tioned into partial k-trees, such as K3,3-free graphs [C98].

5.1 NP-hardness of sum coloring planar graphs

It is clear that p-makespan and np-makespan are NP-hard on planar graphs, as they extend theNP-hard minimum coloring problem on planar graphs (cf. [GJ79]). We prove that already thesum-coloring problem, SC, is NP-complete for planar graphs.

Theorem 5.1 The SC problem and SMC problem are NP-complete on planar graphs.

lll1 2 3

x

y zu v

Figure 2: Gadget for the edge uv.

The reduction is from the maximum independent set (MIS) problem on planar graphs, whichis NP-complete (cf. [GJ79]). Given a planar graph G(V, E), we construct a graph G(V , E) byreplacing each edge of G by the gadget shown in Fig. 2. For edge e = uv in G we add to Gthe vertices xe, ye, ze, l

1e, l

2e, l

3e and the edges xeye, xeze, yeze, xel

1e , xel

2e, xel

3e as well as uye and vze.

Clearly G is planar when G is planar.Let α(G) be the size of the maximum independent set in G. Theorem 5.1 follows from the

following lemma.

Lemma 5.2 SC(G) = 9 · |E|+ 2 · |V | − α(G).

Proof. We first show the upper bound by constructing a coloring for G given a maximum indepen-dent set I∗ of G. Color the vertices of I∗ with 1 and other vertices coming from G with 2. Colorthe gadget of each edge uv as follows. Color x with 2, and the leaves li with 1. If u is colored 1,

16

Page 18: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

then by the choice we made v is not colored 1. Color y with 3 and z with 1; otherwise, color y with1 and z with 3. This forms a valid coloring of G where the cost of coloring each edge-gadget is 9,and the cost of coloring the vertices of G is 2|V | − α(G).

We now argue a matching lower bound on SC(G), claiming that the coloring constructed aboveis in a sense canonical. Let ψ∗ be an optimal sum coloring of G. We claim that vertices of Gcolored with 1 in ψ∗ must form an independent set in G. Assuming that claim, the minimum costof coloring the vertices of G is 2|V | −α(G). Since the the minimum cost of coloring each gadget is9, the minimum cost of coloring G is at least 9|E|+2|V | −α(G). Note that u and v are themselvesnot part of the gadget for the edge uv.

To prove the claim, suppose for the sake of obtaining a contradiction that for some edge uv inG, both u and v are colored 1 in ψ∗. We then form another coloring ψ′ of G by changing the color ofu to 2, and recoloring the gadget of each incident edge uv′ as needed. Namely, the leaf nodes of thegadgets are colored 1, x-nodes 2, y-nodes 1, and z-nodes 3 (unless v′ was colored 3, in which casewe color z with 2 and x with 3). It can be verified that the recoloring never increases the cost of agadget. If both u and v′ were colored 1, then the cost of coloring the gadget compatibly was at least12 (as the “triangle” xe, ye, ze has colors 2, 3, and 4 or larger colors, since color 1 is prohibited).Our transformation thus decreased the cost of the gadget by at least 3, while increasing the costof u by only 1. Hence, we have obtained a coloring of lower cost, which is a contradiction. Hence,the claim and the lemma follow.

The lemma implies a linear relationship between the approximability of MIS and SC on planargraphs. This uses the fact that for a planar graph G, α(G) ≥ |V |/4 and that by Euler’s theorem,|E| ≤ 3|V | (see [H69]).

Corollary 5.3 Let f(n) be a monotone non-increasing function. If SC can be approximated onplanar graphs in polynomial time within a ratio of 1 + f(n), then MIS can be approximated onplanar graphs in polynomial time within a ratio of 1 + 30f(n).

Proof. Assume that we are given a procedure A that can approximate the SC problem within1+f(n). Let G be a graph for which we want to approximate the size of the maximum independentset. Consider the graph G defined above. Let ψ∗ be the minimum sum coloring for G. ByLemma 5.2, we may assume that this coloring assigns color 1 to a maximum independent set andthat it completes the coloring as described in the proof of Lemma 5.2. Let IA denote the verticescolored 1 by A. Observe that SC(G) = SC(ψ∗) = 9 · |E| + 2 · |V | − α(G). By our assumption,9 · |E|+ 2 · |V | − |IA| ≤ (1 + f(n)) · (9 · |E|+ 2 · |V | − α(G)). Rearranging the terms, we get

|IA| ≥ f(n)(9|E|+ 2|V |) + (1 + f(n))α(G) ≥ 29f(n)|V | + (1 + f(n))α ≥ (1 + 30f(n))α(G).

The claim now follows.

5.2 PTAS for p-sum

The following well-known decomposition lemma of Baker [B94] will be used for both np-sum as wellas p-sum.

A class of plane graphs are outerplanar if all vertices are on the exterior face. More generally,the class of t-outerplanar graphs(cf. [B94]) are defined to be the outerplanar graphs when t = 1,and inductively, when t > 1, graphs such that the graph induced by vertices not on the exteriorface is t − 1-outerplanar. The only property of t-outerplanar graphs that is relevant here is thatthey are of treewidth at most 3t− 1 [B98]. The weight of a graph is the sum of the weights of thevertices. We view color requirements as vertex weights.

Lemma 5.4 (Planar decomposition) Let G be a planar graph, and t be a positive integer. ThenG can be decomposed into two vertex-disjoint graphs: Gb, which is t-outerplanar, and Ga, which isouterplanar with at most 2n/t vertices and at most 2S(G)/t weight.

17

Page 19: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

We briefly recall how this decomposition is done. Given a planar embedding of the graph, letL0 be the set of vertices on the exterior face, and inductively let Li be the exterior vertices of thegraphs induced by V (G)−∪i−1

j=0Lj, i = 1, . . . , t.For a given j, 0 ≤ j < t, let Uj = ∪i=0Lit+j. Namely, Uj consists of all the layers whose

index is congruent to j modulo t. By a simple averaging argument, there must be some value j,0 ≤ j < t + 1 such that |Uj| ≤ 2n/t and S(Uj) ≤ 2S(G)/t (because fewer than k/2 of the Uj failon either one of these two properties). For this value of j, let Va = Uj, let Vb = V −Va, and let Ga(Gb) be the graph induced by Va (Vb). Then Ga consists of disjoint outerplanar graphs, and thus isouterplanar, and similarly Gb consists of disjoint t-outerplanar graphs, and thus is t-outerplanar.

The following lemma relates approximations of planar graphs to those of partial k-trees.

Lemma 5.5 A ρ-approximation for p-sum on partial k-trees for any fixed k, implies a ρ(1 + ǫ)-approximation for planar graphs, for any ǫ > 0.

Proof. Let t be a constant to be determined. DecomposeG intoG1 andG2, withG1 t2-outerplanar,

and G2 outerplanar, following Lemma 5.4. Then, S(G2) ≤ 2S(G)/t2. Use the assumed approxima-tion of p-sum on partial k-trees to get solutions ψ1 and ψ2 whose sums are bounded by ρ ·OPT (G1)and ρ ·OPT (G2). Then, use a biased round-robin as follows: after each group of t− 1 color classesof ψ1, insert the next color class of ψ2. Clearly, the finish times of each of the vertices in G1 ismultiplied by at most 1 + 1/t, and that of a vertex in G2 by t. Note, that since G2 is 4-colorable,OPT (G2) ≤ 4S(G2). Hence, the four-colorability of G2 gives that

OPT (G2) ≤ 4S(G2) ≤ 8OPT (G)/t2.

Therefore, the cost of the sum coloring of G is bounded above by

ρ((1 + 1/t)OPT (G1) + t ·OPT (G2)) ≤ ρ(1 + 9/t) ·OPT (G).

Choosing t = 1/9ǫ yields the lemma.

The following theorem now follows from Lemma 5.5 and Theorem 4.4.

Theorem 5.6 The p-sum problem on planar graphs admits a PTAS whose running time is nO(1/ǫ5).

5.3 PTAS for np-sum

We now turn to the non-preemptive case. Given Theorem 2.10, the missing link is in solving planargraphs with small ratios τ(G) between maximum and minimum color requirements. First, we needa variation on the number of colors used. Let OPT (G) be an optimal multicoloring sum of G.

Corollary 5.7 At most OPT (G)/(c · p) vertices remain to be completed in an optimal sum multi-coloring of G by step p+ 2µ(G) lg c, for any positive c > 1.

Proof. By step p, at most OPT (G)/p vertices remain to be completed (for otherwise the delayis more than the optimum). By Lemma 2.1, after additional 2µ(G) lg c rounds, the number ofremaining vertices is down to at most OPT (G)/(cp).

Lemma 5.8 (Compact lengths) Let (G, x) be a planar instance with τ(G) = O(logn/(log logn)3),and let ǫ = ǫ(n). Then, np-sum(G) admits a 1+ ǫ-approximation using O(p · log ǫ−1) colors in time(logn)O(τ (G)ǫ−1 log ǫ−1)n.

Proof. Let h = h(n) be determined later, and let d = d(n) = hp/(OPT (G)/n) and b = b(n) =1 + 8 lgh. Note that

d =hp

OPT (G)/n≤ hp

S(G)/n≤ hp

pmin= hτ(G).

We apply the following approach.

18

Page 20: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

1. Partition V via Lemma 5.4 into V1 and V2, where V1 induces a d-outerplanar graph G1 while|V2| ≤ 2n/d.

2. Sum multicolor G1 nearly-optimally, using the rounding lemma 2.9 with CompSum on thereduced instance of maximum color requirement τ(G)/ǫ. Use the first b · p = (1 + 8 logh)pcolors in this solution (discarding the remaining color-classes), and let V be the set of verticesnot fully colored by these colors.

3. Color V2 ∪ V using a graph 4-coloring algorithm, yielding a multicoloring with at most 4pcolors.

The cost of coloring V1, and thus that of coloring V1−V , is at most (1+ǫ)OPT . By Lemma 5.7,V contains at mostOPT (G)/(hp) vertices. Also, V2 contains at most n/d = OPT (G)/(hp) vertices.Hence, the cost of coloring V2 ∪ V is at most

(b+ 4)p · 3OPT (G)/(hp) =15 + 24 lgh

hOPT (G).

The 4p term here reflects a bound on the cost per each vertex in a four-coloring, while the b · pterm reflects the delay of V2 ∪ V . Now set h to make the above expression at most ǫOPT . Thush = O(ǫ−1 · log ǫ−1). Then, the total cost of the coloring is at most (1 + 2ǫ)OPT .

The complexity of our algorithm depends primarily on CompSum. Recall that d is at mosth · τ(G), and without loss of generality ǫ−1 = O(logn). By Corollary 3.2, the scaled instance issolved in time

(ǫ−1τ(G) logn)O(d)n = (logn)O(hτ (G))n = (logn)O(τ (G)ǫ−1 log ǫ−1)n.

The number of colors used is (b+ 4)p = (5 + 8 lgh)p = O(p log ǫ−1).

Theorem 5.9 Let fǫ = ǫ−1 log ǫ−1. The np-sum problem on planar graphs admits a PTAS usingO(p · log ǫ−1) colors whose running time is n · exp(ln lnn · exp(O(f2

ǫ ))).

Proof. By Lemma 5.8, np-sum on short instances (with τ(G) at most a given q) admits a 1 + ǫ-approximation in time n · (logn)O(q·fǫ). The number of colors used is σp, for σ = c log ǫ−1 for someconstant c. Let q be such that σ/

√ln q = ǫ, or q = exp((cfǫ)

2). Applying Theorem 2.10 we obtainan approximation of np-sum within a 1 + 2ǫ factor. The time complexity is

n · (logn)O(q·fǫ) = n · exp(ln lnn ·O(exp((cfǫ)2) · fǫ)) = n · exp(ln lnn · exp(O(fǫ)

2)).

In particular, we can obtain a 1 +√

ln lnn/ ln ln lnn-approximation in sub-quadratic timen1+O(log log logn/ log logn).

For Sum Coloring, we obtain better tradeoffs, since we can solve exactly partial k-trees fork = O(logn/ log logn), by directly applying the Compact Lengths Lemma 5.8.

Theorem 5.10 SC on planar graphs admits a PTAS with running time of exp(O(ln lnn · fǫ)) · n.

6 Open problems

Our research leaves some open problems, of which we mention one. The fact that p-makespan andnp-makespan are solvable on bipartite graphs easily yields a 2-approximation for these problems onplanar graphs. Further, an approximation better than 4/3 does not exist, unless P = NP . Whatthen is the approximation threshold of these problems on planar graphs? Can the reduction of themaximum color to O(logn) help in designing an 4/3 + ǫ approximation for any ǫ?

19

Page 21: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

Acknowledgements

This paper owes its existence to Amotz Bar-Noy, for bringing the authors together. We thank himfor his support and many early discussions. We also thank Hadas Shachnai and Hermann Thorissonfor helpful discussions and Barun Chandra for important comments.

References

[B98] H. L. Bodlaender. A partial k-arboretum of graphs with bounded treewidth. Theoret-ical Computer Science, 209:1–45, 1998.

[B92] M. Bell. Future directions in traffic signal control. Transportation Research Part A,26:303–313, 1992.

[B94] B. S. Baker. Approximation algorithms for NP-complete problems on planar graphs.J. ACM, 41:153–180, Jan. 1994.

[BBH+98] A. Bar-Noy, M. Bellare, M. M. Halldorsson, H. Shachnai, and T. Tamir. On chromaticsums and distributed resource allocation. Information and Computation, 140:183–202,1998.

[BH94] D. Bullock and C. Hendrickson. Roadway traffic control software. IEEE Transactionson Control Systems Technology, 2:255–264, 1994.

[BK98] A. Bar-Noy and G. Kortsarz. The minimum color-sum of bipartite graphs. Journal ofAlgorithms, 28:339–365, 1998.

[BHK+98] A. Bar-Noy, M. M. Halldorsson, G. Kortsarz, H. Shachnai, and R. Salman. Sum Multi-Coloring of Graphs. In Proc. Seventh European Symposium on Algorithms (ESA ’99),Lecture Notes in Computer Science Vol. 1643, Springer-Verlag, July 1999. To appearin Journal of Algorithms.

[CCO93] J. Chen, I. Cidon and Y. Ofek. A local fairness algorithm for gigabit LANs/MANswith spatial reuse. IEEE Journal on Selected Areas in Communications, 11:1183–1192,1993.

[C98] Z.-Z. Chen. Efficient Approximation Schemes for Maximization Problems on K3,3-FreeGraphs. J. Algorithms 26(1):166–187, 1998.

[Cof85] E. G. Coffman, M. R. Garey, D. S. Johnson, and A. S. Lapaugh. Scheduling filetransfers. SIAM J. Comp. 14:744-780, 1985.

[FK98] U. Feige and J. Kilian. Zero Knowledge and the Chromatic number. Journal ofComputer and System Sciences, 57(2):187-199, October 1998.

[GJ79] M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theoryof NP-completeness. W. H. Freeman, 1979.

[Ger96] J. Gergov. Approximation algorithms for dynamic storage allocation. In Proc. 4th Ann.European Symp. on Algorithms, Lecture Notes in Comput. Sci. 1136, Springer-Verlag,52-61, 1996.

[GLS88] M. Grotschel, L. Lovasz and A. Schrijver. Geometric Algorithms and CombinatorialOptimization, Springer-Verlag, 1988.

20

Page 22: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

[H69] F. Harary, Graph Theory. Addison-Wesley, 1969

[H94] C. T. Hoang, Efficient algorithms for minimum weighted coloring of some classes ofperfect graphs. Discrete Applied Math, 55:133-143, 1994.

[HK99] M. M. Halldorsson and G. Kortsarz. Multicoloring Planar Graphs and Partial k-Trees.In Proceedings of the Second International Workshop on Approximation algorithms(APPROX ’99). Lecture Notes in Computer Science Vol. 1671, Springer-Verlag, August1999.

[HK+99] M. M. Halldorsson, G. Kortsarz, A. Proskurowski, H. Shachnai, R. Salman, andJ. A. Telle. Multi-Coloring Trees. In Proceedings of the Fifth International Comput-ing and Combinatorics Conference, Tokyo, Japan, Lecture Notes in Computer ScienceVol. 1627, Springer-Verlag, pages 271–280, July 1999.

[HKS01] M. M. Halldorsson, G. Kortsarz, and H. Shachnai. Minimizing Average Completionof Dedicated Tasks and Interval Graphs. In Proceedings of the Fourth InternationalWorkshop on Approximation algorithms (APPROX ’01). Lecture Notes in ComputerScience, Springer-Verlag, August 2001.

[J97] K. Jansen. The Optimum Cost Chromatic Partition Problem. In Proceedings of theThird Italian Conference on Algorithms and Complexity (CIAC ’97). Lecture Notes inComputer Science Vol. 1203, pp. 25–36, Springer-Verlag, July 1997.

[KKK89] E. Kubicka and G. Kubicki, and D. Kountanis. Approximation Algorithms for theChromatic Sum. Proceedings of the First Great Lakes Computer Science Conf., LectureNotes in Computer Science Vol. 507, pp. 15–21, Springer-Verlag, July 1989.

[KS89] E. Kubicka and A. J Schwenk. An Introduction to Chromatic Sums. In Proceedingsof the Seventeenth Annual ACM Computer Science Conference, “Computing trends inthe 1990’s”, pages 39–45, 1989.

[L81] N. Lynch. Upper Bounds for Static Resource Allocation in a Distributed System. J.of Computer and System Sciences, 23:254–278, 1981.

[MR97] C. McDiarmid and B. Reed. Channel assignment and weighted coloring. Networks,36:114–117, 2000.

[MR95] R. Motwani and P. Raghavan. Randomized Algorithms. Cambridge University Press,1995.

[NS93] M. Naor and L. Stockmeyer. What Can be Computed Locally? Proceedings of theTwenty Fifth Annual Symposium on the Theory of Computing, pp. 184–193, 1993.

[NS97] L. Narayanan and S. Shende. Static Frequency Assignment in Cellular Networks. InProceedings of the Fourth Colloquium on Structural Information and CommunicationComplexity, July 1997. To appear in Algorithmica.

[NSS99] S. Nicoloso, M. Sarrafzadeh, and X. Song. On the Sum Coloring Problem on IntervalGraphs. Algorithmica, 23:109–126, 1999.

[S-99] T. Szkaliczki. Routing with Minimum Wire Length in the Dogleg-Free ManhattanModel is NP-complete. SIAM Journal on Computing, 29(1):274-287, 1999.

21

Page 23: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

[SG98] A. Silberschatz and P. Galvin. Operating System Concepts. Addison-Wesley, 5thEdition, 1998.

[SP88] E. Steyer and G. Peterson. Improved Algorithms for Distributed Resource Allocation.Proceedings of the Seventh Annual Symposium on Principles of Distributed Computing,pp. 105–116, 1988.

[T95] A. S. Tanenbaum, Distributed Operating Systems. Prentice-Hall, 1995.

[X98] J. Xue. Solving the minimum weighted integer coloring problem. ComputationalOptimization and Application 11(1):53–64, 1998.

A General cost functions

We consider here a general class of cost functions, to which the CompSum algorithm is extended.To consider first some concrete examples of cost functions, one example is the sum of squares of

completion times,∑

v fψ(v)2. This could be viewed as the L2-metric, with L1 being the multicolorsum and L∞ the makespan. Any Lp-metric can be handled within our framework.

Another example is the d(v)-coloring problem which comes with edge lengths d : E → Z+

and asks for an ordinary coloring where the colors of adjacent vertices are further constrained tosatisfy |fψ(v)− fψ(w)| ≥ d(vw). A non-preemptive multicoloring instance corresponds roughly tothe case where d(vw) = (x(v) + x(w))/2. Our algorithms handle this extension equally well, andcan both handle the sum objective as well as minimizing the number of colors.

Each cost function C associates a positive real number with each legal multicoloring. We needthe function C to be also defined for partial colorings, i.e., legal multicolorings ψ of only a subsetS ⊆ V of the vertices. In this case, the value of the coloring is defined by the graph induced byS. We denote this cost by C(ψ, S). The goal is to compute a legal multicoloring (of the entiregraph) with minimum C value. We show that CompSum can be generalized to the following familyof functions.

Let g1 and g2 be two multicolorings of subsets A ⊆ V and B ⊆ V , respectively, with g1 andg2 agreeing on A ∩ B. Then the extension function Gx(g1, g2) of g1 and g2 is the function coloringA ∪ B according to g1 and g2. The functions we deal with obey the following properties.

• Monotonicity property: A cost function is monotonic if it is preferable to color as manyvertices as possible with small colors. Formally, a cost function is monotonic if the followingholds. Say that we take a coloring ψ, and “move” a vertex v colored j, into a smaller colorclass i, i < j, resulting in a new (legal) coloring ψ′. Then, C(ψ′) ≤ C(ψ).

• Composition property: A function obeys the Composition property if the following holds.Given A and B and a coloring g of A ∩ B, the optimum way of extending g to A ∪ B isby choosing the optimum coloring gA of A among the colorings agreeing with g on A ∩ B,and similarly taking the optimum coloring gB of B agreeing with g on A ∩ B and choosingGx(gA, gB). Further, if we have a coloring g of A, the optimum way to extend g to A ∪ Bis by choosing an optimum coloring of B, among the colorings agreeing with g on A ∩ B.Finally, the cost of C(Gx(gA, gB), A∪ B) can be computed in polynomial time from C(gA, A)and C(gB, B).

Beside the examples mentioned above, another previously studied monotonic cost functionappears in the Optimum Chromatic Cost Problem (OCCP) (see [J97]). OCCP generalizes the SumColoring problem in that the color classes come equipped with a cost function c : Z+ → Z+ andwe assign a single color f(v) to each vertex minimizing

v∈V c(f(v)). Without loss of generality,

22

Page 24: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

we may assume that the color costs are non-decreasing. We can generalize this to multicolorings,where the cost incurred for vertex v is c(fψ(v)).

We first show that any monotonic cost function C the optimum uses few colors on certain graphs,that include planar graphs and partial k-trees. We then derive a generalization of the CompSum

algorithm of Section 3 to monotonic cost functions.

A.1 Number of colors

The following discussion shows that on certain graphs, the number of colors an optimum algorithm(under a monotonic cost function) needs to optimally multicolor the graph is “small”. This appliesboth to the preemptive and non-preemptive cases. The following lemmas extend a similar lemmaof the work in [J97] that applies to the unweighted case (with x(v) = 1 for all v). It is interestingto note that this lemma applies to a family of graphs that contains among others planar graphsand partial k-trees: the family of inductive graphs.

We say that a graph G(V, E) is t-inductive if for any subgraph G′(V ′, E ′) of G, |E ′| ≤ t · |V ′|.Also, G is inductive, if there exist a constant t such that G is t-inductive. In particular, planargraphs are 5-inductive. Also partial k-trees are k-inductive since any subgraph of a partial k-treeis also a partial k-tree.

Lemma A.1 An optimal sum multicoloring of an inductive graph (under a general monotonic costfunction) uses at most O(p · logn) colors.

We prove the lemma in two claims below.

Claim A.2 Let G be t-inductive, and let (Gi, xi) be the instance induced by the colors i, i+1, . . . ofsome optimal preemptive solution, under a monotonic cost function. Then, the number of verticesin Gi′ is at most half that of Gi, when i′ = i+ (8t+ 2)p.

Proof. It suffices to consider each connected component of Gi independently, thus for simplicityassume Gi is connected. Let ni denote the number of vertices of Gi. Let t be the largest integersuch that ni+t ≥ ni/2. In each iteration, a vertex is either colored or adjacent to a vertex that getscolored, by maximality of the independent set colored. Thus, in each iteration j = i, i+1, . . . , i+ t,either at least ni/4 vertices are colored or at least ni/4 vertices are dominated by colored vertices.There can be at most 4p iterations of the former type before the sum of the color requirementsbecomes zero. Let us now concentrate on the latter type of iterations, each involving at leastni/4 edges incident on colored vertices. Each edge (u, v) can dominate, or delay, a vertex atmost x(u) + x(v) ≤ 2p times. Since there are at most tni edges by inductiveness, total countsof dominations is at most 2tpni. Hence, the number of such iterations is at most 8tp. Thus,t ≤ (8t+ 2)p.

We now prove a similar claim for the non-preemptive case. Again we deal with a monotonic costfunction C and some optimum non-preemptive coloring under C. Note that in the non-preemptivecase the color-classes are not necessarily maximal. Hence, a different proof is needed. However, wemay assume that for each vertex v, there is no smaller color-class in the optimum in which we can(non-preemptively) insert v (and keep the coloring legal).

Claim A.3 Each O(p) iterations in an optimum solution on inductive graphs, halves the maximumsize of any connected component remaining.

Proof. Take a component with n′ vertices, and consider all following iterations having a sub-component of at least n′/2 vertices. Consider the first p iterations. Let N be the number ofvertices chosen in one of these first p iterations. If a vertex v is chosen in one of these iterations,then v is deleted in at most 2 · p iterations (recall that we are dealing with the non-preemptive casenow.) If v is not chosen in any of the first p iterations, it must have a neighbor chosen in one ofthese first p iterations. Thus, at time 2 · p a neighbor of v is deleted. This means that after 2 · p

23

Page 25: Tools for Multicoloring with Applications to Planar Graphs and …guyk/pub/ps/nabs.pdf · 2010. 11. 22. · Tools for Multicoloring with Applications to Planar Graphs and Partial

iterations, at least n′/2−N edges of the graph are deleted (the total number of vertices is at leastn′/2, and an edge is deleted for each non-chosen vertex.) Since maxN, n′/2 −N = Ω(n) a proofsimilar to the proof of Claim A.2 gives the desired result.

A.2 Adapting CompSum to deal with monotonic functions

It is now immediate to adapt CompSum for partial k-trees to deal with monotonic functions. Again,for any supervertexXi, we let Mi(g) denote the value of the best assignment of colors that extends gfromXi to Ui. As in the case with multisum objective, we need to computeMi(g) going exhaustivelyover all possible functions g. Again, we use the fact that few colors are used to bound the numberof functions g to be considered. By the composition property, we only need to “guess” (searchexhaustively) the coloring of the root in the optimum. Once we get the “correct” coloring g ofthe root we know from the composition property that we get an optimum coloring of Ui extendingthe coloring optimally on the subtrees. The value of the optimal extensions is computed by therecursive calculation.

We now verify the running time of the procedure. By Lemma A.1, the number of possiblecolorings of Xi is O((p · logn)k). By the composition property, the optimum coloring of Ti (thesubtree rooted at Xi) can be computed in polynomial time P (n). It follows that in time O(P (n) ·n · (p · logn)k) the optimum assignment C is computed.

As in Section 3.1 two corollaries apply.Corollary A.4 The non-preemptive coloring problem under any monotonic cost function admitsan exact algorithm in O(P (n) · n · (p · logn)k+1) time.

Corollary A.5 The preemptive problem under any monotonic cost function admits a polynomialsolution in the case p = O(logn/ log logn), k fixed.

24