Lecture Notes in Computer Science Edited by G. Goos, J. Hartmanis and J. van Leeuwen
1444
Klaus Jansen Jos6 Rolim (Eds.)
Approximation Algorithms for Combinatorial Optimization International Workshop APPROX'98 Aalborg, Denmark, July 1819, 1998 Proceedings
Springer
Series Editors Gerhard Goos, Karlsruhe University, Germany Juris Hartmanis, Cornell University, NY, USA Jan van Leeuwen, Utrecht University, The Netherlands Volume Editors Klaus Jansen IDSIA Lugano Corso Elvezia 36, CH6900 Lugano, Switzerland Email:
[email protected] Jos6 Rolim University of Geneva, Computer Science Center 23, Rue Gtntral Dufour, CH1211 Geneva 4, Switzerland Email: jose.rolim @cui.unige.ch CataloginginPublication data applied for
Die Deutsche Bibliothek  CIPEinheitsaufuahme
Approximation algorithms for combinatorial optimization : proceedings / International ICALP '98 Workshop, APPROX '98, Aalborg, Denmark, July 18  19, 1998. Klaus Jansen ; Jos~ Rolim (ed.).  Berlin ; Heidelberg ; New York ; Barcelona ; Budapest ; Hong Kong ; London ; Milan ; Paris ; Singapore ; Tokyo : Springer, 1998 (Lecture notes in computer science ; Vol. 1444) ISBN 3540647368
CR Subject Classification (1991): F.2.2, G.1.2, G.1.6, G.3, 1.3.5 ISSN 03029743 ISBN 3540647368 SpringerVerlag Berlin Heidelberg New York This work is subject to copyright. All rights are reserved, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other way, and storage in data banks. Duplication of this publication or parts thereof is permitted only under the provisions of the German Copyright Law of September 9, 1965, in its current version, and permission for use must always be obtained from Springer Verlag. Violations are liable for prosecution under the German Copyright Law. 9 SpringerVerlag Berlin Heidelberg 1998 Printed in Germany Typesetting: Cameraready by author SPIN 10638075 06/3142  5 4 3 2 1 0
Printed on acidfree paper
Preface The Workshop on Approximation Algorithms for Combinatorial Optimization Problems A P P R O X ' 9 8 focuses on algorithmic and complexity aspects arising in the development of efficient approximate solutions to computationally difficult problems. It aims, in particular, at fostering cooperation among algorithmic and complexity researchers in the field. The workshop, to be held at the University of Aalborg, Denmark, on July 18  19, 1998, colocates with ICALP'98. We would like to thank the organizer of ICALP'98, Kim Larsen, for this opportunity. A previous event in Europe on approximate solutions of hard combinatorial problems consisting in a school followed by a workshop was held in Udine (Italy) in 1996. Topics of interest for APPROX'98 are: design and analysis of approximation algorithms, inapproximability results, online problems, randomization techniques, averagecase analysis, approximation classes, scheduling problems, routing and flow problems, coloring and partitioning, cuts and connectivity, packing and covering, geometric problems, network design, and various applications. The number of submitted papers to APPROX'98 was 37. Only 14 papers were selected. This volume contains the selected papers plus papers by invited speakers. All papers published in the workshop proceedings were selected by the program committee on the basis of referee reports. Each paper was reviewed by at least three referees who judged the papers for originality, quality, and consistency with the topics of the conference. We would like to thank all authors who responded to the call for papers and our invited speakers: Magnds M. Halld6rsson (Reykjavik), David B. Shmoys (Cornell), and Vijay V. Vazirani (Georgia Tech). Furthermore, we thank the members of the program committee:  Ed Coffman (Murray Hill), Pierluigi Crescenzi (Florence),  Ulrich Faigle (Enschede), Michel X. Goemans (Louvain and Cambridge), Peter Gritzmann (Mfinchen), Magnfis M. Halld6rsson (Reykjavik), Johan Hs (Stockholm), Klaus Jansen (Saarbr/icken and Lugano, chair), Claire Kenyon (Orsay),  Andrzej Lingas (Lund),  George Lueker (Irvine),  Ernst W. Mayr (Miinchen),  Jose D.P. Rolim (Geneva, chair), Andreas Schulz (Berlin), David B. Shmoys (Cornell), Jan van Leeuwen (Utrecht). 









VI and the reviewers Susanne Albers, AbdelKrim Amoura, Gunnar Andersson, Christer Berg, Ioannis Caragiannis, Dietmar Cieslik, A. Clementi, Artur Czumaj, Elias Dahlhaus, A. Del Lungo, Martin Dyer, Lars Engebretsen, Thomas Erlebach, Uriel Feige, Stefan Felsner, Rudolf Fleischer, Andras Frank, R. Grossi, Joachim Gudmundsson, Dagmar Handke, Stephan Hartmann, Dorit S. Hochbaum, J.A. Hoogeveen, Sandra Irani, Jesper Jansson, Mark Jerrum, David Johnson, Christos Kaklamanis, Hans KeUerer, Samir Khuller, Ekkehard Koehler, Stefano Leonardi, Joseph S. B. Mitchell, Rolf H. MShring, S. Muthu Muthukrishnan, Petra Mutzel, Giuseppe Persiano, Joerg Rambau, Ramamoorthi Ravi, Ingo Schiermeyer, Martin Skutella, Roberto SolisOba, Frederik Stork, Ewald Speckenmeyer, C.R. Subramanian, Luca Trevisan, Denis Trystram, John Tsitsiklis, Marc Uetz, HansChristoph Wirth, Gerhard Woeginger, Martin Wolff, Alexander Zelikovsky, and Uri Zwick. z
We gratefully acknowledge sponsorship from the MaxPlanckInstitute for Computer Science Saarbriicken (AG 1, Prof. Mehlhorn), ALCOMIT Algorithms and Complexity in Information Technology, and Siemens GmbH. We also thank Luca Gambardella, the research institute IDSIA Lugano, Alfred Hofmann, Anna Kramer, and SpringerVerlag for supporting our project. May 1998
Klaus Jansen
Co
e
s
Invited Talks Approximations of independent sets in graphs Magnds M. HalldSrsson
Using linear programming in the design and analysis of approximation algorithms: Two illustrative problems David B. Shmoys
15
The steiner tree problem and its generalizations Vijay V. Vazirani
33
Contributed Talks
Approximation schemes for covering and scheduling on related machines Yossi Azar and Leah Epstein
39
One for the price of two: A unified approach for approximating covering problems Reuven Bar Yehuda
49
Approximation of geometric dispersion problems Christoph Baur and Sdndor P. Fekete
63
Approximating koutconnected subgraph problems Joseph Cheriyan, Tibor Jorddn and Zeev Nutov
77
Lower bounds for online scheduling with precedence constraints on identical machines Leah Epstein
89
Instant recognition of half integrality and 2approximations Dorit S. Hochbaum
99
The t  vertex cover problem: Extending the half integrality framework with budget constraints Dorit S. Hochbaum
111
vllf
A new fully polynomial approximation scheme for the knapsack problem Hans Kellerer and Ulrich Pferschy
123
On the hardness of approximating spanners Guy Kortsarz
135
Approximating circular arc colouring and bandwidth allocation in allopticai ring networks Vijay Kumar
147
Approximating maximumindependentset in kcliquefree graphs IngoSchiermeyer
159
Approximating an interval scheduling problem Frits C.R. Spieksma
169
Finding dense subgraphs with semidefinite programming Anand Srivastav and Katja Wolf
181
Best possible approximation algorithm for MAX SAT with cardinality constraint Maxim I. Sviridenko
193
Author Index
201
Approximations of Independent Sets in Graphs Magn´ us M. Halld´ orsson1,2 1
Science Institute, University of Iceland, Reykjavik, Iceland.
[email protected] 2 Department of Informatics, University of Bergen, Norway.
1
Introduction
The independent set problem is that of ﬁnding a maximum size set of mutually nonadjacent vertices in a graph. The study of independent sets, and their alter egos, cliques, has had a central place in combinatorial theory. Independent sets occur whenever we seek sets of items free of pairwise conﬂicts, e.g. when scheduling tasks. Aside from numerous applications (which might be more pronounced if the problems weren’t so intractable), independent sets and cliques appear frequently in the theory of computing, e.g. in interactive proof systems [6] or monotone circuit complexity [2]. They form the representative problems for the class of subgraph or packing problems in graphs, are essential companions of graph colorings, and form the basis of clustering, whether in terms of nearness or dispersion. As late as 1990, the literature on independent set approximations was extremely sparse. In the period since Johnson [31] started the study of algorithms with good performance ratios in 1974 – and in particular showed that a whole slew of independent set algorithms had only the trivial performance ratio of n on general graphs – only one paper had appeared containing positive results [29], aside from the special case of planar graphs [34,8]. Lower bounds were effectively nonexistent, as while it was known that the best possible performance ratio would not be some fixed constant, there might still be a polynomialtime approximation scheme lurking somewhere. Success on proving lower bounds for Independent Set has been dramatic and received worldwide attention, including the New York Times. Progress on improved approximation algorithms has been less dramatic, but a notable body of results has been developed. The purpose of this talk is to bring some of these results together, consider the lessons learned, and hypothesize about possible future developments. The current paper is not meant to be the ultimate summary of independent set approximation algorithms, but an introduction to the performance ratios known, the strategies that have been applied, and oﬀer glimpses of some of the results that have been proven. We prefer to study a range of algorithms, rather than seek only the best possible performance guarantee. The latter is ﬁne as far as it goes, but is not the only thing that matters; only so much information is represented by a single number. Algorithmic strategies vary in their time requirements, temporal access Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 1–13, 1998. c SpringerVerlag Berlin Heidelberg 1998
2
Magn´ us M. Halld´ orsson
to data, parallelizability, simplicity and numerous other factors that are far from irrelevant. Diﬀerent algorithms may also be incomparable on diﬀerent classes of graphs, e.g. depending on the size of the optimal solution. Finally, the proof techniques are perhaps the most valuable product of the analysis of heuristics. We look at a slightly random selection of approximation results in the body of the paper. A complete survey is beyond the scope of this paper but is under preparation. The primary criteria for selection was simplicity, of the algorithm and the proof. We state some observations that have not formally appeared before, give some recent results, and present simpler proofs of other results. The paper is organized as follows. We deﬁne relevant problems and deﬁnitions in the following section. In the body of the paper we present a number of particular results illustrating particular algorithmic strategies: subgraph removal, semideﬁnite programming, partitioning, greedy algorithms and local search. We give a listing of known performance results and ﬁnish with a discussion of open issues.
2
Problems and definitions
Independent Set: Given a graph G = (V, E), ﬁnd a maximum cardinality set I ⊆ V such that for each u, v ∈ I, (u, v) ∈ E. The independence number of G, denoted by α(G), is the size of the maximum independent set. Clique Partition: Given a graph G = (V, E), ﬁnd a minimum cardinality set of disjoint cliques from G that contains every vertex. κSet Packing: Given a collection C of sets of size at most κ drawn from a ﬁnite set S, ﬁnd a minimum cardinality collection C such that each element in S is contained in some set in C . These problems may also be weighted, with weights on the vertices (or on the sets in Set Packing). A set packing instance is a case of an independent set problem. Given a set system (C, S), form a graph with a vertex for each set in C and edge between two vertices if the corresponding sets intersect. Observe that if the sets in C are of size at most κ, then the graph contains a κ + 1claw, which is a subgraph consisting of a center node adjacent to κ + 1 mutually nonadjacent vertices. The independent set problem in κ + 1claw free graphs slightly generalizes κset packing, which in turn slightly generalizes κdimensional matching. The performance ratio ρA of an independent set algorithm A is given by α(G) . G,G=n A(G)
ρA = ρA (n) = max
Approximations of Independent Sets in Graphs
3
Notation n the number of vertices m the number of edges ∆ maximum degree d average degree δ minimum degree α independence number κ maximum claw size
3
d(v) the degree of vertex v N (v) set of neighbors of v N (v) nonneighbors of v A(G) the size of solution found by A ρA performance ratio of A χ clique partition number
Ramsey theory and subgraph removal
The ﬁrst published algorithm with a nontrivial performance ratio on general graphs was introduced in 1990. In appreciation of the heritage that the late master Erd˝ os left us, we give here a treatment diﬀerent from Boppana and Halld´orsson [12] that more closely resembles the original Ramsey theorem of Erd˝ os and Szekeres [17].
Ramsey (G) if G = ∅ then return (∅, ∅) choose some v ∈ G (C1 , I1 ) ← Ramsey(N (v)) (C2 , I2 ) ← Ramsey(N (v)) return (larger of (C1 ∪ {v}, C2 ), larger of (I1 , I2 ∪ {v}))
CliqueRemoval (G) i ← 1 (Ci , Ii ) ← Ramsey (G) while G = ∅ do G ← G − Ci i ← i + 1 (Ci , Ii ) ← Ramsey (G) od return ((maxij=1 Ij ), {C1 , C2 , . . . , Ci })
Fig. 1. Independent set algorithm based on Ramsey theory
Theorem I+C 1. Ramsey finds an independent1 set 2I and a clique C such that − 1 ≥ n. In particular, I · C ≥ 4 log n. C Proof. The proof is by induction on both I and C. It is easy to verify the claim when either I or C are at most 1. By the induction hypothesis, I1  + C1  I2  + C2  − 1 n = N (v) + N (v) + 1 ≤ ( − 1) + ( − 1) + 1. C1  C2  Recall that C = max(C1  + 1, C2 ) and I = max(I1 , I2  + 1). Thus, I + C − 1 I + C − 1 n≤ + − 1. C − 1 C s+t−1 s+t−1 The claim now follows from the equality s+t = t−1 + . s t
4
Magn´ us M. Halld´ orsson
It is easy to verify that the product of I and C is minimized when they ≤ 22C , hence I · C ≥ ( 12 log n)2 . are equal. That is, when n = 2C C The following simpliﬁed proof of a O(n/ log2 n) performance ratio also borrows from another of Erd˝ os’s work [15]. Theorem 2. The performance ratio of CliqueRemoval is O(n/ log2 n). Proof. Let CC denote the number of cliques returned by CliqueRemoval and let CC0 denote the number of cliques removed before the size of the graph dropped below n0 = n/ log2 n. Let t be the size of the smallest of these latter cliques, which without loss of generality is at most log2 n. Then CC1 ≤ n/t, and CC ≤ n/t + n0 ≤ 2n/t. If I is the independent set returned, we have that I ≥ 4 log2 n0 /t ≥ 2 log2 n/t. Consider the product of the two performance ratio of CliqueRemoval, ρα for independent sets, and ρχ for clique partition: ρα · ρχ =
n α n CC α · ≤ ≤ . χ I log2 n χ log2 n
Clearly, either performance ratio is also bounded by O(n/ log2 n). For graphs with high independence number, the ratios are better. Theorem 3. If α(G) ≥ n/k + p, then CliqueRemoval finds an independent set of size Ω(p1/(k−1) ). This illustrates the strategy of subgraph removal, that is based around the concept that graphs without small dense subgraphs are easier to approximate.
4
Lov´ asz theta function
A fascinating polynomialtime computable function ϑ(G), that was introduced by Lov´ asz [37], has the remarkable sandwiching property that it always lies between two N P hard functions, α(G) ≤ ϑ(G) ≤ χ(G). This property suggests that it may be particularly suited for obtaining good approximations to either function. While some of those hopes have been dashed, a number of fruitful applications have been found and it remains the most promising candidate for obtaining improved approximations. Karger, Motwani and Sudan [32] proved the following property in the context ˜ hides logarithmic factors. of coloring. The “softomega” notation Ω Theorem 4 (Karger et al). If ϑ(G) ≤ k, then an independent set of size ˜ 3/(k+1) ) can be constructed with high probability in polynomial time. Ω(n Mahajan and Ramesh [38] showed how these and related algorithms can be derandomized. Alon and Kahale [4] applied the theta function further for independent sets.
Approximations of Independent Sets in Graphs
5
Theorem 5 (Alon, Kahale). If ϑ(G) ≥ n/k + p (e.g. if α(G) ≥ n/k + p), then we can find a graph K on p vertices with ϑ(K) ≤ k. Combining the two, they obtained a ratio for highindependence graphs that improves on Theorem 3. Corollary 1. For any fixed integer k ≥ 3, if ϑ(G) ≥ n/k + p, then an indepen˜ 3/(k+1) ) can be found in polynomial time. dent set of size Ω(p Theta function on sparse graphs Karger et al. proved a core result in terms of maximum degree of the graph. In fact, their argument also holds in terms of average degree. Theorem 6 (Karger et al). If ϑ(G) ≤ k, then an independent set of size 1−2/k ˜ Ω(n/d ) can be constructed with high probability in polynomial time. Vishwanathan [40] observed that this, combined with Theorem 5, also yields an improved algorithm for boundeddegree graphs. This, however, has not been stated before in the literature, to the best of the author’s knowledge. Proposition 1. Independent Set can be approximated within a factor of O(∆ log log ∆/ log ∆)1 . Proof. Given G, if α(G) ≥ n/k = n/2k + n/2k, then we can ﬁnd a subgraph K on n/2k vertices with ϑ(K) ≤ k and maximum degree at most ∆(G), by Theorem 5. By Theorem 6, we can ﬁnd an independent set in K (and G) of size Ω((n/2k)/∆1−2/k ) = Ω(n/∆ · ∆2/k /k). If k ≤ log ∆/ log log ∆, then the set found is of size Ω(n/∆ · log ∆), and the claim is satisﬁed since α ≤ n. Otherwise, α ≤ n log log ∆/ log ∆, and any maximal solution is of size n/(∆ + 1), for a ratio satisfying the proposition.
5
Partitioning and weighted independent sets
A simple strategy in the design of approximation algorithms is to break the problem into a collection of easier subproblems. Observation 1 Suppose we can partition G into t subgraphs and solve the weighted independent set problem on each subgraph optimally. Then, the largest of these solutions is a tapproximation of G. Proof. The size of the optimal solution for G is at most the sum of the sizes of the largest independent sets on each subgraph, which is at most t times the largest solution in some subgraph. This gives us the ﬁrst nontrivial ratio for weighted independent sets in general graphs [21]. 1
We may need to assume that ∆ be a large constant independent of n.
6
Magn´ us M. Halld´ orsson
Theorem 7. The weighted independent set problem can be approximated within O(n(log log n/ log n)2 ). Proof. The bound on Ramsey in Theorem 1 implies that it either outputs an independent set of size log2 n, or a clique of size log n/ log log n. We apply this algorithm repeatedly, like CliqueRemoval, but either removes a log2 nindependent set or a log n/ log log nclique in each step. We now form a partition where each class is either an independent set, or a (not necessarily disjoint) union of log n/ log log n diﬀerent cliques. This yields a partition into O(n(log log n/ log n)2 ) classes. The weighted independent set problem on such classes can be solved by exhaustively checking all (log n/ log log n)log n/ log log n = O(n) possible combinations of selecting one vertex from each clique. Thus, by the above observation, the claimed ratio follows. On boundeddegree graphs, we can apply a partitioning lemma of Lov´ asz [35], which we specialize here to this application. Lemma 2. The vertices of a graph can be partitioned into (∆ + 1)/3 sets, where each induces a subgraph of maximum degree at most two. Proof. Start with an arbitrary partitioning into (∆ + 1)/3 sets, and repeat the following operation: If v is adjacent to three or more vertices in its set, move it to a set where it has at most two neighbors. Such a set must exist as otherwise v’s degree would be at least 3 (∆ + 1)/3 ≥ ∆ + 1. Observe that such a move increases the number of cross edges, or edges going between diﬀerent sets, hence this process must terminate with a partition where every vertex has at most two neighbors in its set. Dynamic programming easily solves the weighted maximum independent set problem on each such subgraph, and as shown in [23], the partitioning can also be performed in linear time by starting with a greedy partition. Theorem 8. Weighted Independent Set is approximable within (∆+1)/3 in linear time. Hochbaum [29] also used a form of a partition, a coloring, to approximate weighted independent set problems.
6
Greediness and Set packing
The general set packing problem can be shown to be equivalent to the independent set problem. Given a graph G = (V, E), let the base set S contain one element for each edge in E, and for each vertex v ∈ V , form a set Cv containing the base sets corresponding to edges incident on v. It holds that the maximum number of sets in a set packing of (S, C) is α(G). There are four parameters of set systems that are of interest for Set Packing approximations: n, the number of sets, S, the number of base elements, κ,
Approximations of Independent Sets in Graphs
7
maximum cardinality of a set, and B, the maximum number of occurrences of a base elements in sets in C. In the reduction above, we ﬁnd that C = n, and therefore approximations of Independent Set as functions of n carry over to approximations of Set Packing in terms of C. A reduction in the other direction also preserves this relationship. As for B, observe that in the reduction above, B = 2, for arbitrary instances. Hence, we cannot expect any approximations as functions of B alone. It remains to consider approximability in terms of κ and S. Local search Just about any solution gives a modest approximation. Theorem 9. Any maximal solution is κapproximate. Proof. We say that a vertex v dominates a vertex u if u and v are either adjacent or the same vertex. Any vertex can dominate at most κ vertices from an optimal solution. Yet, maximality requires that a maximal independent set dominates all vertices of the graph. Hence, an optimal solution is at most κ times bigger than any maximal solution. This can be strengthened using simple local search. Tight analysis was ﬁrst given by Hurkens and Schrijver [30], whose article title seemed to obscure its contents since the results were reproduced in part or full by several groups of authors [33,42,20,43,7]. Local search is straightforward for problems whose solutions are collections of items: repeatedly try to extend the solution by eliminating t elements while adding t + 1 elements. A solution that cannot be further extended by such improvements is said to be toptimal. It turns out that 2optimal solutions, which are the most eﬃcient and the easiest to analyze, already give considerably improved approximations. Theorem 10. Any 2optimal solution is (κ + 1)/2approximate. Proof. Let us argue in terms of independent sets in κ + 1claw free graphs. Let I be a 2optimal solution, and let O be any optimal independent set. Partition O into O1 , those vertices in O that are adjacent to only one vertex in I, and O2 , those vertices in O that are adjacent to two or more vertices in I. Note that each vertex in I is adjacent to at most κ vertices in O, due to the lack of a κ + 1claw. Then, considering the edges between I and O we have that O1  + 2O2  ≤ κI. Also, since I is 2optimal O1  ≤ I. Adding the two inequalities gives that 2O = 2(O1  + O2 ) ≤ (κ + 1)I, or that the performance ratio is at most (κ + 1)/2.
8
Magn´ us M. Halld´ orsson
Using topt we can prove a bound of κ/2+ . On boundeddegree graphs, local search can be applied with a very large radius while remaining in polynomial time, and using some additional techniques, Berman, F¨ urer, and Fujito [11,10] obtained the best performance ratios known for small values of ∆ of (∆ + 3)/5. Greedy algorithms This leaves S as the only parameter left to be studied for Set Packing. A related topic is the Strong Stable Set problem, where we seek an independent set in which the vertices are of distance at least two apart. Such a strong stable set corresponds to a set packing of the set system formed by the closed vertex neighborhoods in the graph. In this case, C = S = n. The question is then whether this is easier to approximate than the general independent set problem. Halld´orsson, Kratochv´ıl, and Telle [22] recently gave a simple answer to this question, using a greedy set packing algorithm that always picks the smallest set remaining. Theorem 3 Set Packing can be approximated within S in time linear in the input size. Proof. Consider the following greedy algorithm. In each step, it chooses a smallest set and removes from the collection all sets containing elements from the selected set. GreedySP(S,C) t ← 0 repeat t ← t + 1 Xt ← C ∈ C of minimum cardinality Zt ← {C ∈ C : X ∩ C = ∅ } C ← C − Zt until C = 0 Output {X1 , X2 , . . . , Xt } Let M = S. Observe that {Z1 , . . . , Zt } forms a partition of C. Let i be the index of some iteration of the algorithm, i.e. 1 ≤ i ≤ t. All sets in Zi contain at least one element of Xi , thus the maximum number of disjoint sets in Zi is at most the cardinality of Xi . On the other hand, every set in Zi is of size at least Xi , so the maximum number of disjoint sets in Zi is also at most S/Xi . Thus, the optimal solution contains at most min(Xi , S/Xi ) ≤ maxx min(x, S/x) = M sets from Zi . Thus, in total, the optimal solution contains at most tM sets, when the algorithm ﬁnds t sets, for a ratio of at most M . Observe that this approximation is near the best possible. Since a graph contains O(n2 ) edges, H˚ astad’s result [27] yields an Ω(m1/2− ) lower bound, for any > 0.
Approximations of Independent Sets in Graphs
9
Other greedy algorithms have been studied, especially the one that repeatedly selects vertices of minimum degree in the graph. It remains, e.g., the driving force for the best ratio known for sparse graphs, (2d + 3)/5 [26].
7
Summary of results
Table 1 contains a listing of the various ratios that have been proved for heuristics for the independent set problem, along with known inapproximability results. It is divided according to graph classes / graph parameter. Results in terms of other measures of graphs or pairs of measures are not included. The results hold for unweighted graphs except for the last category. Each entry contains the ratio proved, the algorithmic strategy used, the complexity of the method, and a citation. We have not described the NemhauserTrotter reduction [39] that was championed by Hochbaum [29], which allows one to assume in many cases without loss of generality that the maximum weight independent set is of weight at most half the total weight of the graph. The complexity of this procedure equals the complexity of ﬁnding a minimum cut in a network in the weighted case√(O(nm)), and the complexity of bipartite matching in the unweighted case (O( nm)). Abbreviations: SR = subgraph removal, SDP = semideﬁnite programming, NT = NemhauserTrotter reduction, MIS = arbitrary maximal independent set. Complexity: NT refers to the complexity of the NemhauserTrotter reduction. “Linear” means time linear in the size of the graph. nO(1) suggests time bounded by a polynomial of high degree; in the case of the (∆ + 3)/5 ratio, the degree of the polynomial appears to be on the order of 2100 [24].
8
Discussion
A number of open issues remain. General graphs There remains some gap between the best upper and lower bounds known for general graphs. Stated in terms of “distance from trivial”, it is the diﬀerence between log2 n and no(1) . It is not as presumptuous now to conjecture that the ultimate ratio is n/polylog(n) as it was in 1991 [19]. It may be possible to extend the proof of [27] to argue a stronger lower bound than n1− if given a stronger assumption, such as SAT not having 2o(n) time algorithms. (Admittedly, such a task appears less than trivial [28]). Performance of ϑfunction The theta function remains the most promising candidate for improved approximations. Some of the hopes attached with it have been √ dashed. Feige [18] showed that its performance ratio is at least n/2O( log n) . Can’t we at least prove something better than the simple Ramseytheoretic bound? Highindependence graphs Gaps in bounds on approximability are nowhere greater than in the case of independent sets in graphs with α(G) = n/k, for some ﬁxed k > 2. These problems are APXhard, i.e. hard within some
10
Magn´ us M. Halld´ orsson
Result
Method Complexity General graphs O(nm) SR O(nm)
O(n/ log n) O(n/ log2 n) Ω(n1− ) O(n1−1/(k−1) ) ˜ 1−3/(k+1)) O(n
Highindependence graphs (α = n/k) SR O(nm) SDP SDP
Ω(1 + c) Sparse graphs Greedy linear Greedy linear Greedy + NT NT Greedy+SR linear Greedy + NT NT Boundeddegree graphs ∆ MIS linear ∆/2 Brooks+NT NT (∆ + 2)/3 Greedy linear (∆ + 3)/5 Local search + nO(1) (∆ + 2)/4 + Local search ∆O(∆) n ∆/6 + O(1) SR O(∆∆ n + n2 ) O(∆/ log log ∆) SR nO(1) O(∆ log log ∆/ log ∆) SDP SDP Ω(∆c ) κ + 1clawfree graphs and Set Packing κ MIS linear (κ + 1)/2 Local search O(n3 ) κ/2 Local search O(nlogκ 1/ ) + S GreedySP linear Ω(κc ) Ω(S1− ) Weighted graphs ∆/2 Brooks+NT NT
(∆ + 1)/3 Partitioning linear (∆ + 2)/3 Partitioning+NT NT κ Maxweight greedy O(n2 ) κ−1+ Local search nO(1/) (4κ + 2)/5 LS + greedy nO(κ) O(n(log log n/ log n)2 ) SR+Partitioning O(n2 ) d+1 (d + 2)/2 (d + 1)/2 (2d + 4.5)/5 (2d + 3)/5
Reference [41] [12] [27] [12] [4] [6] [29], via [16] [26] [29] [25] [26]
[29], via [36] [26] [11,10] [24] [25] [25], via [1] [40], via [32,4] [3]
[33,42] [30,20,43] [22] [3] [27] [29] [23], via [35] [23] [29] [5,7] [13] [21]
Table 1. Results on approximating independent sets
Approximations of Independent Sets in Graphs
11
constant factor greater than one, but all the upper bounds known are some roots of n. These problems generalize the case of kcolorable graphs, for which a similar situation holds. Results of Alon and Kahale [4] indicate that some root of n is also the best that the theta function will yield in this case. The limited progress on the more studied kcoloring problem suggests that this is near best possible. Vertex cover The preceding item has relevance to the approximability of Vertex Cover, which is the problem of ﬁnding a minimum set of vertices S such that V − S is an independent set. If Vertex Cover can be approximated within less than 1.5, then Independent Set in graphs with α = n/3 is constant approximable and Graph 3Coloring is O(log n) approximable, as ﬁrst shown by BarYehuda and Moran [9]. This gives support to the conjecture that factor 2 is optimal for Vertex Cover, within lower order terms [29]. Boundeddegree graphs It is natural to extrapolate that the improved hardness ratio n1− of [27] indicates that the hardness ratio Ω(∆c ) of [3] for boundeddegree graphs could be jacked up to Ω(∆1−o(1) ). From the upper bound side, it would be nice to extend the o(∆) ratios of [25,40] to hold for all values of ∆ as a function of n. Demange and Paschos [14] have parametrized the strategy of [25] to give a ratio ∆/c for every c, that holds for every value of ∆ in time O(nc ). κ + 1clawfree graphs Clawfree graphs appear considerably harder than boundeddegree graphs. Any improvement to the κ/2 + ratios would be most interesting. Observe that a maximum κset packing is within a factor κ from a minimum hitting set of a collection of sets of size κ, but we also do not have any better ratio than factor κ for the latter problem. In the weighted case, we know that the greedy and the local search strategies do not improve on κ−O(1). However, the combination of the two does attain asymptotically better ratios [13]. We conjecture that selective local search starting from a greedy solution does attain the unweighted bound of κ/2 + . o(α)approximations While we do have o(n)approximations of Independent Set, √these methods fail to give us anything beyond the trivial when, say, α = n. While it is probably too much to ask for a ω(1)size independent set in graphs with α ≈ log n, it is not unfair to ask for, say, a α log n/ log2 αapproximation.
References 1. M. Ajtai, P. Erd˝ os, J. Koml´ os, and E. Szemer´edi. On Tur´ an’s theorem for sparse graphs. Combinatorica, 1(4):313–317, 1981. 10 2. N. Alon and R. B. Boppana. The monotone complexity of Boolean functions. Combinatorica, 7(1):1–22, 1987. 1 3. N. Alon, U. Feige, A. Wigderson, and D. Zuckerman. Derandomized graph products. Computational Complexity, 5(1):60 – 75, 1995. 10, 11 4. N. Alon and N. Kahale. Approximating the independence number via the θ function. Math. Programming. To appear. 4, 10, 11
12
Magn´ us M. Halld´ orsson
5. E. M. Arkin and R. Hassin. On local search for weighted kset packing. ESA ’97, LNCS 1284. 10 6. S. Arora, C. Lund, R. Motwani, M. Sudan, and M. Szegedy. Proof veriﬁcation and hardness of approximation problems. FOCS ’92, 14–23. 1, 10 7. V. Bafna, B. O. Narayanan, and R. Ravi. Nonoverlapping local alignments (weighted independent sets of axis parallel rectangles). WADS ’95, LNCS 955, 506–517. 7, 10 8. B. S. Baker. Approximation algorithms for NPcomplete problems on planar graphs. J. ACM, 41:153–180, Jan. 1994. 1 9. R. BarYehuda and S. Moran. On approximation problems related to the independent set and vertex cover problems. Discrete Appl. Math., 9:1–10, 1984. 11 10. P. Berman and T. Fujito. On the approximation properties of independent set problem in degree 3 graphs. WADS ’95, LNCS 955, 449–460. 8, 10 11. P. Berman and M. F¨ urer. Approximating maximum independent set in bounded degree graphs. SODA ’94, 365–371. 8, 10 12. R. B. Boppana and M. M. Halld´ orsson. Approximating maximum independent sets by excluding subgraphs. BIT, 32(2):180–196, June 1992. 3, 10 13. B. Chandra and M. M. Halld´ orsson. Approximating weighted ksetpacking. Manuscript, May 1998. 10, 11 14. M. Demange and V. T. Paschos. Improved approximations for maximum independent set via approximation chains. Appl. Math. Lett, 1996. To appear. 11 15. P. Erd˝ os. Some remarks on chromatic graphs. Colloq. Math., 16:253–256, 1967. 4 16. P. Erd˝ os. On the graph theorem of Tur´ an (in Hungarian). Mat. Lapok, 21:249–251, 1970. 10 17. P. Erd˝ os and G. Szekeres. A combinatorial problem in geometry. Compositio Math., 2:463–470, 1935. 3 18. U. Feige. Randomized graph products, chromatic numbers, and the Lov´ asz ϑfunction. Combinatorica, 17(1):79–90, 1997. 9 19. M. M. Halld´ orsson. A still better performance guarantee for approximate graph coloring. Inform. Process. Lett., 45:19–23, 25 January 1993. 9 20. M. M. Halld´ orsson. Approximating discrete collections via local improvements. SODA ’95, 160–169. 7, 10 21. M. M. Halld´ orsson. Approximation via partitioning. Res. Report ISRR950003F, Japan Adv. Inst. of Sci. and Tech., Mar. 1995. 5, 10 22. M. M. Halld´ orsson, J. Kratochv´ıl, and J. A. Telle. Independent sets with domination constraints. ICALP ’98, LNCS. 8, 10 23. M. M. Halld´ orsson and H. C. Lau. Lowdegree graph partitioning via local search with applications to constraint satisfaction, max cut, and 3coloring. J. Graph Algo. Applic., 1(3):1–13, 1997. 6, 10 24. M. M. Halld´ orsson and J. Radhakrishnan. Improved approximations of independent sets in boundeddegree graphs. SWAT ’94, LNCS 824, 195–206. 9, 10 25. M. M. Halld´ orsson and J. Radhakrishnan. Improved approximations of independent sets in boundeddegree via subgraph removal. Nordic J. Computing, 1(4):475– 492, 1994. 10, 11 26. M. M. Halld´ orsson and J. Radhakrishnan. Greed is good: Approximating independent sets in sparse and boundeddegree graphs. Algorithmica, 18:145–163, 1997. 9, 10 27. J. H˚ astad. Clique is hard to approximate within n1− . FOCS ’96, 627–636. 8, 9, 10, 11 28. J. H˚ astad. Private communication, 1997. 9
Approximations of Independent Sets in Graphs
13
29. D. S. Hochbaum. Eﬃcient bounds for the stable set, vertex cover, and set packing problems. Disc. Applied Math., 6:243–254, 1983. 1, 6, 9, 10, 11 30. C. A. J. Hurkens and A. Schrijver. On the size of systems of sets every t of which have an SDR, with an application to the worstcase ratio of heuristics for packing problems. SIAM J. Disc. Math., 2(1):68–72, Feb. 1989. 7, 10 31. D. S. Johnson. Approximation algorithms for combinatorial problems. J. Comput. Syst. Sci., 9:256–278, 1974. 1 32. D. Karger, R. Motwani, and M. Sudan. Approximate graph coloring by semideﬁnite programming. FOCS ’94, 2–13. 4, 10 33. S. Khanna, R. Motwani, M. Sudan, and U. Vazirani. On syntactic versus computational views of approximability. FOCS ’94, 819–830. 7, 10 34. R. J. Lipton and R. E. Tarjan. Applications of a planar separator theorem. FOCS ’77, 162–170. 1 35. L. Lov´ asz. On decomposition of graphs. Stud. Sci. Math. Hung., 1:237–238, 1966. 6, 10 36. L. Lov´ asz. Three short proofs in graph theory. J. Combin. Theory Ser. B, 19:269– 271, 1975. 10 37. L. Lov´ asz. On the Shannon capacity of a graph. IEEE Trans. Inform. Theory, IT25(1):1–7, Jan. 1979. 4 38. S. Mahajan and H. Ramesh. Derandomizing semideﬁnite programming based approximation algorithms. FOCS ’95, 162–169. 4 39. G. L. Nemhauser and L. Trotter. Vertex packings: Structural properties and algorithms. Math. Programming, 8:232–248, 1975. 9 40. S. Vishwanathan. Personal communication, 1996. 5, 10, 11 41. A. Wigderson. Improving the performance guarantee for approximate graph coloring. J. ACM, 30(4):729–735, 1983. 10 42. G. Yu and O. Goldschmidt. On locally optimal independent sets and vertex covers. Manuscript, 1993. 7, 10 43. G. Yu and O. Goldschmidt. Local optimality and its application on independent sets for kclaw free graphs. Manuscript, 1994. 7, 10
Using Linear Programming in the Design and Analysis of Approximation Algorithms: Two Illustrative Problems David B. Shmoys Cornell University, Ithaca NY 14853, USA
Abstract. One of the foremost techniques in the design and analysis of approximation algorithms is to round the optimal solution to a linear programming relaxation in order to compute a nearoptimal solution to the problem at hand. We shall survey recent work in this vein for two particular problems: the uncapacitated facility location problem and the problem of scheduling precedenceconstrained jobs on one machine so as to minimize a weighted average of their completion times.
1
Introduction
One of the most successful techniques in the design and analysis of approximation algorithms for combinatorial optimization problems has been to ﬁrst solve a relaxation of the problem, and then to round the optimal solution to the relaxation to obtain a nearoptimal solution for the original problem. Although the relaxation used varies from problem to problem, linear programming relaxations have provided the basis for approximation algorithms for a wide variety of problems. Throughout this paper, we shall discuss approximation algorithms, where a ρapproximation algorithm for an optimization problem is a polynomialtime algorithm that is guaranteed to ﬁnd a feasible solution for the problem with objective function value within a factor of ρ of optimal. In this brief survey, we shall discuss recent developments in the design of approximation algorithms for two speciﬁc problems, the uncapacitated facility location problem, and a rather basic singlemachine scheduling problem. In focusing on just two problems, clearly we are omitting a great deal of important recent work on a wide crosssection of other problems, but the reader can obtain an accurate indication of the level of activity in this area by considering, for example, the other papers in this proceedings. For a more comprehensive review of the use of this approach, the reader is referred to the volume edited by Hochbaum [16]. We shall consider the following scheduling problem. There are n jobs to be scheduled on a single machine, where each job j has a speciﬁed weight wj and processing time pj , j = 1, . . . , n, which we restrict to be positive integers. Furthermore, there is a partial order ≺ that speciﬁes a precedence relation among the jobs; if j ≺ k then we must ﬁnd a schedule in which job j completes its processing before job k is started. Each job must be processed without interruption, Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 15–32, 1998. c SpringerVerlag Berlin Heidelberg 1998
16
David B. Shmoys
and the machine can process at most one job at a time. If we let Cj denote the completion of job j, then we wish to minimize the average weighted completime n n tion time j=1 wj Cj /n, or equivalently, j=1 wj Cj . In the notation of Graham, Lawler, Lenstra, & Rinnooy Kan [11], the problem is denoted 1prec wj Cj ; it was shown to be N Phard by Lawler [21]. The ﬁrst nontrivial approximation algorithm for 1prec wj Cj is due to Ravi, Agrawal, & Klein [33], who gave an O(lg n lg W )approximation algorithm, where W = j wj . A slightly improved performance guarantee of O(lg n lg lg W ) follows from work of Even, Naor, Rao, & Schieber [9]. We shall present a series of results that give constant approximation algorithms for this problem, where the resulting algorithms are both simple to state, and simple to analyze. We shall also consider the uncapacitated facility location problem. In this problem, there is a set of locations F at which we may build a facility (such as a warehouse), where the cost of building at location i is fi , for each i ∈ F . There is a set D of client locations (such as stores) that require to be serviced by a facility, and if a client at location j is assigned to a facility at location i, a cost of cij is incurred. All of the data are assumed to be nonnegative. The objective is to determine a set of locations at which to open facilities so as to minimize the total facility and assignment costs. Building on results for the set covering problem (due to Johnson [19], Lov´ asz [25], and Chv´ atal [7]), Hochbaum [15] showed that a simple greedy heuristic is an O(log n)approximation algorithm, where n denotes the total number of locations in the input. Lin & Vitter [24] gave an elegant ﬁltering and rounding technique that yields an alternate O(log n)approximation algorithm for this problem. We shall focus on the metric case of this problem, in which distances between locations are given in some metric (and hence satisfy the triangle inequality), and the assignment costs cij are proportional to the distance between i and j, for each i ∈ F , j ∈ D. We shall present a series of results that give constant approximation algorithms for this problem, where, once again, the resulting algorithms are both simple to state, and (relatively) simple to analyze.
2
A simple scheduling problem
We shall present approximation algorithms for the problem of scheduling precedenceconstrained jobs on a single machine so as to minimize the average weighted completion time, 1prec wj Cj . Although we will primarily focus on this one scheduling model, the starting point for the work that we shall survey is an extremely simple, elegant result of Phillips, Stein, & Wein [29] for a related problem, in which the jobs are now independent (that is, there are no precedence constraints) but instead each job j has a speciﬁed release date rj before which it may not begin processing, j = 1, . . . , n; furthermore, they consider the unitweight case,or in other words, wj = 1, for each j = 1, . . . , n. This problem is denoted 1rj  Cj and was shown to be N Phard by Lenstra, Rinnooy Kan, & Brucker [22].
Design and Analysis of Approximation Algorithms
17
The algorithm of Phillips, Stein, & Wein [29] is based on a relaxation of the problem that can be solved in polynomial time. In this case, however, the relaxation is not a linear program, but instead one motivated in purely scheduling terms: rather than requiring that each job be processed without interruption, we allow preemption. That is, the processing of a job may be interrupted to process another (higher priority) job instead, and then the ﬁrst job may be resumed without penalty. This problem, denoted 1rj , pmtn Cj , can be solved (to optimality) by the following simple rule: schedule the jobs in time, and always process the job with the least remaining processing time (among those already released). The approximation algorithm of Phillips, Stein, & Wein works as follows: solve the preemptive relaxation, and then schedule the jobs in the order in which they complete in the relaxed solution. It is remarkably straightforward to show that this is a 2approximation algorithm. Suppose that the jobs happen to be indexed in the order in which they complete in the preemptive relaxation, and so are processed in the order 1, 2, . . . , n in the heuristically computed nonpreemptive schedule as well. If we consider the schedule produced by the approximation algorithm, then any idle time in the schedule ends at the release date of some job k (since that idle time is, in eﬀect, caused by waiting for job k to be released). Consequently, for each job j, there is no idle time between maxk=1,...,j rk and the completion time of job j, Cj . This implies that Cj ≤ max rk + k=1,...,j
j
pj .
k=1
Let C j denote the completion time of job j in the optimal preemptive schedule; since each job k, k = 1, . . . , j, has completed its processing in the optimal preemptive schedule by C j , it follows that rk ≤ C k ≤ C j ,
for each k = 1, . . . , j,
j By the same reasoning, k=1 pk ≤ C j . Hence, Cj ≤ 2C j . Furthermore, the value n of the schedule found, j=1 Cj , is at most twice the preemptive optimum, and so is at most twice the value of the nonpreemptive optimal schedule as well. For 1prec wj Cj , we shall rely on a number of linear programming relaxations, but the overall approach will be identical. We will solve the relaxation, and then use the relaxed solution to compute a (natural) ordering of the jobs that is feasible with respect to ≺; this is the schedule computed by the approximation algorithm. This is not the ﬁrst scheduling problem for which this approach has been considered; for example, Munier & K¨ onig [28] have given a very elegant approximation algorithm where the schedule (for a particular parallel machine scheduling problem with communication delays) is derived from an optimal solution to a linear programming relaxation. We start by considering a very strong linear programming relaxation, the nonpreemptive timeindexed formulation. In this formulation, which is due to Dyer & Wolsey [8], we use the variable xjt to indicate whether job j completes
18
David B. Shmoys
processing at time t, j = 1, . . . , n, t = 1, . . . , T , where T = nj=1 pj . Given these decision variables, it is easy to represent the objective function: Minimize
n j=1
wj
T
t · xjt .
(1)
t=1
We can constrain the assignments of the decision variables as follows. Each job must complete at a unique point in time; hence, T
xjt = 1, j = 1, . . . , n.
(2)
t=1
No job j can complete before pj : xjt = 0, if t < pj .
(3)
t The sum s=1 xjs = 1 if and only if job j has been completed by time t; if j ≺ k, we know that job j must complete at least pk time units earlier than job k, and hence t
xjs ≥
s=1
t+p k
xks , if j ≺ k, t = 1, . . . , T − pk .
(4)
s=1
Of course, the machine can process at most one job at each time t; job j is processed at time t if it completes at any time within the interval [t, t + pj − 1]: j −1 n t+p
j=1
xjs ≤ 1, t = 1, . . . , T.
(5)
s=t
If we wish to give an integer programming formulation of the problem, then we would require each variable to be either 0 or 1. We shall consider the linear programming relaxation, in which we require that xjt ≥ 0, j = 1, . . . , n, t = T 1, . . . , T. For any feasible fractional solution x, we deﬁne C j = t=1 t · xjt to be the fractional completion timeof job j, j = 1, . . . , n. If x is an optimal solution n to the linear relaxation, then j=1 wj C j is a lower bound on the optimal value for the original problem. For a given α, 0 ≤ α ≤ 1, and a job j, j = 1, . . . , n, we focus on the earliest point in time that a cumulative αfraction of jobj has been slated to complete: t let the αpoint of job j be tj (α) = min{t : s=1 xjs ≥ α}. The notion of an αpoint was also introduced in the work of Phillips, Stein, & Wein [29], in a slightly diﬀerent context. Hall, Shmoys, & Wein [14] proposed the following algorithm for 1prec wj Cj : schedule the jobs in nondecreasing order of their αpoints. It is easy to see that the constraints (4) ensure that the schedule found satisﬁes the precedence constraints.
Design and Analysis of Approximation Algorithms
19
The αpoint algorithm of Hall, Shmoys, & Wein can be analyzed as follows. Suppose that the jobs happen to be indexed in nondecreasing αpoint order. Hence, each job j completes at time Cj =
j
pk .
(6)
k=1
For each job k, k = 1, . . . , j, an α fraction of each job k is done by time tj (α), and hence j pk ≤ tj (α). (7) α k=1
Consider the fractional completion time C j ; one can view the values xjt as providing a weighted average of the corresponding values t. Since less than a 1 − α fraction of the weight can be placed on values more than 1/(1 − α) times the average, we see that (8) tj (α) ≤ C j /(1 − α). By combining (6)–(8), we see that each job j completes at time Cj ≤ C j /(α(1 − α)). Consequently, we see that the value of the solution found, nj=1 wj Cj , is within n a factor of 1/(α − α2 ) of j=1 wj C j , which is a lower bound on the optimal value. If we set α = 1/2 (to minimize 1/(α − α2 )), we see that we have obtained a solution of value within a factor of 4 of the optimum. But is setting α = 1/2 the best thing to do? Goemans [10] observed that rather than choosing α once, to optimize the performance guarantee, it makes more sense to consider, for each input, which choice of α would deliver the best schedule for that particular input. (Chekuri, Motwani, Natarajan, & Stein [3] independently suggested an analogous improvement to the algorithm of Phillips, Stein, & Wein.) The performance of this bestα algorithm can be analyzed by considering the following randomized algorithm instead: set α = a by choosing at random within the interval (0,1) according to the probability density function f (a) = 2a. The same analysis given above implies that we can bound E[Cj ] ≤
1
(tj (a)/a)f (a)da = 2 0
1
tj (a)da. 0
If we interpret this integral as the area under the curve deﬁned by the function tj (a) as a ranges from 0 to 1, then it is easy to see that this integral is precisely C j . Thus, the randomized algorithm produces a solution that has expected value at most twice the optimal value. Furthermore, the algorithm that ﬁnds the value of α for which the αpoint algorithm delivers the best solution, the bestα algorithm, is a deterministic algorithm guaranteed to ﬁnd a solution with objective function value at most twice the optimal value.
20
David B. Shmoys
Of course, none of these algorithms are eﬃcient; that is, it is not known how to implement them to run in polynomial time, due to the size of the linear programs that must be solved. Sincethe size of the linear program can be bounded by a polynomial in n and T = j pj , the αpoint algorithm can be shown to run in pseudopolynomial time. It is often the case that a pseudopolynomial algorithm for a problem can be adapted to run in polynomial time while losing an additional 1 + factor in accuracy, basically by using only a polynomial number of bits of accuracy in the input. However, in this case it is not clear how to use to these wellknown techniques. Instead, Hall, Shmoys, & Wein [14] proposed using a diﬀerent, more compact, linear programming relaxation, called an intervalindexed formulation. (This type of formulation was subsequently used in another context in the journal version of these results [13].) The key idea behind these constructions is that the time horizon is subdivided into the intervals [1, 1], (1, 1 + ], (1 + , (1 + )2 ], ((1 + )2 , (1 + )3 ], . . . , where is an arbitrarily small positive constant; the linear program only speciﬁes the interval in which a job is completed. Since all completion times within an interval are within a (1 + ) factor of each other, the relative scheduling within an interval will be of little consequence. Given this basic idea, it is extremely straightforward to complete all of the details of this polynomialsized formulation. The linear programming relaxation relies on the variables xj , which indicate whether job j completes within the th interval. There are assignment constraints completely analogous to (2). The precedence constraints are enforced only to the extent that if j ≺ k, then the interval in which j ﬁnishes is no later than the interval in which k ﬁnishes. To capture the load constraint, we merely require that the total length of jobs assigned to complete in the interval ((1 + )−1 , (1 + ) ] is at most (1 + ) . The analogue of the αpoint algorithm is as follows: for each job, compute its αinterval, and schedule the jobs in order of nondecreasing αintervals, where the jobs assigned to the same interval are scheduled in any order that is consistent with the precedence relation. Thus, Hall, Shmoys, & Wein obtained, for any ﬁxed > 0, a 4 + approximation algorithm, and the bestαpoint algorithm of Goemans can be adapted to yield a 2 + approximation algorithm. As it turns out, it is even easier to obtain a 2approximation algorithm for this problem by using other compact linear programming relaxations. Schulz [35] (and subsequently in its journal version [13]) showed how to improve the earlier work of Hall, Shmoys, & Wein by using a relaxation due to Wolsey [41] and Queyranne [31]. In this formulation, there is a variable Cj for each job j in N = {1, . . . , n}: n wj Cj (9) Minimize j=1
subject to
j∈S
pj Cj ≥
pj pk ,
for each S ⊆ N,
(10)
(j,k)∈S×S
Ck ≥ Cj + pk ,
if j ≺ k.
(11)
Design and Analysis of Approximation Algorithms
21
If the jobs are independent, and hence there are neither precedence constraints nor constraints in (11), then Wolsey [41] and Queyranne [31] independently showed that this linear program provides an exact characterization of the problem 1 wj Cj : extreme points of this linear program correspond to schedules. Of course, in the case in which there are precedence constraints, the situation is quite diﬀerent, since otherwise P would be equal to N P. The most natural approximation algorithm for 1prec wj Cj based on this linear relaxation is as follows: solve the relaxation to obtain a solution C j , j = 1, . . . , n, and schedule the jobs so that their LP values are in nondecreasing order. The analysis of this algorithm is also remarkably simple. Suppose that the jobs happen to be indexed so that C 1 ≤ · · · ≤ C n , and so they are scheduled by the algorithm in their index order as well. Once again, job j completes at j time Cj = k=1 pk . If we consider the constraint (10) when S = {1, . . . , j}, then we see that j j pk C k ≥ pk pk ≥ (1/2)( pk )2 . k=1
k=1
(k,k )∈S×S
However, C j ( jk=1 pk ) ≥ jk=1 pk C k . Hence C j ≥ ( jk=1 pk )/2, or equivalently, Cj ≤ 2C j . This proves that the value of the solution found is within a factor of 2 of optimal. However, it is not at all clear that this linear programming relaxation is suﬃciently more compact than the timeindexed one, since it contains an exponential number of constraints. However, one can solve this linear program in polynomial time with the ellipsoid algorithm, since it is easy to devise a polynomialtime algorithm that determines whether a given fractional solution is feasible, or if not, returns a violated constraint (see Queyranne [31]). Hence, we have a 2approximation algorithm. Potts [30] has proposed yet another linear programming relaxation of the problem 1prec wj Cj , which is called the linear ordering formulation. In this formulation, there are variables δij that indicate whether or not job i is processed before job j: n Minimize wj Cj j=1
subject to pj +
n
i=1
pi δij = Cj , j = 1, . . . , n;
δij + δji = 1, δij + δjk + δki ≤ 2,
i, j = 1, . . . , n, i < j; i, j, k = 1, . . . , n, i < j < k or i > j > k;
δij = 1,
i, j = 1, . . . , n, i ≺ j;
δij ≥ 0,
i, j = 1, . . . , n, i = j.
Schulz [35] has observed that for any feasible solution to this linear program, the Cj values are feasible for the linear program (9)–(11). Hence, if we solve the linear ordering formulation to obtain values C j , and then schedule the jobs so that these values are in nondecreasing order, then we obtain a more eﬃcient
22
David B. Shmoys
2approximation algorithm (since any polynomialtime linear programming algorithm can be used to solve this LP with n2 variables and O(n3 ) constraints). Chudak & Hochbaum [5] proposed a somewhat weaker linear programming relaxation, which also uses the variables δij . In this relaxation, the constraints that enforce the transitivity of the ordering relaxation, δij + δjk + δki ≤ 2, are instead replaced with the constraints that δki ≤ δkj , whenever i ≺ j, and k is diﬀerent from both jobs i and j. Once again, a straightforward calculation shows that for any feasible solution to this weaker linear program, the Cj values are feasible for the constraints (10) and (11). Consequently, one also obtains a 2approximation algorithm by ﬁrst solving this weaker linear program, and then using the resulting Cj values to order the jobs. The advantage of using this formulation is as follows: Chudak & Hochbaum also observed that a result of Hochbaum, Meggido, Naor, & Tamir [17] can be applied to show that there always exists an optimal solution to this linear program that is halfintegral, i.e., each variable δij is either 0,1/2, or 1; furthermore, an optimal halfintegral solution can be computed by a maximum ﬂow computation. Thus, this approach yields a 2approximation algorithm that does not require the solution of a linear program, but rather only a single maximum ﬂow computation. Chekuri & Motwani [2] and Margot, Queyranne, & Wang [27] independently devised another, more combinatorial 2approximation algorithm for the problem 1prec wj Cj . We shall say that a subset S of jobs is an initial set of the precedence relation ≺ if, for each job k ∈ S, each of its predecessors is also in S, or more formally, (k ∈ S and j ≺ k) ⇒ j ∈ S. For each subset of jobs S ⊆ N , let ρ(S) = j∈S pj / j∈S wj . Suppose that we minimize ρ(S) over all initial subsets to obtain a subset S ∗ . Chekuri & Motwani and Margot, Queyranne, & Wang proved a remarkable fact: if S ∗ = N , then any ordering of the jobs that is consistent with ≺ has objective function value within a factor of 2 of the optimum. The proof of this fact by time is amazingly simple. In each feasible schedule, eachjob j completes k∈N pk , and so the cost of any solution is at most ( k∈N pk )( k∈N wk ). So we need only show that the optimal value is at least ( k∈N pk )( k∈N wk )/2. Suppose that the jobs happen to be indexed so that job j is the jth job to be scheduled in an optimal schedule. Then each set {1, . . . , j} is an initial set, and hence the completion time of job j, Cj =
j
pk ≥ ρ(N )
k=1
j
wk .
k=1
Consequently, we know that n j=1
wj Cj ≥ ρ(N ) n
j n j=1 k=1
n
n wj wk ≥ ρ(N )( wj )2 /2. j=1
Recalling that ρ(N ) = j=1 pj / j=1 wj , we see that we have obtained the desired lower bound on the optimal value.
Design and Analysis of Approximation Algorithms
23
Of course, there is no reason to believe that N is the initial set S for which ρ(S) is minimized. Fortunately, if this is not the case, then we can rely on the following decomposition result of Sidney [37]: if S ∗ is the initial set S for which ρ(S) is minimized, then there exists an optimal solution in which the jobs of S ∗ precede the jobs of N −S ∗ . This suggests the following recursive 2approximation algorithm: ﬁnd the set S ∗ , and schedule it ﬁrst in any order consistent with the precedence relation ≺, and then recursively apply the algorithm to N − S ∗ , and concatenate the two schedules found. It is not hard to show that the initial set S ∗ can be found via a minimum cut (or equivalently, a maximum ﬂow) computation. For each of the results above, we have presented an algorithm and then showed that it delivers a solution whose objective function value is within some constant factor of the optimal value of a linear programming relaxation of the problem. Such a result not only shows that we have found a good algorithm, but also implies a guarantee for the quality of the lower bound provided by that linear program. For each of the linear programs concerned, one might ask whether these particular algorithms can be improved; that is, might it be possible to round the optimal fractional solutions in a more eﬀective manner? Unfortunately, the answer to each of these questions is no. For the timeindexed formulation, Schulz & Skutella [34] have given instances for which the ratio between the integer and fractional optima is arbitrarily close to 2. For the linear ordering formulation, Chekuri & Motwani [2] have given a surprising construction based on expander graphs for which the ratio of the integer to fractional optimal values asymptotically approaches 2. Each of these results implies the analogous result for the linear program (9)–(11), but for this relaxation it is also relatively simple to construct examples directly. Of course, there might still be other relaxations that provide stronger lower bounds, and this is an extremely interesting direction for further research.
3
The uncapacitated facility location problem
The uncapacitated facility location problem is one of the most wellstudied problems in the Operations Research literature, dating back to the work of Balinski [1], Kuehn & Hamburger [20], Manne [26], and Stollsteimer [38,39] in the early 60’s. We shall focus on one important special case of this problem, where the locations are embedded in some metric space, and the assignment costs cij are proportional to the distances between locations; we shall call this the metric uncapacitated facility location problem. Although there is little work that has speciﬁcally focused on the metric case of this location problem, for many others, such as the kcenter problem (see, e.g., [18]) and the kmedian problem (see, e.g., [23]) this assumption is prevalent. In fact, the algorithms of Lin & Vitter [23] contained many of the seeds of the work that we shall present for the metric uncapacitated facility location problem. Once again, all of the algorithms that we shall discuss will be based on rounding an optimal solution to a linear programming relaxation of the problem. For this problem, the most natural relaxation is as follows. There are two types
24
David B. Shmoys
of decision variables xij and yi , for each i ∈ F , j ∈ D, where each variable yi , i ∈ F , indicates whether or not a facility is built at location i, and each variable xij indicates whether or not the client at location j is assigned to a facility at location i, for each i ∈ F , j ∈ D: fi yi + cij xij (12) Minimize i∈F
i∈F j∈D
subject to
xij = 1,
for each j ∈ D,
(13)
xij ≤ yi , xij ≥ 0,
for each i ∈ F, j ∈ D, for each i ∈ F, j ∈ D.
(14) (15)
i∈F
Shmoys, Tardos, & Aardal [36] gave a simple algorithm to round an optimal solution to this linear program to an integer solution of cost at most 3/(1 − e3) ≈ 3.16 times as much. The algorithm relies on the ﬁltering technique of Lin & Vitter [24]. We can interpret each fractional solution (x, y) as the following bipartite graph G(x, y) = (F, D, E): the two sets of nodes are F and D, and there is an edge (i, j) ∈ E exactly when xij > 0. First, we apply an αfiltering algorithm to convert the optimal fractional solution to a new one, (¯ x, y¯), in which the cost cij associated with each edge in G(¯ x, y¯) is relatively cheap. As in the algorithm based on the timeindexed formulation for the scheduling problem, we ﬁrst deﬁne the notion of an αpoint, cj (α), for each location j ∈ D. Focus on a location j ∈ D, and let π be a permutation such that cπ(1)j ≤ cπ(2)j ≤ · · · ≤ cπ(n)j . We then set cj (α) = cπ(i∗ )j , i where i∗ = min{i : x, y¯), for each (i, j) ∈ i=1 xπ(i)j ≥ α}. To construct (¯ E(x, y) for which cij > cj (α) we set x ¯ij = 0, and then renormalize by setting each remaining x¯ij equal to xij /αj , where αj = (i,j)∈E: cij ≤cj (α) xij . We also renormalize y¯i = yi /α. It is easy to check that (¯ x, y¯) is a feasible solution to the linear program (12)–(15) with the further property that x ¯ij > 0 ⇒ cij ≤ cj (α). Motivated by this, given values gj , j ∈ D, we shall call a solution gclose if x ¯ij > 0 ⇒ cij ≤ gj . The central element of the rounding algorithm of Shmoys, Tardos, & Aardal is a polynomialtime algorithm that, given a gclose feasible solution (¯ x, y¯) to (12)–(15), ﬁnds a 3gclose integer solution (ˆ x, yˆ) such that fi yˆi ≤ fi y¯i . i∈F
i∈F
The algorithm works as follows. It partitions the graph G(¯ x, y¯) = (F, D, E) into clusters, and then, for each cluster, opens one facility that must serve all clients in it. The clusters are constructed iteratively as follows. Among all clients that have not already been assigned to a cluster, let j be the client j for which gj is x, y¯), and all of their smallest. This cluster consists of j , all neighbors of j in G(¯ neighbors as well (that is, all nodes j such that there exists some i for which
Design and Analysis of Approximation Algorithms
25
(i, j) and (i, j ) are both in E. Within this cluster, we open the cheapest facility i and use it to serve all clients within this cluster. We next show that this rounding algorithm has the two claimed properties. Each client j in the cluster is assigned to a facility i for which there is a path in G(¯ x, y¯) consisting of an edge connecting i and j (of cost at most gj ), an edge connecting j and some node i (of cost at most gj ), and an edge connecting i and j (of cost at most gj ). Hence, by the triangle inequality, the cost of assigning j to i is at most 2gj + gj . Since j was chosen as the remaining client with minimum gvalue, it follows that gj ≤ gj , and so the cost of assigning j to i is at most 3gj . In other words, the integer solution found is 3gclose. Consider the ﬁrst cluster formed, and let j be the node with minimum g¯ij = 1. Since the minimum value used in forming it. We know that i:(i,j )∈E x of a set of values is never more than a weighted average of them, the cost of the facility selected fi ≤ x ¯ij fi ≤ y¯i fi , i:(i,j )∈E
i:(i,j )∈E
where the last inequality follows from constraint (14). Observe that, throughout the execution of the algorithm, each location j ∈ D that has not yet been assigned to some cluster, has the property that each of its neighbors i must also remain unassigned. Hence, for each cluster, the cost of its open facility is at most the cost that the fractional solution assigned to nodes in F within that cluster. Hence, in total, fi yˆi ≤ fi y¯i . i∈F
i∈F
Thus, we have argued that the rounding algorithm of Shmoys, Tardos, & Aardal has the two key properties claimed above. Suppose that we apply this rounding theorem to an αﬁltered solution. What can we prove about the cost of the resulting integer solution? By the two properties proved above, we know that the cost of the solution is at most fi yˆi + cij xˆij ≤ fi y¯i + 3cj (α) = fi yi /α + 3 cj (α). i∈F
i∈F j∈D
i∈F
j∈D
i∈F
j∈D
However, exactly analogous to (8), we again know that at most a (1 − α) fraction of the values in a weighted average can exceed 1/(1 − α) times the average, and hence cij xij )/(1 − α). cj (α) ≤ ( i∈D
Plugging this bound into the previous inequality, we see that the total cost of the solution found is at most 1 3 fi yi + cij xij ). max{ , }( α 1−α i∈F
i∈F j∈D
If we set α = 1/4, then we see that the total cost of the solution found is at most 4 times the cost of (x, y), and so by rounding an optimal solution to the linear relaxation, we obtain a 4approximation algorithm.
26
David B. Shmoys
Once again, we may apply the idea of Goemans [10]; it is foolish to set α once, rather than choosing the best α for each input. Once again, we will analyze this bestα algorithm by analyzing a randomized algorithm instead. Let 0 < β < 1 be a parameter to be ﬁxed later. We shall set α = a, where a is selected uniformly at random within the interval [β, 1]. Once again, we shall rely on the fact that 1 n cj (a)da = cij xij . 0
i=1
The expected cost of the solution found can be upper bounded by 1 1 E[ fi yi + 3 cj (a)] = E[ ] fi yi + 3 E[cj (a)] a a i∈F j∈D i∈F j∈D 1 1 1 1 1 da) cj (a)da) =( fi yi + 3 ( 1−β β 1−β a i∈F j∈D β ln(1/β) 3 1 ≤ fi yi + cj (a)da 1−β 1−β 0 i∈F
=
ln(1/β) 1−β
i∈F
j∈D
fi yi +
3 cij xij . 1−β j∈D i∈F
3 If we set β = 1/e3 , then we have obtained the claimed 1−e 3 approximation algorithm. Guha & Khuller [12] proposed the following improvement to the algorithm of Shmoys, Tardos, & Aardal. A natural way in which to compute a better solution is to perform a postprocessing phase in which one iteratively checks if an additional facility can be opened to reduce the overall cost, and if so, greedily opens the facility that most reduces the total cost. Furthermore, Guha & Khuller also proposed the following strengthening of the linear programming relaxation. If one knew the cost φ incurredto build facilities in the optimal solution, one could add the constraint that i∈F fi yi ≤ φ. Since we don’t know k this value, we can instead guess this value by setting φ equal to (1 + ) , for each k = 1, . . . , log1+ i∈F fi , where is an arbitrarily small positive constant. There are only a polynomial number of settings for φ that must be considered, and so, in eﬀect, we may assume that we know the correct φ to an arbitrary number of digits of accuracy. By adding the postprocessing phase to the result of applying the rounding algorithm to the strengthened relaxation, Guha & Khuller obtain a 2.408approximation algorithm. Guha & Khuller [12] and Sviridenko [40] independently showed that this problem is MAXSNPhard, and hence there exists some constant ρ > 1 for which no ρapproximation algorithm exists, unless P = N P. Guha & Khuller also showed a much stronger result, that no approximation algorithm can have performance guarantee better than 1.463 (unless N P ⊆ DT IM E(nO(log log n) )). Chudak & Shmoys, independently, obtained a more modest improvement, a 3approximation algorithm, which relies only on the original linear programming
Design and Analysis of Approximation Algorithms
27
relaxation. The ﬁrst essential idea in their improvement was the observation that the ﬁltering step is, in some sense, completely unnecessary for the performance of the algorithm. This was based on a simple property of the optimal solution to the linear programming relaxation. Consider the dual to the linear program (12)–(15): vj (16) Maximize j∈D
subject to
wij ≤ fi ,
for each i ∈ F,
j∈D
vj − wij ≤ cij , wij ≥ 0
for each i ∈ F, j ∈ D, for each i ∈ F, j ∈ D.
This dual can be motivated in the following way. Suppose that we wish to obtain a lower bound for our input to the uncapacitated facility location problem. If we reset all ﬁxed costs fi to 0, and solve this input, then clearly we get a (horrible) lower bound: each client j ∈ D gets assigned to its closest facility at a cost of mini∈F cij . Now suppose we do something a bit less extreme. Each location i ∈ F decides on a given costsharing of its ﬁxed cost fi . Each location j ∈ D is allocated a share wij of the ﬁxed cost; if j is assigned to an open facility at i, then it must pay an additional fee of wij (for a total of cij + wij ), but the explicit ﬁxed cost of i is once again reduced to 0. Of course, we insist that each wij ≥ 0, and j∈D wij ≤ fi for each i ∈ F . But this is still an easy input to solve: each j ∈ D incurs a cost vj = mini∈F (cij + wij ), and the lower bound is j∈D vj . Of course, we want to allocate the shares so as to maximize this lower bound, and this maximization problem is precisely the LP dual. Consider a pair of primal and dual optimal solutions: (x, y) and (v, w). Complementary slackness implies that if xij > 0, then the corresponding dual constraint is satisﬁed with equality. That is, vj − wij = cij , and since wij ≥ 0, we see that cij ≤ vj ; in other words, (x, y) is already vclose. Hence, if we apply the rounding algorithm of Shmoys, Tardos, & Aardal (without ﬁltering ﬁrst, and so gj = vj ), we ﬁnd a solution of cost at most fi yi + 3vj = fi yi +3( fi yi + cij xij ) ≤ 4( fi yi + cij xij ), i∈F
j∈D
i∈F
i∈F
i∈F j∈D
i∈F
i∈F j∈D
where the ﬁrst equality follows from the fact that the optimal solutions to the primal and the dual linear programs have equal objective function values. The second key idea in the improvement of Chudak & Shmoys was the use of randomized rounding in the facility selection step. Randomized rounding is an elegant technique introduced by Raghavan & Thompson [32], in which a feasible solution to a linear programming relaxation of a 0–1 integer program is rounded to an integer solution by interpreting the fractions as probabilities, and setting each variable to 1 with the corresponding probability. Sviridenko [40] proposed a simple randomized rounding approximation algorithm for the special case of
28
David B. Shmoys
the metric uncapacitated facility location problem in which each cij ∈ {1, 2}. In the deterministic algorithm presented above, the cheapest facility in each cluster was opened. Instead, if the cluster is “centered” at j , one can open facility i with probability xij . This does not really change the previous analysis, since the expected cost of the facilities selected is at most i∈F fi yi , and the bound on the assignment costs was independent of the choice of the facility opened in each cluster. The ﬁnal idea used to obtain the improved performance guarantee is as follows: rather than select the next center by ﬁnding the remaining client for which (since gj = vj in the version without ﬁltering), select the client vj is minimum for which vj + i∈F cij xij is minimum. This enters into the analysis in the following way. For each client j in the cluster “centered” at j , its assignment cost is bounded by the cost of an edge (i, j) (of cost at most vj ), an edge (i, j ) (of cost at most vj ), and the edge (i , j ). The last of these costs is a random variable, and so we can focus on its expected value. Since j chooses to open each facility i with probability xij , the expected cost of the edge (i , j ) is exactly i∈F cij xij . Thus, the expected cost of assigning j to i is at most vj + vj + i∈F cij xij . By our modiﬁed selection rule, this expectation is at most 2vj + i∈F cij xij , and hence the expected total cost of the solution is at most 2vj + cij xij + fi yi , j∈D
j∈D i∈F
i∈F
which is exactly equal to three times the optimal value of the linear programming relaxation. The analogous deterministic algorithm is quite natural. Before, we merely chose the cheapest facility in each cluster. However, by choosing a facility, we also aﬀect the assignment cost of each client in that cluster. Thus, if choose the facility that minimizes the total cost for that cluster, then we achieve a deterministic 3approximation algorithm. However, this is not the best possible analysis of this randomized algorithm. Subsequently, Chudak [4] and Chudak & Shmoys [6] have improved this bound to show that (essentially) this randomized algorithm leads to a (1 + 2/e)approximation algorithm. We shall modify the algorithm in the following way. For each location i ∈ F , there is some probability pi with which it has been opened by this algorithm. (For most locations, it is equal to some value xij when facility location i belongs to a cluster “centered” at j , but some locations i might not belong to any cluster.) In the modiﬁed algorithm, we also have independent events that open each facility i with probability yi − pi . In fact, we can simplify some of this discussion by making the following further assumption about the optimal solution (x, y) to the linear program (12)–(15): for each xij > 0, it follows that xij = yi . We shall say that such a solution is complete. This assumption can be made without loss of generality, since it is not hard to show that for any input, there is an equivalent input for which the optimal fractional solution is complete. For the algorithms above, we have indicated that each client is assigned to the facility that has been opened in its cluster. In fact, there is no need to make
Design and Analysis of Approximation Algorithms
29
this assumption about the assignments, since we may simply assign each client to its cheapest open facility. Given this, the key insight to the improved analysis is as follows. Consider some client j (which is not the center of its cluster). We have shown that its assignment cost is at most 3vj (for the 4approximation algorithm, and a somewhat better bound for the 3approximation algorithm). However, the randomized algorithm might very well open one of j’s neighbors in G(x, y). In that case, clearly we can obtain a much better bound on the assignment cost incurred for client j. In fact, one can show that the probability that a facility has been opened at least one of j’s neighbors is at least (1 − 1/e), and this is the basic insight that leads to the improved analysis. Although the complete analysis of this algorithm is beyond the scope of this survey, we will outline its main ideas. The improvement in the bound is solely due to the fact that we can bound the expected assignment cost for each client j by i∈F cij xij + (2/e)vj . In fact, we will only sketch the proof that this expectation is at most i∈F cij xij + (3/e)vj , and will use as a starting point, the original clustering algorithm in which the next client selected is the one for which vjis smallest (rather than the modiﬁed one in which selection was based on vj + i∈F cij xij ). Suppose that the neighbors of client j in G(x, y) happen to be nodes 1, . . . , d, d d where c1j ≤ · · · ≤ cdj . Thus, i=1 xij = i=1 yi = 1. We can bound the expected assignment cost for j, by considering nodes i = 1, . . . , d in turn, assigning j to the ﬁrst of these that has been opened, and if none of these facilities have been opened, then assigning j to the “backup” facility i that has surely been opened in its cluster. If opening neighboring facilities i = 1, . . . , d were independent events, then a simple upper bound on the expected assignment cost for j is y1 c1j + (1 − y1 )y2 c2j + · · · + (1 − y1 ) · · · (1 − yd−1 )yd cdj + (1 − y1 ) · · · (1 − yd )3vj , d d which is clearly at most i=1 cij yi +3vj i=1 (1−yi ). The Taylor series expansion of e−r implies that 1 − r ≤ e−r . Using this fact, and the assumption that the optimal LP solution (x, y) is complete, we see that the expected assignment cost for j is at most i∈F cij xij + (3/e)vj . However, opening the neighboring facilities i = 1, . . . , d are not independent events: for instance, if two of these neighbors are in the same cluster, then only one of them can be opened. The next question is: can the conditioning between these events be harmful? Fortunately, the answer is no, and it is fairly intuitive to see why this is the case. If it happens that none of the ﬁrst k neighbors of j have not been opened, this only makes it more likely that the next cheapest facility is, in fact, open. A precise analysis of this situation can be given, and so one can prove that the expected assignment cost for j is at most i∈F cij xij + (3/e)vj (without relying on unsupportable assuptions). These randomized approximation algorithms can each be derandomized, by a straightforward application of the method of conditional probabilities. Thus, if we return to the selection rule in which the next cluster is “centered” at the
30
David B. Shmoys
remaining client j for which vj + i∈F cij xij is minimized, then this derandomization leads to a (1 + 2/e)approximation algorithm. For the uncapacitated facility location problem, the natural questions for further research are even more tantalizing than for the scheduling problem discussed in the previous section. It is not known that the analysis of the algorithm of Chudak & Shmoys is tight (and in fact, we suspect that it is not tight). Guha & Khuller [12] have given an input for which the ratio between the optimal integer and fractional optima is at least 1.463, but this still leaves some room between that and the upper bound of 1 + 2/e ≈ 1.736 implied by the last algorithm. Furthermore, there are wellknown ways to construct stronger linear programming relaxations for this problem, and it would be very interesting to use them to prove stronger performance guarantees.
References 1. M. L. Balinksi. On ﬁnding integer solutions to linear programs. In Proceedings of the IBM Scientiﬁc Computing Symposium on Combinatorial Problems, pages 225–248. IBM, 1966. 23 2. C. Chekuri and R. Motwani. Precedence constrained scheduling to minimize weighted completion time on a single machine. Unpublished manuscript, 1997. 22, 23 3. C. Chekuri, R. Motwani, B. Natarajan, and C. Stein. Approximation techniques for average completion time scheduling. Proceedings of the Eighth Annual ACMSIAM Symposium on Discrete Algorithms, pages 609–618, 1997. 19 4. F. A. Chudak. Improved approximation algorithms for uncapacitated facility location. In: Proceedings of the 6th Integer Programming and Combinatorial Optimization Conference (IPCO), 1998, to appear. 28 5. F. A. Chudak and D. S. Hochbaum. A halfintegral linear programming relaxation for scheduling precedenceconstrained jobs on a single machine. Unpublished manuscript, 1997. 22 6. F. A. Chudak and D. B Shmoys. Improved approximation algorithms for the uncapacitated facility location problem. Unpublished manuscript, 1997. 28 7. V. Chv´ atal. A greedy heuristic for the set covering problem. Math. Oper. Res., 4:233–235, 1979. 16 8. M. E. Dyer and L. A. Wolsey. Formulating the single machine sequencing problem with release dates as a mixed integer program. Discrete Appl. Math., 26:255–270, 1990. 17 9. G. Even, J. Naor, S. Rao, and B. Schieber. Divideandconquer approximation algorithms via spreading metrics. In Proceedings of the 36th Annual IEEE Symposium on Foundations of Computer Science, pages 62–71, 1995. 16 10. M. X. Goemans. Personal communication, June, 1996. 19, 26 11. R. L. Graham, E. L. Lawler, J. K. Lenstra, and A. H. G. Rinnooy Kan. Optimization and approximation in deterministic sequencing and scheduling: a survey. Ann. Discrete Math., 5:287–326, 1979. 16 12. S. Guha and S. Khuller. Greedy strikes back: Improved facility location algorithms. In Proceedings of the 9th Annual ACMSIAM Symposium on Discrete Algorithms, pages 649–657, 1998. 26, 30
Design and Analysis of Approximation Algorithms
31
13. L. A. Hall, A. S. Schulz, D. B. Shmoys, and J. Wein. Scheduling to minimize the average completion time: online and oﬀline approximation algorithms. Math. Oper. Res., 22:513–544, 1997. 20 14. L. A. Hall, D. B. Shmoys, and J. Wein. Scheduling to minimize the average completion time: online and oﬀline algorithms. In Proceedings of the 7th Annual ACMSIAM Symposium on Discrete Algorithms, pages 142–151, 1996. 18, 20 15. D. S. Hochbaum. Heuristics for the ﬁxed cost median problem. Math. Programming, 22:148–162, 1982. 16 16. D. S. Hochbaum, editor. Approximation algorithms for NPhard problems, Boston, MA, 1997. PWS. 15 17. D. S. Hochbaum, N. Megiddo, J. Naor, and A. Tamir. Tight bounds and 2approximation algorithms for integer programs with two variables per inequality. Math. Programming, 62:69–83, 1993. 22 18. D. S. Hochbaum and D. B. Shmoys. A best possible approximation algorithm for the kcenter problem. Math. Oper. Res., 10:180–184, 1985. 23 19. D. S. Johnson. Approximation algorithms for combinatorial problems. J. Comput. System Sci., 9:256–278, 1974. 16 20. A. A. Kuehn and M. J. Hamburger. A heuristic program for locating warehouses. Management Sci., 9:643–666, 1963. 23 21. E. L. Lawler. Combinatorial Optimization: Networks and Matroids. Holt, Rinehart, and Winston, New York, 1976. 16 22. J. K. Lenstra, A. H. G. Rinnooy Kan, and P. Brucker. Complexity of machine scheduling problems. Ann. Discrete Math., 1:343–362, 1977. 16 23. J.H. Lin and J. S. Vitter. Approximation algorithms for geometric median problems. Inform. Proc. Lett., 44:245–249, 1992. 23 24. J.H. Lin and J. S. Vitter. approximations with minimum packing constraint violation. In Proceedings of the 24th Annual ACM Symposium on Theory of Computing, pages 771–782, 1992. 16, 24 25. L. Lov´ asz. On the ratio of optimal integral and fractional covers. Discrete Math., 13:383–390, 1975. 16 26. A. S. Manne. Plant location under economiesofscaledecentralization and computation. Management Sci., 11:213–235, 1964. 23 27. F. Margot, M. Queyranne, and Y. Wang. Decompositions, network ﬂows and a precedence constrained single machine scheduling problem. Unpublished manuscript, December, 1996. 22 28. A. Munier and J. C. K¨ onig. A heuristic for a scheduling problem with communication delays. Oper. Res., 45:145–147, 1997. 17 29. C. A. Phillips, C. Stein, and J. Wein. Minimizing average completion time in the presence of release dates. Math. Programming B, 1998. To appear. 16, 17, 18 30. C. N. Potts. An algorithm for the single machine sequencing problem with precedence constraints. Math. Programming Stud., 13:78–87, 1980. 21 31. M. Queyranne. Structure of a simple scheduling polyhedron. Math. Programming, 58:263–285, 1993. 20, 21 32. P. Raghavan and C. D. Thompson. Randomized rounding: a technique for provably good algorithms and algorithmic proofs. Combinatorica, 7:365–374, 1987. 27 33. R. Ravi, A. Agrawal, and P. Klein. Ordering problems approximated: singleprocessor scheduling and interval graph completion. In Proceedings of the 18th International Colloquium on Automata, Languages, and Processing, Lecture Notes in Computer Science 510, pages 751–762, 1991. 16 34. A. S. Schulz and M. Skutella. Personal communication, 1997. 23
32
David B. Shmoys
35. A. S. Schulz. Scheduling and Polytopes. PhD thesis, Technical University of Berlin, 1996. 20, 21 ´ Tardos, and K. I. Aardal. Approximation algorithms for facility 36. D. B. Shmoys, E. location problems. In Proceedings of the 29th Annual ACM Symposium on Theory of Computing, pages 265–274, 1997. 24 37. J. B. Sidney. Decomposition algorithms for singlemachine sequencing with precedence and deferral costs. Oper. Res., pages 283–298, 1975. 23 38. J. F. Stollsteimer. The eﬀect of technical change and output expansion on the optimum number, size and location of pear marketing facilities in a California pear producing region. PhD thesis, University of California at Berkeley, Berkeley, California, 1961. 23 39. J. F. Stollsteimer. A working model for plant numbers and locations. J. Farm Econom., 45:631–645, 1963. 23 40. M. Sviridenko. Personal communication, July, 1997. 26, 27 41. L. A. Wolsey. Mixed integer programming formulations for production planning and scheduling problems. Invited talk at the 12th International Symposium on Mathematical Programming, MIT, Cambridge, August, 1985. 20, 21
The Steiner Tree Problem and its Generalizations Vijay V. Vazirani1 College of Computing, Georgia Institute of Technology,
[email protected] Abstract. We will survey recent approximation algorithms for the metric Steiner tree problem and its generalization, the Steiner network problem. We will also discuss the bidirected cut relaxation for the metric Steiner tree problem.
1
Introduction
The Steiner tree problem occupies a central place in the emerging theory of approximation algorithms – methods devised to attack it have led to fundamental paradigms for the rest of the area. The reason for interest in this problem lies not only its rich mathematical structure, but also because it has arisen repeatedly in diverse application areas. In the last couple of years, some nice algorithmic results have been obtained for this problem and its generalizations. Let us mention three that especially stand out: Arora’s polynomial time approximation scheme [2] for the Euclidean Steiner tree problem, Promel and Steger’s [18] factor 53 + approximation algorithm, for any constant > 0, for the metric Steiner tree problem, and Jain’s [12] factor 2 approximation algorithm for the Steiner network problem. Even though the Euclidean Steiner tree problem now seems fairly well understood (see also Du and Huang’s [5] remarkable proof resolving the GilbertPollack conjecture), it is clear that there are vast gaps in our understanding of the metric Steiner tree problem and its variants and generalizations. In this survey, we will restrict attention to the metric case, and will ﬁrst outline the ideas behind the algorithms of Promel and Steger, and Jain. Then, we will mention what is perhaps the most compelling open problem in this area: to design an algorithm using the bidirected cut relaxation for the metric Steiner tree problem, and determine the integrality gap of this relaxation.
2
Steiner trees via matroid parity
The metric Steiner tree problem is: Given a graph G = (V, E) whose vertices are partitioned into two sets, R and S, the required and Steiner vertices, and a function cost : E → Q+ specifying nonnegative costs for the edges, ﬁnd a minimum cost tree containing all the required vertices and any subset of the Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 33–41, 1998. c SpringerVerlag Berlin Heidelberg 1998
34
Vijay V. Vazirani
Steiner vertices. It is easy to see that we can assume without loss of generality that the edge costs satisfy the triangle inequality. Let us say that a Steiner tree is 3restricted if every Steiner vertex used in this tree has exactly three neighbors all of which are required vertices. Zelikovsky [21] showed that the cost of an optimal 3restricted Steiner tree is within 5/3 of the cost of an optimal Steiner tree. Promel and Steger have shown how to ﬁnd a 3restricted Steiner tree that is within a 1 + factor of an optimal such tree, for any > 0. This gives a 5/3 + factor approximation algorithm for the metric Steiner tree problem, for any > 0. A hypergraph H = (V, F ) is a generalization of a graph, allowing F to be an arbitrary family of subsets of V , instead of just 2 element subsets. A sequence of distinct vertices and hyperedges, v1 , e1 , . . . , vl , el , for l ≥ 2 is said to be a cycle in H if v1 ∈ e1 ∩ el and for 2 ≤ i ≤ l, vi ∈ ei−1 ∩ ei . A subgraph of H, H = (V, F ), with F ⊆ F is said to be a spanning tree of H if it is connected, acyclic and spans all vertices of V . Hypergraph H is said to be 3regular if every hyperedge in F consists of 3 vertices. Consider an instance G of the metric Steiner tree problem. For a set of three required vertices and a single Steiner vertex, deﬁne their connection cost to be sum of the costs of the three edges connecting the Steiner vertex to each of the three required vertices. Now, deﬁne a hypergraph H = (R, F ) on the set of required vertices of G with edge costs as follows: F contains all edges of G incident at required vertices with their speciﬁed costs. In addition, for each triple of required vertices, F has a hyperedge on these vertices; the cost of this hyperedge is the minimum connection cost of these three vertices using some Steiner vertex. Lemma 1. A minimum cost spanning tree in H corresponds to an optimal 3restricted Steiner tree in G. Lemma 2. The problem of finding a minimum cost spanning tree in H can be reduced to that of finding a minimum cost spanning tree in a 3regular hypergraph. The key step in Promel and Steger’s result is: Lemma 3. The problem of finding a minimum cost spanning tree in a 3regular hypergraph can be reduced to the minimum weight matroid parity problem. Let us sketch the reduction in Lemma 3. Let H = (V, F ) be a 3regular hypergraph. A new graph H on vertex set V is constructed as follows: corresponding to each hyperedge {v1 , v2 , v3 } ∈ F , we add the edge pair (v1 , v2 ) and (v1 , v3 ) to H (the choice of v1 is arbitrary). The cost of this pair is the same as that of the hyperedge. We will consider the graphic matriod in H . It is easy to verify that a solution to the minimum weight matroid parity problem on this instance gives a minimum cost spanning tree in H. Interestingly enough, determining the complexity of minimum weight matroid parity is still open, even though the cardinality version of this problem is known to be in P[15]. However, if the weights are given in unary, a random polynomial time algorithm is known [16] (see also [4]). Now, by scaling the original
The Steiner Tree Problem and its Generalizations
35
weights appropriately, we get a 1 + factor algorithm for the minimum weight 3restricted Steiner tree problem. The approximation algorithm for the metric Steiner tree problem follows. For other algorithms for this problem see [3,13]. An algorithm achieving a slightly better approximation factor of 1.644 appears in [14]. However, it is too involved in its current form for this survey; moreover, to beat the factor of 5/3, it takes time exceeding O(n20 ).
3
Steiner networks via LProunding
The Steiner network problem generalizes the metric Steiner tree problem to higher connectivity requirements: Given a graph G = (V, E), a cost function on edges c : E → Q+ (not necessarily satisfying the triangle inequality), and a connectivity requirement function r mapping unordered pairs of vertices to Z+ ﬁnd a minimum cost graph that has r(u, v) edge disjoint paths for each pair of vetices u, v ∈ V . Multiple number of copies of any edge can be used to construct this graph; each copy of edge e will cost c(e). For this purpose, for each edge e ∈ E, we are also speciﬁed ue ∈ Z+ ∪ {∞} stating an upper bound on the number of copies of edge e we are allowed to use; if ue = ∞, then there is no bound on the number of copies of edge e. All LPduality based approximation algorithms for the metric Steiner tree problem and its generalizations work with the undirected relaxation [1,9,10,20]. In order to give the integer programming formulation on which this relaxation is based, we will deﬁne a cut requirement function f : 2V → Z+ . For S ⊆ V , f (S) is deﬁned to be the largest connectivity requirement separated by the cut (S, S), i.e., f (S) = max{r(u, v)u ∈ S and v ∈ S}. Let us denote the set of edges in the cut (S, S) by δ(S). The integer program has a variable xe for each edge e: minimize
ce xe
(1)
e∈E
subject to
xe ≥ f (S),
S⊆V
e: e∈δ(S)
xe ∈ Z+ ,
e ∈ E and ue = ∞
xe ∈ {0, 1, . . . , ue },
e ∈ E and ue = ∞
The LPrelaxation is: minimize
ce xe
(2)
e∈E
subject to
xe ≥ f (S),
S⊆V
e: e∈δ(S)
xe ≥ 0,
e ∈ E and ue = ∞
ue ≥ xe ≥ 0,
e ∈ E and ue = ∞
36
Vijay V. Vazirani
Figure 1. An extreme optimal solution for the Petersen graph.
Certain NPhard problems, such a vertex cover [17] and node multiway cut [7] admit LPrelaxations having the remarkable property that they always have a halfintegral optimal solution. Clearly, rounding up all halves to 1 in such a solution leads to a factor 2 approximation algorithm. Does the relaxation (2) have this property? The answer is “No”. Not surprisingly, the Petersen graph is a counterexample: Consider the minimum spanning tree problem on this graph, i.e., for each pair of vertices u, v, r(u, v) = 1. Each edge is of unit cost. Since the Petersen graph is 3edge connected (in fact, it is 3vertex connected as well), xe = 1/3 for each edge e is a feasible solution. Moreover, this solution is optimal, since the degree of each vertex under this solution is 1, the minimum needed to allow the connectivity required. The cost of this solution is 5. A half integral solution of cost 5 would have to pick, to the extent of half each, the edges of a Hamiltonian cycle. Since the Petersen graph has no Hamiltonian cycles, there is no half integral optimal solution. Let us say that an extreme solution, also called a vertex solution or a basic feasible solution, for an LP is a feasible solution that cannot be written as the convex combination of two feasible solutions. It turns out that the solution, xe = 1/3 for each edge e, is not an extreme solution. An extreme solution is shown in Figure 1; thick edges are picked to the extent of 1/2, thin edges to the extent of 1/4, and the missing edge is not picked. The isomorphism group of the Petersen graph is edgetransitive, and so there are several related extreme solutions; the solution xe = 1/3 for each edge e is a suitable convex combination of these. Notice that although the extreme solution is not halfintegral, it picks some edges to the extent of half.
The Steiner Tree Problem and its Generalizations
37
Jain’s algorithm is based on proving that in fact an extreme solution to LP (2) must pick at least one edge to the extent of at least a half. We will pay a factor of at most 2 in rounding up all such edges. But now how do we proceed? Let us start by computing the residual cut requirement function. Suppose H is the set of edges picked so far. Then, the residual requirement of cut (S, S) is f (S) = max{f (S) − δH (S), 0}, where δH (S) represents the set of edges of H crossing the cut (S, S). In general, the residual cut requirement function, f , may not correspond to the cut requirement function for a certain set of connectivity requirements. We will need the following deﬁnitions to characterize it: Definition 4. Function f : 2V → Z+ is said to be submodular if f (V ) = 0, and for every two sets A, B ⊆ V , the following two conditions hold: 1. f (A) + f (B) ≥ f (A − B) + f (B − A). 2. f (A) + f (B) ≥ f (A ∩ B) + f (A ∪ B). Lemma 5. For any graph G on vertex set V , the function δG (.) is submodular. Definition 6. Function f : 2V → Z+ is said to be weakly supermodular if f (V ) = 0, and for every two sets A, B ⊆ V , at least one the following conditions holds: – f (A) + f (B) ≤ f (A − B) + f (B − A) – f (A) + f (B) ≤ f (A ∩ B) + f (A ∪ B) The following is an easy consequence of the deﬁnitions: Lemma 7. Let H be a subgraph of G. If f : 2V (G) → Z+ is a weakly supermodular function, then so is the residual cut requirement function f . It is easy to see that the original cut requirement function is weakly supermodular; by Lemma 7, so is the residual cut requirement function. Henceforth, we will assume that the function f used in LP (2) is a weakly supermodular function. We can now state the central polyhedral fact proved by Jain in its full generality. This will enable us to design an iterative algorithm for the Steiner network problem. Theorem 8. Any extreme solution to LP (2) picks some edge e to the extent of at least a half, i.e., xe ≥ 1/2. The algorithm that we started to design above can now be completed: in each iteration, round up all edges picked to the extent of at least a half in an extreme optimal solution, and update the residual cut requirement function. The algorithm halts when the original cut requirement function is completely satisﬁed, i.e., the residual cut requirement function is identically zero. Using a maxﬂow subroutine, one can obtain a separation oracle for LP (2) for any
38
Vijay V. Vazirani
residual cut requirement function f , and so an extreme optimal solution can be computed in polynomial time. Let us sketch how Theorem 8 is proven. From polyhedral combinatorics we know that a feasible solution to a set of linear inequalities in Rm is an extreme solution iﬀ it satisﬁes m linearly independent inequalities with equality. W.l.o.g. we can assume that in any optimal solution to LP (2), for each edge e, 0 < xe < 1 (since edges with xe = 0 can be dropped from the graph, and those with xe = 1 can be permanently picked and the cut requirement function updated accordingly). So, the tight inequalities of an extreme optimal solution to LP (2) must correspond to cut requirements of sets. Theorem 9. Corresponding to any extreme solution to LP (2) there is a collection of m linearly independent tight sets that form a laminar family. The extreme optimal solution shown in Figure 1 uses 14 edges; we have shown a collection of 14 sets as required by Theorem 9. Finally, a counting argument establishes Lemma 10, which leads to Theorem 8. Lemma 10. For any extreme solution to LP (2) there is a tight set S with exactly two edge in the cut (S, S). The integrality gap of a relaxation is the supremum of the ratio of costs of optimal integral and optimal fractional solutions. Its importance lies in the fact that it limits the approximation factor that an algorithm using this relaxation can achieve. As a consequence of the factor 2 approximation algorithm for the Steiner network problem, we also get that the integrality gap of the undirected relaxation is 2. Previously, algorithms achieving guarantees of 2k [20] and 2Hk [10], where k is the largest requirement, were obtained for this problem.
4
The bidirected cut relaxation
The metric Steiner tree problem is a special case of the Steiner network problem in which all requirements are 0 or 1. The further restriction, when all vertices are required, is the minimum spanning tree problem, which is polynomial time solvable. It turns out that the integrality gap of the undirected relaxation, LP 2, is essentially 2 even for restriction. To prove a lower bound of 2 − n2 on the integrality gap, consider a cycle on n vertices, with all edges of unit cost. The optimal integral solution to the minimum spanning tree problem on this graph is to pick n − 1 edges for a cost of n − 1, but an optimal fractional solution picks each edge to the extent of a half, for a total cost of n/2. Thus, the undirected relaxation has an integrality gap of 2 not only for as general a problem as the Steiner network problem, but also for the minimum spanning tree problem, a problem in P! Two fundamental questions arise: – Is there an exact relaxation, i.e., with integrality gap 1, for the minimum spanning tree problem?
The Steiner Tree Problem and its Generalizations
39
– Is there a tighter relaxation for the metric Steiner tree problem? The two questions appear to be intimately related: The answer to the ﬁrst question is “Yes”. This goes back to the seminal work of Edmonds [6], giving a primaldual schema based polynomial time algorithm for the even more general problem of ﬁnding a minimum branching in a directed graph. A similar idea gives a remarkable relaxation for the metric Steiner tree problem: the bidirected cut relaxation. This relaxation is conjectured to have integrality gap close to 1; the worst example known, due to Goemans [8], has integrality gap of 8/7. However, despite the fact that this relaxation has been known for decades, no algorithms have been designed using it, and the only upper bound known on its integrality gap is the trivial bound of factor 2 which follows from the undirected relaxation. Recently, [19] have given a primaldual schema based factor 3/2 approximation algorithm using this relaxation for the special class of quasibipartite graphs; a graph is quasibipartite if it contains no edges between two Steiner vertices. We present below the bidirected cut relaxation, and leave the open problem of designing an approximation algorithm beating factor 2 using it. 4.1
The bidirected cut relaxation
First replace each undirected edge (u, v) of G by two directed edges (u → v) and (v → u) each of cost cost(u, v). Denote the graph so obtained by G = (V, E). Pick an arbitrary vertex r ∈ R and designate it to be the root. W.r.t. the choice of a root, a set C ⊂ V will be called a valid set if C contains at least one required vertex and C contains the root. The following integer program is trying to pick a minimum cost collection of edges from E in such a way that each valid set has at least one outedge. It is easy to see that an optimal solution to this program will be a minimum cost Steiner tree directed into r. minimize
cost(e)xe
(3)
e∈E
subject to
xe ≥ 1,
∀ valid set C
e: e∈δ(C)
xe ∈ {0, 1},
∀e ∈ E
The LPrelaxation of this integer program is called the bidirected cut relaxation for the metric Steiner tree problem. (Notice that there is no need to explicitly add the costraints upperbounding variables xe .) minimize
cost(e)xe
(4)
e∈E
subject to
xe ≥ 1,
∀ valid set C
e: e∈δ(C)
xe ≥ 0,
∀e ∈ E
40
Vijay V. Vazirani
It is easy to verify that the choice of the root does not aﬀect the cost of the optimal solution to the IP or the LP. As usual, the dual is seeking a maximum cut packing.
References 1. A. Agrawal, P. Klein, and R. Ravi. When trees collide: An approximation algorithm for the generalized Steiner problem on networks. SIAM Journal on Computing, 24(3):440–456, June 1995. 35 2. S. Arora. Nearly linear time approximation schemes for Euclidean TSP and other geometric problems. In 38th Annual Symposium on Foundations of Computer Science, pages 554–563, Miami Beach, Florida, 20–22 October 1997. IEEE. 33 3. P. Berman and V. Ramaiyer. Improved approximations for the Steiner tree problem. J. Algorithms, 17, 381408, 1994. 35 4. P. Camerini, G. Galbiati, and F. Maﬃoli. Random pseudopolynomial algorithms for exact matroid problems. J. Algorithms 13, 258273, 1992. 34 5. D. Du and F. Hwang. A proof of GilbertPollack’s conjecture on the Steiner ratio. Algorithmica 7, 121135, 1992. 33 6. J. Edmonds. Optimum branchings. J. Res. Nat. Bur. Standards, B71:233–240, 1967. 39 7. N. Garg, V. V. Vazirani, and M. Yannakakis. Approximation algorithms for multiway cuts in nodeweighted and directed graphs. Proc. 21th International Colloquium on Automata, Languages and Programming, 1994. 36 8. M. Goemans. Personal communication, 1996. 39 9. M.X. Goemans and D.P. Williamson. A general approximation technique for constrained forest problems. SIAM Journal on Computing, 24(2):296–317, April 1995. 35 10. M.X. Goemans, A. Goldberg, S. Plotkin, D. Shmoys, E. Tados, and D.P. Williamson. Approximation algorithms for network design problems. SODA, 223232, 1994. 35, 38 11. M. Gr¨ otschel, L. Lov´ asz, and A. Schrijver. The ellipsoid method and its consequences in combinatorial optimization. Combinatorica, 1(2):169–197, 1981. 12. K. Jain. A factor 2 approximation algorithm for the generalized steiner network problem. manuscript, 1998. 33 13. L. Kou, G. Markowsky, and L. Berman. A fast algorithm for Steiner trees. Acta Informatica 15, 141145, 1981. 35 14. M. Karpinski and A. Zelikovsky. New approximation algorithms for the Steiner tree problem. Electr. Colloq. Comput. Compl., TR95030, 1995. 35 15. L. Lovasz. The matroid matching problem. Algebraic Methods in Graph Theory, Colloquia Mathematica Societatis Janos Bolyai, Szeged (Hungary), 1978. 34 16. H. Narayanan, H. Saran, and V.V. Vazirani. Randomized parallel algorithms for matroid union and intersection, with applications to arboresences and edgedisjoint spanning trees. SIAM. J. Comput., vol. 23, No. 2, 387397, 1994. 34 17. G. L. Nemhauser and L. E. Trotter, Jr.. Vertex packing: structural properties and algorithms. Mathematical Programming, 8:232248, 1975. 36 18. H. J. Pr¨ omel and A. Steger. RNCapproximation algorithms for the Steiner problem. In R. Reischuk and M. Morvan, editors, Proceedings of the Symposium on Theoretical Aspects of Computer Science, volume 1200 of Lecture Notes in Computer Science, pages 559–570. SpringerVerlag, Berlin, Germany, 1997. 33
The Steiner Tree Problem and its Generalizations
41
19. S. Rajagopalan and V.V. Vazirani. On the Bidirected Cut Relaxation for the Metric Steiner Tree Problem. Submitted, 1998. 39 20. D. Williamson, M. Goemans, M. Mihail, and V. Vazirani. A primaldual approximation algorithm for generalized steiner network problems. Combinatorica, 15, 1995. 35, 38 21. A. Zelikovsky. An 11/6approximation algorithm for the network Steiner problem. Algorithmica, 9:463–470, 1993. 34
Approximation Schemes for Covering and Scheduling on Related Machines Yossi Azar1 and Leah Epstein2 1 2
Dept. of Computer Science, TelAviv University.
[email protected] Dept. of Computer Science, TelAviv University.
[email protected] Abstract. We consider the problem of assigning a set of jobs to m parallel related machines so as to maximize the minimum load over the machines. This situation corresponds to a case that a system which consists of the m machines is alive (i.e. productive) only when all machines are alive, and the system should be maintained alive as long as possible. The above problem is called related machines covering problem and is different from the related machines scheduling problem in which the goal is to minimize the maximum load. Our main result is a polynomial approximation scheme for this covering problem. To the best of our knowledge the previous best approximation algorithm has a performance ratio of 2. Also, an approximation scheme for the special case of identical machines was given by [14]. Some of our techniques are built on ideas of Hochbaum and Shmoys [12]. They provided an approximation scheme for the well known related machines scheduling. In fact, our algorithm can be adapted to provide a simpler approximation scheme for the related machines scheduling as well.
1
Introduction
We consider the problem of assigning a set of jobs to m parallel related machines so as to maximize the minimum load over the machines. This situation is motivated by the following scenario. A system which consists of m related machines is alive (i.e. productive) only when all machines are alive. The duration that a machine is alive is proportional to the total size of the resources (e.g. tanks of fuel) allocated to it. The goal is to keep the system alive as long as possible using a set of various sizes resources. The above problem has applications also in sequencing of maintenance actions for modular gas turbine aircraft engines [8]. To conform with the standard scheduling terminology we view the resources as jobs. Thus, jobs are assigned to machines so as to maximize the minimum load. In the related machines case each machine has its own speed (of the engine that operates on fuel). The identical machines case is a special
Research supported in part by the Israel Science Foundation and by the United StatesIsrael Binational Science Foundation (BSF).
Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 39–47, 1998. c SpringerVerlag Berlin Heidelberg 1998
40
Yossi Azar and Leah Epstein
case where all speeds of machines are identical. We refer to these problems as machines covering problems. Note that the classical scheduling/loadbalancing problems [10,11,12,13] seem strongly related to the covering problems. However, scheduling/loadbalancing are packing problems and hence their goal is to minimize the makespan (i.e. to minimize the maximum load over all machines) where in the covering problems the goal is to maximize the minimum. Our results: Our main result is polynomial approximation scheme for the covering problem in the related machines case. That is for any ε > 0 there is a polynomial time algorithm Aε that approximates the optimal solution up to a factor of 1 + ε. In fact, since the problem is strongly NP hard no fully polynomial approximation scheme exists unless P=NP. Some of our techniques are built on ideas of Hochbaum and Shmoys [12]. They provided an approximation scheme for the well known related machines scheduling. In fact, our algorithm can be adapted to provide a simpler approximation scheme for the related machines scheduling as well. Known results: The problem of maximizing the load of the least loaded machine, (i.e the machines covering problem) is known to be NPcomplete in the strong sense already for identical machines [9]. For the identical machines case Deuermeyer, Friesen and Langston [7] studied the LPTheuristic. The LPTheuristic orders the jobs by non increasing weights and assigns each job to the least loaded machine at the current moment. It is shown in [7] that the approximation ratio of this heuristic is at most 43 . The tight ratio 4m−2 3m−1 is given by Csirik, Kellerer and Woeginger [5]. Finally, Woeginger [14] designed a polynomial time approximation scheme for the identical machines covering problem. The history for the related machines covering problem is much shorter. The only result which is known for the related machines case is the 2 + ε approximation algorithm follows from [4]. The above paper also contains results for the online machines covering problems. Definitions: We give a formal deﬁnition of the problems discussed above. Consider a set of m identical machines and a set of jobs. Machine i has a speed vi and a job j has a weight wj . The load of a machine i is the sum of the weights wj of the jobs assigned to it normalized by the speed. That is, i = j∈Ji vi where Ji is the of jobs assigned to machine i. (The identical machines case is the special case where all vi are equal.) The goal in the machines covering problems is to assign the jobs to the machines so as to maximize the minimum load over the machines. This is in contrast to the scheduling/loadbalancing problems where the goal there is to minimize the maximum load. Note that these covering problems are also diﬀerent from the bin covering problems [1,2,3,6] where the goal is to maximize the number of covered bins, i.e. bins of load of at least 1.
2
Approximation scheme for machine covering
We use a standard binary search technique to search for the value of the optimal cover. By this we reduce the approximation algorithm to the following approximate decision problem. Given a value T for the algorithm, the decision procedure
Approximation Schemes for Covering and Scheduling on Related Machines
41
outputs an assignment of value at least (1 − ε)T , or answers that there does not exist an assignment of value at least T . We start the binary search with an initial estimation of the value of the optimal cover using the (2 + ε)approximation algorithm given in [4]. Clearly, the overall complexity of the approximation algorithm is just O(log 1/ε) times the complexity of the decision procedure (the initial estimation algorithm is fast). We note that the decision procedure is equivalent to decide if one can ﬁll the m bins such that bin i is ﬁlled by at least (1 − ε)T vi . We scale the sizes of bins and the weights of jobs, so that the size of the smallest bin is 1. Now we have a set of n jobs, and a set of m bins of sizes s1 , s2 , ..., sm where 1 = s1 ≤ s2 ≤ ... ≤ sm . Bin ranges: We partition the bins according to their sizes into sets Br , where the bin range set Br is the set of all bins of size 2r ≤ sj < 2r+1 . Let R = ε {rBr = φ}, clearly R ≤ m. We choose ε0 to be a value such that 16 ≤ ε0 ≤ 8ε 1 r 2 r and ε0 is an integer. We denote εr = 2 ε0 , δ0 = ε0 and δr = 2 δ0 . For each bin range Br the jobs are partitioned into three sets. – Big jobs: jobs of weight more than 2r+1 . – Medium jobs: jobs of weight wj : εr < wj ≤ 2r+1 . – Small jobs: jobs of weight at most εr . Jobs vectors: For each Br we can approximate a set of jobs by a jobs vector (y, n1 , n2 , . . . , nl , W ) where y is the number of big jobs, nk is the number of (medium) jobs whose size is between tk−1 and tk where tk = εr + kδr and W is the total weight of small jobs in the set. Clearly l, the number of types of medium jobs, is at most δ20 − ε10 ≤ δ20 . We refer to the values of tk as rounded weights. Note that the jobs vector for a given set of jobs depends on the bin range. Cover vectors: Let Br be the bin range of bin j. A cover vector for bin j has the same form as the jobs vector except the last coordinate which is an integer that corresponds to the weight of small jobs normalized by εr . A vector (y, n1 , n2 , . . . , nl , q) is a cover vector for bin j if 2r+1 y +
l
nk tk + qεr ≥ sj − εr = sj (1 − ε0 ) ,
k=1
i.e., the sum of the rounded weights of the jobs in the vector is at least 1 − ε0 fraction of sj . Let Tj be the set of cover vectors for a bin j. Let Tj be the set of minimal cover vectors with respect to inclusion i.e. a cover vector u is in Tj if for any other cover vector for bin j, u the vector u − u has at least one negative coordinate. Since the minimum weight of a job is ε0 2r and the size of the bin is at most 2r+1 then any minimal cover vector consists of at most ε20 jobs (sum of coordinates). Clearly, we may use only minimal vector covers since any cover can be transformed to a minimal one by omitting some jobs. The layer graph: We use a layer graph where each node of the graph is state vector which is in a form of a cover vector. We order the bins in non
42
Yossi Azar and Leah Epstein
decreasing size order. The layers of the graph are partitioned into phases. There are R phases, a phase for each r ∈ R. Let br = Br  for r ∈ R and br = 0 otherwise. Phase r consists of br + 1 layers Lr,0 , ..., Lr,br . The nodes of Lr,i are all admissible state vectors of Br . We put an edge between a node x in Lr,i−1 , and a node x in Lr,i if the diﬀerence u = x − x is a minimal cover vector of bin j. r−1 Layer Lr,i corresponds to jobs that remained after the ﬁrst j = t=0 bt + i bins were covered. More speciﬁcally, if there is a path from L0,0 to a state vector in Lr,i then there is a cover of the ﬁrst j bins, where bin k ≤ j is covered with sk (1 − ε0 ), such that the remaining jobs has jobs vector which is identical to the state vector except of the last coordinate. The last coordinate of the jobs vector, W , satisﬁes qεr ≤ (W + 2εr )(1 + ε0 ) where q is the last coordinate of the state vector. Moreover, if there is a cover of the ﬁrst j bins, bin k ≤ j with sk such that the remaining jobs set deﬁnes some jobs vector then there a path from the ﬁrst layer to the node in layer Lr,i whose state vector is identical to the jobs vector except of the last coordinate. The last coordinate of the state vector, q, satisﬁes W ≤ qεr where W is the last coordinate of the jobs vector. The translating edges between phases: The edges between phases ”translate” each state vector into a state vector of the next phase. These edges are not used to cover bins, but to move from one phase to another. There is only one outgoing edge from each node in a last layer of any phase (except the last one which has no outgoing edges). More speciﬁcally, for each phase r, any node in Lr,br translates by an edge into a node in Lr ,0 where r > r is the index of the next phase. We consider a state vector in Lr,br (an input vector). We construct a corresponding state vector in layer Lr ,0 (an output vector) which results in an edge between them. We start with an empty output state vector. We scan the input state vector. To build the output vector we need to know how jobs change their status. Since the bins become larger, the small jobs remain small. Medium jobs may either become small, or stay medium. Big jobs can stay big, or become medium or small. First we consider the number of big items y in the input vector. Note that all big jobs could be used to cover previous bins. Thus we may assume that the smallest big jobs were used, and the y big jobs that remained are the largest y jobs in the original set. Let y1 be the number of big jobs in the input vector that are also big in Br , y2 the number of jobs that are medium in Br and y3 the number of jobs that are small in Br . A medium job in phase Br becomes small in Br if its rounded weight tj is at most εr . In phase Br the rounded weight of a job of weight εr is exactly εr since (2r −r − 1)/ε0 is integer, and εr = 2r ε0 = 2r ε0 + ((2r −r − 1)/ε0 · 2r ε20 ). Thus r −r − 1)/ε0 become small, and all other medium all medium jobs with k ≤ (2 jobs remain medium. The coordinates of the output vector: The big job coordinate in the output vector would be y1 , since no medium or small jobs could become big.
Approximation Schemes for Covering and Scheduling on Related Machines
43
Now we deal with all the jobs which became small in the output, i.e. the y3 big jobs together with the medium input jobs that became small output jobs and all the small jobs which must remain small in the output. To build the component of small jobs we reestimate the total weight of small jobs. Since small jobs remain small, we initialize W = qεr where q is the integer value of the small jobs in the input node. We add to W the total sum of the rounded jobs that were medium in Br and become small in Br (their rounded weight in Br ), and also the original weight of the big jobs in Br that become small in Br . The new component q of small jobs is W /εr . Next we consider all jobs that are medium in Br . There were y2 big jobs in Br that become medium in Br . For every such job we round its weight according to Br and add one to the coordinate of its corresponding type in Br . What remains to consider is the coordinates of jobs that are medium for both Br and Br . We claim that all jobs that are rounded to one type k in Br cannot be rounded to diﬀerent types Br . Thus we add the type k coordinate of the input vector to the corresponding coordinate of the output vector. To prove the claim we note that a job of type k satisﬁes 2r ε0 + (k − 1)2r ε20 < wj ≤ 2r ε0 + k2r ε20 . Let l = r − r, in terms of εr and δr we get that 1 1 − 2l 1 1 − 2l ( + k − 1) < wj ≤ εr + δr ( + k) . ε r + δr 2 l ε0 2 l ε0 1−2l ε0 1 1−2l ( l ε0 2
1−2l ε0
l
Since
+ k − 1 and
+ k are integers, then the interval ( 21l ( 1−2 ε0 + k −
1),
+ k)) does not contain an integer and thus all these jobs are rounded l
to the type εr + δr 21l ( 1−2 ε0 + k). After we built the graph, we look for a path between a node of the ﬁrst layer in the ﬁrst phase which corresponds to the whole set of jobs, and any node in the last layer of the last phase (which means that we managed to cover all bins with the set of jobs, maybe some jobs were not used but it is possible to add them to any bin). If such path exists, the procedure answers ”yes”, and otherwise ”no”.
3
Analysis of the algorithm
In this section we prove the correctness of our algorithm and compute its complexity. Theorem 1. If a feasible cover of value T exists, then the procedure outputs a path that corresponds to a cover of at least (1 − ε)T . Otherwise, the procedure answers ”no”. Proof. We need to show that any cover of value at least T can be transformed into a path in the graph, and that a path in the graph can be transformed into a cover of at least (1 − ε)T . Assume a cover of value T . We ﬁrst transform it to a cover of a type that our algorithm is searching for. We assume that the cover of any bin is minimal,
44
Yossi Azar and Leah Epstein
otherwise we just remove jobs. Next we scan the bins by their order in the layered graph (small to large). If the j’th bin was covered by a single job, we change the cover to get another feasible cover in the following way. We consider the smallest job that is at least as large as the j’th bin, and is not used to cover a bin with a smaller index. We change the places of the two big jobs and continue the scanning. The modiﬁed cover after each change is still feasible since bin j is still covered and weight of the jobs on the larger bin may only increase. We use the ﬁnal cover to build a path in the graph. We show how to add a single edge to a path in each step. Since there is only one outgoing edge from each node of the last layer in each phase, we only need to show how to add edges between consecutive layers inside the phases, each such edge corresponds to some bin. We also assume inductively the following invariant. The weight of the small jobs in any state vector is at least the weight of the small jobs that has not been yet used in the cover (the cover for bins we already considered). Consider the j’th bin. If the bin is covered with a big job then we choose an edge that corresponds to one big job. Otherwise the bin is covered by medium jobs and small jobs. We compute the following state vector. Each medium job adds one to the appropriate coordinate of the vector. Note that rounded weight of a medium job (as interpreted in the state vector) is at least as large as its weight. We also need to provide one coordinate for the small jobs used in covering bin j. For that we divide the total weight of the small jobs in the cover of that bin by εr where r is the index of the phase and take the ﬂoor. The sum of the rounded weights of the jobs of the vector we built is at least sj − εr , and thus it is a cover vector, i.e., an edge in the j’th layer of the graph. the invariant on the small jobs remains true since the weight of the small jobs of the cover vector is less than that in the cover. Now we show that a full path in the graph is changed into a cover of value (1 − ε)T . We build the cover starting from the smallest bin (the ﬁrst edge of the path). We show how to build a cover for one bin using a cover vector. In the case that the cover vector of the edge corresponds to one big job, we add the smallest big job available to the cover. We replace a medium job of rounded weight εr + kδr by a job of weight in the interval (εr + (k − 1)δr , εr + kδr ]. Such a job must exist according to the way that the graph was built. We replace the small jobs coordinate in the following way: Let j1 , ..., jz where wj1 ≤ ... ≤ wjz be the subset of the small jobs that were not used to cover any of the bins that were already covered. Let z1 be the index 1 ≤ z1 ≤ z such that (q − 3)εr < wji ≤ (q − 2)εr 1≤i≤z1
(where q is the small jobs coordinate of the cover vector). We add the jobs j1 , ..., jz1 to the cover. We prove the following Lemma in order to show that such an index exists. Lemma 2. Consider the node in phase r on the path up to which we built the cover. Denote by W1 the total rounded weight of small jobs that were not used to cover any of the bins that are already covered. (The rounded weight of a small
Approximation Schemes for Covering and Scheduling on Related Machines
45
job is its rounded weight when it was last medium, and its real weight if it never was medium). The small jobs coordinate q of the state vector of the node satisfies the equation qεr ≤ W1 + 2εr Proof. First we show the correctness of the lemma only for the ﬁrst layer of each phase. We show the lemma by induction on the number of phase r. In the beginning of each phase there is a rounding process in which the total rounded weight of small jobs is divided by εr , and the result is rounded up. Thus in phase 0 since we round up the number W /ε0 , we added at most ε0 to the total rounded weight of the jobs. In phase r we might add by rounding extra εr . Since r 0 C\{x} is not a cover. If we know that the ﬁnal cover C is minimal w.r.t. δ, we can bound the payment ∆COST by max{δ(C)C is minimal w.r.t δ}. Deﬁne δ : X → R+ to be minimalreﬀective if 1. ∀x∈X 0 ≤ δ(X) ≤ ω(x) 2. δ(C) ≤ r · OPT(ω) for all C that are minimal w.r.t. δ. Consider the following general algorithm A:
58
Reuven BarYehuda
Algorithm A(X, f, ω) Select a minimalreﬀective δ Call algorithm B(X, f, ω − δ) to ﬁnd a cover C Removal loop: for each x ∈ C, if δ(x) > 0 and C \ {x} is a cover then C = C \ {x} Return C Theorem 8. The Extended LocalRatio Theorem If B returns a cover C s.t. (ω − δ)(C) ≤ r · OPT(ω − δ), then ω(C) ≤ r · OPT(ω). Proof. After the “removal loop”, C is still a cover, but it is also minimal w.r.t. δ, and therefore δ(C) ≤ r · OPT(δ). Hence ω(C) = (ω − δ)(C) + δ(C) ≤ r · OPT(ω − δ) + r · OPT(δ) [by the properties of B and δ] ≤ r · OPT(ω) [by the Decomposition Observation]
7
The Feedback Vertex Set Problem
Let G = (V, E) be a simple graph with weight function ω : V → R+ . A set F ⊆ V is called a Feedback Vertex Set (FVS) if G\F is a forest, i.e., for every cycle C ⊆ V, C ∩ F = φ. The FVS problem is: given a graph G = (V, E) and a weight function ω : V → R+ , ﬁnd a FVS, F , with minimum total weight. The FVS problem is NPhard [14]. Furthermore, any rapproximation for FVS implies an rapproximation with the same time complexity for the VC problem (each edge in the VC instance graph can be replaced by some cycle). This implies that a 2approximation is the best we can hope for, as long as the ratio for VC is not improved. The ﬁrst nontrivial approximation algorithm was given by BarYehuda, Geiger, Naor and Roth [7]. They present a 4approximation for unit weights and an O(log n)approximation for the general problem. Following their paper, Bafna, Berman and Fujito [2] found the ﬁrst 2approximation. They were also the ﬁrst to generalize the local ratio theorem to deal with “paying” according to a minimal cover. Their approach has helped to deepen our understanding of approximations for covering problems. Following their approach, Becker and Geiger [9] present a relatively simple 2approximation. Following all these, Chudak, Goemans, Hochbaum and Williamson [10] explained all of these algorithms in terms of the primaldual method. They also gave a new 2approximation algorithm, which is a simpliﬁcation of the Bafna et al. algorithm. Using the Extended Local Ratio theorem, we can further simplify the presentation and proof of all these three algorithms, [2], [10], [9]. Let us illustrate this for the BeckerGeiger algorithm.
One for the Price of Two: A Unified Approach
59
The main idea behind Becker and Geiger’s algorithm is the weighted graph we call a degreeweighted graph. A degreeweighted graph is a pair (G, ω) s.t. each vertex v has a weight ω(v) = d(v) > 1. Theorem 9. Every minimal FVS in a degreeweighted graph is a 2approximation. Proof. Let C be a minimal cover, and C ∗ an optimum cover. We need to prove ω(C) ≤ 2 · ω(C ∗ ). It is enough to show that ω(x) ≤ 2 · ω(x) x∈C
x∈C ∗
by deﬁnition, it is enough to show that d(x) ≤ 2 · d(x). x∈C
x∈C ∗
This is proved in [9]. A simple proof also appears in [10].
Corollary 2. If G = (V, E) is a graph with ∀v∈V d(v) > 1, and δ : V → R+ satisﬁes ∀v∈V 0 ≤ δ(v) = · d(v) ≤ ω(v) for some , then δ is 2eﬀective. Proof. We need only show that for every minimal cover C, δ(C) ≤ 2 · OPT(δ). This is immediate from Theorem 9.
In order to guarantee termination, we choose = minv∈V
ω(v) d(v) .
Algorithm BeckerGeiger (G = (V, E), ω) If G is a tree return φ If ∃x∈V d(x) ≤ 1 return BeckerGeiger(G\{x}, ω) If ∃x∈V w(x) = 0 return {x}+BeckerGeiger(G\{x}, ω) Let = minv∈V ω(v) d(v) Deﬁne δ : ∀x∈V δ(x) = · d(x) C = BeckerGeiger(G, ω − δ) Removal loop: for each x ∈ C, if δ(x) > 0 and C\{x} is a cover then C = C\{x} Theorem 10. Algorithm BeckerGeiger is a 2approximation for FVC. Proof. The algorithm terminates, since in each recursive call, at least one more vertex weight becomes zero. Therefore we can use induction. The base of induction is trivial. Let us assume inductively that the recursive call returns C s.t. (ω − δ)(C) ≤ 2 · OPT(ω − δ). Since, by Corollary 2, δ is 2eﬀective, we can use the Extended LocalRatio theorem to conclude that ω(C) ≤ 2 · OPT(ω).
60
8
Reuven BarYehuda
Generalized Steiner Forest and Related Problems
Goemans and Williamson [15] have recently presented a general approximation technique for covering cuts of vertices with edges. Their framework includes the Shortest Path, Minimumcost Spanning Tree, Minimumweight Perfect Matching, Traveling Salesman, and Generalized Steiner Forest problems. All these problems are called Constraint Forest Problems. To simplify the presentation, let us choose the Generalized Steiner Forest problem. We are given a graph G = (V, E), a weight function ω : E → R+ , and a collection of terminal sets T = {T1 , T2 , . . . , Tt }, each a subset of V . A subset of edges C ⊆ E is called a Steinercover if, for each Ti , and for every pair of terminals x, y ∈ Ti , there exists a path in C connecting x to y. The Generalized Steiner Forest problem is: given a triple (G, T, ω), ﬁnd a Steinercover C with minimum total weight ω(C). In order to get a 2eﬀective weight function, let us deﬁne an edgedegreeweighted graph. An edgedegreeweighted graph is a triple (G, T, ω) s.t. ∀e∈E ω(e) = dT (e) = {x ∈ e : ∃i x ∈ Ti } . Theorem 11. Every minimal cover in an edgedegreeweighted graph is a 2approximation. Proof. The proof is an elementary exercise, see, e.g., [16].
So now, given (G, T, ω), we can easily compute a 2eﬀective weight function δ(e) = dT (e) · for all e ∈ E, and in order to guarantee termination, we select = min{ω(e)/dT (e)dT (e) = 0}. Now we can proceed as follows: “Shrink” all pairs e = {x, y} s.t. (ω − δ)(e) = 0. Recursively, ﬁnd a minimal 2approximation Steinercover, C. Add all “shrunken” edges to the cover C. In order to guarantee the minimality property, apply the following removal loop: For each “shrunken” edge e do: if C \ {x} is a Steinercover, delete e from C
9
A Generic rApproximation Algorithm
We now present a generic rapproximation algorithm that can be used to generate all the deterministic algorithms presented in this paper. The weight function δ is called ωtight if ∃x∈X δ(x) = ω(x) > 0.
One for the Price of Two: A Unified Approach
61
Algorithm Cover (X, f, ω) If the set {x ∈ X : ω(x) = 0} is a cover then return this set. Select ωtight minimalreﬀective δ : X → R+ Recursively call Cover (X, f, ω − δ) to get a cover C Removal loop: for each x ∈ C, if δ(x) > 0 and C\{x} is a cover then C = C\{x} Theorem 12. Algorithm Cover is an rapproximation. Proof. Deﬁne X + = {x ∈ Xω(x) > 0}. Since δ is ωtight, the size of X + decreases at each recursive call. This implies that the total number of recursive calls is bounded by X. We can now prove the theorem using induction on X + . Basis: X +  = 0, hence ω(X) = 0. Step: We can consider the recursive call as the algorithm B in the Extended LocalRatio theorem, theorem 8. By the induction hypothesis, this recursive call, Cover (X, f, ω − δ), satisﬁes B’s requirement in the theorem, i.e., (ω − δ)(X) ≤ r · OPT(ω − δ). Since δ is minimalreﬀective, it remains to show that C is a minimal cover w.r.t δ. This follows from the last step of algorithm Cover.
Acknowledgment We would like to thank Yishay Rabinovitch and Joseph Naor for helpful discussions, Avigail Orni for her careful reading and suggestions, and Yvonne Sagi for typing.
References 1. A. Agrawal, P. Klein, and R. Ravi. When trees collide: an approximation algorithm for the generalized steiner problem in networks. Proc. 23rd ACM Symp. on Theory of Computing, pages 134–144, 1991. 50 2. V. Bafna, P. Berman, and T. Fujito. Constant ratio approximation of the weighted feedback vertex set problem for undirected graphs. ISAAC ’95 Algorithms and Computation, (1004):142–151, 1995. 50, 57, 58 3. R. BarYehuda and S. Even. A linear time approximation algorithm for the weighted vertex cover problem. Journal of Algorithms, 2:198–203, 1981. 52, 53 4. R. BarYehuda and S. Even. A localratio theorem for approximating the weighted vertex cover problem. Annals of Discrete Mathematics, 25:27–46, 1985. 50, 52, 53, 54 5. R. BarYehuda. A linear time 2approximation algorithm for the min cliquecomplement problem. Technical Report CS0933, Technion Haifa, May 1998. 50 6. R. BarYehuda. Partial vertex cover problem and its generalizations. Technical Report CS0934, Technion Haifa, May 1998. 50 7. R. BarYehuda, D. Geiger, J. Naor, and R. Roth. Approximation algorithms for the vertex feedback set problem with applications to constraint satisfaction and bayesian inference. Accepted to SIAM J. on Computing, 1997. 58
62
Reuven BarYehuda
8. R. BarYehuda and D. Rawitz. Generalized algorithms for bounded integer programs with two variables per constraint. Technical Report CS0935, Technion Haifa, May 1998. 50 9. A. Becker and D. Geiger. Approximation algorithms for the loop cutset problem. Proc. 10th Conf. on Uncertainty in Artificial Intelligence, pages 60–68, 1994. 50, 58, 59 10. F. Chudak, M. Goemans, D. Hochbaum, and D. Williamson. A primaldual interpretation of recent 2approximation algorithms for the feedback vertex set problem in undirected graphs. Unpublished, 1996. 50, 58, 59 11. V. Chvatal. A greedy heuristic for the setcovering problem. Math. of Oper. Res., 4(3):233–235, 1979. 50, 56 12. K. Clarkson. A modification of the greedy algorithm for the vertex cover. Info. Proc. Lett., 16:23–25, 1983. 53 13. T. Fujito. A unified local ratio approximation of nodedeletion problems. ESA, Barcelona, Spain, pages 167–178, September 1996. 50 14. M. Garey and D. Johnson. Computers and Intractability. W.H. Freeman, 1979. 52, 58 15. M. Goemans and D. Williamson. A general approximation technique for constrained forest problems. SIAM Journal on Computing, 24(2):296–317, 1995. 50, 60 16. M. Goemans and D. Williamson. The primaldual method for approximation algorithms and its application to network design problems. Approximation Algorithms for NPHard Problems, 4, 1996. 60 17. D. Hochbaum. Approximating covering and packing problems: Set cover, vertex cover, independent set, and related problems. Chapter 3 in Approximation Algorithms for NPHard Problems, PWS Publication Company, 1997. 49 18. G. Nemhauser and J. L.E. Trotter. Vertex packings: structural properties and algorithms. Mathematical Programming, 8:232–248, 1975. 52 19. V. T. Paschos. A survey of approximately optimal solutions to some covering and packing problems. ACM Computing Surveys, 29(2):171–209, June 1997. 49 20. L. Pitt. Simple probabilistic approximation algorithm for the vertex cover problem. Technical Report, Yale, June 1984. 56 21. D. Williamson, M. Goemans, M. Mihail, and V. Vazirani. A primaldual approximation algorithm for generalized steiner network problems. Combinatorica, 15:435– 454, 1995. 50
Approximation of Geometric Dispersion Problems (Extended Abstract)
Christoph Baur and S´ andor P. Fekete Center for Parallel Computing, Universit¨ at zu K¨ oln, D–50923 K¨ oln, Germany {baur,fekete}@zpr.unikoeln.de
Abstract. We consider problems of distributing a number of points within a connected polygonal domain P , such that the points are “far away” from each other. Problems of this type have been considered before for the case where the possible locations form a discrete set. Dispersion problems are closely related to packing problems. While Hochbaum and Maass (1985) have given a polynomial time approximation scheme for packing, we show that geometric dispersion problems cannot be approximated arbitrarily well in polynomial time, unless P=NP. We give a 23 approximation algorithm for one version of the geometric dispersion problem. This algorithm is strongly polynomial in the size of the input, i. e., its running time does not depend on the area of P . We also discuss extensions and open problems.
1
Introduction: Geometric Packing Problems
In the following, we give an overview over geometric packing. Problems of this type are closely related to geometric dispersion problems, which are described in Section 2. Twodimensional packing problems arise in many industrial applications. As two–dimensional cutting stock problems, they occur whenever steel, glass, wood, or textile materials are cut. There are also many other problems that can be modeled as packing problems, like the optimal layout of chips in VLSI, machine scheduling, or optimizing the layout of advertisements in newspapers. When considering the problem of ﬁnding the best way to pack a set of objects into a given domain, there are several objectives that can be pursued: We can try to maximize the value of a subset of the objects that can be packed and consider knapsack problems; we can try to minimize the number of containers that are used and deal with bin packing problems, or try to minimize the area that is used – in strip packing problems, this is done for the scenario where the domain is a strip with ﬁxed width and variable length that is to be kept small. All of these problems are NPhard in the strong sense, since they contain the onedimensional bin packing problem as a special case. However, there are
This work was supported by the German Federal Ministry of Education, Science, Research and Technology (BMBF, F¨ orderkennzeichen 01 IR 411 C7).
Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 63–75, 1998. c SpringerVerlag Berlin Heidelberg 1998
64
Christoph Baur and S´ andor P. Fekete
some important diﬀerences between the one and the twodimensional instances; and while there are many algorithms for onedimensional packing problems that work well in practice (currently, benchmark instances of the onedimensional knapsack problem with up to 250,000 objects can be solved optimally, see [31]), until recently, the largest solved benchmark instance of the twodimensional orthogonal knapsack problem (i. e., packing rectangles into a rectangular container) had no more than 23 objects (see [3,22]). One of the diﬃculties in two dimensions arises from the fact that an appropriate way of modeling packings is not easy to ﬁnd; this is highlighted by the fact that the feasible space cannot be assumed to be convex. (Even if the original domain is convex, the remaining feasible space will usually lose this property after a single object is placed in the domain.) This makes it impossible to use standard methods of combinatorial optimization without additional insights. For an overview over heuristic and exact packing methods, see [40]. See [11,12,13,14,38] for a recent approach that uses a combination of geometric and graphtheoretic properties for characterizing packings of rectangles and constructing relatively fast exact algorithms. Kenyon and Remila [24] give an “asymptotic” polynomial time approximation scheme for the strip packing problem, using the additional assumption that the size of the packed objects is insigniﬁcant in comparison to the total strip length. (In this context, see also [1].) There are several other sources of diﬃculties of packing in two dimensions: the shape of the objects may be complicated (see [26] for an example from the clothing industry), or the domain of packing may be complicated. In this paper, we will deal with problems related to packing objects of simple shape (i. e., identical squares) into a polygonal domain: a connected region, possibly with holes, that has a boundary consisting of a total of n line segments, and the same number of vertices. It should be noted that even when the structure of domain and objects are not complicated, only little is known – see the papers by Graham, Lubachevsky, and others [16,19,20,21,27,28,29] for packing identical disks into a strip, a square, a circle, or an equilateral triangle. Also, see Nelißen [34] for an overview of the socalled pallet loading problem, where we have to pack identical rectangles into a larger rectangle; it is still unclear whether this problem belongs to the class NP, since there may not be an optimal solution that can be described in polynomial time. The following decision problem was shown to be NPcomplete by Fowler et al. [15]; here and throughout the paper an Lsquare is a rectangle of size L × L, and the number of vertices of a polygonal domain includes the vertices of all the holes it may have. Pack(k, L): Input: a polygonal domain P with n vertices, a parameter k, a parameter L. Question: Can k many Lsquares be packed into P ? Pack(k, L) is the decision problem for the following optimization problem:
Approximation of Geometric Dispersion Problems
65
maxk Pack(L): Input: a polygonal domain P with n vertices Task: Pack k many Lsquares into P , such that k is as big as possible. It was shown by Hochbaum and Maass [23] that maxk Pack(L) allows a polynomial time approximation scheme. The main contents of this paper is to examine several versions of the closely related problem maxL Pack(k): Input: a polygonal domain P with n vertices Task: Pack k many L × L squares into P , such that L is as big as possible.
2
Preliminaries: Dispersion Problems
The problem maxL Pack(k) is a particular geometric dispersion problem. Problems of this type arise whenever the goal is to determine a set of positions, such that the objects are “far away” from each other. Examples for practical motivations are the location of oil storage tanks, ammunition dumps, nuclear power plants, hazardous waste sites – see the paper by Rosenkrantz, Tayi, and Ravi [36], who give a good overview, including the papers [6,7,9,10,18,30,32,35,39]. All these papers consider discrete sets of possible locations, so the problem can be considered as a generalized independent set problem in a graph. Special cases have been considered – see [5,6]. However, for these discrete versions, the stated geometric diﬃculties do not come into play. In the following, we consider geometric versions, where the set of possible locations is given by a polygonal domain. We show the close connection to the packing problem and the polynomial approximation scheme by Hochbaum and Maass [23], but also a crucial diﬀerence: in general, if P=NP, it cannot be expected that the geometric dispersion problem can be approximated arbitrarily well. When placing objects into a polygonal domain, we consider the following problem, where d(v, w) is the geodesic distance between v and w: max
min d(v, w).
S⊂P,S=k v,w∈S
This version corresponds to the dispersion problems in the discrete case and will be called pure dispersion. In a geometric setting, we may not only have to deal with distances between locations; the distance of the dispersed locations to the boundary of the domain can also come into play. This yields the problem max
min {d(v, w), d(v, ∂P )},
S⊂P,S=k v,w∈S
where ∂P denotes the boundary of the domain P . This version will be called dispersion with boundaries. Finally, we may consider a generalization of the problem maxL Pack(k), which looks like a mixture of both previous variants:
66
Christoph Baur and S´ andor P. Fekete
max
min {2d(v, w), d(v, ∂P )}.
S⊂P,S=k v,w∈S
Since this corresponds to packing k many dballs of maximum size into P , this variant is called dispersional packing. It is also possible to consider other objective functions. Maximizing the average distance instead of the minimum distance can be shown to lead to a onedimensional problem for pure dispersion (all points have to lie on the boundary of the convex hull of P ). Details are omitted from this abstract. Several distance functions can be considered for d(v, w); the most natural ones are L2 distances and L1 or L∞ distances. In the following, we concentrate on rectilinear, i. e., L∞ distances. This means that we will consider packing squares with edges parallel to the coordinate axes. Most of the ideas carry over for L2 distances by combining our ideas with the techniques by Hochbaum and Maass [23], and Fowler et al. [15]: again, it is possible to establish upper bounds on approximation factors, and get a factor 12 by a simple greedy approach. Details are omitted from this abstract. We concentrate on the most interesting case of dispersion with boundaries, and only summarize the results for pure dispersion and dispersional packing; it is not hard to see that these variants are related via shrinking or expanding the domain P in an appropriate manner. See the full version of this paper or [2] for details. The rest of this paper is organized as follows: In Section 3, we show that geometric dispersion with boundaries cannot be approximated arbitrarily well within polynomial time, unless P=NP; this result is valid, even if the polygonal domain has only axisparallel edges, and distances are measured by the L∞ metric. In Section 4, we give a strongly polynomial algorithm that approximates this case of geometric dispersion within a factor of 23 of the optimum.
3
An upper bound on approximation factors
In this section, we give a sketch of an NPcompleteness proof for geometric dispersion. Basically, we proceed along the lines of Fowler et al. [15], combined with the result by Lichtenstein [17,25] about the NPcompleteness of Planar 3SAT. We then argue that our proof implies an upper bound on approximation factors. In this abstract, we concentrate on the case of geometric dispersion with boundaries. In all ﬁgures, the boundaries correspond to the original boundaries of P , the interior is shaded in two colors. The lighter one corresponds to the part of the domain that is lost when shrinking P to accommodate for half of the considered distance L∗ = d(v, ∂P ). The remaining dark region is the part that ∗ is feasible for packing L2 squares. Theorem 1. Unless P=NP, there is no polynomial algorithm that finds a solution within more than 13 14 of the optimum for rectilinear geometric dispersion with boundaries, even if the polygonal domain has only axisparallel edges.
Approximation of Geometric Dispersion Problems
67
Sketch: We give a reduction of Planar 3SAT. A 3SAT instance I is said to be an instance of Planar 3SAT, if the following bipartite graph GI is planar: Every variable and every clause in I is represented by a vertex in GI ; two vertices are connected, if and only if one of them represents a variable that appears in the clause that is represented by the other vertex. See Figure 1 for an example. x1 x2 x3 x4
c1 c2 c3
111 000 111 000
Fig. 1. The graph GI representing the Planar 3SAT instance (x1 ∨ x2 ∨ x3 ) ∧ (¯ x1 ∨ x¯3 ∨ x4 ) ∧ (¯ x2 ∨ x3 ∨ x ¯4 ) Proposition 2 (Lichtenstein) Planar 3SAT is NPcomplete. As a ﬁrst step, we construct an appropriate planar layout of the graph GI by using the methods of Duchet et al. [8], or Rosenstiehl and Tarjan [37]. Note that these algorithms produce layouts with all coordinates linear in the number of vertices of GI . Next, we proceed to represent variables, clauses, and connecting edges by suitable polygonal pieces. See Figure 2 for the construction of variable components.
True
False
True
False
Fig. 2. A variable component for dispersion with boundaries (top), a placement corresponding to “true” (center), and a placement corresponding to “false” (bottom) The variable components are constructed in a way that allows basically two ways of dispersing a speciﬁc number of locations. One of them corresponds to a setting of “true”, the other to a setting of “false”. Depending on the truth setting, the adjacent connector components will have their squares pushed out or not. See Figure 5 (bottom) for the design of the connector components. The construction of the clause components is shown in Figure 3: connector components from three variables (each with the appropriate truth setting) meet in such a way that there is a receptor region of “L” shape into which additional squares can be packed. Any literal that does not satisfy the clause forces one of
68
Christoph Baur and S´ andor P. Fekete
the three corners of the L to be intersected by a square of the connector. Three additional squares can be packed if and only if one corner is not intersected, i. e., if the clause is satisﬁed. From the above components, it is straightforward to compute the parameter k, the number of locations that are to be dispersed by a distance of 2. k is polynomial in the number of vertices of GI and part of the input for the dispersion problem. All vertices of the resulting P have integer coordinates of small size, their number is polynomial in the number of vertices of GI .
00000000 11111111 000 111 00000000 11111111 000 111 00000000 11111111 00000000 11111111 00000000 11111111 000 111 00 11 00000000 11111111 000 111 00 11 00000000 11111111 000 111 00 11
1111 0000 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111
0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111
(c)
(b)
(a)
Fig. 3. A clause component for dispersion with boundaries and its receptor region (a), a placement corresponding to “true” (b), and a placement corresponding to “false” (c)
This shows that the problem is NPhard. Now we need to argue that there cannot be a solution within more than 13 14 of the optimum, if the Planar 3SAT instance cannot be satisﬁed.
True
False
2
True
False
2−2α
s=11
s=11 + 2α
Fig. 4. An upper bound on the approximation factor: variable components for 2squares (left) and (2 − 2α)squares (right)
See Figure 4 (top) for the variable components. Indicated is a critical distance of s = 11. We show that it is impossible to pack an additional square into this section, even by locally changing the truth setting of a variable. Now suppose there was an approximation factor of 1 − α. This increases the feasible domain for packing squares by a width of 2α, and it decreases the size of these squares to 1 , then s+1 2 − 2α. If α < s+3 2 (2 − 2α) > s + 2α, implying that it is impossible to s+1 place more than 2 squares within the indicated part of the component. Similar arguments can be made for all other parts of the construction – see Figure 5. (Details are contained in the full version of the paper.) This shows that it is impossible to make local improvements in the packing to account for unsatisﬁed clauses, implying that we basically get the same solutions for value 2 − 2α as for 1 . value 2, as long as α < 14 Along the same lines, we can show the following:
Approximation of Geometric Dispersion Problems
s=7
69
s=9
(b)
(a)
Fig. 5. An upper bound on the approximation factor: clause components (a) and connector components (b)
Theorem 3. Unless P=NP, there is no polynomial algorithm that can guarantee a solution within more than 78 of the optimum for pure geometric dispersion with L∞ distances or for dispersional packing, even if the domain has only axisparallel edges. Details are omitted from this abstract. We note that this bound can be lowered to 12 if we do not require P to be a nondegenerate connected domain – see Figure 6 for the general idea. Further technical details are contained in the full version of the paper. It should be noted that the problem of covering a discrete point set, instead of “packing” into it, is well studied in the context of clustering – see the overview by Bern and Eppstein [4]. True
False
True
False
(a)
(b)
Fig. 6. An upper bound of 12 on the approximation factor, if the domain P may be degenerate and disconnected – variable components (a) and clause components (b)
4
A
2 3
approximation algorithm
In this section, we describe an approximation algorithm for geometric dispersion with axisparallel boundaries in the case of L∞ distances. We show that we can achieve an approximation factor of 23 . We use the following notation: Definition 4 The horizontal αneighborhood of a d square Q is a rectangle of size ((d + α) × d) with the same center as Q. For a polygonal domain P and a distance r, P − r is the polygonal domain {p ∈ P  d(p, ∂P ) ≥ r}, obtained by shrinking P . Similarly, P + r is the domain {p ∈ IR2  d(p, P ) ≤ r}, obtained by expanding P . Note that P + r is a polygonal domain for rectilinear distances. P ar(P ) := { (ei , ej )  ei  ej ; ei , ej ∈ E(P )} is the set of all pairs of parallel edges of P . Dist(ei , ej ) (for (ei , ej ) ∈ P ar(P )) is the distance of the edges ei and ej . With AS(P, d, l), we call the approximation scheme by Hochbaum and Maass
70
Christoph Baur and S´ andor P. Fekete
for maxk Pack(L), where P is the feasible domain, d is the size of the squares, and l is the width of the strips, guaranteeing that the number of packed squares 2 is at least within a factor of l−1 of the optimum. l Note that the approximation scheme AS(P, d, l) can be modiﬁed for axisparallel boundaries, such that the resulting algorithms are strongly polynomial: If the number of squares that can be packed is not polynomial in the number n of vertices of P , then there must be two “long” parallel edges. These can be shortened by cutting out a “large” rectangle, which can be dealt with easily. This procedure can be repeated until all edges are of length polynomially bounded in n. (Details are contained in the full version of the paper. Also, see [2,40].) The idea of the algorithm is the following: Use binary search over the size d of the squares in combination with the approximation scheme by Hochbaum and Maas for maxk Pack(L) in order to ﬁnd the largest size d of squares where the approximation scheme guarantees a packing of k many dsquares into the domain P − d2 , with the optimum number of dsquares guaranteed to be strictly less than 3k 2 . Then the following crucial lemma guarantees that it is impossible 3d 2 to pack k squares of size at least 3d 2 into P − 4 , implying a 3 approximation algorithm. Lemma 5 Let P be a polygonal domain, such that k many 3d 2 squares can be 3 . Then at least k many dsquares can be packed into P −d/2. packed into P − 3d 4 2 Proof. Consider a packing of k many Clearly, we have: (P −
3d 2 squares
into P − 3d 4 .
d 3d ) + ⊆ P −d/2. 4 4
(1)
For constructing a packing of dsquares, it suﬃces to consider the domain 3d that is covered by the 3d 2 squares instead of P − 4 . After expanding this domain by d4 , we get a subset of P −d/2 by (1). In the following, we construct a packing of dsquares. At any stage, the following Observation 6 is valid. Observation 6 Suppose the feasible space for packing dsquares contains the horizontal d4 neighborhoods of a set of disjoint 3d 2 squares. Then there exists a 3d square Q that has leftmost position among all remaining squares, i. e., to 2 d the left of Q, the horizontal 4 neighborhood of Q does not overlap the horizontal d 3d 4 neighborhood of any other 2 square. 3d While there are 3d 2 squares left, consider a leftmost 2 square Q. We distinguish cases, depending on the relative position of Q with respect to other remaining 3d 2 squares. See Figure 7. Details are omitted from this abstract for lack of space. At any stage, a set of one, two, or three 32 dsquares that includes a leftmost 32 dsquare is replaced by a set of two, three, or ﬁve dsquares This iteration is performed while there are 32 dsquares left. It follows that we can pack at least 32 k many dsquares into P − d2 .
Approximation of Geometric Dispersion Problems
71
x2
3d/4 d/2 d/4 0 d/4 d/2 3d/4
Q 0000 1111 111 000 000 111 0000 1111 000 111 0000 1111 0000 1111 000 111 000 0000 111 1111
111 000 000 111 000 111 Q 000 111 000 111 000 111 000 111 0000 1111 0000 1111 000 111 0000 1111 0000111 1111 000 0000 1111 0000 1111 000 111 0000 1111 1111 0000 000 0000 1111 1111 0000111 000 111 000 111 000 111 000 111 Q1 000 111
Q 1111 0000 0000 1111 0000 1111 0000 1111 0000 1111 0000 1111 0000 0000 1111 1111 0000 1111 0000 0000 1111 1111 0000 1111 0000 1111 0000 1111 0000 1111
x1
0
(a)
Q2
Q2
(b)
3d/4 d/4 d/2 0 d/4 d/2 3d/4
Q1
(c)
Fig. 7. Constructing a packing of dsquares
In the following, we give a formal description of the binary search algorithm, and argue why it is possible to terminate the binary search in polynomial time. Algorithm 7 Input: polygonal domain P , positive integer k. Output: ADis (P, k) := d is the minimum L∞ distance between a location and the boundary or between two locations. 1. For all (ei , ej ) ∈ P ar(P ) do 2. While dij undetermined, perform binary search as follows: (a) smax := k + 1 and smin := 2 and dmax := 23 Dist(ei , ej )/(smax ) and dmin := 23 Dist(ei , ej )/(smin ). (b) If AS(P −dmax /2 , dmax , 6) < k then dij = 0. (c) If AS(P −dmin /2 , dmin , 6) ≥ k then dij := 23 Dist(ei , ej ). (d) While smax > smin + 1 do (e) s := (smax + smin )/2 and d := 23 Dist(ei , ej )/s. (f ) If AS(P −d/2, d, 6) ≥ k then smax := s. (g) Else smin := s. (h) dij := d. 3. Output d := max{dij  (ei , ej ) ∈ P ar(P )} and exit. Theorem 8. For rectilinear geometric dispersion with boundaries of k locations in a polygonal domain P with axisparallel boundaries and n vertices, Algorithm 7 computes a solution ADis (P, k), such that ADis (P, k) ≥
2 OP T (P, k). 3
The running time is strongly polynomial. Proof. It is not hard to see that there are only ﬁnitely many values for the optimal value between the k points. More precisely, we can show that for the optimal distance dopt , the following holds: There is a pair of edges (ei , ej ) ∈ P ar(P ), such that dopt =
Dist(ei , ej ) sij
for some 2 ≤ sij ≤ k + 1.
(2)
72
Christoph Baur and S´ andor P. Fekete
In order to determine an optimal solution, we only need to consider values that satisfy Equation (2). For every pair of parallel edges of P , there are only k possible values for an optimal distance of points. Thus, there can be at most O(n2 k) many values that need to be considered. We proceed to show that the algorithm guarantees an approximation factor of 23 . By binary search, the algorithm determines for every pair of edges (ei , ej ) ∈ P ar(P ) of P a dij with the following properties: = Dist(ei , ej )/sij (2 ≤ sij ≤ k + 1) is a possible optimal value for the distance of k points that have to be dispersed in P . 2. Using the approximation scheme [23], at least k many dij squares can be packed into P −dij /2, with dij = Dist(ei , ej )/(sij ). 3. If sij > 2, then for d˜ij := 23 Dist(ei , ej )/(sij − 1), we cannot pack k many d˜ij squares into P − d˜ij /2 with the help of the approximation scheme. 1.
3 2 dij
Property 1 follows from (2), Properties 2 and 3 hold as a result of the binary search. From Lemma 5, we know that at least 32 k many 23 dopt squares can be packed into P − 13 dopt , since k many dopt squares can be packed into P −dopt /2. Let kopt (P− 13 dopt , 23 dopt ) be the optimal number of 23 dopt squares that can be packed into P − 13 dopt . With the parameter l = 6, the approximation scheme [23] guarantees an approximation factor of ( 56 )2 . This implies: 2 6 1 2 AS(P − dopt , dopt , 6) 5 3 3 1 3 2 < AS(P − dopt , dopt , 6). 2 3 3
1 2 kopt (P − dopt , dopt ) ≤ 3 3
It follows that 3 1 2 1 2 3 AS(P − dopt , dopt , 6) > kopt (P − dopt , dopt ) ≥ k 2 3 3 3 3 2 This means that at least k squares are packed when the approximation scheme is called with a value of at most 23 dopt . For d˜ij this means that d˜ij > 23 dopt and therefore 32 d˜ij = Dist(ei , ej )/(sdij + 1) > dopt . Hence, for every pair (ei , ej ) ∈ P ar(P ) of edges, the algorithm determines a value dij that satisﬁes 32 dij = Dist(ei , ej )/sdij and is a potential optimal value, and the next larger potential value is strictly larger than the optimal value. The algorithm returns the d with d = max{dij  (ei , ej ) ∈ P ar(P )}. Therefore, 32 d ≥ dopt , implying ADis (P, k) = d ≥ proving the approximation factor.
2 2 dopt = OP T (P, k), 3 3
Approximation of Geometric Dispersion Problems
73
The total running time is O(log k · n40 ). Note that the strongly polynomial 2 modiﬁed version of the approximation scheme [23] takes O(l2 · n2 · nl ), i. e., 38 O(n ) with l = 6. For the case of general polygonal domains, where the boundaries of the domain are not necessarily axisparallel, Lemma 5 is still valid. In the full version of the paper, we discuss approximation for this more general case. Without further details, we mention Theorem 9. Pure geometric dispersion and dispersional packing can be approximated within a factor of 12 in (strongly) polynomial time. These factors can be achieved without use of the approximation scheme via a straightforward greedy strategy; the approximation factor follows from the fact that any packing of k 2dballs guarantees a packing of 2k many dballs, and a greedy packing guarantees a 12 approximation for maxk Pack(L).
5
Conclusions
We have presented upper and lower bounds for approximating geometric dispersion problems. In the most interesting case of a nondegenerate, connected domain, these bounds still leave a gap; we believe that the upper bounds can be improved. It would be very interesting if some of the lower bounds of 12 could be improved. If we assume that the area of P is large, it is not very hard to see that an optimal solution can be approximated much better. It should be possible to give some quantiﬁcation along the lines of an asymptotic polynomial time approximation scheme. It is clear from our above results that similar upper and lower bounds can be established for L2 distances. Like for packing problems, there are many possible variants and extensions. One of the interesting special cases arises from considering a simple polygon, i. e., a polygonal region without holes. The complexity of this problem is unknown, even if the simple polygon is rectilinear, i. e., all its edges are axisparallel. Conjecture 10 The problem Pack(k, L) for Li nf ty distances is polynomial for the class of simple polygons P .
Acknowledgments The second author would like to thank Joe Mitchell, Estie Arkin, and Steve Skiena for discussions at the Stony Brook Computational Geometry Problem Seminar [33], which gave some initial motivation for this research. We thank J¨ org Schepers, Joe Mitchell, and the anonymous referees for helpful comments.
74
Christoph Baur and S´ andor P. Fekete
References 1. B. S. Baker, D. J. Brown and H. K. Katseﬀ. A 5/4 algorithm for twodimensional packing, Journal of Algorithms, 2, 1981, 348–368. 64 2. Christoph Baur. Packungs und Dispersionsprobleme. Diplomarbeit, Mathematisches Institut, Universit¨ at zu K¨ oln, 1997. 66, 70 3. J. E. Beasley. An exact two–dimensional nonguillotine cutting tree search procedure, Operations Research, 33, 1985, 49–64. 64 4. M. Bern and D. Eppstein. Clustering. Section 8.5 of the chapter Approximation algorithms for geometric problems, in: D. Hochbaum (ed.): Approximation Algorithms for NPhard Problems. PWS Publishing, 1996. 69 5. B. K. Bhattacharya and M. E. Houle. Generalized maximum independent set for trees. To appear in: Journal of Graph Algorithms and Applications, 1997.
[email protected] 65 6. R. Chandrasekaran and A. Daughety. Location on tree networks: pcentre and ndispersion problems. Mathematics of Operations Research, 6, 1981, 50–57. 65 7. R. L. Church and R. S. Garﬁnkel. Locating an obnoxious facility on a network. Transportation Science, 12, 1978, 107–118. 65 8. P. Duchet, Y. Hamidoune, M. Las Vergnas, and H. Meyniel. Representing a planar graph by vertical lines joining diﬀerent levels. Discrete Mathematics, 46, 1983, 319–321. 67 9. E. Erkut. The discrete p–dispersion problem. European Journal of Operational Research, 46, 1990, 48–60. 65 10. E. Erkut and S. Neumann. Comparison of four models for dispersing facilities. European Journal of Operations Research, 40, 1989, 275–291. 65 11. S. P. Fekete and J. Schepers. A new exact algorithm for general orthogonal ddimensional knapsack problems. Algorithms – ESA ’97, Springer Lecture Notes in Computer Science, vol. 1284, 1997, 144–156. 64 12. S. P. Fekete and J. Schepers. On moredimensional packing I: Modeling. Technical report, ZPR 97288. Available at http://www.zpr.unikoeln.de/~paper 64 13. S. P. Fekete and J. Schepers. On moredimensional packing II: Bounds. Technical report, ZPR 97289. Available at http://www.zpr.unikoeln.de/~paper 64 14. S. P. Fekete and J. Schepers. On moredimensional packing III: Exact Algorithms. Technical report, ZPR 97290. Available at http://www.zpr.unikoeln.de/ ~paper 64 15. R. J. Fowler, M. S. Paterson, and S. L. Tanimoto. Optimal packing and covering in the plane are NP–complete. Information Processing Letters, 12, 1981, 133–137. 64, 66 16. Z. F¨ uredi. The densest packing of equal circles into a parallel strip. Discrete & Computational Geometry, 1991, 95–106. 64 17. M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the theory of NP–Completeness. W. H. Freeman and Company, San Francisco, 1979. 66 18. A. J. Goldmann and P. M. Dearing. Concepts of optimal locations for partially noxious facilities. Bulletin of the Operational Research Society of America. 23, B85, 1975. 65 19. R. L. Graham and B. D. Lubachevsky. Dense packings of equal disks in an equilateral triangle: from 22 to 34 and beyond. The Electronic Journal of Combinatorics, 2, 1995, #A1. 64
Approximation of Geometric Dispersion Problems
75
20. R. L. Graham and B. D. Lubachevsky. Repeated patterns of dense packings of equal disks in a square. The Electronic Journal of Combinatorics 3, 1996, #R16. 64 ¨ 21. R. L. Graham, B. D. Lubachevsky, K. J. Nurmela, and P. R. J. Osterg˚ ard. Dense packings of congruent circles in a circle. Manuscript, 1996.
[email protected] 64 22. E. Hadjiconstantinou and N. Christoﬁdes. An exact algorithm for general, orthogonal, two–dimensional knapsack problems, European Journal of Operations Research, 83, 1995, 39–56. 64 23. D. S. Hochbaum and W. Maass. Approximation schemes for covering and packing problems in image processing and VLSI. Journal of the ACM, 32, 1985, 130–136. 65, 66, 72, 73 24. C. Kenyon and E. Remila, Approximate strip packing. Proc. of the 37th Annual Symposium on Foundations of Computer Science (FOCS 96), 142–154. 64 25. D. Lichtenstein. Planar formulae and their uses. SIAM Journal on Computing, 11, 1982, 329–343. 66 26. Z. Li and V. Milenkovic. A compaction algorithm for nonconvex polygons and its application. Proc. of the Ninth Annual Symposium on Computational Geometry, 1993, 153–162. 64 27. B. D. Lubachevsky and R. L. Graham. Curved hexagonal packings of equal disks in a circle. Manuscript.
[email protected] 64 28. B. D. Lubachevsky, R. L. Graham, and F. H. Stillinger. Patterns and structures in disk packings. 3rd Geometry Festival, Budapest, Hungary, 1996. Manuscript.
[email protected] 64 29. C. D. Maranas, C. A. Floudas, and P. M. Pardalos. New results in the packing of equal circles in a square. Discrete Mathematics 142, 1995, 287–293. 64 30. M. V. Marathe, H. Breu, H. B. Hunt III, S. S. Ravi, and D. J. Rosenkrantz. Simple heuristics for unit disk graphs. Networks, 25, 1995, 59–68. 65 31. S. Martello and P. Toth, Knapsack Problems – Algorithms and Computer Implementations, Wiley, Chichester, 1990. 64 32. I. D. Moon and A. J. Goldman. Tree location problems with minimum separation. Transactions of the Institute of Industrial Engineers, 21, 1989, 230–240. 65 33. J. S. B. Mitchell, Y. Lin, E. Arkin, and S. Skiena. Stony Brook Computational Geometry Problem Seminar. Manuscript.
[email protected] 73 34. J. Nelißen. New approaches to the pallet loading problem. Technical Report, RWTH Aachen, Lehrstuhl f¨ ur Angewandte Mathematik, 1993. 64 35. S. S. Ravi, D. J. Rosenkrantz, and G. K. Tayi. Heuristic and special case algorithms for dispersion problems. Operations Research, 42, 1994, 299–310. 65 36. D. J. Rosenkrantz, G. K. Tayi, and S. S. Ravi. Capacitated facility dispersion problems. Manuscript, submitted for publication, 1997.
[email protected] 65 37. P. Rosenstiehl and R. E. Tarjan. Rectilinear planar layouts and bipolar orientations of planar graphs. Discrete & Computational Geometry, 1, 1986, 343–353. 67 38. J. Schepers. Exakte Algorithmen f¨ ur orthogonale Packungsprobleme. Dissertation, Mathematisches Institut, Universit¨ at zu K¨ oln, 1997. 64 39. A. Tamir. Obnoxious facility location on graphs. SIAM Journal on Discrete Mathematics, 4, 1991, 550–567. 65 40. M. Wottawa. Struktur und algorithmische Behandlung von praxisorientierten dreidimensionalen Packungsproblemen. Dissertation, Mathematisches Institut, Universit¨ at zu K¨ oln, 1996. 64, 70
Approximating koutconnected Subgraph Problems Joseph Cheriyan1 , Tibor Jord´ an2 , and Zeev Nutov1 1
Department of Combinatorics and Optimization, University of Waterloo, Waterloo, Ontario, Canada N2L 3G1, {jcheriyan,znutov}@math.uwaterloo.ca 2 Institut for Matematik og Datalogi, Odense Universitet, Odense, Denmark,
[email protected] Abstract. We present approximation algorithms and structural results for problems in network design. We give improved approximation algorithms for ﬁnding mincost koutconnected graphs with either a single root or multiple roots for (i) uniform costs, and (ii) metric costs. The improvements are obtained by focusing on singleroot koutconnected graphs and proving (i) a version of Mader’s critical cycle theorem and (ii) an extension of a splitting oﬀ theorem by Bienstock et al.
1
Introduction
We study some NPhard problems from the area of network design. We are interested in approximation algorithms as well as structural results, and we use new structural results to obtain improved approximation guarantees. A basic problem in network design is to ﬁnd a mincost kconnected spanning subgraph. (In this paper kconnectivity refers to knode connectivity.) The problem is NPhard, and there is an O(log k)approximation algorithm due to [13]. A generalization is to ﬁnd a mincost subgraph that has at least kvw openly disjoint paths between every node pair v, w, where [kvw ] is a prespeciﬁed “connectivity requirements” matrix. No polylogarithmic approximation algorithm for this problem is known. For the special case when each kvw is in {0, 1, 2}, [13] gives a 3approximation algorithm. The mincost koutconnected subgraph problem is “sandwiched” between the basic problem and the general problem. There are two versions of the problem. In the singleroot version, there is a root node r, and the connectivity requirement is krv = k, for all nodes v (kvw = 0 if v = r and w = r). This problem is NPhard, even for k = 2 and uniform costs. (To see this, note that a 2outconnected subgraph of a graph G has ≤ V (G) edges iﬀ G has a Hamiltonian cycle.) In the multiroot version, there are q ≥ 1 root nodes r1 , . . . , rq , and the connectivity requirement is kri v = ki for i = 1, . . . , q and for all nodes v; note that the connectivity requirements k1 , . . . , kq of the roots r1 , . . . , rq may be distinct. Consider a directed variant of the singleroot problem: given a digraph with a speciﬁed root node r, ﬁnd a mincost subdigraph that contains k openly disjoint r→v directed paths for all nodes v. A polynomialtime algorithm for ﬁnding an optimal solution to this digraph problem is given Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 77–88, 1998. c SpringerVerlag Berlin Heidelberg 1998
78
Joseph Cheriyan et al.
in [4]. Based on this, [9] gives a 2approximation algorithm for the undirected singleroot problem. For the multiroot problem, a 2qapproximation algorithm follows by sequentially applying the 2approximation algorithm of [9] to each of the roots r1 , . . . , rq . To the best of our knowledge, no better approximation guarantees were known even for uniform costs (i.e., the minsize koutconnected subgraph problem) and for metric costs (i.e., edge costs satisfying the triangle inequality). There has been extensive recent research on approximation algorithms for NPhard network design problems with uniform costs and with metric costs, see the survey in [8] and see [1,3,5,9], etc. For the uniform cost multiroot prob} (this lem, we improve the approximation guarantee from 2q to min{2, k+2q−1 k implies a 1 + k1 approximation algorithm for the uniform cost singleroot problem), and for the metric cost multiroot problem, we improve the approximation guarantee from 2q to 4 (in fact, to 3 + kkms , where km and ks are the largest and the second largest requirements, respectively). The multiroot problem appears to have been introduced in [12], and for some special cases with max{ki  i = 1, . . . , q} ≤ 3, approximation guarantees better than 2q are derived in [12]. An application of the multiroot problem to “mobile robot ﬂow networks” is described in [12]. We skip the applications in this paper. Our results on minsize koutconnected subgraphs are based on a new structural result that extends a result of Mader [10]. Mader’s theorem (see Theorem 2) states that in a knode connected graph, a cycle of critical edges must be incident to a node of degree k. Our result is similar to Mader’s statement, except it applies to singleroot koutconnected graphs, and “critical” edge means critical for koutconnectivity, see Theorem 1. Our proof is similar to Mader’s proof but as far as we can see, neither of the two results generalizes the other. The results on the metric version of the mincost koutconnected subgraph problem are based on a partial extension of a splitting oﬀ theorem due to Bienstock et al. [1]. They proved that if the edges incident to a vertex r are all critical with respect to kconnectivity in a kconnected graph G (k ≥ 2) and the degree d(r) is at least k + 2 then either there exists a pair of edges incident to r which can be split oﬀ preserving kconnectivity or there exist two pairs, one of them is incident to r, such that splitting oﬀ both preserves kconnectivity. We prove the corresponding statement in the case when G is koutconnected from r, the edges incident to r are critical with respect to koutconnectivity and d(r) ≥ 2k + 2. It turns out that our result implies the splitting result of [1] when d(r) ≥ 2k + 2. Deﬁnitions and notation We consider only simple graphs, that is, the graphs have no multiedges and no loops. Throughout the paper, when discussing a problem, we use G = (V, E) to denote the input graph, and opt to denote the optimal value of the problem on G; also, we assume that G has a feasible solution to the problem. The number of nodes of G is denoted by n, so n = V . Splitting oﬀ two edges su, sv means deleting su and sv and adding a new edge uv. For a set X ⊆ V of nodes Γ (X) := {y ∈ V − X : xy ∈ E for some x ∈ X} denotes its set of neighbours.
Approximating koutconnected Subgraph Problems
79
A graph is said to be koutconnected from a node r, if for every node v, there exist k openly disjoint v↔r paths. The node r is called the root. Clearly, for a ﬁxed root node r, a knode connected graph is koutconnected from r (by Menger’s theorem), but the reverse is not true. For example, we can take several diﬀerent knode connected graphs G1 , G2 , . . ., choose an arbitrary node wi in each Gi , and identify w1 , w2 , . . . into a single node r. The resulting graph has node connectivity one, but is koutconnected from r. It can be seen that if G is koutconnected from r, then every separator (node cut) of cardinality < k must contain the root r. Consequently, if G is not knode connected, then there are two neighbours v, w of r such that G has at most (k − 1) openly disjoint v↔w paths.
2 2.1
Structural results for koutconnected subgraphs Reducible root sequences
First we show a simple but useful observation which shows that there is no loss of generality in assuming that the number of roots for the multiroot outconnected subgraph problem is at most k, where k is the maximum connectivity requirement; moreover, if the number of roots is k, then each root ri has ki = k. Suppose that we are given a set R = {r1 , . . . , rq } of root nodes together with their connectivity requirements k = (k1 , . . . , kq ). Without loss of generality we may assume that k1 ≤ . . . ≤ kq = k. Lemma 1. If there is an index j = 1, . . . , q such that kj ≤ q − j, then a graph is koutconnected from R iﬀ it is k outconnected from R , where k = (kj+1 , . . . , kq ) and R = {rj+1 , . . . , rq }.
Corollary 1. If q > k, then we can replace R by R − {v1 , . . . , vq−k } and we can change k appropriately. If q = k and say k1 < k, then we can replace R by R − {v1 } and we can change k appropriately.
2.2
The extension of Mader’s theorem
This section has a proof of the following result. Theorem 1. Let H be a graph that is koutconnected from a node r. In H, a cycle consisting of critical edges must be incident to a node v = r such that deg(v) = k. (Here, critical is with respect to koutconnectivity, i.e., an edge e is called critical if H − e is not koutconnected from r.) For comparison, we state Mader’s theorem. Theorem 2 (Mader [10]). In a knode connected graph H , a cycle of critical edges must be incident to a node of degree k. (Here, critical is with respect to knode connectivity, i.e., an edge e is called critical if H − e is not knode connected.)
80
Joseph Cheriyan et al.
Remark: Theorem 1 does not seem to have any obvious extension to multiroot outconnected graphs. Here is an example H with two roots r1 , r2 and k = 3 that is koutconnected from each of r1 and r2 such that there is a cycle of critical edges such that each incident node has degree ≥ 4 > k = 3. Take a 6cycle v1 , . . . , v6 , v1 and add two nodes v7 and v8 , and add the following edges incident to v7 or v8 : v7 v1 , v7 v2 , v7 v5 , v7 v6 , v8 v2 , v8 v3 , v8 v4 , v8 v5 . Let the roots be r1 = v2 , r2 = v5 . Note that each edge of H is critical, either for 3outconnectivity from r1 or for 3outconnectivity from r2 . The cycle C = v7 , r1 , v8 , r2 , v7 has the property stated above. We have examples where the cycle in question is incident to no root. The following corollary of Theorem 1 gives an extension of Theorem 2. Corollary 2. Let G be a knode connected graph, and let C be a cycle of critical edges that is incident to exactly one node v0 with deg(v0 ) = k (so deg(v) ≥ k + 1 for all nodes v ∈ V (C) − {v0 }). Then there exists an edge e in C such that every (k − 1)separator S of G − e contains v0 .
Our proof of Theorem 1 is based on two lemmas. The second of these is similar to the key lemma used by Mader in his proof of Theorem 2; we skip the full proof, and instead refer the interested reader to [10, Lemma 1] or to [2, Lemma 4.4]. Lemma 2. Let H = (V, E) be koutconnected from r. Let v be a neighbour of r with deg(v) ≥ k + 1, and let vw = vr be an edge. Then in H − vw, there are k openly disjoint r↔v paths.
Corollary 3. Let H = (V, E) be koutconnected from r, and let e = vw be a critical edge (with respect to koutconnectivity from r). Then in H − e there is a (k − 1)separator Se ⊂ V − {r, v, w} such that H − e − Se has exactly two components, one containing v and the other containing w.
For a critical edge e = vw of H, let Se denote a (k − 1)separator as in the corollary, and let the node sets of the two components of H − e − Se be denoted by Dv,e and Dw,e , where v ∈ Dv,e and w ∈ Dw,e . Lemma 3 (Mader). Let H = (V, E) be koutconnected from r. Let v = r be a node with deg(v) ≥ (k + 1), and let e = vw and f = vx be two critical edges. Let Se , Dv,e , Dw,e and Sf , Dv,f , Dx,f be as deﬁned above. (1) Then Dw,e and Dx,f have no nodes in common, i.e., Dw,e ∩ Dx,f = ∅. (2) If r ∈ Dw,e , then r ∈ Dv,f , and symmetrically, if r ∈ Dx,f , then r ∈ Dv,e . Proof. For the proof of part (1), we refer the reader to Mader’s proof, see [10, Lemma 1] or [2, Lemma 4.4]. For part (2), note that Dw,e = (Dw,e ∩ Dv,f ) ∪ (Dw,e ∩ Sf ) ∪ (Dw,e ∩ Dx,f ). If r is in Dw,e , then r is in Dw,e ∩ Dv,f , because r ∈ Sf (by hypothesis), and
r ∈ Dw,e ∩ Dx,f (by part (1)).
Approximating koutconnected Subgraph Problems
81
Proof. (of Theorem 1) The proof is by contradiction. Let C = v0 , v1 , v2 , . . . , vp , v0 be a cycle of critical edges, and let every node in V (C)− {r} have degree ≥ k + 1. The case when C is not incident to r is easy to handle. There is a reduction to knode connected graphs, and the contradiction comes from Mader’s theorem. Here is the reduction: replace the root r by a clique Q on deg(r) nodes and replace each edge incident to r by an edge incident to a distinct node of Q. Claim 1: If H is koutconnected from r, then the new graph is knode connected. Moreover, for every edge vw ∈ E(H), if vw is critical in H (with respect to koutconnectivity from r), then vw is critical in the new graph with respect to knode connectivity. From Claim 1 and Mader’s theorem (Theorem 2), we see that there is a contradiction if C is not incident to r. Now, suppose that C is incident to r. Recall that C = v0 , v1 , v2 , . . . , vp , v0 , and let r = v0 . For each edge vi vi+1 in C (indexing modulo p), let us revise our notation to Si = Svi vi+1 , Di = Dvi ,vi vi+1 , Di = Dvi+1 ,vi vi+1 . (So Si ⊆ V − {r, vi , vi+1 } has cardinality k − 1, and G − vi vi+1 − Si has two components with node sets Di and Di , where vi is in the former and vi+1 is in the latter.) The next claim follows easily by induction on i, using Lemma 3, part (2); the induction basis is immediate. Claim 2: For each i = 0, 1, 2, 3, . . . , p, the root r is in Di . Claim 2 gives the contradiction needed to prove the theorem, because the claim states that r is in the component of vp (rather than the component of v0 = r) in H − vp v0 − Sp .
2.3
Splitting oﬀ edges from the root in a koutconnected graph
In this subsection we present our result on the existence of pairs of edges which can be split oﬀ from the root r. First let us recall the following result of Bienstock et al. Theorem 3 (Bienstock et al. [1]). Let G = (V, E) be a kconnected graph, V  ≥ 2k, k ≥ 2. Suppose that the edges incident to a node r ∈ V are all critical with respect to kconnectivity and d(r) ≥ k + 2. Then either there exists a pair ru, rv of edges incident to r which can be split oﬀ preserving kconnectivity or for any pair ru, rv there exists a pair sw, sz such that splitting oﬀ both pairs preserves kconnectivity.
We prove the following. Theorem 4. Let G = (V + r, E ) be a graph that is koutconnected from r and where the edges incident to r are all critical with respect to koutconnectivity and d(r) ≥ 2k + 1. Then either there exists a pair of edges incident to r which can be split oﬀ preserving koutconnectivity or G is knode connected.
82
Joseph Cheriyan et al.
Proof. Let G = (V + r, E ) be a simple undirected graph with a designated root node r. For each v ∈ V let f (v) := 1 if rv ∈ E and f (v) := 0 otherwise. For some ∅ = X ⊆ V let f (X) = v∈X f (v). Let g(X) := ΓG −r (X)+f (X) be also deﬁned on the nonempty subsets of V , where ΓG −r (X) is the set of neighbours of X in the graph G − r. Lemma 4. G is koutconnected from r if and only if g(X) ≥ k for every ∅ = X ⊆ V. Proof. The lemma follows easily from Menger’s theorem.
(1)
Note that the function g(X) is submodular (since it is obtained as the sum of a submodular and a modular function). That is, g(X)+g(Y ) ≥ g(X ∩Y )+g(X ∪Y ) for every X, Y ⊆ V . In what follows assume that G = (V + r, E ) is koutconnected from the root r (k ≥ 2) and every edge rv incident to r in G is critical with respect to koutconnectivity (that is, G − rv is no longer koutconnected). It will be convenient to work with the graph G = (V, E) := G − r and the functions f, g deﬁned above. By Lemma 4 a pair ru, rv of edges is admissible for splitting in G (that is, splitting oﬀ the pair preserves koutconnectivity) if and only if decreasing f (u) and f (v) by one and adding a new edge uv in G preserves (1). Therefore such a pair u, v of nodes in G (with f (u) = f (v) = 1) is also called admissible. Otherwise the pair u, v is illegal. Thus we may consider a graph G = (V, E) with a function f : V → {0, 1} for which G satisﬁes (1) and for which f is minimal with respect to this property (that is, decreasing f (v) by one for any v ∈ V with f (v) = 1 destroys (1)), and search for admissible pairs of nodes. A node u ∈ V with f (u) = 1 is called positive. Let F denote the set of positive nodes in G. ¿From now on suppose that each pair x, y ∈ F is illegal in G. It is not diﬃcult to see that a pair x, y is illegal if and only if one of the following holds: (i) there exists an X ⊆ V with x, y ∈ X and g(X) ≤ k + 1, (iia) there exists an X ⊆ V with x ∈ X, y ∈ Γ (X) and g(X) = k, (iib) there exists an X ⊆ V with y ∈ X, x ∈ Γ (X) and g(X) = k. A set X ⊆ V with g(X) ≤ k + 1 is called dangerous. If g(X) = k then X is critical. The minimality of f implies that for every positive node x there exists a critical set X ⊆ V with x ∈ X. Using that g is submodular, standard arguments give the following: Lemma 5. (1) The intersection and union of two intersecting critical sets are both critical, (2) for two intersecting maximal dangeruos sets X, Y , we have g(X ∩ Y ) = k and g(X ∪ Y ) = k + 2, (3) if X is maximal dangerous and Y is critical then either X ∩ Y = ∅ or Y ⊆ X, (4) for every positive node x there exists a unique maximal critical set Sx with x ∈ Sx ,
Approximating koutconnected Subgraph Problems
83
(5) for two sets Sx , Sy either Sx = Sy or Sx ∩ Sy = ∅ holds, (6) if D1 , ..., Dm (m ≥ 2) are distinct maximal dangerous sets containing a positive node x then Di ∩ Dj = Sx for every 1 ≤ i < j ≤ m, (7) if D1 , ..., Dm (m ≥ 2) are distinct maximal dangerous sets containing a positive node x then g(C) ≤ k + m, where C := ∪m
1 Di . Note that Sx = Sy may hold for diﬀerent positive nodes x = y ∈ V . Focus on a ﬁxed pair x, y ∈ F . If there exists a dangerous set X with property (i) above then let Mxy be deﬁned as (an arbitrarily ﬁxed) maximal dangerous set with property (i). By Lemma 5(3) we have Sx , Sy ⊆ Mxy in this case. If no such set exists then there exist critical sets satisfying property (iia) or (iib). Clearly, in this case Sx ∩ Sy = ∅ and by Lemma 5(1) the union of type (iia) sets (type (iib) sets) with respect to a ﬁxed node pair x, y is also of type (iia) (type (iib), respectively). Thus the maximal type (iia) set, if exists, is equal to Sx and the maximal type (iib) set, if exists, is equal to Sy . Moreover, either (Sy ∩F ) ⊆ Γ (Sx ) or (Sx ∩ F ) ⊆ Γ (Sy ). Lemma 6. For every x ∈ F the critical set Sx induces a connected subgraph in G. Suppose Sx = Sy for x, y ∈ F and let Mxy be a maximal dangerous set with x, y ∈ Mxy . Then either (a) Mxy induces a connected subgraph in G or (b) Mxy = Sx ∪ Sy , Sx ∩ Sy = ∅, Γ (Mxy ) = Γ (Sx ) = Γ (Sy ), Γ (Mxy ) = k − 1, and f (Sx ) = f (Sy ) = 1.
Let us ﬁx an arbitrary positive node x. Since every pair x, y ∈ F is illegal, using our previous observations we can partition the set F (with respect to x) by deﬁning four sets A, B, C, D as follows: A := {y ∈ F B := {y ∈ F C := {y ∈ F D := {y ∈ F
: Sy = Sx }, / A}, : Mxy exists and y ∈ : Mxy does not exist and (Sy ∩ F ) ⊆ Γ (Sx )}, : Mxy does not exist, (Sx ∩ F ) ⊆ Γ (Sy ) and y ∈ / C}.
Note that for two nodes z, y belonging to diﬀerent parts of this partition we must have Sz ∩ Sy = ∅. Furthermore, if z belongs to C or D and Mxy exists for some y then Sz ∩ Mxy = ∅. These facts follow easily from Lemma 5. Lemma 7. Let z ∈ D. Then Γ (Sx ) ∩ Sz  ≥ f (Sx ). Proof. By deﬁnition, there exists a positive node w ∈ Sz − Γ (Sx ) and hence Z := Sz − Γ (Sx ) is nonempty. Since no node of Z is adjacent to Sx , we have Γ (Z)− Sz  ≤ g(Sz )− f (Sz )− f (Sx ). By (1) and g(Sz ) = k this gives k ≤ g(Z) = f (Z) + Γ (Z) = f (Z) + Γ (Z) − Sz  + Γ (Z) ∩ Sz  ≤ f (Sz ) + k − f (Sz ) − f (Sx ) + Γ (Sx ) ∩ Sz . This inequality proves the lemma.
Now assume that x is a positive node for which f (Sx ) is maximal. Lemma 8. If f (Sx ) ≥ 2 then F  ≤ 2k − 2.
84
Joseph Cheriyan et al.
Proof. For a node y ∈ C we have (Sy ∩ F ) ⊆ Γ (Sx ) and hence y ∈ Γ (Sx ). If z ∈ D then by Lemma 7 and the choice of x we have f (Sz ) ≤ f (Sx ) ≤ Γ (Sx ) ∩ Sz , hence f (D) ≤ Γ (Sx ) ∩ (∪z∈D Sz ). Thus C + D ≤ Q, where Q := Γ (Sx ) ∩ ∪z∈C∪D Sz . Recall that no contribution was counted twice since, as we remarked, two sets Sy , Sz are disjoint whenever y and z belong to diﬀerent partition classes. Furthermore, Q∩Mxy = ∅ for each maximal dangerous set Mxy . Now let us estimate the contribution of B to Γ (Sx ). If B = ∅, let W := Sx and m := 0, otherwise let W be the union of m distinct maximal dangerous sets, each of the form Mxy for some y ∈ B and such that B ⊂ W . Note that each positive node in A ∪ B contributes to f (W ). Now g(W ) = f (W ) + Γ (W ) ≤ k + m by Lemma 5 (7). Moreover, by Lemma 6 and f (Sx ) ≥ 2 each maximal dangerous set Mxy induces a connected subgraph and hence by Lemma 5 (6) Γ (Sx ) ∩ W  ≥ m holds. This gives m ≤ k−f (Sx )−f (C∪D). Thus f (W ) ≤ k+k−f (Sx )−f (C∪D), which yields F  = f (A ∪ B ∪ C ∪ D) = f (W ) + f (C ∪ D) ≤ 2k − 2.
In the rest of our investigations assume that f (Sx ) = 1 for every x ∈ F . If every maximal dangerous set Mxy (deﬁned with respect to some ﬁxed x ∈ F ) induces a connected subgraph, the proof of Lemma 8 works without any modiﬁcation (except that f (Sx ) ≥ 2 cannot be used in the last count) and gives F  ≤ 2k − 1. Let us ﬁx a node x ∈ F again and deﬁne the partition of F with respect to x as before. Focus on set B, which contains those nodes y ∈ F for which a maximal dangerous set Mxy exists. Let us call such an Mxy special if it satisﬁes Lemma 6 (b). Let Bs := {y ∈ B : Mxy is special} and let Bn := B − Bs . (Note that since Sx , Sy ⊂ Mxy and for a special Mxy we have Sx ∪ Sy = Mxy , the set Mxy is unique if it is special. Thus the bipartition Bs ∪ Bn does not depend on the choices of the Mxy ’s.) By our previous remark we may assume Bs = ∅. First suppose that Bn = ∅ and take z ∈ Bs , w ∈ Bn . We claim that there exists an edge between Sz and Mxw − Sx . Indeed, since by the deﬁnition of Bn and Lemma 6 Sx has a neighbour p in Mxw − Sx and since Mxz is special, p must be a neighbour of Sz , too. Let W be the union of m distinct maximal nonspecial dangerous sets Mxy such that Bn ⊂ W and let R := ∪z∈Bs Sz . Our claim implies that Γ (W ) ∩ R ≥ Bs . Moreover, R ∩ (Sx ∪ Γ (Sx )) = ∅ holds. Hence, as in Lemma 8, we obtain f (W ) ≤ k+m−Γ (W )∩R ≤ k+k−f (Sx )−f (C ∪D)−Bs . Thus F  ≤ 2k − 1 follows. Now suppose that Bn = ∅. In this case F  = A + C + D + Bs  ≤ f (Sx ) + Γ (Sx ) + Bs  = k + Bs  and therefore Bs  ≤ k yields F  ≤ 2k. Suppose Bs  ≥ k + 1. By Lemma 6 the special dangerous sets of the form Mxy and the maximal critical sets Sx , Sy (y ∈ Bs ) have a common set K of neighbours (of size k − 1). Moreover, f (Sy ) = 1 for each y ∈ F . These facts imply that in G there exist k nodedisjoint paths between each pair of nodes x, y of the form x, y ∈ K ∪ {r} or x ∈ K ∪ {r}, y ∈ Sx ∪ T , where T := ∪z∈Bs Sz . This proves that the set K ∪{r} ∪Sx ∪T induces a kconnected subgraph H in G . It is easy to see that in this subgraph K := K ∪ {r} is a cut of size k, the components of H − K are precisely the sets Sx and Sz (z ∈ Bs ), dH (r) = Bs +1 ≥ k+2 and every edge incident to r is critical with respect to kconnectivity. Finally, we show that this
Approximating koutconnected Subgraph Problems
85
structure implies G = H. To see this suppose that J := G − (K ∪ Sx ∪ T ) = ∅. Since Sx ∪ T has no neighbours in J, Γ (J) ≤ k − 1 and hence by (1) f (J) ≥ 1 follows. Let j ∈ F ∩ J. By our assumptions j ∈ C ∪ D must hold. Therefore Sj ∩ K = ∅ and Sj ∩ (Sx ∪ T ) = ∅. Since each node in K is adjacent to a node in every Sz (z ∈ Bs ), this implies k ≥ Γ (Sj ) ≥ Bs  ≥ k + 1, a contradiction. This proves the theorem via Lemma 4.
Remark: Consider the complete bipartite graph Kk,n−k = (A, B, E) with A = k and put r ∈ A. Now d(r) may be arbitrary and there is no admissible pair of edges on r. This shows that there is no lower bound on d(r) which can guarantee the existence of an admissible pair incident to r. To illustrate that in Theorem 4 one has to deal with a more general problem than in Theorem 3, note that if there exists an admissible pair adjacent to r and d(r) ≥ 2k + 1 in Theorem 3 then any ﬁxed edge rv is part of an admissible pair. This fact was pointed out in [7], where a strongly related “augmentation problem” was considered. However, there are examples showing that such a strengthening of Theorem 4 fails even if 2k + 1 is replaced by 2k 2 − 2k. Finally we remark that Theorem 4 implies Theorem 3 in the case of d(r) ≥ 2k + 1. This follows by observing that if we split oﬀ a pair of edges from a node r in a kconnected graph, preserving koutconnectivity from r, we preserve kconnectivity, as well.
3
3.1
Approximation results for minimum koutconnected subgraphs Uniform cost problems
Our ﬁrst goal is to give an approximation guarantee less than 2 for the following problem. Problem P1: Given a graph G, and a node r, ﬁnd a minimumsize subgraph that is koutconnected from r. Our improved approximation guarantees for minsize koutconnected subgraphs are based on Theorem 1 and results from [3]. We obtain a (1 + k1 )approximation algorithm for Problem P1 as follows: First, we ﬁnd a minimumsize subgraph with minimum degree (k − 1), call it (V, M ). This can be done in polynomial time via Edmonds’ maximum matching algorithm, or more directly via a bmatching algorithm (i.e., an algorithm for the degreeconstrained subgraph problem) [6, Section 11]. Second, we augment (V, M ) by an inclusionwise minimal edge set F ⊆ E(G) − M to obtain a subgraph H = (V, M ∪ F ) that is koutconnected from r. Note that every edge f ∈ F is critical for the koutconnectivity of H from r. Now, we apply Theorem 1 to H and F and conclude that F is a forest. (Otherwise, if F contains a cycle C, then every node of C is incident to ≥ (k + 1) edges of H, since the node is incident to ≥ (k − 1) M edges and to 2 F edges, but this contradicts Theorem 1.) Therefore, F  ≤ n − 1.
86
Joseph Cheriyan et al.
Moreover, we have M  ≤ opt − n/2, by [3, Theorem 3.5]. In detail, [3, Theorem 3.5] shows that for every nnode kedge connected graph, n/2 is a lower bound on the diﬀerence between the size of the graph and the minimum size of a subgraph of minimum degree (k − 1). Clearly, the optimal koutconnected subgraph of G, call it H ∗ , is kedge connected, hence [3, Theorem 3.5] applies to H ∗ and shows that M  ≤ (minimum size of a subgraph of minimum degree (k − 1) of H ∗ ) ≤ opt − n/2. Hence, M ∪ F  ≤ opt + (n/2) ≤ (k + 1)opt /k. Here, we used the fact that opt ≥ nk/2, since the optimal subgraph has minimum degree k. This method can be extended to the following multiroot version of Problem P1. Problem P2: Given a graph G and a set R = {r1 , . . . , rq } of root nodes (more formally, an ordered tuple R of nodes) together with a requirement ki for each root node ri . Find a minimumsize subgraph that simultaneously satisﬁes the connectivity requirements of all the root nodes, that is, the solution subgraph must be ki outconnected from ri , for i = 1, . . . , q. We use k to denote max{ki  i = 1, . . . , q}, and k to denote the vector of connectivity requirements (k1 , . . . , kq ), where q denotes the number of roots, R. By Lemma 1 there is no loss of generality in taking the number of roots q to be ≤ k = max{ki }, and moreover, if q = k then k1 = . . . = kq = k and the problem becomes that of ﬁnding a minimumsize kconnected spanning subgraph. We achieve an approximation guarantee of min{2, 1 + 2q−1 k } for Problem P2. The approximation guarantee for the multiroot problem is obtained by combining the solution method of Problem P1 and the sparse certiﬁcate for “local node connectivity” of Nagamochi & Ibaraki [11]. For a graph H and nodes v, w, let κH (v, w) denote the maximum number of openly disjoint v↔w paths. Recall that [11] gave an eﬃcient algorithm for ﬁnding j edge disjoint forests F1 , . . . , Fj of G such that for every two nodes v, w, κH (v, w) ≥ min{j, κG (v, w)}, where the edge set of H is F1 ∪ . . . ∪ Fj . This graph H has ≤ k(n − 1) edges, while the optimal subgraph has ≥ kn/2 edges. Now H has ki openly disjoint v↔ri paths ∀v ∈ V , ∀ri ∈ R, because, by assumption, G has ki openly disjoint v↔ri paths. Consequently, H is koutconnected from R, as required, and has size ≤ 2opt . approximation algorithm. First we ﬁnd a minimumNow consider the k+2q−1 k size subgraph of minimum degree (k − 1), call it (V, M ). Then, sequentially for each of the roots ri = r1 , . . . , rq , we ﬁnd an inclusionwise minimal edge set Fi ⊆ E(G) − (F1 ∪ . . . ∪ Fi−1 ) such that (V, M ∪ F1 ∪ . . . ∪ Fi ) is ki outconnected from ri . Clearly, the solution subgraph H = (V, M ∪ F1 ∪ . . . ∪ Fq ) satisﬁes all the connectivity requirements, i.e., H is koutconnected from R. By Theorem 1, each Fi (i = 1, . . . , q) has size ≤ (n − 1), since each Fi is a forest. Also, we have M  ≤ opt − n/2, by [3, Theorem 3.5]. Hence, E(H) = M ∪ F1 ∪ . . . ∪ Fq  ≤ opt + (2q − 1)n/2 ≤ (k + 2q − 1)opt /k, since opt ≥ kn/2 (since the optimal subgraph has minimum degree k). This proves the following result.
Approximating koutconnected Subgraph Problems
87
Theorem 5. There is a polynomial min{2, k+2q−1 }approximation algorithm k for the problem of ﬁnding a minimumsize subgraph that is koutconnected from a set of root nodes R, where q = R and k = max{ki }.
Remark: Note that for R = q ≤ k/2, the approximation guarantee is less than 2, and when k is large and q is small then the approximation guarantee is signiﬁcantly smaller than 2. In the case of q = 1 (Problem P1) the approximation factor equals 1 + k1 . 3.2
Metric cost problems
Problem P3: Let G be a complete graph, and let c : E(G)→+ assign nonnegative costs to the edges such that c is a metric, that is, the edge costs c satisfy the triangle inequality. Given a set of root nodes R = {r1 , . . . , rq } and connectivity requirements k = (k1 , . . . , kq ), Problem P3 is to ﬁnd a mincost subgraph that is koutconnected from R. As we remarked, for the generalization of Problem P3 where the edge costs are nonnegative but arbitrary a 2qapproximation algorithm is straightforward by the result of Frank & Tardos [4], and by the 2approximation algorithm of Khuller & Raghavachari [9] for the singleroot version of the problem. We will not deal with the general problem but focus on the metric version and improve the approximation factor to 4. Our result is related to [9, Theorem 4.8], but neither result implies the other one. (Theorem 4.8 in [9] gives an approximation guarantee of (2 + 2(k − 1)/n) for the mincost knode connected spanning subgraph problem, assuming metric edge costs.) Note that Problem P3 is also NPhard. Theorem 6. Suppose that the edge costs satisfy the triangle inequality. Then there is a polynomial (3+ kks )approximation algorithm for the problem of ﬁnding a mincost subgraph that is koutconnected from the set of root nodes R, where k := max{ki } is the largest and ks is the second largest requirement. Proof. We start by ﬁnding a subgraph H that is koutconnected from r, with cost c(H) ≤ 2 opt . This is done via the FrankTardos result, as in [9]. By deleting edges if necessary we may assume that each edge incident to r is critical with respect to koutconnectivity. If dH (r) ≥ 2k + 1 then by Theorem 4 either H is kconnected or we can split oﬀ a pair of edges from r preserving koutconnectivity. In the former case let H be our solution. Clearly, H satisﬁes all the requirements and has cost ≤ 2opt . In the latter case we split oﬀ the admissible pair. Since c is a metric, this will not increase the cost of our subgraph. Clearly, the admissible pairs, if exist, can be found in polynomial time. Thus we may assume dH (r) ≤ 2k. The next step is to add new edges to H in order to make it ks connected and to satisfy all the requirements this way. The ﬁnal solution will be a supergraph of H where each edge added to H has both ends among the neighbours of r. To ﬁnd the set of new edges to be added take H and split oﬀ edges from r, preserving ks outconnectivity, until either d(r) ≤ 2ks holds or the graph becomes ks connected.
88
Joseph Cheriyan et al.
This can be done by Theorem 4. Let H be the ﬁnal graph and let E be the set of new edges obtained by the splittings. Since dH (r) ≤ 2k and dH (r) ≥ 2ks − 1 and dH (r) − dH (r) is even, we have E  ≤ 2(k − ks )/2 = k − ks . Let C be the set of neighbours of r in H . Now augment H by adding an inclusionwise minimal edge set F such that the resulting graph is ks connected and each F edge has both end nodes in C. Since either H is already ks connected or dH (r) ≤ 2ks , by Mader’s theorem (Theorem 2) we can see that F is acyclic and so has size ≤ C − 1 ≤ 2ks − 1. Let our solution be H := H + E + F , which is koutconnected from r and ks connected and hence satisﬁes all the requirements by the choice of k and ks . We claim that every edge in E ∪ F (in fact, every edge of the complete graph) has cost ≤ opt /k. To see this, observe that every solution must be kedgeconnected and hence there exist k edgedisjoint paths between any two nodes u, w. Each of these paths has cost at least c(uw) by the triangle inequality. Thus
c(H ) ≤ 2opt + (k − ks + 2ks )opt /k = (3 + kks )opt ≤ 4opt .
References 1. D. Bienstock, E. F. Brickell and C. L. Monma, “On the structure of minimumweight kconnected spanning networks,” SIAM J. Discrete Math. 3 (1990), 320–329. 78, 81 2. B. Bollob´ as, Extremal Graph Theory, Academic Press, London, 1978. 80 3. J.Cheriyan and R.Thurimella, “Approximating minimumsize kconnected spanning subgraphs via matching,” manuscript, Sept. 1996. ECCC TR98025, see http://www.eccc.unitrier.de/eccclocal/Lists/TR1998.html. Preliminary version in Proc. 37th IEEE FOCS (1996), 292–301. 78, 85, 86 4. A.Frank and E.Tardos, “An application of submodular ﬂows,” Linear Algebra and its Applications, 114/115 (1989), 320–348. 78, 87 5. G.L.Frederickson and J.Ja’Ja’, “On the relationship between the biconnectivity augmentation and traveling salesman problems,” Theor. Comp. Sci. 19 (1982), 189–201. 78 6. H. N. Gabow and R. E. Tarjan, “Faster scaling algorithms for general graph matching problems,” Journal of the ACM 38 (1991), 815–853. 85 7. T. Jord´ an, “On the optimal vertexconnectivity augmentation,” J. Combinatorial Theory, Series B 63 (1995), 8–20. 85 8. S. Khuller, “Approximation algorithms for ﬁnding highly connected subgraphs,” in Approximation algorithms for NPhard problems, Ed. D. S. Hochbaum, PWS publishing co., Boston, 1996. 78 9. S. Khuller and B. Raghavachari, “Improved approximation algorithms for uniform connectivity problems,” Journal of Algorithms 21 (1996), 434–450. 78, 87 10. W. Mader, “Ecken vom Grad n in minimalen nfach zusammenh¨ angenden Graphen,” Archive der Mathematik 23 (1972), 219–224. 78, 79, 80 11. H.Nagamochi and T.Ibaraki, “A lineartime algorithm for ﬁnding a sparse kconnected spanning subgraph of a kconnected graph,” Algorithmica 7 (1992), 583– 596. 86 12. Z.Nutov, M.Penn and D.Sinreich, “On mobile robots ﬂow in locally uniform networks,” Canadian Journal of Information Systems and Operational Research 35 (1997), 197–208. 78 13. R. Ravi and D. P. Williamson, “An approximation algorithm for minimumcost vertexconnectivity problems.” Algorithmica (1997) 18: 2143. 77
Lower Bounds for Online Scheduling with Precedence Constraints on Identical Machines Leah Epstein Dept. of Computer Science, TelAviv University
[email protected] Abstract. We consider the online scheduling problem of jobs with precedence constraints on m parallel identical machines. Each job has a time processing requirement, and may depend on other jobs (has to be processed after them). A job arrives only after its predecessors have been completed. The cost of an algorithm is the time that the last job is completed. We show lower bounds on the competitive ratio of online algorithms for this problem in several versions. We prove a lower bound of 2 − 1/m on the competitive ratio of any deterministic algorithm (with or without preemption) and a lower bound of 2 − 2/(m + 1) on the competitive ratio of any randomized algorithm (with or without preemption). The lower bounds for the cases that preemption is allowed require arbitrarily long sequences. If we use only sequences of length O(m2 ), we can show a lower bound of 2 − 2/(m + 1) on the competitive ratio of deterministic algorithms with preemption, and a lower bound of 2 − O(1/m) on the competitive ratio of any randomized algorithm with preemption. All the lower bounds hold even for sequences of unit jobs only. The best algorithm that is known for this problem is the well known List Scheduling algorithm of Graham. The algorithm is deterministic and does not use preemption. The competitive ratio of this algorithm is 2 − 1/m. Our randomized lower bounds are very close to this bound (a diﬀerence of O(1/m)) and our deterministic lower bounds match this bound.
1
Introduction
We consider the problem of scheduling a sequence of n jobs on m parallel identical machines. There are precedence constraints between the jobs, which can be given by a directed acyclic graph on the jobs. In this graph each directed edge between jobs j1 and j2 indicates that j1 has to be scheduled before j2 . We consider an online environment in which a job is known only after all its predecessors in the graph are processed by the online algorithm. Each job j has a certain time requirement wj (which is known when the job arrives). The cost of an algorithm is the makespan, which is the time in which the last job is completed. This model is realistic since often the running times of speciﬁc jobs are known in advance, but it is unknown whether after these jobs, there will be need to perform jobs that depend on some previous jobs. Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 89–97, 1998. c SpringerVerlag Berlin Heidelberg 1998
90
Leah Epstein
We compare the performance of online algorithms and the optimal oﬀline algorithm that knows the sequence of jobs and the dependencies graph in advance. We use the competitive ratio to measure the performance of the algorithm. Denote the cost of the online algorithm by Con and the cost of the optimal oﬀline algorithm by Copt . The competitive ratio of an online algorithm is r if for any input sequence of jobs: Con ≤ r · Copt . We consider a several models. Consider a job j which is released at time t1 (t1 is the time that its last predecessor ﬁnished running), and has processing time requirement wj . In the model without preemption, j has to be processed on one machine for wj time units, starting at some time t, t ≥ t1 till time t + wj . In the model that allows preemption, each running job can be preempted, i.e. its processing may be stopped and resumed later on the same, or on diﬀerent machine. Thus j still has to be processed for a total of wj time units, but not necessarily continuously, or on one machine (it cannot be processed on more than one machine at the same time). The algorithms may be either deterministic or randomized. For randomized algorithms the competitive ratio is r if for any input sequence of jobs: E(Con ) ≤ r · Copt . It is also possible to consider special sequences as sequences that consist only of unit jobs, and sequences of bounded length. Related problems and results: The problem of scheduling a set of tasks on parallel machines has been widely studied in many variants. In the basic problem, a sequence of jobs is to be scheduled on a set of identical parallel machines. The jobs may be independent or have precedence constraints between them. They may all arrive at the beginning or have release times, or arrive according to the precedence constraints. The running times of the jobs can be known in advance (at arrival time) or unknown (till they are ﬁnished). It is also possible to allow restarts (a job is stopped, and resumed later from the beginning) or to allow preemptions. The goal is to construct a schedule of minimum length. (There are variants with other cost functions too). All those problems, in their oﬀline version are NPhard [6]. The ﬁrst one to introduce the online scheduling problem was Graham [8,9]. He also introduced the algorithm List Scheduling. This algorithm, each time that some machine is idle, schedules a job that is available (if there exists such a job which was not scheduled yet and already arrived). List Scheduling suits all the above mentioned cases, and has the competitive ratio of 2 − 1/m. In this paper we show that for our problem, the algorithm is optimal in the deterministic case, and that it is almost optimal for randomized algorithms. Our deterministic lower bounds build on the paper of Shmoys, Wein and Williamson [15]. They consider the problem of scheduling a sequence of independent tasks online. The duration of a job in unknown until it is completed, but there are no precedence constraints between the jobs. They show a lower bound of 2 − 1/m on the competitive ratio of any deterministic algorithm without preemption. In this paper we adapt this lower bound to a lower bound of 2 − 1/m for our problem. We also build our lower bounds for deterministic algorithms with preemption on some of the ideas of their lower bound. They also
Lower Bounds for Online Scheduling
91
show that the same √ lower bound holds with preemption, and they show a lower bound of 2 − O(1/ m) on the competitive ratio of randomized algorithms without preemption. The last lower bound can be also adapted to our problem (even with preemption), but we show a much stronger lower bound for randomized algorithms. Our results: All the results apply even if the sequences may consist of unit jobs only. Also the number of jobs, the structure, and makespan of the optimal oﬀline assignment is known in advance in all lower bounds. We prove the following lower bounds for deterministic algorithms: – A lower bound of 2 − 1/m on the competitive ratio of any deterministic online algorithm without preemption (even if the length of the sequence is limited to O(m2 )). – A lower bound of 2 − 2/(m + 1) on the competitive ratio of any deterministic online algorithm that allows preemption (even if the length of the sequence is limited to O(m2 )). – A lower bound of 2 − 1/m on the competitive ratio of any deterministic online algorithm that allows preemption. We prove the following lower bounds for randomized algorithms – A lower bound of 2 − 2/(m + 1) on the competitive ratio of any randomized online algorithm without preemption (even if the length of the sequence is limited to O(m2 )). – A lower bound of 2 − O(1/m) on the competitive ratio of any randomized online algorithm that allows preemption (even if the length of the sequence is limited to O(m2 )). – A lower bound of 2 − 2/(m + 1) on the competitive ratio of any randomized online algorithm that allows preemption. The similar results for all the models show that for this problem, neither randomization nor preemption can help in reducing the competitive ratio. Any algorithm would have the competitive ratio of 2 − O(1/m) which is very close to the competitive ratio of List Scheduling. More related work: A summary on results for many variants of online scheduling problems appears in [14]. Results for the case that jobs arrive over time appear in [1,5,15,17]. Note that [1,17] show an algorithm with competitive ratio 3/2 even without preemption, for the case that jobs are independent, and the durations are known in advance (unlike our case in which there is a lower bound of 2− O(1/m) even with preemption). Moreover, if preemption is allowed, there exists a 1competitive algorithm [7,10,13,16]. Results on scheduling with precedence constraints, but for other types of machine sets or jobs can be found in [3,4,11,12]. There are also some oﬀline results with precedence constraints in [2]. Note that already for a related set of machines (diﬀerent speeds) the problem √ of scheduling with precedence constraints is hard ( competitive ratio of Ω( m) [3,11]). Structure of the paper: In section 2 we show lower bounds for deterministic algorithms. In section 3 we show lower bounds for randomized algorithms.
92
2
Leah Epstein
Deterministic Algorithms
In this section we show a lower bound of 2 − 1/m on the competitive ratio of deterministic algorithms with preemption. We give all the lower bounds in this section in detail, since some of the ideas in the randomized lower bounds build on the deterministic case. We begin with a simple lower bound without preemption. All lower bounds use sequences of unit jobs only. Theorem 1. The competitive ratio of any deterministic algorithm without pre1 emption is at least 2 − m . This is true even if all jobs are unit jobs. Proof. We use the following sequence: (all jobs are unit jobs). First m(m − 1) + 1 jobs arrive. Consider the online assignment. Since the total time to schedule m(m − 1) jobs is at least m − 1 units of time, there is at least one job j assigned at time m − 1 or later, and ﬁnishes at time m or later. After that, a sequence of m − 1 jobs j1 , ..., jm−1 arrives. In this sequence the ﬁrst job j1 depends on j, and each job ji depends on the previous one ji−1 ; (2 ≤ i ≤ m − 1). It takes more m − 1 units of time to schedule them and thus Con = m + (m − 1) = 2m − 1. The optimal oﬀline algorithm would schedule j at time 0, and each ji at time i and thus can ﬁnish all m2 jobs in m time units. Thus Copt = m the competitive ratio is 2 − 1/m. We use a longer sequence to show that the same lower bound holds with preemption too. Theorem 2. The competitive ratio of any deterministic algorithm with preemp1 . This is true even if all jobs are unit jobs. tion is at least 2 − m Proof. For an integer k, (mk +1)(m−1)+1 jobs arrive. The minimum time to run those jobs even with preemption is at least (mk+1 +m−mk )/m = mk +1−mk−1 , thus for the online algorithm there is at least one job j that ﬁnishes at time at least mk + 1 − mk−1 . After those jobs, a sequence J of mk jobs, that the ﬁrst one depends on j, and each job depends on the previous one arrives. The time to run those jobs is at least mk and thus Con = mk + 1 − mk−1 + mk = 2mk − mk−1 + 1. The optimal oﬀline algorithm would schedule j at time 0, and since there are m(mk + 1) jobs, the total time to run them would be Copt = mk + 1 (it is possible to run j and all jobs of J in mk + 1 time units). The competitive ratio k−1 +1 1 = 2− m − εk where εk → 0 when k → ∞. Thus the competitive is 2 − mmk +1 ratio of any deterministic online algorithm that allows preemption is at least 2 − 1/m. now we show that the strength of the lower bound almost does not depend on the length of the sequence. Theorem 3. The competitive ratio of any deterministic algorithm with preemp2 . This is true even if all jobs are unit jobs. And the length tion is at least 2 − m+1 of the sequence is O(m2 ). Proof. We use the sequence from Theorem 2 with k = 1.
Lower Bounds for Online Scheduling
93
Fig. 1. The online and oﬀline assignments for the sequence in Theorem 1
3
Randomized Algorithms
In all the proofs in this section, which are lower bounds on the competitive ratio of randomized algorithms we use an adaptation of Yao’s theorem for online algorithms. It states that a lower bound for the competitive ratio of deterministic algorithms on any distribution on the input is also a lower bound for randomized algorithms and is given by E(Con /Copt ). We will use only sequences for which Copt is constant and thus in our case E(Con /Copt ) = E(Con )/Copt . We begin with a lower bound without preemption. note that in this section the lower bound without preemption uses a totally diﬀerent sequence than the lower bound with preemption. It is possible the same sequence as in the ﬁrst proof in this section (Theorem 4) to get the lower bound of 2 − 1/m for deterministic algorithms without preemption. Note that here also all lower bound sequences consist of unit jobs only. Theorem 4. The competitive ratio of any randomized algorithm without pre2 . This is true even if all jobs are unit jobs. emption is at least 2 − m+1 Proof. First m − 1 phases of m + 1 jobs arrive. In each phase, all jobs depend on m jobs of the previous phase (For each phase, the subset of m jobs from the previous phase is chosen among all
m+1 m
= m + 1 possible subsets of m
94
Leah Epstein
jobs with equal probability). After all m2 − 1 jobs have arrived, another job that depends on m jobs of the last phase arrives (here also the m jobs are chosen among the m + 1 possible subsets with equal probability). For each phase i, 0 ≤ i ≤ m − 2, the optimal oﬀline algorithm schedules the m jobs that the next phase depends on them at time i. all other jobs are scheduled at time m − 1 and thus Copt = m. Note that a phase can arrive only after all m jobs from the previous phase, that this phase depends on them were scheduled (the important jobs in this phase). The time to schedule a phase is 1 or 2 units of time, since if the correct subset of m jobs is chosen, it is possible to assign the last job later and use only one time unit. If the wrong subset was chosen, the algorithm has to use another unit of time to complete the running of the important jobs of this phase and uses two units of time. The last job requires exactly one unit of time. Each of the m − 1 phases is placed correctly with probability 1/(m + 1). For each phase, the probability to use a second unit of time is at least m/(m + 1). Thus the expectation of the online cost is at least E(Con ) ≥ m + (m − 1)(m/(m + 1)), Copt = m the competitive ratio is at least 2m/(m + 1) = 2 − 2/(m + 1). Now we show the simple lower bound for randomized algorithms with preemption. This lower bound uses a short sequence. Theorem 5. The competitive ratio of any randomized algorithm with preemp1 tion is at least 2 − O( m ). This is true even if all jobs are unit jobs, and the length of the sequence is O(m2 ). Proof. First m2 jobs arrive. More m jobs j1 , ..., jm arrive so that j1 depends on 2 a subset J of m of the m jobs, which is chosen uniformly at random among all m2 m
possible subsets, and for 1 ≤ i ≤ m − 1, ji+1 depends on ji .
Even with preemption, since each job requires one processing unit, and jobs cannot run simultaneously, no jobs can ﬁnish before time 1 and at most m jobs can ﬁnish at time 1. In general, at most im jobs can ﬁnish before time i + 1. Let b1 , ..., bm2 be the set of the ﬁrst m2 jobs sorted according to their ﬁnishing time (b1 ﬁnishes ﬁrst). For 1 ≤ i ≤ m, let Ji be the set bim−m+1 , ..., bim . Each job in a set Ji cannot ﬁnish before time i. Let I be the set of indices i such that there is at least one job of J in Ji . Let i1 be the maximum index in I. We deﬁne pi to be the probability that i = i1 for each 1 ≤ i ≤ m. For 0 ≤ i ≤ m, let qi be the probability that all m jobs of J are chosen among the jobs in the sets J1 , ..., Ji then qi =
mi m2 / m m
and pi = qi − qi−1 . Let us calculate E(Con ). For a ﬁxed
value of i1 the online cost is at least i1 + m. E(Con ) ≥
m
pi (i + m) = m
i=1
=m+
m i=1
m i=1
iqi −
m i=1
pi +
m
i(qi − qi−1 )
i=1
i(qi−1 ) = m + mqm +
m−1 i=1
iqi −
m−1
(i + 1)qi
i=0
Lower Bounds for Online Scheduling m−1
= 2m − (
qi ) − q0 = 2m −
m−1
i=1
(Since
m i=1
95
qi
i=1
pi = 1, qm = 1 and q0 = 0.) Let us bound the values qi : qi =
Thus
mi m 2
m m
=
m−1
i (mi)!(m2 − m)! ≤ ( )m ≤ ei−m (m2 )!(mi − m)! m
qi ≤
i=0
1 e(em−1 − 1) ≤ m e (e − 1) e−1
and E(Con ) >= 2m − 1/(e − 1). The optimal oﬀline algorithm would assign all jobs in J at time 0, and get Copt = m + 1. Thus the competitive ratio is 2 − O(1/m). We combine the previous lower bound and the deterministic lower bound with preemption to get the following lower bound: Theorem 6. The competitive ratio of any randomized algorithm with preemp2 tion is at least 2 − m+1 . This is true even if all jobs are unit jobs, Proof. For an integer k, N = (mk + 1)(m − 1) + 1 jobs arrive. Denote L = N/m = mk + 1 − mk−1 . More mk jobs: j1 , ..., jmk arrive so that j1 depends on a subset J of m of the N jobs, which is chosen uniformly at random among all N m
possible subsets, and for 1 ≤ i ≤ mk − 1, ji+1 depends on ji and each job
in the new sequence m jobs depends on the previous one. Even with preemption, since each job requires one processing unit, and jobs cannot run simultaneously, at most im jobs can ﬁnish before time i + 1. Let b1 , ..., bN be the set of the ﬁrst N jobs sorted according to their ﬁnishing time (b1 ﬁnishes ﬁrst). For 1 ≤ i ≤ L, let Ji be the set bim−m+1 , ..., bim . Each job in a set Ji cannot ﬁnish before time i. Let I be the set of indices i such that there is at least one job of J in Ji . Let i1 be the maximum index in I. We deﬁne pi to be the probability that i = i1 for each 1 ≤ i ≤ L. For 0 ≤ i ≤ L, let qi be the probabilitythat all mjobs of J are chosen among the jobs in the sets J1 , ..., Ji then qi =
mi N / m m
and pi = qi − qi−1 . Let us calculate E(Con ). For a ﬁxed
value of i1 the online cost is at least i1 + mk . E(Con ) ≥
L i=1
pi (i + mk ) = mk
L i=1
pi +
L i=1
i(qi − qi−1 )
96
Leah Epstein
Fig. 2. The online and oﬀline assignments for the sequence in Theorem 5
= mk +
L
iqi −
i=1
L
i(qi−1 ) = mk + LqL +
i=1 L−1
= mk + L − ( L i=1
iqi −
i=1
qi ) − q0 = mk + L −
i=1
(Since
L−1
L−1
L−1
(i + 1)qi
i=0
qi
i=1
pi = 1, qL = 1 and q0 = 0.) Let us bound the values qi :
mi m
qi =
N m
=
i (mi)!(N − m)! ≤ ( )m (N )!(mi − m)! L
We use the following inequality of Bernoulli: Lm+1 ≥ (L − 1)m+1 + (m + 1)(L − 1)m By induction we can get Lm+1 ≥ Thus
L−1 i=1
(m + 1)im hence
L−1 i=1
qi ≤
L m+1 .
E(Con ) ≥ mk + L − L/(m + 1) = mk + (1 − 1/(m + 1))(mk − mk−1 + 1) >
2mk+1 m+1
Lower Bounds for Online Scheduling
97
The optimal oﬀline algorithm would assign all jobs in J at time 0, and get Copt = mk + 1. Thus the competitive ratio is at least (2mk+1 )/((m+ 1)(mk + 1)). Since mk /(mk+1 + 1) → 1 when k → ∞, The competitive ratio is at least 2m/(m + 1) = 2 − 2/(m + 1) Acknowledgments: I would like to thank Yossi Azar and Jiˇr´ı Sgall for helpful discussions.
References 1. B. Chen and A. Vestjens. Scheduling on identical machines: How good is lpt in an online setting? To appear in Oper. Res. Lett. 91 2. Fabian A. Chudak, David B. Shmoys. Approximation algorithms for precedence constrained scheduling problems on parallel machines that run at diﬀerent speeds. Proc. of the 8th Ann. ACMSIAM Symp. on Discrete Algorithms, 581590, 1997. 91 3. E. Davis and J. M. Jaﬀe. Algorithms for scheduling tasks on unrelated processors. J. ACM. 28(4):721736, 1981. 91 4. A. Feldmann, M.Y. Kao, J. Sgall and S.H. Teng. Optimal online scheduling of parallel jobs with dependencies. Proc. of the 25th Ann. ACM symp. on Theory of Computing, pages 642651. 91 5. A. Feldmann, B. Maggs, J. Sgall, D. D. Sleator and A. Tomkins. Competitive analysis of call admission algorithms that allow delay. Technical Report CMUCS95102, CarnegieMellon University, Pittsburgh, PA, U.S.A., 1995. 91 6. M. R. Garey and D. S. Johnson. Computers and Intractability: A Guide to the Theory of NPcompleteness, W. H. Freeman, NewYork, 1979. 90 7. T. Gonzalez and D. B. Johnson. A new algorithm for preemptive scheduling of trees. J. Assoc. Comput. Mach., 27:287312, 1980. 91 8. R.L. Graham. Bounds for certain multiprocessor anomalies. Bell System Technical Journal, 45:1563–1581, 1966. 90 9. R.L. Graham. Bounds on multiprocessing timing anomalies. SIAM J. Appl. Math, 17:263–269, 1969. 90 10. K. S. Hong and J. Y.T. Leung. Online scheduling of realtime tasks. IEEE Transactions on Computers, 41(10):13261331, 1992. 91 11. Jeﬀrey M. Jaﬀe Eﬃcient scheduling of tasks without full use of processor resources. The. Computer Science, 12:117, 1980. 91 12. J.W.S. Liu and C.L. Liu. Bounds on scheduling algorithms for heterogeneous computing systems. Information Processing 74, North Holland, 349353,1974. 91 13. S. Sahni and Y. Cho. Nearly on line scheduling of a uniform processor system with release times. Siam J. Comput. 8(2):275285, 1979. 91 14. J. Sgall. OnLine Scheduling  A Survey 1997 91 15. D. B. Shmoys, J. Wein and D. P. Williamson. Scheduling parallel machines on line. Siam J. of Computing, 24:13131331, 1995. 90, 91 16. A. P. A. Vestjens. Scheduling uniform machines online requires nondecreasing speed ratios. Technical Report Memorandum COSOR 9435, Eindhoven University of Technology, 1994. To appear in Math. Programming. 91 17. A. P. A. Vestjens. Online Machine Scheduling. Ph.D. thesis, Eindhoven University of Technology, The Netherlands, 1997. 91
Instant Recognition of Half Integrality and 2Approximations Dorit S. Hochbaum Department of Industrial Engineering and Operations Research, and Walter A. Haas School of Business, University of California, Berkeley
[email protected] Abstract. We deﬁne a class of integer programs with constraints that involve up to three variables each. A generic constraint in such integer program is of the form ax + by ≤ z + c, where the variable z appears only in that constraint. For such binary integer programs it is possible to derive half integral superoptimal solutions in polynomial time. The scheme is also applicable with few modiﬁcations to nonbinary integer problems. For some of these problems it is possible to round the half integral solution to a 2approximate solution. This extends the class of integer programs with at most two variables per constraint that were analyzed in [HMNT93]. The approximation algorithms here provide an improvement in running time and range of applicability compared to existing 2approximations. Furthermore, we conclude that problems in the framework are MAX SNPhard and at least as hard to approximate as vertex cover. Problems that are amenable to the analysis provided here are easily recognized. The analysis itself is entirely technical and involves manipulating the constraints and transforming them to a totally unimodular system while losing no more than a factor of 2 in the integrality.
1
Introduction
We demonstrate here for a given class of integer programming problems a uniﬁed technique for deriving constant approximations and superoptimal solutions in half integers. The class is characterized by formulations involving up to three variables per constraint one of which appears in a single constraint. Such problem formulations have a number of interesting properties that permit the derivation of lower or upper bounds that are of better quality than the respective linear programming relaxations, and that can be turned in some cases into feasible solutions that are 2approximate. The integer programs described here have a particularly structured set of constraints, with a generic constraint of the form ax + by ≤ z + c. Note that any linear optimization problem, integer or continuous, can be written with at most three variables per inequality. The generic constraints here have one of
Research supported in part by NSF award No. DMI9713482, and by SUN Microsystems.
Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 99–110, 1998. c SpringerVerlag Berlin Heidelberg 1998
100
Dorit S. Hochbaum
the variables appearing only once in a constraint. We call such structure of the set of constraints the 2var structure. The paper describes an analysis of such problems based on manipulating the constraints and transforming them to a totally unimodular system. The outcome of this process is a polynomial algorithm that delivers a superoptimal solution to all integer programs with 2var constraints that has the variables on the left hand side as integer multiple of 12 , and the variables on the right hand side, z as an integer multiple of 12 U1 where U is the number of integer values in the range of the variables x and y. In the case of binary problems there is an exception with the value U = 2 with z being an integer multiple of 12 (although there are two integer values for each variable). Being superoptimal means that the solution’s objective value can only be better (lower) than the optimum (for minimization problems). When it is possible to round the 12 integral solution to a feasible solution then a 2approximate solution is obtained. Applications and 2approximations based on the technique. The class of problems addressed by the technique described expands substantially the class treated in [HMNT93]. There we demonstrated that 12 integral solutions and 2approximations are always obtained in polynomial time for minimization (with nonnegative coeﬃcients) integer programs with at most two variables per inequality. For these problems a feasible rounding always exists provided that the problems are feasible. The technique of [HMNT93] was shown applicable to the vertex cover problem and the problem of satisfying a 2SAT formula with the least weight of true variables. Here and in other papers we demonstrate 2approximations for additional problems: – minimum satisfiability. In the problem of minimum satisﬁability or MINSAT, we are given a CNF satisﬁability formula. The aim is to ﬁnd an assignment satisfying the smallest number of clauses, or the smallest weight collection of clauses. The minimum satisﬁability problem was introduced by Kohli et. al. [KKM94] and was further studied by Marathe and Ravi [MR96]. Marathe and Ravi discovered a 2approximation algorithm to the problem, that can be viewed as a special case of our general algorithm for problems with two variables per inequality. – Scheduling with precedence constraints, [CH97]. – Biclique problems. Minimum weight node deletion to obtain a complete bipartite subgraph – biclique [Hoc97]. With the use of the technique described here we identiﬁed the polynomiality of the problem on general graphs when each side of the biclique is not required to form an independent set. When this requirement is introduced the problem is NPhard and a 2approximation algorithm is given. Another variant of the biclique problem is the minimum weight edge deletion. This problem is NPhard even on a bipartite graphs. All variants of this problem considered in [Hoc97] are NPhard and 2approximable. – The complement of the edge maximum clique problem. This problem is to minimize the weight of the edges deleted so the remaining subgraph is a clique, [Hoc97].
Instant Recognition of Half Integrality and 2Approximations
– – – –
101
Generalized satisfiability problems, [HP97]. The generalized vertex cover problem, [Hoc97a]. The tvertex cover problem. [Hoc98]. The feasible cut problem. The 2approximation for this problem is illustrated here.
The last three items on the list are problems that have three variables per inequality. The technique delivers 12 integral solutions as well as polynomial time 2 approximation algorithms for these problems. All the approximations listed are obtained using a minimum cut algorithm, and thus in strongly polynomial time. The problems that fall in the class described here and are NPhard are then provably at least as hard to approximate as the vertex cover problem (see [HMNT93] and [Hoc96]). Therefore an approximation factor better than 2 is only possible provided that there is such approximation for the vertex cover. 1.1
The Structure of 2varConstraints
2var constraints contain two types of integer variables, a vector x ∈ INn and z ∈ INm2 . We refer to them here as xvariables and zvariables respectively. A 2var constraint has at most two xvariables appearing in it. The zvariables can appear each in just one constraint. We refer to integer problems of optimizing over 2var constraints as IP2. A formulation of a typical IP2 is, n ei zi Min j=1 wj xj + subject to ai xji + bi xki ≥ ci + di zi for i = 1, . . . , m (IP2) j ≤ xj ≤ uj j = 1, . . . , n i = 1, . . . , m2 zi integer xj integer j = 1, . . . , n. A parameter of importance in the analysis is the number of values in the range of the xvariables, U = maxj=1,...n (uj − j + 1). We assume throughout that U is polynomially bounded thus permitting a reference to running time that depends polynomially on U as polynomial running time. An important property of 2var inequalities that aﬀect the complexity of the IP2 is monotonicity: Definition 1. An inequality ax − by ≤ c + dz is monotone if a, b ≥ 0 and d = 1. The IP2 problem was studied for D = max di  = 0 in [HN94] and in [HMNT93]. For such problems there are only xvariables and at most two of them per inequality. Hochbaum and Naor [HN94] devised a polynomial time algorithm to solve the problem in integers over monotone inequalities. For (nonmonotone) inequalities with at most two variables per inequality, D = 0, Hochbaum,
102
Dorit S. Hochbaum
Megiddo, Naor and Tamir described a polynomial time 2approximation algorithm. These results are extended here for D ≥ 1. An important special case of IP2 where the value of U aﬀects neither the complexity nor the approximability is of binarized IP2: Definition 2. An IP2 problem is said to be binarized if all coeﬃcients of the variables are in {−1, 0, 1}. Or, if B = maxi {ai , bi , di } = 1. Note that a binarized system is not necessarily deﬁned on binary variables. The value of U may be arbitrarily large for a binarized IP2 without aﬀecting the polynomiality of the results as proved in our main theorem. 1.2
The Main Theorem
For IP2 over monotone constraints that is binarized we describe a polynomial time algorithm solving the problem in integers. The polynomial algorithm for the monotone IP2 is used as a building block in the derivation of the superoptimal solution and approximations of nonmonotone problems. For nonmonotone constraints a polynomial time procedure derives a superoptimal half integral solution for the xvariables in which the zvariables are an 1 integer multiple of 2DU . If that solution has a rounding to a feasible integer solution, and the objective function coeﬃcients are nonnegative then that solution is a 2approximation, or for arbitrary D and U it is a 2DU approximation. For an integer program over 2var constraints, the running time required for ﬁnding a superoptimal half integral solution can be expressed in terms of the time required to solve a linear programming over a totally unimodular constraint matrix, or in terms of minimum cut complexity. In the complexity expressions we let T (n, m) be the time required to solve a minimum cut problem on a graph with m arcs and n nodes. T (n, m) may be assumed equal to O(mn log(n2 /m)), [GT88]. For binarized system the running time depends on the complexity of solving a minimum cost network ﬂow algorithm T1 (n, m). We set T1 (n, m) = O(m log n(m + n log n)), the complexity of Orlin’s algorithm [Orl93]. n n Let T = T (2 j=1 [uj − j ], 2m1 (U − 1) + 2m2 U 2 ) and T1 = T1 (2 j=1 [uj − 2 j ], 2m1 U + 2m2 (U + 1) ). The main theorem summarizing our results is, Theorem 3. Given an IP2 on m = m1 + m2 constraints, x ∈ Zn and U = maxj=1,...n (uj − j + 1). 1. A monotone IP2 with D ≤ 1 is solvable optimally in integers for – U = 2, in time T (n, m). – Binarized IP2 in time T1 (n, m). – Otherwise, in time T . 2. For nonmonotone IP2 with D ≤ 1, a superoptimal fractional solution is obtainable in polynomial time: – For U = 2 a half integral superoptimal solution is obtained in time T (2n, 2m).
Instant Recognition of Half Integrality and 2Approximations
103
– For binarized IP2, a half integral superoptimal solution is obtained in time T1 (2n, 2m). – Otherwise, a superoptimal solution that is integer multiple of 12 for the 1 xvariables, and integer multiple of 2U for the zvariables is obtained in time T . 3. Given an IP2 and an objective function min wx + cz with w, c ≥ 0. – For D = 0, if there exists a feasible solution then there exists a feasible rounding of the 12 integer solution, which is a 2approximate solution obtainable in time T , [HMNT93]. – For binarized IP2, if there exists a feasible rounding of the fractional solution, then any feasible rounding is a 2approximate solution obtainable in time T1 . – For D > 0, if there exists a feasible rounding of the fractional solution, then any feasible rounding is a 2DU approximate solution obtainable in time T . If U = 2 the solution is 2Dapproximate.
2
The Algorithm
The algorithm solves the monotone IP2 problem in polynomial time using minimum cut or maximum ﬂow algorithm. This is done by transforming the monotone constraints to an equivalent system that is totally modular but contain a larger number of constraints by a factor of U . For NPhard instances of IP2, those containing nonmonotone constraints, we employ a monotonizing procedure. This procedure is a transformation of the 2var constraints to another set of constraints with totally unimodular matrix coeﬃcients. The transformed problem can then be solved in integers. The transformation back to the original polytope maps integers to half integers for the xvariables. Those can be rounded, under certain conditions, to a feasible solution within a factor of 2 of the optimum. Algorithm IP2 described in Figure 1 works in two phases: Phase applies a process of “monotonizing” (step 1) the inequalities and “binarizing” (step 2) the variables. The second phase recovers the values of the fractional solution 1 for the that is half integral for the xvariables and an integer multiple of 2DU zvariables. 2.1
Monotonizing
Consider ﬁrst a generic nonmonotone inequality ax + by ≤ c + dz. It can be assumed that z is scaled so that d > 0 and its objective function coeﬃcient is positive. If the inequality is reversed, ax + by ≥ c + dz, z is simply set to its lower bound. Replace each variable x by two variables, x+ and x− , and each term dz by z and z . The nonmonotone inequality is then replaced by two monotone inequalities: ax+ − by − ≤ c + z ,
−ax− + by + ≤ c + z .
The upper and lower bounds constraints j ≤ xj ≤ uj are transformed to
104
Dorit S. Hochbaum
Algorithm IP2 (min{ay : By ≤ c}) 1. 2. 3. 4. 5.
Monotonize using the map f : y → y+ , y− , B y ≤ c . Binarize , B y ≤ 0 ˆ+, y ˆ −. Solve min{a y : B y ≤ 0} in integers. Let optimal solution be y −1 + − ˆ ). ˆ to {By ≤ c} by applying f (ˆ y ,y Recover fractional solution y ˆ to y∗ . Round. If a feasible rounding exists, round y
Fig. 1. Schematic description of the algorithm IP2 j ≤ x+ j ≤ uj
− uj ≤ x− j ≤ −j .
In the objective function, the variable x is substituted by 12 (x+ − x− ) and z is substituted by 12 (z + z ). Monotone inequalities remain so by replacing the variables x and y in one inequality by x+ and y + , and in the second, by x− and y − , respectively. The variable z is duplicated: ax+ − by + ≤ c + z ax− − by − ≤ c + z . It is easy to see that if x+ , x− , y + , u− z , z solve the transformed system, 1 then x = 12 (x+ − x− ), y = 12 (y + − y − ), z = 2d (z + z ) solve the original system. 2.2
Binarizing
The transformed monotonized and binarized system has the property that every extreme point solution is integer. The process of conversion of the system of inequalities to a system that has all coeﬃcients in {0, −1, 1} is referred to as binarizing. This process can be applied to a 2var system of inequalities whether or not it is monotonized. For simplicity we describe the binarizing of monotonized inequalities. “Binarizing” is a process transforming the monotonized system to inequalities of the form xi − xj ≤ 0 or xi − xj ≤ zij . We start by replacing each xvariable xi , ≤ xi ≤ u, by u− binary variables ( +1) ( +2) (u) (k) so that xi = +xi +xi +. . .+xi , and so that xi ≥ kxi . ( +1) (u) The values of xi , . . . , xi form a consecutive sequence of 1s followed by a consecutive sequence of 0s. Each of these sequences could possibly be empty. This structure is enforced by including for each variable xi the inequalities, ( +1) (u) xi , . . . , xi
(k)
xi
(k+1)
≥ xi
for k = , . . . , u − 1,
(1)
Instant Recognition of Half Integrality and 2Approximations
105
( )
where xi = 1. For a linear objective function with xi ’s coeﬃcient w, the term wxi is replaced by, ( +1) (u) w + wxi + . . . + wxi . Binarizing axi − bxj ≤ c: Consider the monotone inequality axi − bxj ≤ c. This inequality enforces for each value pi ∈ [i , ui ] the implication: if xi ≥ pi , xj must satisfy for pj a function of pi , xj ≥
api − c ≡ pj . b
(2)
In other words, the implications (pi )
xi
(pj )
= 1 =⇒ xj
= 1 for all pi ∈ [i , ui ]
are equivalent to the inequality axi − bxj ≤ c. If pj > uj then the upper bound on xi is updated by setting, xi ≤ pi − 1 and ui ← pi − 1. To satisfy the set of (p ) (p ) implications it suﬃces to include the inequalities, xj j ≥ xi i . We append the set of inequalities (1) with up to min{ui , uj } inequalities, ∀pi ∈ {i , . . . , ui } such that pj ∈ {j , . . . , uj }, (p ) (p ) xj j ≥ xi i . (3) The set of inequalities (3) is equivalent to the inequality axi − bxj ≥ c. Binarizing axi − bxj ≤ dz + c: Consider an inequality with three variables, axi − bxj ≤ dz + c. First we substitute dz by another variable z, thus deriving the inequality axi − bxj ≤ z + c. We assume that z’s coeﬃcient in the objective function is positive, else we can ﬁx z at its upper bound, uz , in an optimal solution. Since the procedure is somewhat involved, we describe it here only for the case when z is binary. The general case is described in [Hoc97a]. (p ) z binary: Let pj be a function of pi as in (2). If xi i = 1 and pj − 1 =
api − c api − c − 1 n and all ij < n . Arranging the edges in arbitrary order e1 , . . . , em , one possible assignment of values is 1 i 1 n+j i = ( 2m ) and ej = ( 2m ) . We will be concerned with the behavior of the optimal solution to LP tVC as a function of m − t. When t = 0 the optimal solution value is 0. As the value of t grows (and the value of m − t becomes smaller) the optimal objective value becomes larger. The optimal solution as a function of the parameter m − t is piecewise linear and convex. We will investigate later the positioning of the breakpoints of this function. A description of the parametric optimal solution is given in Figure 1. Let λ be the dual multiplier associated with the budget constraint. At an ∗ the complementary slackness conditions imply that, optimal solution λ∗ and zij ∗ zij ) = 0. λ∗ ((m − t) − (i,j)∈E
116
Dorit S. Hochbaum
Since λ∗ > 0 for t > 0 it follows that the budget constraint is satisﬁed with equality for any optimal solution of the linear programming problem. 2.2
The Lagrangean Relaxation
We now relax the budget constraint in LP tVC with a nonnegative Lagrange multiplier λ. The resulting relaxation for a speciﬁed value of λ is, Min j∈V wj (1 + j )xj + (i,j)∈E (λ + ij )zij −λ(m − t) (tVCλ ) subject to xi + xj ≥ 1 − zij (i, j) ∈ E 0 ≤ xi , zij ≤ 1 for all i, j. For any value of λ, opt(tVCλ )≤opt(LP tVC). The optimal value of tVCλ is a lower bound to the optimal solution to the linear programming relaxation LP tVC. This relaxation is also socalled strong Lagrangean relaxation in that there exists a value of λ for which the Lagrangean relaxation solution has the same value as the linear programming relaxation optimum. This follows from our observation that there is always an optimal solution to LP tVC in which the budget constraint is binding. The relaxed problem has the 2var structure and therefore has an optimal solution that is half integer. We can thus replace in the relaxation the constraint 0 ≤ xi , zij ≤ 1 for all i, j by 0 ≤ xi , zij ∈ {0, 12 , 1} for all i, j. We call the resulting problem 12 tVCλ . If the budget constraint is binding opt(t − VC) ≥ opt( 12 t − VCλ∗ ) = opt(t − VCλ∗ ) ≥ opt(LPt − VC). In other words, the relaxation on the half integers is only a tighter relaxation than the linear programming relaxation. Consider again Figure 1: Every value of λ corresponds to the slope of one of the line segments in the parametric objective function. The value of the relaxation for one of these values is always attained at the rightmost end of the interval as there the objective value is the smallest. The constant term λ(m−t) can be omitted from the objective function. Once this term is omitted, the relaxed problem is an instance of Generalized Vertex Cover for any given value of λ with cij = λ + ij . For this reason it is possible to solve the relaxation in half integers more easily than the linear programming relaxation. Lemma 3. There exists a λ∗ such that opt(t − VCλ∗ ) = opt(LP tVC).
3
The 2approximation Algorithm
The algorithm searches value of λ so that when the problem tVCλ for smallest ∗ ∗ is solved for zij then (i,j)∈E zij ≤ m − t. We show how to solve the relaxation in half integers so that the budget constraint is binding and demonstrate the existence of rounding of the variables to a feasible integer and 2approximate solution. For convenience, we use here the notation for the perturbed coeﬃcients, wj = wj (1 + j ) and λij = λ + ij .
The t Vertex Cover Problem
3.1
117
The Algorithm for Solving the Relaxation for a Given λ
The technique of “monotonizing” described in [Hoc96] is applied to the relax− ation.: Each variable xj is replaced by two variables x+ j and xj , such that xj =
x+ −x− j j 2
− with x+ j ∈ [0, 1] and xj ∈ [−1, 0]. Each variable zij is replaced by z +z
and zij so that zij = ij 2 ij and both zij and zij in [0, 1]. The two variables zij formulation of the relaxation in the new set of variables called monotonized tVCλ is, 1 1 + 1 − Min j∈V 2 wj xj + j∈V 2 wj xj + 2 (i,j)∈E λij (zij + zij ) + − subject to xi − xj ≥ 1 − zij (i, j) ∈ E + (i, j) ∈ E −x− i + xj ≥ 1 − zij + 0 ≤ xi , zij , zij ≤ 1, −1 ≤ x− i ≤ 0 for all i, j.
To verify that this formulation is equivalent to tVCλ observe that adding up the two inequalities for a given (i, j) results in 2xi +2xj ≥ 2−2zij . Thus any solution to the monotonized formulation is feasible for the nonmonotonized formulation. The converse is true as well: given a feasible solution {xj }, {zij } to tVCλ , set − x+ i = −xi = xi and zij = zij = zij for a feasible solution to monotonized tVC. We have thus proved, Lemma 4. The set of feasible solutions for tVCλ is identical to the set of feasible solutions to monotonized tVCλ . The formulation monotonized tVCλ has a constraints’ coeﬃcients matrix that is totally unimodular. These constraints form the feasible solutions polytope of a minimum cut problem. We show how to construct a network where a minimum cut corresponds to an optimal solution to monotonized tVCλ . The network has one node for each variable x+ i and one node for each variable − xi . A source node s and a sink node t are added to the network. There is an 1 arc of capacity 12 wi connecting s to each node x+ i and an arc of capacity 2 wi − connecting each node xi to the sink t. For each (i, j) ∈ E there are two arcs − + − from node x+ i to the node xj and another arc from xj to the node xi . Both these arcs have capacities 12 λij . The network is described in Figure 2. ¯ corresponds to a feasible Lemma 5. Any finite cut separating s and t, (S, S), integer solution to monotonized tVCλ . Proof: The correspondence between the partition of nodes in the cut and the − values of x+ i and xi is set as in [Hoc96]: −1 x− − i ∈ S xi = ¯ 0 x− i ∈ S x+ i =
0 x+ i ∈ S ¯ 1 x+ i ∈ S.
118
Dorit S. Hochbaum
xi
x+i
1_ 2
λ ij
_1
w’i
2
w’i
s
t 1_ 2
1 _
w’j
2
x+j
w’j
xj
Fig. 2. The network for monotonized tVCλ
− ¯ Let zij be a binary variable that is equal to 1 if x+ i ∈ S and xj ∈ S. Otherwise + − ¯ Otherwise it is 0. Such assignment it is 0. Let zij = 1 if xj ∈ S and xi ∈ S. of values creates a feasible solution to the monotonized problem. The value of a ¯ is, cut (S, S)
+ − 1 1 ¯ ¯ wi + 2 (i,j)∈E {λij xi ∈ S and xj ∈ S} x+ ∈S x− ∈S wi + 2 i i + − ¯ (i,j)∈E {λij xj ∈ S and xi ∈ S} − x+ −x − + − = i wi i 2 i + 12 (i,j)∈E λij [1 − (x+ i − xj ) + 1 − (xj − xi )] 1 = i wi xi + 2 (i,j)∈E λij (zij + zij ) = i wi xi + (i,j)∈E λij zij .
¯ = C(S, S) +
1 2 1 2
Thus the value of the cut is precisely equal to the value of the objective function of tVCλ . Minimizing the value of the cut minimizes also tVCλ . The minimum cut solution corresponds to an optimal integer solution to the monotonized problem. That solution in turn corresponds to a half integral optimal solution for the relaxation tVCλ . Rounding the half integral solution by rounding the xj up and the zij down when fractional results in a feasible integer solution. To see that such rounding is feasible observe that whenever zij = 12 then 1 − (xi + xj ) = 12 and thus one of these variables is equal to 12 and will be rounded up. Note that the value of (i,j)∈E zij in the rounded solution may only go down and thus it satisﬁes the budget constraint.
The t Vertex Cover Problem
3.2
119
The Search for λ∗
As the value of λ increases the value of zij decreases in the relaxation’s optimal solution. We seek a value λ∗ which is the smallest for which zij ≤ m − t. It is easy to see that λ∗ ∈ (0, maxi wi ]. One method of ﬁnding the value of λ∗ is to conduct binary search in the interval (0, maxi wi ]. The running time of such procedure depends on the resolution of the value of λ. Based on our earlier observation in Lemma 1 λ may assume one of 2m · maxi wi values. The binary search on such set will have polynomial (but not strongly polynomial) number of calls to the solution of the relaxed problem. Each call requires to solve a minimum cut problem which can be accomplished by using for instance the pushrelabel 2 algorithm in O(mn log nm ), [GT88]. We prove now that λ may assume one of 2m possible values and thus the binary search will require only log m calls to a minimum cut procedure. Let dj be the degree of node j in the graph G = (V, E). Lemma 6. λ∗ ∈ {
(1+ j )wj dj
− ij (i, j) ∈ E}.
Proof: Consider ﬁrst the problem dual to the linear programming relaxation LP tVC with λ a dual variable corresponding to the budget constraint and µij the dual variables for the edge covering constraints. The upper bound constraints zij ≤ 1 and xj ≤ 1 can be ignored as they are automatically satisﬁed in any optimal solution. max (i,j)∈E µij − λ(m − t) subject to µij ≤ λ + ij for all (i, j) ∈ E (Dual tVC) for all j ∈ V i µij ≤ (1 + j )wj λ, µij ≥ 0 for all i, j. ¿From the formulation it is evident that in an optimal solution {λ∗ , µ∗ij }, w ¯ λ = max(i,j)∈E µ∗ij − ij . Let i µ∗ij = w ¯j for all j, then maxi µ∗ij ≥ djj and ∗
w ¯
λ∗ ≥ maxi,j ( djj − ij ). We show ﬁrst that maxi µ∗ij = maxj maxi µ∗ij =
w maxj djj
w ¯j dj
and later that
. w ¯
Let δ = max(i,j)∈E djj − ij . We construct a feasible solution with λ = δ of value that is equal or larger to that of an optimal solution. Let E ∗ be the set of edges (i, j) with µ∗ij > maxv wd¯vv . Consider an ordering of the nodes in the graph according to the ratio, wd¯11 < wd¯22 < . . . < wd¯nn . Suppose we are given an optimal dual solution with the set E ∗ nonempty. We will show that the values of the variables µ can be modiﬁed without aﬀecting their sum in the objective value but permitting to reduce the value of λ and thus increasing the dual objective. This will prove that the set E ∗ must be empty, and therefore w ¯ maxi µ∗ij = maxj djj .
120
Dorit S. Hochbaum
Construction of a solution to Dual tVC ¯v Step 0: µij = min{µ∗ij , maxv w } for all (i, j) ∈ E ∗ . k = 1. Let deficit(k) = w ¯k − dv µ . ik i Step 1: while deficit(k) > 0 begin For i = k + 1, . . . n ¯k then if µ∗ik < w dk ¯k − µ∗ik , deficit(k), deficit(i)}. ∆ = min{ w dk Update µik ← µik + ∆, def icit(k) ← def icit(k) − ∆ and def icit(i) ← def icit(k) − ∆. end. Step 2: If k = n output {µij }(i,j)∈E , stop. Else set k ← k + 1 and go to Step 1.
The procedure delivers i µik = w ¯k and every µij ≤ max v wd¯vv . Whenever Step 1 is visited there is always an edge (i, k) such that µ∗ik < wd¯kk . This can be veriﬁed by induction: At the beginning of iteration k, the set of edges between {1, . . . , k − 1} and {k, . . . , n} has the property that the total decrease in the values of µ∗ij across this cut is equal or greater to the total increase resulting from the process in step 1. Therefore the objective function for that solution satisﬁes (i,j)∈E
µij − (max j∈V
w ¯j − ij )(m − t) ≥ µ∗ij − λ∗ (m − t) dj (i,j)∈E
Thus we proved that in the optimal solution λ∗ = maxj∈V
w ¯j dj
− ij .
We show next that there is an optimal solution so that maxj w ¯
w ¯j dj
= maxj
w ¯j dj .
Let max djj − ij be attained for a collection of edges Emax (containing possibly a single edge) of cardinality Emax  < m − t. Then we can reduce the value of λ∗ by a small > 0 by reducing all µk, for edges in Emax by . The resulting change in the dual objective function is thus an increase of −dk + (m − t) > 0 which contradicts the optimality of the solution. Suppose now that Emax  ≥ m − t, and wk, >w ¯k, for each (k, !) ∈ Emax . Let = min(k,) wk, − w ¯k, > 0. But then we can feasibly increase all µ∗k, by and increase also λ∗ by the same amount. The resulting objective value is increased by (Emax  − (m − t)) ≥ 0. Therefore there is an optimal solution with w λ∗ = maxi,j djj − ij as claimed. We conclude that there are 2m breakpoints to the value of λ∗ in an optimal solution. 3.3
The Approximation Algorithm
The approximation relies on properties of the parametric piecewise linear function. In particular, we show that the breakpoints are a distance of 12 apart.
The t Vertex Cover Problem
121
Consider the convex parametric function in Figure 1. As the value of zij is increasing the objective value is decreasing. The value of the dual variable λ corresponds to the (absolute value of the) slope of the function. We sort the 2m breakpoints in decreasing values. For each slope (value of λ) some value of zij is increased. Because of the uniqueness, each breakpoint corresponds to a unique paring of an edge with one of its endpoints. The corresponding zij can be increased while this dual variable value is applicable. At the breakpoint the value is an integer multiple of half (since that problem’s relaxation has the 2var structure). Since this slope value cannot be repeated again due to uniqueness, the value of zij will have to be incremented maximally till the next breakpoint that corresponds to a strictly lower slope of the parametric function. 2approximation for tVC w
w
w
L = { djj − ij (i, j) ∈ E}. lower = min(i,j)∈E djj − ij , upper = max djj − ij . begin until L = 1 do L ← L ∩ [lower, upper]. Select the median element λ in L. Call a minimum cut to solve monotonized tVCλ for λ. If z < m − t, then upper = λ. Else lower = λ. (i,j)∈E ij end Round the values of xj up, and the values of zij down. Output the solution. end
With every call made to a minimum cut procedure the size of the set L is reduced by a factor of 2. There are thus altogether at most log2 (2m) calls. It follows that the complexity is that of O(log n) maximum ﬂow applications.
4
General Budget Constraints
Suppose each edge has a certain beneﬁt weight associated with covering it, aij . And suppose the problem is to cover a total of at least b weight of edges. We then substitutethe budget inequality by aij (1 − zij ) ≥ b. This constraint is equivalent to aij zij ≤ B = (i,j)∈E aij − b. We call BVC the problem in which the budget constraint is aij zij ≤ B. The formulation of the dual to the problem with this general requirement is, max (i,j)∈E µij − λB subject to µij ≤ aij λ for all (i, j) ∈ E (Dual BVC) for all j ∈ V i µij ≤ wj λ, µij ≥ 0 for all i, j. As argued before for the case of aij = 1, in an optimal solution {λ∗ , µ∗ij } the budget constraint is binding, and λ∗ = max(i,j)∈E µ∗ij .
122
Dorit S. Hochbaum
The entire discussion is analogous: The objective function coeﬃcients are perturbed to achieve uniqueness. The value of zij is increasing by a 12 at each breakpoint. However the budget constraint value aij zij may increase by an arbitrary amount corresponding to some aij . Suppose the values at two consecutive breakpoints are B1 and B2 so that B1 < B < B2 . Then we can take an appropriate convex combination of the solutions at the two breakpoints to obtain a solution with budget value B. The crucial property of this convex combination solution is that only one variable xj and one variable zij are of value that is not integer multiple of half. By rounding all the x variable up we get a 3approximation algorithm for the problem. Some reﬁnements are possible and are elaborated upon in the expanded version of this paper. This idea extends to added arbitrary number of constraints, k. The search for the λ vector becomes exponential in the number of added constraints. The approximation bound obtained is 2 + k.
Acknowledgment I wish to thank Lynn Burroughs for important feedback and for pointing out errors in an earlier version of this paper. My gratitude to Ilan Adler who has provided me with valuable insights on parametric linear programming.
References [BB98] N. H. Bshouty and L. Burroughs. Massaging a linear programming solution to give a 2approximation for a generalization of the vertex cover problem. The Proceedings of the 15th Annual Symposium on the Theoretical Aspects of Computer Science, (1998) 298–308 111 [GT88] A. V. Goldberg and R. E. Tarjan. A new approach to the maximum ﬂow problem. J. of ACM, 35 (1988) 921–940 112, 119 [HMNT93] D. S. Hochbaum, N. Megiddo, J. Naor and A. Tamir. Tight bounds and 2approximation algorithms for integer programs with two variables per inequality. Mathematical Programming, 62 (1993) 69–83 114 [Hoc82] D. S. Hochbaum. Approximation algorithms for the set covering and vertex cover problems. SIAM J. Comput. 11 (1982) 555556. An extended version in: W.P. #647980, GSIA, CarnegieMellon University, April 1980. 112 [Hoc83] D. S. Hochbaum. Eﬃcient bounds for the stable set, vertex cover and set packing problems. Discrete Applied Mathematics, 6 (1983) 243–254 112 [Hoc96] D. S. Hochbaum. A framework for half integrality and good approximations. Manuscript UC Berkeley, submitted. (1996). Extended abstract in this volume. 112, 113, 117 [Hoc96a] D. S. Hochbaum. Approximating covering and packing problems: set cover, vertex cover, independent set and related problems. Chapter 3 in Approximation algorithms for NPhard problems edited by D. S. Hochbaum. PWS Boston (1996) 112 [Kar72] R. M. Karp. Reducibility among combinatorial problems. In R. E. Miller and J. W. Thatcher (eds.) Complexity of Computer Computations, Plenum Press, New York (1972) 85–103 112 [Pet94] E. Petrank. The hardness of approximation: Gap location. Computational Complexity, 4 (1994) 133–157 111
A New Fully Polynomial Approximation Scheme for the Knapsack Problem Hans Kellerer and Ulrich Pferschy University Graz, Department of Statistics and Operations Research Universit¨ atsstr. 15, A8010 Graz, Austria {hans.kellerer,pferschy}@kfunigraz.ac.at
Abstract. A fully polynomial approximation scheme (FPTAS) is presented for the classical 0–1 knapsack problem. The new approach considerably improves the necessary space requirements. The two best previously known approaches need O(n + 1/ε3 ) and O(n · 1/ε) space, respectively. Our new approximation scheme requires only O(n + 1/ε2 ) space while also reducing the running time.
1
Introduction
The classical 0–1 knapsack problem (KP ) is deﬁned by (KP )
maximize subject to
n i=1 n
pi xi wi xi ≤ c
(1)
i=1
xi ∈ {0, 1},
i = 1, . . . , n,
with pi , wi and c being positive integers. (Note that this integrality assumption is not necessary for the algorithm in this paper.) W.l.o.g. we assume wi ≤ c ∀ i = 1, . . . , n. This special case of integer programming can be interpreted as ﬁlling a knapsack with a subset of the item set {1, . . . , n} maximizing the profit in the knapsack such that its weight is not greater than the capacity c. A set of items is called feasible if it fulﬁlls (1), i.e. if its total weight is at most the given capacity. The optimal solution value will be denoted by z ∗ . An overview of all aspects of (KP ) and its relatives is given in the book by Martello and Toth [5]. A more recent survey is given in Pisinger and Toth [6]. An algorithm A with solution value z A is called an ε–approximation algorithm, ε ∈ (0, 1), if z A ≥ (1 − ε) z ∗ holds for all problem instances. We will also call ε the performance ratio of A. Basically, the developed approximation approaches can be divided into three groups: Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 123–134, 1998. c SpringerVerlag Berlin Heidelberg 1998
124
Hans Kellerer and Ulrich Pferschy
(1) The classical Greedy algorithm, which is known in diﬀerent versions, needs only O(n) running time, requires no additional memory and has a performance ratio of 12 (cf. also Proposition 1). (2) Polynomial time approximation schemes (PTAS) reach any given performance ratio and have a running time polynomial in the length of the encoded input. The best scheme currently known is given in Caprara et al. [1] and yields 1 within O(n ) running time using O(n) space. a performance ratio of +2 (3) Fully polynomial time approximation schemes (FPTAS) also reach any given performance ratio and have a running time polynomial in the length of the encoded input and in the reciprocal of the performance ratio. This improvement compared to (2) is usually paid for by much larger space requirements. The best currently known FPTAS are summarized below in Table 1.
author
running time
space
Lawler [3]
O(n log(1/ε) + 1/ε4 )
O(n + 1/ε3 )
Magazine, Oguz[4] O(n2 log n · 1/ε) this paper
O(n · 1/ε) 2
O(n min{log n, log(1/ε)} + 1/ε min{n, 1/ε log(1/ε)}) O(n + 1/ε2 )
Table 1. FPTAS for (KP ) Our contribution concerns point (3). We present an improved fully polynomial approximation scheme with running time O(n · min{log n, log(1/ε)} + 1/ε2 · min{n, 1/ε log(1/ε)}) and space requirement O(n + 1/ε2 ). In particular, the improvement in space is a major advantage for the practical use of these methods. As in [3] we will assume that arithmetic operations on numbers as large as n, c, 1/ε and z ∗ require constant time. Our method is clearly superior to the one in [3] with a reduction by a 1/ε factor in space requirements. To compare the performance of our approach with the one given in [4] note that in the crucial aspect of space our new method is superior for n ≥ 1/ε. The running time is even improved as soon as n log n ≥ 1/ε. These relations are rather practical assumptions because for the solution of a knapsack problem with a moderate number of items and a very high accuracy optimal solution methods could be successfully applied. Moreover, we recall a statement by Lawler [3] that “bounds are intended to emphasize asymptotic behaviour in n, rather than ε ” indicating that n is considered to be of larger magnitude than 1/ε. For the closely related subset sum problem, which is a knapsack problem where the proﬁt and weight of each item are identical, the best known FPTAS is given by Kellerer et al. [2]. It requires only O(n + 1/ε) space and O(min{n · 1/ε, n + 1/ε2 log(1/ε)}) time. This could be seen as an improvement by a factor of 1/ε compared to this paper for a problem with “dimension reduced by one” although it requires diﬀerent techniques. Before going into the details of the algorithm in Section 2 we ﬁrst give an informal description of our approach.
A New Fully Polynomial Approximation Scheme for the Knapsack Problem
125
All items with “small” proﬁts are separated in the beginning. The range of all remaining “large” proﬁt values is partitioned into intervals of identical length. Every such interval is further partitioned into subintervals of a length increasing with the proﬁt value, which means that the higher the proﬁt in an interval, the fewer subintervals are generated. Then from each subinterval a certain number of items with smallest weights is selected and all proﬁts of these items are set equal to the lower subinterval bound. This number decreases with increasing proﬁt value of the current interval. Dynamic programming by proﬁts is performed with this simpliﬁed proﬁt structure. The approximate solution value is computed by going through the dynamic programming array and determining the best combination of an entry with a greedy solution consisting only of small proﬁt items. To attain the improved space complexity, we do not store the corresponding subset of items for every entry of the dynamic programming array but keep only the index of the most recently added item. To reconstruct the approximate solution set only limited backtracking through these entries is possible. Most of the solution set is computed by bipartitioning the item set and recursively solving the two resulting subproblems each dealing with only half of the original items set and a reduced range of dynamic programming. By patching together the items of the two subproblem solutions the original solution set can be constructed. Surprisingly, this recursion can be performed without increasing the overall time and space complexities (cf. Theorem 8). A related bipartitioning scheme to save space was used by Magazine and Oguz [4]. However their approach led to an increase of time complexity. Summarizing the main new ideas, the improvement of space is attained by storing only one item for each dynamic programming entry instead of a complete subset of items. The time improvement is derived on one hand by retriving the not stored solution set via an eﬃcient recursive partitioning of the item set and the dynamic programming array and on the other hand by a more involved partitioning and reduction of the proﬁt space of the items and by the use of this reduced proﬁt structure in the dynamic programming lstep.
2
The new fully polynomial approximation scheme
To compute bounds for z ∗ let us recall the Greedy–Heuristic G: A feasible solution is determined by sorting the items in nonincreasing order of their proﬁt to weight ratio and then considering all the items in that order (cf. [5]). Each item is put into the knapsack of capacity c if it ﬁts and is never taken out again. The solution value LB, which is a lower bound for z ∗ , is deﬁned as the maximum of the proﬁt computed by this procedure and the overall highest proﬁt of any item which is considered as a possible solution on its own. It is known that G has a performance ratio of 12 . Proposition 1 ((folklore)). LB ≤ z ∗ ≤ 2LB
126
Hans Kellerer and Ulrich Pferschy
A variant of the Greedy–Heuristic G will be used in Step 2 of the approximation scheme (AS) to add items with small proﬁt to possible solutions consisting of items with larger proﬁt. For technical reasons we will introduce the refined accuracy ε˜ := Note that 1ε˜ and scheme (AS) .
1 ε˜2
1 2ε
≤
ε . 2
are integers. In the following we state the new approximation
Algorithm (AS) : Step 1 Reduction of the items Compute the above lower bound LB by running G. Let T := {i  pi ≤ LB ε˜} be the set of small items. Let B := {i  pi > LB ε˜} be the set of large items. Partition B into 1/˜ ε − 1 intervals Lj of range LB ε˜ such that Lj := {i  jLB ε˜ < pi ≤ (j + 1)LB ε˜} with j = 1, . . . , 1/˜ ε − 1. for j = 1, . . . , 1/˜ ε − 1 do Partition Lj into j1ε˜ − 1 subintervals Lkj of range jLB ε˜2 such that Lkj := {i  jLB ε˜(1 + (k − 1)˜ ε) < pi ≤ jLB ε˜(1 + k˜ ε)} with k = 1, . . . , j1ε˜ − 1 and the remaining (possibly smaller) subinterval 1 1 ε) < pi ≤ (j + 1)LB ε˜}. Lj jε˜ := {i  jLB ε˜(1 + ( − 1)˜ j ε˜ for k = 1, . . . , j1ε˜ do ε). for all i ∈ Lkj set pi := jLB ε˜(1 + (k − 1)˜ if (Lkj  > j2ε˜ ) then Reduce Lkj to the j2ε˜ items with minimal weight it contains. Delete all other items in Lkj . Denote by L ⊆ B the set of all remaining large items. Step 2 Computation of the solution value z A := 0 (solution value) S A := ∅ (solution item set) perform dynamic programming (L, 2LB) returning (W [ ], R[ ]). Sort the items in T in nonincreasing order of their proﬁt to weight ratios. for all j ∈ {1, . . . , 2/˜ ε 2 } with W [j] ≤ c do in nonincreasing order of W [j] Add up the items from T as long as their weight sum is not more than the remaining capacity c − W [j] yielding a proﬁt of z T . z A := max{j LB ε˜2 + z T , z A } Let j A denote the iteration of the last update of the solution value z A . Put the items from T with total proﬁt z T inspected in iteration j A into S A .
A New Fully Polynomial Approximation Scheme for the Knapsack Problem
127
Step 3 Recursive reconstruction of the solution item set perform backtracking (R[ ], L, j A ) returning (z N ) and updating S A . perform recursion (L, j A LB ε˜2 − z N ). comment: The sorting of T in Step 2, which adds the O(n log n) factor to the running time, can be avoided by iteratively ﬁnding the median of the proﬁt/weight ratios of the small items and bipartitioning at this point. We do not give any details of this strategy which is analogous to Section 6 in Lawler [3] and yields a time bound of O(n log(1/ε)).
Dynamic Programming (L , P ) Input: L ⊆ L: subset of items, P : proﬁt bound. Output: W [ ], R[ ]: dynamic programming arrays, W [j] = w and R[j] = r means that there exists a subset of items with proﬁt jLB ε˜2 , weight w ≤ c and that item r was most recently added to this set. (Note that all profit values are multiples of LB ε˜2 .) u := P /(LB ε˜2 ) for j = 1ε˜ , 1ε˜ + 1, . . . , u do W [j] := c + 1, R[j] := 0 W [0] := 0 for all distinct proﬁt values pt of items in L do Let w1t ≤ . . . ≤ wdt be the weights of the items with proﬁt pt . for j = 0, 1ε˜ , 1ε˜ + 1, . . . , u do label[j] := false (indicates if entry W [j] was considered before for pt ) q := pt /(LB ε˜2 ) for j = 0, 1ε˜ , 1ε˜ + 1, . . . , u − q do if (label[j] = false and W [j] + w1t < W [j + q]) then (2) P := W [j + q], W [j + q] := W [j] + w1t (update operation) R[j + q] := index of the item with weight w1t label[j + q] := true (After updating an entry of W [ ] we consider all possible updates by items with profit pt originating from this entry) if (j + 2q ≤ u) then s := 2, # := 1, stop := false repeat P1 := P + w1t , P∗ := W [j + #q] + wst (P denotes the old value of the current entry.) # := # + 1, P := W [j + #q] M := min{P, P1 , P∗ } case M = P : stop := true case M = P1 : W [j + #q] := P1 R[j + #q] := index of item with weight w1t label[j + #q] := true, s := 2
128
Hans Kellerer and Ulrich Pferschy
case M = P∗ : W [j + #q] := P∗ R[j + #q] := index of item with weight wst label[j + #q] := true, s := s + 1 until (stop = true or j + (# + 1)q > u or s > d) return (W [ ], R[ ]). comment: We perform in principle classical dynamic programming by profits. The index of the last item used to reach any proﬁt value is stored in R[ ] for further use in backtracking. After updating an entry j + q we immediately consider the possibilities that either the old value of W [j + q] plus w1t or the new value of W [j + q] plus w2t yield an update of W [j + 2q]. If this is indeed the case the strategy is continued iteratively.
Backtracking (R[ ], L , j S ) Input: R[ ]: dynamic programming array with the same meaning as in dynamic programming. L ⊆ L: subset of items, j S : starting point in the array. Output: z N : collected part of the solution value. updates S A . v := j S , z N := 0; repeat r := R[v] S A := S A ∪ {r} z N := z N + pr v¯ := v, v := v − pr /(LB ε˜2 ) until (v = 0 or W [v] < W [¯ v ] − wr ) return (z N ). comment: The subset of items with total proﬁt j S LB ε˜2 is partially reconstructed. The backtracking stops, if an entry is reached which was updated after the desired subset was constructed. Such an updated entry must not be used because it may originate from an entry with smaller proﬁt which was generated by an item already used in the partial solution. This would result in a solution with a duplicate item. In the following we denote by D(L ) the number of distinct profit values of items from a set L .
˜ P˜ ) Recursion (L, ˜ ⊆ L: subset of items, P˜ : given proﬁt value. Input: L indirectly updates S A by calling backtracking.
A New Fully Polynomial Approximation Scheme for the Knapsack Problem
129
Partitioning ˜ into two disjoint subsets L ˜ 1, L ˜ 2 such that Partition L ˜ ˜ ˜ D(L1 ) ≈ D(L2 ) ≈ D(L)/2. ˜ 1 , P˜ ) returning (W1 [ ], R1 [ ]). Perform dynamic programming (L ˜ 2 , P˜ ) returning (W2 [ ], R2 [ ]). Perform dynamic programming (L Merging Find indices j1 , j2 such that (j1 + j2 )LB ε˜2 = P˜
and W [j1 ] + W [j2 ] is minimal.
(3)
Reconstruction and Recursion ˜ 1 , j1 ) returning (z N ). Perform backtracking (R1 [ ], L 1 2 N if (j1 LB ε˜ − z1 > 0) then ˜ 1 , j1 LB ε˜2 − z N ). Perform recursion (L 1 ˜ 2 , P˜ ) returning (W2 [ ], R2 [ ]). Perform dynamic programming (L (This recomputation is necessary because the space for W2 [ ], R2 [ ] ˜ 1 .) is used during the recursion on L ˜ Perform backtracking (R2 [ ], L2 , j2 ) returning (z2N ). if (j2 LB ε˜2 − z2N > 0) then ˜ 2 , j2 LB ε˜2 − z2N ). Perform recursion (L comment: Recursion does not yield an explicit return value but implicitly determines the solution set by the executions of backtracking during the recursion. Concerning the practical behaviour of (AS) it can be noted that its performance hardly depends on the input data and is thus not sensitive to “hard” (KP ) instances. Furthermore, it can be expected that the treelike structure implied by recursion (cf. Lemma 6) will hardly be fully generated and the maximum recursion depth should be fairly moderate in practice.
3
Analysis
At ﬁrst we show that the reduction of the large items B to set L in Step 1 induces only minor changes in an optimal solution. For a capacity c ≤ c let z L and z B be the optimal solution value of the knapsack problem with item set L and item set B, respectively. Lemma 2. z L ≥ (1 − ε˜)z B Proof. Let µj be the number of items from Lj in the optimal solution. As each item of Lj has a proﬁt greater than jLB ε˜ we get immediately zB >
j
µj jLB ε˜.
(4)
130
Hans Kellerer and Ulrich Pferschy
However, the rounding down of the proﬁts in Step 1 diminishes the proﬁt of every item in Lj by at most jLB ε˜2 . By bounding the new proﬁt of the same item set as above we get µj jLB ε˜2 ≥ z B − ε˜z B ≥ (1 − ε˜)z B zL ≥ zB − j
by inserting (4). The possible reduction of each set Lkj to j2ε˜ items with minimal weight has no eﬀect on z L . Because of Proposition 1 we have 2 · jLB ε˜ ≥ 2LB ≥ z B j ε˜ and hence there can never be more than j2ε˜ items from Lj in any feasible solution. Naturally, selecting from items with identical proﬁts those with smallest weight will not decrease the optimal solution value.
Lemma 3. Dynamic Programming (L , P ) computes for every P ≤ P a feasible set of items from L ⊆ L with total profit P and minimal weight, if it exists. Proof. After the preprocessing in Step 1 all item proﬁts are multiples of LB ε˜2 . As in classical dynamic programming schemes, an entry W [j] contains the smallest weight of all subsets of items with a total proﬁt of jLB ε˜2 considered up to any point. The correctness is clear for each item with weight w1t . The other items with the same proﬁt but larger weight are considered during the “repeat – until” loop. In this way the number of operations is proportional to the number of distinct proﬁt values instead of the (larger) number of items (cf. Theorem 8). For every entry W [j] we have to determine the minimum over three values: (1) the previous entry in W [j] (which means that there is no further update during this loop), (2) the previous entry in W [j − q] plus w1t (a classical update by the “most eﬃcient”item with proﬁt pt ) and (3) the entry in W [j − q] if it was t recently updated by some weight ws−1 , plus wst . In this way, it is taken care that no item is used twice to achieve a particular proﬁt value. (Note that for every entry W [j], if there is no update by an item with weight wst there will also be no update for an item with weight wst for
s > s.) Lemma 4. At the end of Step 2 we have z A ≥ (1 − ε)z ∗ . ∗ ∗ + zT∗ , where zB Proof. Let us partition the optimal solution value into z ∗ = zB ∗ denotes the part contributed by large items and zT the part summing up the small items in the optimal solution. The corresponding total weight of the large items will be denoted by c∗B ≤ c. In Lemma 2 it was shown that there exists also ∗ ∗ − ε˜zB and weight at most c∗B . a set of items in L with total value at least zB
A New Fully Polynomial Approximation Scheme for the Knapsack Problem
131
Hence, it follows from Lemma 3 that the ﬁrst execution of dynamic programming generates an entry in the dynamic programming array corresponding ∗ ∗ to a set of items with proﬁt between (1 − ε˜)zB and zB and weight not greater ∗ than cB . In Step 2, the corresponding entry in W [ ] is considered at some point during the for–loop and small items are added to the corresponding subset of items in a greedy way to ﬁll as much as possible of the remaining capacity which is at least c−c∗B . However, the proﬁt diﬀerence between an optimal algorithm and the greedy heuristic in ﬁlling any capacity is less than the largest proﬁt of an item and hence in our case it is at most LB ε˜. Altogether, this yields by Proposition 1 and Lemma 2 ∗ + zT∗ − LB ε˜ ≥ z ∗ − 2˜ ε z ∗ ≥ (1 − ε)z ∗ z A ≥ (1 − ε˜)zB
by deﬁnition of ε˜.
Lemma 5. After performing backtracking (R[ ], L , j S ) a subset of items from L with total profit z N was put into S A and there exists a subset of items in L with total profit z R such that z N + z R = j S LB ε˜2 . Proof. omitted.
˜ with total profit P˜ , then the Lemma 6. If there exists a feasible subset of L ˜ ˜ execution of recursion (L, P ) will add such a subset to S A . Proof. Naturally, a feasible subset of items with proﬁt P˜ can be divided into ˜ 2 respectively. Thereby, the given proﬁt value ˜ 1 and L two parts belonging to L P˜ can be written as a sum of P˜1 and P˜2 , each corresponding to the proﬁt of items from one subset. Applying Lemma 3 to both subsets with proﬁt value P = P˜ , it follows that in dynamic programming sets of items with minimal weight summing up to every reachable proﬁt smaller or equal P˜ are computed. Hence, the values P˜1 and P˜2 will also be attained in the dynamic programming arrays and the corresponding indices j1 , j2 fulﬁlling (3) can be found e.g. by going through array W1 [ ] in increasing and through W2 [ ] in decreasing order. To analyze the overall eﬀect of executing recursion also the recursive calls for ˜ 2 must be analyzed. This recursive structure of recursion corresponds ˜ 1 and L L to an ordered, binary rooted tree which is not necessarily complete. Each node in the tree corresponds to a call to recursion with the root corresponding to the ﬁrst call in Step 3. A node may have up to two child nodes, the left child ˜ 1 and the right child corresponding corresponding to the call of recursion with L ˜ 2 . The order of computation corresponds to a preorder tree walk to a call with L as the left child (if it exists) is always visited ﬁrst. This tree model will be also used in the proof of Theorem 8. The above statement will be shown by backwards induction moving “upwards” in the tree, i.e. starting with its leaves and applying induction to the inner nodes.
132
Hans Kellerer and Ulrich Pferschy
The leaves of the tree are executions of recursion with no further recursive calls. Hence, the two corresponding conditions yield z1N +z2N = (j1 +j2 )LB ε˜2 = P˜ and the statement of the Lemma follows from Lemma 5. If the node under consideration has one or two childs, the corresponding calls of recursion follow immediately after backtracking on the same set of parameters. Hence, Lemma 5 guarantees that the existence condition required for the statement is fulﬁlled. By induction, during the processing of the child nodes items with total proﬁt j1 LB ε˜2 − z1N + j2 LB ε˜2 − z2N are added to S A . Together with the items of proﬁt z1N and z2N added by backtracking this proves the above statement.
The above Lemmata can be summarized in Theorem 7. Algorithm (AS) is a fully polynomial approximation scheme for (KP ). Proof. Lemma 4 showed that the solution value of (AS), which can be written as z A = z T + j A LB ε˜2 , is close enough to the optimal solution value. At the end of Step 2 we put small items with proﬁt z T into S A . In Step 3 we add items with proﬁt z N to S A and by Lemma 5 we know the existence of an item set with proﬁt j A LB ε˜2 − z N . But this is precisely the condition required by Lemma 6 to guarantee that during the recursion items with a total proﬁt of j A LB ε˜2 − z N are added to S A .
It remains to analyze the asymptotic running time and space requirements of (AS). Theorem 8. For every performance ratio ε, (0 < ε < 1), algorithm (AS) runs in time O(n·min{log n, log(1/ε)} + 1/ε2 ·min{n, 1/ε log(1/ε)}) and space O(n+ 1/ε2 ). Proof. The maximal number of items in L is 1/˜ ε−1
j=1
1/˜ ε 1 2 2 1 · ≈ 2 j ε˜ j ε˜ ε˜ j=1 j 2
which is of order O(1/ε2 ). The four dynamic programming arrays clearly require O(1/ε2 ) space. To avoid the implicit use of memory in the recursion we always use the same memory positions for the four arrays. Therefore, W2 [ ] and R2 [ ] have to be recomputed in recursion because their original entries were destroyed during the recursion ˜ 1. for L ˜ in recursion can be handled without The recursive bipartitions of D(L) ˜ into a set with smaller proﬁts using additional memory e.g. by partitioning L
A New Fully Polynomial Approximation Scheme for the Knapsack Problem
133
and one with larger proﬁts. In this case every subset is a consecutive interval of indices and can be referenced by its endpoints. Hence, every execution of recursion requires only a constant amount of additional memory. As the recursion depth is bounded by O(log(1/ε)) (see below), the overall space bound follows. The reduction of the items in every interval Lkj can be done by a linear median algorithm. Hence, the overall running time of Step 1 is in O(n + 1/ε2 ). The main computational eﬀort is spent on dynamic programming. A straightforward implementation of a classical dynamic programming scheme without the complicated loop used in our procedure would consider every item for every entry of W [ ] and hence require O(L  · P /(LBε2 )) time. For the ﬁrst call in Step 2 this would be O(1/ε4 ). In our improved version dynamic programming we combine items with identical proﬁts. For every proﬁt value pt each entry of the dynamic programming array is considered only a constant number of times. It is for sure considered in (2). If the label of the current entry is “false”, we may enter the loop. As long as this “repeat – until” loop is continued, the label of every considered entry is set to “true”. At the point when any such entry is considered again in (2) it will therefore not start another “repeat” loop. With the above, every execution of dynamic programming (L , P ) requires only O(D(L ) · P /(LBε2 )) time. This clearly dominates the eﬀort of the following backtracking procedure. After Step 1 the number of large distinct proﬁt values is bounded by 1/˜ ε−1
D(L) ≤
j=1
1/˜ ε 11 1 1 1 ≈ ≈ log j ε˜ ε˜ j=1 j ε˜ ε˜
and hence is in O(min{n, 1/ε log(1/ε)}). Therefore, performing dynamic programming (L, 2LB) in Step 2 takes O(min{n, 1/ε log(1/ε)}1/ε2) time. The “for” loop in Step 2 can be performed by going through each W [ ] and T only once after sorting W [ ]. As mentioned in the comment after Step 3 the O(n log n) factor caused by sorting T can be replaced by O(n log(1/ε)) following an iterative median strategy by Lawler [3]. Summarizing, algorithm (AS) can be performed in O(n·min{log n, log(1/ε)} + 1/ε2 · min{n, 1/ε log(1/ε)}) time plus the eﬀort of recursion. To estimate the running time of recursion we go back to the representation of the recursive structure as a binary tree as introduced in the proof of Lemma 6. A node is said to have level # if there are # − 1 nodes on the path to the root node. The root node has level 0. Obviously, the level of a node is equivalent to its recursion depth and gives the number of bipartitions of the initial set of distinct proﬁt values. Therefore, the maximum level of a node is log D(L) which is in ˜ ≤ D(L)/2 . O(log(1/ε)). Moreover, for a node with level # we have D(L) ˜ P˜ ) will The running time of a node corresponding to a call of recursion (L, be interpreted as the computational eﬀort in this procedure without the possible
134
Hans Kellerer and Ulrich Pferschy
˜ 1 and L ˜ 2 . It is easy to see that the running two recursive calls of recursion for L time of a node with level # is dominated by the two executions of dynamic ˜ 1 )+D(L ˜ 2 ))·P˜ /(LBε2 )), which programming and therefore bounded by O((D(L ˜ 2 is in O(D(L)/2 · P /(LBε )). ˜ appropriate auxiliary values such as the number To ﬁnd the median of D(L) of items with identical proﬁt have to be kept. Without going into technical details it is clear that this can be done easily within the given time bounds. For the combined input proﬁt of the children in any node we get j1 LB ε˜2 − z1N + j2 LB ε˜2 − z2N < (j1 + j2 )LB ε˜2 = P˜ . Repeating this argument for all nodes from the root towards the leaves of the tree, this means that the sum of input proﬁts for all nodes with equal level is less than 2LB, the input proﬁt of the root node. Let the number of nodes with level # be m ≤ 2 . If we denote the input proﬁt of a node i in level # by P˜i this means that m P˜i < 2LB. i=1
Summing up over all levels the total computation time for all nodes with level # this ﬁnally yields log D(L) m =0
i=1
∞
D(L) D(L) ˜ i · P /(LBε2 ) ≤ · 2/ε2 ≤ 2D(L) · 2/ε2 , 2 2 =0
which is of order O(1/ε2 · min{n, 1/ε log(1/ε)}). Therefore, the recursive structure does not cause an increase in asymptotic running time and the theorem is proven.
References 1. A. Caprara, H. Kellerer, U. Pferschy, D. Pisinger, “Approximation algorithms for knapsack problems with cardinality constraints”, Technical Report 01/1998, Faculty of Economics, University Graz, submitted. 124 2. H. Kellerer, R. Mansini, U. Pferschy, M.G. Speranza, “An eﬃcient fully polynomial approximation scheme for the subsetsum problem”, Technical Report 14/1997, Fac. of Economics, Univ. Graz, submitted, see also Proceedings of the 8th ISAAC Symposium, Springer Lecture Notes in Computer Science 1350, 394–403, 1997. 124 3. E. Lawler, “Fast approximation algorithms for knapsack problems”, Mathematics of Operations Research 4, 339–356, 1979. 124, 127, 133 4. M.J. Magazine, O. Oguz, “A fully polynomial approximation algorithm for the 0–1 knapsack problem”, European Journal of Operational Research, 8, 270–273, 1981. 124, 125 5. S. Martello, P. Toth, Knapsack Problems, J. Wiley & Sons, 1990. 123, 125 6. D. Pisinger, P. Toth, “Knapsack Problems”, in D.Z. Du, P. Pardalos (eds.) Handbook of Combinatorial Optimization, Kluwer, Norwell, 1–89, 1997. 123
On the Hardness of Approximating Spanners Guy Kortsarz Department of Computer Science, The Open university, Klauzner 16, Ramat Aviv, Israel.
Abstract. A k−spanner of a connected graph G = (V, E) is a subgraph G consisting of all the vertices of V and a subset of the edges, with the additional property that the distance between any two vertices in G is larger than that distance in G by no more than a factor of k. This paper concerns the hardness of ﬁnding spanners with the number of edges close to the optimum. It is proved that for every ﬁxed k approximating the spanner problem is at least as hard as approximating the set cover problem We also consider a weighted version of the spanner problem. We prove that in the case k = 2 the problem admits an O(log n)−ratio approxima1− tion, and in the case k ≥ 5, there is no 2log n − ratio approximation, polylog n ). for any > 0, unless N P ⊆ DT IM E(n
1
Introduction
The concept of graph spanners has been studied in several recent papers, in the context of communication networks, distributed computing, robotics and computational geometry [ADDJ90, C94, CK94, C86, DFS87, DJ89, LR90, LR93] [LS93, CDNS92, PS89, PU89]. Consider a connected simple graph G = (V, E), with V  = n vertices. A subgraph G = (V, E ) of G is a k − spanner if for every u, v ∈ V , dist(u, v, G ) ≤ k, dist(u, v, G) where dist(u, v, G ) denotes the distance from u to v in G , i.e., the minimum number of edges in a path connecting them in G . We refer to k as the stretch factor of G . In the Euclidean setting, spanners were studied in [DFS87, DJ89, LL89]. Spanners for general graphs were ﬁrst introduced in [PU89], where it was shown that for every n−vertex hypercube there exists a 3spanner with no more than 7n edges. Spanners were used in [PU89] to construct a new type of synchronizer for an asynchronous network. Spanners are also used to construct eﬃcient routing tables [PU88]. For this, and other applications, it is desirable that the spanners be as sparse as possible, namely, have few edges. This leads to the following problem. Let Sk (G) denote the minimum number of edges in a k−spanner for the graph G. The sparsest kspanner problem involves constructing a k−spanner with Sk (G) edges for a given graph G. In this paper we consider the question of Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 135–146, 1998. c SpringerVerlag Berlin Heidelberg 1998
136
Guy Kortsarz
constructing spanners with the number of edges close to Sk (G).This is motivated as follows. It is shown in [PS89] that the problem of determining, for a given graph G = (V, E) and an integer m, whether S2 (G) ≤ m is NPcomplete. This indicates that it is unlikely to ﬁnd an exact solution for the sparsest k−spanner problem even in the case k = 2. In [C94] this result is extended for any integer k. Recently, in [VRMMR97] it is shown that the k−spanner problem is hard even in restricted cases. For example, the problem is hard even restricted to chordal graphs. The problem was known to be hard also for bipartite graphs [C94] (see also [VRMMR97]). Consequently, two possible remaining courses of action for investigating the problem are establishing global bounds on Sk (G) and devising approximation algorithms for the problem. In [PS89] it is shown that every n−vertex graph G has a polynomial time constructible (4k + 1)−spanner with at most O(n1+1/k ) edges, or in other words, S4k+1 (G) = O(n1+1/k ) for every graph G. Hence in particular, A every graph G has an O(log n)−spanner with O(n) edges. These results are close to the best possible in general, as implied by the lower bound given in [PS89]. The results of [PS89] were improved and generalized in [ADDJ90][CDNS92] to the weighted case, in which there are nonnegative weights associated with the edges, and the distance between two vertices is the weighted distance. Specifically, it is shown in [ADDJ90] that given an n−vertex graph and an integer k ≥ 1, there is a polynomially constructible (2k + 1)−spanner G such that 1 the weight (sum of weights of E(G ) < n · n k . It is also proven there, that the edges) of the constructed spanner, is O k · nO(1/k) times the weight of a minimum spanning tree. The algorithms of [ADDJ90, PS89] provide us with global upper bounds for sparse k−spanners, i.e., general bounds that hold for every graph. However, it may be that for speciﬁc graphs, considerably sparser spanners exist. Furthermore, the upper bounds on sparsity given by these algorithms are small (i.e., close to n) only for large values of k. It is therefore interesting to look for approximation algorithms, that yield nearoptimal local bounds applying to the speciﬁc graph at hand, by exploiting its individual properties. The only logarithmic ratio approximation algorithm known for constructing sparse spanners is for the 2−spanner problem. Speciﬁcally, in [KP92] an O(log(E/V )) approximation algorithm is given for the 2−spanner problem. That is, given a graph algorithm generates a 2−spanner G = (V, E ) G = (V, E), the
E edges. No small ratio approximation algorithm with E  = O S2 (G) · log V  is known even for the 3−spanner problem. However, it follows from the results in [ADDJ90] that any graph admits a 3−spanner with girth (minimum length 3/2 cycle) 5. Now, every √ graph of girth 5 has O(n ) edges. This “global” result can be considered n “approximation” algorithm for the k−spanner problem, for k ≥ 3. Note that this bound can not be improved in general. Consider a projective plane of order q. A projective plane of order q is a q + 1regular bipartite graph with n = q 2 + q + 1 vertices in each size, with the additional property that
On the Hardness of Approximating Spanners
137
every two vertices on the same side, share exactly one neighbor. Such a structure is known to exist, e.g., for prime q. Clearly, the girth in this graph is 6. Thus, the only 3 (and 4) spanner for the graph, is the graph itself. Furthermore, this graph contains θ(n3/2 ) edges. In this paper, we ﬁrst prove that the (unweighted) 2−spanner problem is N P −hard to approximate even when restricted to 3−colorable graphs, within c log n−ratio for some constant c < 1. This matches the approximation ratio of O(logn) of [KP92]. Hence the algorithm in [KP92] is the best possible for approximating the 2−spanner problem, up to constants. We also show that the (unweighted) k−spanner problem is hard to approximate with small ratio, even when restricted to bipartite graphs. Speciﬁcally, we prove that for every ﬁxed integer k, k ≥ 3 there exist a constant c < 1 such that it is N P −hard to approximate the k−spanner problem on bipartite graphs, within ratio c log n (the constant c depends on (the constant) k.) This result improves the N P −hardness result, for bipartite graphs [C94], for ﬁxed values of k. Clearly, this result implies a similar limitation on the approximability, for general graphs. Remark: in fact we prove that for any k = o(log n) (not necessarily ﬁxed) there exist a constant c < 1 such that the k−spanner has no c · log n/k−ratio approximation, unless N P ⊆ DT IM E(nO(k) ). (In the case k = Ω(log n), indeed, the k−spanner problem can be approximated within ratio O(1) since, as we said before, there is always a log n spanner with O(n) edges. Hence, it is mainly interesting to prove hardness results for k = o(log n).) Finally, we deﬁne a natural new weighted version of the spanner problem. In this version, called the edge weighted k−spanner problem, each edge e ∈ E has a positive length l(e) but also a nonnegative weight w(e). The goal is to ﬁnd a k spanner G with low weight. Namely, the graph G should have stretch factor k where the distances are measured according to l, and ,also, the sum of weights w(e) of the edges in G , should be as small as possible. For example, in the unweighted case l(e) = w(e) = 1 for every edge e. Also, in the more common weighted case, considered in [ADDJ90, CDNS92], for every edge e, w(e) = l(e). For the edge weighted k−spanner problem we have the following results. We consider the case where l(e) = 1 for every edge and w is arbitrary. For k = 2, this version of the problem admits a O(log n)−ratio approximation. However, for 1− every k ≥ 5, we prove that the problem has no 2log n − ratio approximation, for any $ > 0, unless N P ⊆ DT IM E(npolylog n ). This later result follows by a reduction from oneround twoprovers interactive proof system. We note that ours are the ﬁrst results on the hardness of approximating the spanner problem.
2
Preliminaries
First, recall the following alternative deﬁnition of spanners.
138
Guy Kortsarz
Lemma 1. [PS89] The subgraph G = (V, E ) is a k − spanner of the graph G = (V, E) iﬀ dist(u, v, G ) ≤ k for every (v, u) ∈ E. Thus the (unweighted) sparsest k−spanner problem can be restated as follows: we look for a minimum subset of edges E ⊂ E such that every edge e that does not belong to E lies on a cycle of length k + 1 or less with edges that do belong to E . In this case we say that e is spanned in E (by the remaining edges of the cycle). In what follows we say that two (independent) sets C and D are cliqued, if every vertex in C is connected to every vertex in D, thus C and D induce a complete bipartite graph. We say that C and D are matched, if C = D (i.e., C and D have the same size) and every vertex in C has a unique neighbor in D (that is, the two sets induce a perfect matching). The setcover problem: For our purpose, it is convenient to state the setcover problem in the following way. The input for the setcover problem consists of a bipartite graph G(V1 , V2 , E), where the edges cross from V1 to V2 (that is, V1 and V2 contain no internal edges) with n vertices on each side. The goal is to ﬁnd the smallest possible subset S ⊆ V1 , such that every vertex in V2 has a neighbor in S. The following result is known [RS97]. This result followed two results by [LY93], and [F96] which, however, where under weaker complexity assumption. Theorem 1. There exist a constant c < 1, such that it is N P −hard to approximate the setcover problem within ratio c ln n. We need the following lemma regarding a restrictive case of the setcover problem. Consider the ρ−setcover problem which is the setcover problem in the case ∆, the maximum degree of any vertex in V1 ∪ V2 , is bounded by nρ for some (ﬁxed) 0 < ρ < 1. The usual greedy algorithm ([J74, L75]) gives a ρ · ln n−ratio approximation algorithm for the ρ−setcover problem. On the other hand we have: Lemma 2. It is N P −hard to approximate the ρ−setcover problem within c · ρ · ln n ratio. (To see this, just consider starting with a bipartite graph G with no restriction on the degrees, and taking n1/ρ−1 copies of G.) In the next section we prove our hardness result for the unweighted case for k ≥ 5. In the full paper, we prove a similar result for k = 3 and k = 4. These results show hardness of approximation on bipartite graphs. We also defer to the full paper the hardness result for k = 2 (this hardness result is for 3−colorable graphs).
3
A hardness result for k ≥ 5 in the unweighted case
In this section we consider the hardness of approximating the k−spanner problem for integer constant odd k, k = 2t + 1 and t ≥ 2. The constructed graph is
On the Hardness of Approximating Spanners
139
bipartite hence contains no odd cycles. It follows that any 2t + 2 spanner in such a graph is a 2t + 1 spanner as well, since the graph has no 2t + 3 cycles. In summary, the lower bound on the approximation for k = 2t+1, on bipartite graphs, will automatically imply a lower bound for the case k = 2t + 2. 3.1
The construction for k ≥ 5
We start this subsection by giving an intuitive explanation for our construction. Consider the graph G(V1 , V2 , E) of the setcover problem. Suppose that we connect V1 in a clique (i.e., complete bipartite graph) to a new set A of n vertices. Further suppose that each vertex in the set A is connected by a collection P of appropriate path, to every vertex of V2 . Each such path would have length exactly 2t. Next suppose that we prove that in any spanner closed to the optimum, in any path P leading from a vertex a ∈ A and v2 ∈ V2 , the central edge is missing. Hence, in order to ﬁnd an alternative path for each such missing edge. we must connect every vertex of A by a path to every vertex of V2 “via” the vertices of V1 (closing a cycle of length 2t + 2 with the missing edge). Namely, each vertex of A has to be connected to each vertex of V2 , by a path of length 2, that goes trough V1 . It is easily seen, therefore, that each vertex a of A is connected in V1 to a subset Sa that covers V2 . The number of edges needed in the spanner will therefore be roughly n · s¯, where s¯ is the average size of all the sets Sa . Hence it is convenient for the algorithm to ﬁnd a small cover S, and connect each vertex in A to S. One diﬃculty is to ﬁnd a construction that assures that indeed the central edge will be missing in any “good” spanner Next, we describe the construction for the k−spanner problem in the case of constant odd k, k ≥ 5. Let k = 2t + 1, t ≥ 2. Let $ > 0 be a constant satisfying: 1−
1 1 < $ < 1− 2t + 1 2t + 2
(1)
Let δ = (2t + 1)(1 − $). We note that by the deﬁnition of $, we have that $ < δ < 1. Also let δ1 be a constant satisfying: max{δ, 1 − $/3} < δ1 < 1
(2)
We start the construction with an instance G(V1 , V2 , E) of the (1 − δ1 )−setcover problem. That is, the maximum degree in G is bounded by n1−δ1 . The construction is composed of two main ingredients: the ﬁxed part and the gadgets part. The ﬁxed part contains the graph G and the set A. We clique A and V1 as explained above (namely, we connect each vertex a ∈ A to each vertex v1 ∈ V1 ). Furthermore, we have two special vertices, a1 , b1 . The vertices a1 and b1 are joined by an edge. Then, a1 is connected to each vertex of A, and b1 is connected to each vertex of V1 . Secondly, we describe the “gadgets part” of the construction. This part of the construction is intended, to connect each vertex in A to each vertex in V2 by a path of length 2t.
140
Guy Kortsarz
The gadget is a union of 4·ln n·n , diﬀerent gadgets. In the i th gadget we have the following ingredients. The construction of the gadget involves randomization (which, nevertheless, can be easily derandomize). For 1 ≤ i ≤ 4 ln n · n do. – Deﬁne sets Ai1 , Ai2 , . . . , Ait , each of them of size n. The sets corresponding to diﬀerent i s are disjoint. For each i, the set A is matched (connected in a perfect matching) to the set Ai1 . The set Ai1 is matched to the set Ai2 , and in general, for every 1 ≤ j ≤ t − 1, the set Aij is matched to the set Aij+1 . – Deﬁne sets V2i1 , V2i2 , . . . , V2it−1 , each of size n. The sets corresponding to different i s are disjoint. The sets V2 and V2i1 are matched. Also, for each 1 ≤ j ≤ t − 2, the sets V2ij and V2ij+1 are matched. Call all edges of the perfect matchings (also the above ones that match Aij with Aij+1 ) “matching edges”. t−1 ∈ V2it−1 put an edge – Finally, for every vertex ait ∈ Ait and every vertex v2i t−1 i between at and v2i , randomly and independently, with probability 1/n . Let Ri denote the collection of random edges resulting among the two sets, V2it and Ait . We note that for each vertex a ∈ A, and gadget i, there is a unique vertex ait ∈ Ait , that is connected to the vertex a via a path that entirely goes trough the matching edges. For this reason we throughout call ait a matched copy of a. t−1 Similarly, every vertex v2 ∈ V2 , has a unique matched copy v2i ∈ V2it−1 in any gadget i. It is easy to verify that the constructed graph is bipartite. 3.2
Cycles containing Ri edges
In this subsection, we show that in a sense, the Ri edges could, without loosing much, be avoided from entering a “good” spanner. It would then follow that each edge of Ri should be spanned using a path from Ait to V2it−2 , that goes trough A, V1 and V2 . Call such path G−path. More speciﬁcally, a G−path starts at a matched copy ait ∈ Ait of a vertex a ∈ A. Then the G−path goes to the sets Ait−1 , Ait−2 , . . . , Ai1 , via the matching edges. Then the path goes to a, and then ¯ v2 ∈ V2 of v1 . Finally, to a vertex v1 ∈ G, and then to a neighbor (in G and G) t−1 the path continues to the matched copy v2i of v2 via the matching edges. Note t−1 ) (if present) closes a cycle of length exactly 2t + 2 with that the edge (ait , v2i the G−path. We call such a cycle a G−cycle. Beside the G−cycles, the other appropriate short cycles are the following: (i) Cycles containing only edges of Ri . Call such cycles i−cycles. (mi) Cycles containing edges of Ri and G, and non of the vertices of A. More speciﬁcally, one can choose a vertex v1 ∈ V1 , Choose two neighbors v2 , u2 of v1 , in V2 , walk in parallel, using the matching edges, to the two matched t−1 t−1 copies v2i of v2 and ut−1 2i of u2 , in V2i , and ﬁnally close the cycle using a t−1 i i mutual neighbor at ∈ At , of v2i and ut−1 2i . Call such cycles m − i−cycles.
On the Hardness of Approximating Spanners
141
In the following lemmas, we bound the (expected) number of i and m − i cycles. Lemma 3. The expected number of i cycles (summing over all of the Ri gadgets) ˜ 1+δ ). is bounded by O(n Lemma 4. The expected number of m − i−cycles is o(n1+δ1 ). Hence we summarize (using the fact that by deﬁnition nδ = o(nδ1 )). Corollary 1. The total number of expected i−cycles and m−i−cycles is bounded by o(n1+δ1 ). 3.3
The lower bound
In this section we give the proof of the lower bound using Corollary 1. We ﬁrst need the following technical lemma. This lemma states that, with high probability, all the vertices of A are connected to all the vertices of V2 , via a path that entirely goes trough the matching edges and Ri edges. Lemma 5. With probability at least 1 − 1/n2 , for each vertex a ∈ A and vertex t−1 ) was included by the v2 ∈ V2 , there exist a gadget i such that the edge (ait , v2i random choice. It is easily seen that one can derandomize the construction using the method of conditional expectation in time roughly nk . That is, it is possible, for ﬁxed k, to construct deterministically, in polynomial time, a structure with the desired properties of Corollary 1 and Lemma 5. Using this lemmas, we prove our two main claims. Let s∗ be the size of an optimum cover in G. Note that since G is an instance of the (1 − δ1 )−setcover problem, the size of the optimum cover is at least s∗ ≥ nδ1 . ¯ of the 2t + 1−spanner problem, admits a Lemma 6. The instance G 2t + 1−spanner with no more than 2 · s∗ · n edges. Proof. Take into the spanner the edges touching a1 , b1 and the edges of G. The number of edges added so far is O(n2−δ1 ). In this way we spanned the edges of the ﬁxed part of the construction (with stretch 1 or 3 for any edge.) I.e., we took care of the edges joining A and V1 , and the edges joining V1 and V2 and the edges of a1 and b1 . Take into the spanner all the matching edges. The number of edges added ˜ 1+ ) (the last equality is valid for ﬁxed t or even for ˜ · n1+ ) = O(n here is O(t t = O(log n) as in our case). It only remains to span the edges of Ri . Choose a cover S ∗ ⊆ V1 of V2 of size s∗ . Connect all the vertices of A to all the vertices of S ∗ . For every vertex v2 ∈ V2 , choose a neighbor s ∈ S ∗ , and add the edge (s, v2 ) to the spanner. It is easy to check that all the edges of Ri are spanned now, with an arbitrary alternative G−path of length exactly 2t + 1. Note that the number of edges in ˜ 1+ ) + O(n2−δ1 ). Now, since n = o(nδ1 ), δ1 > 1/2 this spanner is s∗ · n + O(n ∗ δ1 and s ≥ n , the claim follows for large enough n.
142
Guy Kortsarz
¯ with no more than l ·n edges, Lemma 7. Given a 2t+ 1−spanner H(V, E ) in G for some l > 0, there exist a (polynomially constructible) cover S of V2 of size 2l or less. Proof. Starting with H change to a new 2t + 1−spanner H as follows. First, add to H all the edges of a1 and b1 (if they are not already in). Similarly, add all the matching edges and the edges of G. Now, consider the edges in Ri ∩ E , namely the edges of Ri , that are in the t−1 spanner. Remove every such edge (ait , v2i ), joining a matched copy ait of a to a t−1 matched copy v2i of v2 . In the present situation, several of the Ri edges may be unspanned. Add for each such edge, an alternative Gpath. The resulting graph H is still a legal 2t + 1 spanner. Note that (beside the matching edges) for every i−cycle or m − i−cycle, we may have entered 2 additional edges to H , one joining a vertex a ∈ A and a vertex v1 ∈ V1 , and the other joining the vertex v1 to a vertex v2 ∈ V2 . These are the two relevant edges from the G−path. Let num denote the number of edges in the new resulting spanner H . By Corollary 1 num is bounded above by ˜ · n1+ ) + o(n1+δ1 ) + O(n2−δ1 ). num ≤ l · n + θ(t Note that, now, the only way to span the Ri edges is using G−path. Recall that by Lemma 5, for every vertex a ∈ A and v2 ∈ V2 , there are two t−1 and ait of v2 and a, that are neighbors in Ri . Since the edge matching copies v2i t−1 i e = (v2i , at ) is missing from H , and we need to span this edge by a G−path, it follows that a is connected to a neighbor v1 ∈ V1 of v2 . In other words, the set Sa of neighbors of a in V1 , in the spanner H , is a cover of V2 in G. One one hand, note that the number of edges num in H is bounded below by: num ≥ Sa  ≥ n · s∗ ≥ n1+δ1 . a∈A
which implies that num ≥ n1+δ1 . Now, since $ < δ1 and δ1 > 1/2, we necessarily have that 2l ≥ nδ1 , for large enough n. On the other hand, since: Sa . num ≥ a∈A
By averaging, it turns out that there is a cover Sa of size num/n or less. Hence ˜ · n ) + o(nδ1 ) + O(n1−δ1 ) ≤ 2l (the the size of this set Sa is bounded by l + O(t last inequality, again, follows for large enough n). Hence we may choose Sa as the required cover. Now, the main theorem easily follows. For this theorem, let c be a constant such that it is N P −hard to approximate setcover within ratio c ln n. Then Theorem 2. The k−spanner problem, for k ≥ 5, can not be approximated within ratio c(1 − δ1 ) · ln n, 8 unless P = N P .
On the Hardness of Approximating Spanners
143
Proof. Again, it is only necessary to prove this result for odd values, k = 2t + 1, t ≥ 2 of k. Assume an algorithm A that has the claimed ratio. Let G be an instance of the (1 − δ1 )−setcover as described above. Let s∗ be the size of the ¯ of the 2t + 1spanner as minimum cover of V2 in G. Construct an instance G ¯ described. By Lemma 6, the graph G admits a spanner with 2 · s∗ · n edges. The ¯ is θ(n ˜ 1+ ). Thus, ln n ¯ < 2 ln n for large enough n. number of vertices, n ¯ , in G By the assumption of the theorem, the algorithm A would produce a spanner of size less than (c(1 − δ1 )/8) · 2 · ln n · 2 · s∗ · n = (c(1 − δ1 )/2) · ln n · s∗ · n. Let l = (c(1−δ1 )/2)·ln n·s∗ . By Lemma 7, one derives from this construction (in polynomial time) a cover of size no larger than c(1 − δ1 ) · ln n · s∗ . This contradicts Lemma 2. Similar logarithmic limitation on the approximability (but with slightly different construction) follows for the cases k = 3 and k = 4, and for the case k = 2 on 3−colorable graphs.
4
The weighted case
In this section, we deal with the following weighted version of the spanner problem. We are given a graph G with a weight function w(e) on the edges. We assume the length of each edge to be 1. That is, once again, in every k−spanner, a missing edge should be replaced by a path containing k edges or less. However, here we measure the quality of the spanner by its weight, namely, the sum of weight of its edges. We look for a k−spanner with minimum weight. In this section we prove an essential diﬀerence between the approximability of the cases k = 2, and k ≥ 5. First, we prove that for k = 2, this version of the problem admits a O(log n) ratio approximation. This is done in a way similar to [KP92]. We sketch the variant of the method of [KP92] needed here. We say that a vertex v 2−helps in G an edge e = (w, z) if the two edges (v, w) and (v, z) are included in G . I.e., in G , there is an alternative path of length 2 for e, that goes trough v. The idea is to ﬁnd a vertex v that 2−helps many edges of E, using low weight. Consider each vertex v ∈ G. Let N (v, G) be the graph induced in G by the neighbors N (v) of v. For every neighbor z of v, put weight w(e) on z in N (v, G), where e = (z, v). For any subset of the vertices V ⊆ N (V ), let e(V ) denote the number of edges inside V , and let wv (V ) denote the sum of weights of the vertices of V , in N (v, G). We look for a vertex v and a subset V ⊆ N (v) that achieves the following minimum: wv (V ) min min . v e(V ) V ⊆N (v) It is important to note that the pair v, V achieving this minimum, can be found in polynomial time using ﬂow techniques (cf. [GGT89]). Given v and V , one adds the edges connecting v and V , to the spanner. Note that in this way
144
Guy Kortsarz
we 2−help (or span) all the edges internal to V , using low weight. This is done in iterations, until the edges are exhausted. It follows by a proof similar to the one in [KP92] that this greedy algorithm is an O(log(E/V ))−ratio approximation algorithm for the edge weighted 2−spanner problem. Details are therefore omitted. Theorem 3. The edge weighted 2−spanner problem, in the case l(e) = 1, for every edge e, admits an O(log(E/V ))−ratio approximation algorithm. 1−
However, for every k ≥ 5, the problem has no 2log n − ratio approximation, for any $ > 0, unless N P ⊆ DT IM E(npolylog n ). This, for example, indicates that it is unlikely that there would be any polylogarithmic ratio approximation for the edge weighted k−spanner problem, for k ≥ 5. This result is discussed in the next subsection. 4.1
The weighted case with k ≥ 5
In this subsection we consider the edge weighted k−spanner problem, for k ≥ 5, in the special case where l(e) = 1 for every edge e. We essentially prove hardness by giving a reduction from the oneround twoprovers, interactive proof system. However, for simplicity, we abstract away the relation to the interactive proof, and describe the problem we reduce from in the following simpler way. There are two versions to the problem, a maximization version and a minimization version. We are given a bipartite graph G(V1 , V2 , E). The sets V1 and V2 are split into k a disjoint union of k sets: V1 = i=1 Ai and V2 =kj=1 Bj . The bipartite graph, and the partition of V1 and V2 , induce a supergraph H in the following way. The vertices in H are the sets Ai and Bj . Two sets Ai and Bj are connected by a (super) edge in H iﬀ there exist ai ∈ Ai and bj ∈ Bj which are adjacent in G. For our purposes, it is convenient (and possible) to assume that that graph H is regular. Say that every vertex in H has degree d, and hence, the number of superedges is h = k · d. In the maximization version, which we call Maxrep, we need to select a single “representative” vertex ai ∈ Ai from each subset Ai and a single vertex “representative” bj ∈ Bj from each Bj . We say that a superedge (Ai , Bj ) is covered if the two corresponding representatives, are neighbors in G, namely (ai , bj ) ∈ E. The goal is to (chose a single representative from each set and) maximize the number of superedges covered. Let us now recall the SAT , problem, which is the decision version of the satisﬁability problem. A CNF boolean formula I is given, and the question is weather there is an assignment satisfying all the clauses. The following result follows from [FL92] and [R95]. See also, [LY93]. Theorem 4. For any 0 < $ < 1, there exist a quasipolynomial reduction of the satisﬁability problem, to an instance G of Maxrep of size n, such that if I is satisﬁable, there is a set of unique representatives that cover all h = k · d superedges, and if the formula is not satisﬁable, in the best choice of representatives, 1− it is possible to cover no more than h/2log n of the superedges.
On the Hardness of Approximating Spanners
145
The following easily follows from Theorem 4. Theorem 5. Unless N P ⊆ DT IM E(npolylog n ), for any $ > 0 Maxrep admits 1− no 2log n −ratio approximation. We need a slight minimization variant of Maxrep which we call Minrep. In this case one needs to choose a minimum size subset C ⊆ V1 ∪ V2 . Unlike the maximum version of the problem, in the minimization version of the problem, one may choose to include in C many vertices of each set Ai and Bj . In Minrep it is required to cover every superedge, namely that for each superedge (Ai , Bj ) there is a pair ai ∈ Ai and bj ∈ Bj that both belong to C, such that (ai , bj ) ∈ E. A limitation on the approximability of Minrep, similar to the one for Maxrep, follows easily from Theorem 4. The reduction here is rather standard (it is implicit in [LY93]). Theorem 6. Unless N P ⊆ DT IM E(npolylog n ), for any $ > 0 Minrep admits 1− no 2log n −ratio approximation algorithm. By reducing Minrep to the edge weighted k−spanner problem, for k ≥ 5 we get: Theorem 7. Unless N P ⊆ DT IM E(npolylog n ), the edge weighted k−spanner 1− problem, for k ≥ 5, admits no 2log n −ratio approximation, for any $ > 0, even when restricted to bipartite graphs. In conclusion, we leave open the question of weather a similar “gap” in the approximability of k = 2, and k ≥ 5 is valid also in the unweighted case. The goal is either to prove evidence for such a gap, or give a logarithmic ratio approximation algorithms for ﬁxed values of k. Also, the case of k = 3 and k = 4 deserves attention.
Acknowledgment The author thanks Uri Feige for many helpful discussions.
References [ADDJ90] I. Alth¨ ofer and G. Das and D. Dobkin and D. Joseph, Generating sparse spanners for weighted graphs, Discrete Compu. Geometry, 9, 1993, 81100 135, 136, 137 [B86] B. Bollob´ as, Combinatorics, Cambridge University Press, 1986 [C52] H. Chernoﬀ, A Measure of Asymptotic Eﬃciency for Tests of Hypothesis Based on the Sum of Observations, Ann. Math. Stat., 23, 1952, 493507 [C86] L.P. Chew, There is a Planar Graph Almost as Good as the Complete graph, ACM Symp. on Computational Geometry, 1994, 169177 135 [C94] L. Cai, NPcompleteness of minimum spanner problems, Discrete Applied Math, 9, 1993, 81100 135, 136, 137
146
Guy Kortsarz
[CDNS92] B. Chandra and G. Das and G. Narasimhan and J. Soares, New sparseness results for graph spanners, Proc 8th ACM Symposium on Comp. Geometry, 1992 135, 136, 137 [CK94] L. Cai and M. Keil, Spanners in graphs of bounded degree, Networks, 24, 1994, 187194 135 [DFS87] D.P. Dobkin and S.J. Friedman and K.J. Supowit, Delaunay Graphs are Almost as Good as Complete Graphs, Proc. 31st IEEE Symp. on Foundations of Computer Science, 1987, 2026 135 [DJ89] G. Das and D. Joseph, Which Triangulation Approximates the Complete Graph?, Int. Symp. on Optimal Algorithms, 1989, 168192 135 [F96] U. Feige, A threshold of ln n for approximating set cover, Proc. 28th ACM Symp. on Theory of Computing, 1996, 314318 138 [FL92] U. Feige L. Lova’sz, Twoprovers oneround proof systems: Their power and their problems, Proc. 24th ACM Symp. on Theory of Computing, 733741, 1992 144 [GGT89] G. Gallo and M.D. Grigoriadis and R.E. Tarjan, A fast Parametric maximum ﬂow algorithm and applications, SIAM J. on Comput, 18, 1989, 3055 143 [J74] D.S Johnson, Approximation Algorithms for Combinatorial Problems, J. of computer and system sciences, 9, 1974, 256278 138 [KP92] G. Kortsarz and D. Peleg, Generating Sparse 2spanners, J. Algorithms, 17, 1994, 222236 136, 137, 143, 144 [L75] L. Lov´ asz, On the ratio of Integral and Fractional Covers, Discrete Mathematics, 13, 1975, 383390 138 [LL89] C. Levcopoulos and A. Lingas, There is a Planar Graph Almost as Good as the Complete graph and as short as minimum spanning trees, International Symposium on Optimal Algorithms, LNCS401, 1989, 913 135 [LR90] A.L. Liestman and D. Richards, DegreeConstraint Pyramid Spanners, J. of Parallel and Distributed Computing, 1994 135 [LR93] A.L. Liestman and T.C. Shermer, Grid Spanners, Networks, 23, 123133, 1993 135 [LS93] A. L. Liestman and T. C. Shermer, Additive graph Spanners, Networks, 23, 1993, 343364 135 [LY93] C. Lund and M. Yannakakis, On the hardness of approximating minimization problems, Proc 25’th STOC, 1993, 286293 138, 144, 145 [PS89] D. Peleg and A. Sch¨ aﬀer, Graph Spanners, J. of Graph Theory, 13, 1989, 99116 135, 136, 138 [PU88] D. Peleg and E. Upfal, A Tradeoﬀ between space and eﬃciency for routing tables, Journal of the ACM, 1989, 510530 135 [PU89] D. Peleg and J.D. Ullman, An optimal Synchronizer for the Hypercube, Siam J. on Comput., 18, 1989, 740747 135 [R95] R. Raz, A parallel repetition theorem, Proc 27th ACM STOC, 1995, 447456 144 [S92] J. Soares, Approximating Euclidean distances by small degree graphs, University of Chicago, No. 9205, 1992 [RS97] R. Raz and S. Safra, A sub constant error probability low degree test, and a sub constant error probability PCP characterization of NP, STOC, 1997, 475484. 138 [VRMMR97] G. Venkatesan and U. Rotics and M.S. Madanlal and J.A. Makowsy and C. Pandu Rangan, Restrictions of Minimum Spanner Problems, 1997, Manuscript 136
Approximating Circular Arc Colouring and Bandwidth Allocation in AllOptical Ring Networks Vijay Kumar Department of ECE Northwestern University Evanston, IL 60208, U.S.A.
[email protected] http://www.ece.nwu.edu/~vijay/
Abstract. We present randomized approximation algorithms for the circular arc graph colouring problem and for the problem of bandwidth allocation in alloptical ring networks. We obtain a factorof(1 + 1/e + o(1)) randomized approximation algorithm for the arc colouring problem, an improvement over the best previously known performance ratio of 5/3. For the problem of allocating bandwidth in an alloptical WDM (wavelength division multiplexing) ring network, we present a factorof(1.5+1/2e+o(1)) randomized approximation algorithm, improving upon the best previously known performance ratio of 2.
1
Introduction
The circular arc colouring problem is the problem of ﬁnding a minimal colouring of a set of arcs of a circle such that no two overlapping arcs share a colour. Applications include problems in network design and scheduling. There have been several investigations of the circular arc colouring problem ([17],[5]). The problem was shown to be NPcomplete by Garey, Johnson, Miller and Papadimitriou in [5]. Tucker [17] reduced the problem to an integral multicommodity ﬂow problem. For the special case of the proper circular arc colouring problem (a set of circular arcs is proper if no arc is contained in another), as an O(n2 ) algorithm is due to Orlin, Bonuccelli and Bovet [12]. For the general case, Tucker [17] gave a simple approximation algorithm with an approximation ratio of 2. An approximation algorithm with a performance ratio of 5/3 is due to Shih and Hsu [15]. We present a randomized approximation algorithm that achieves a performance ratio of 1 + 1/e + o(1) for instances where d = Ω(ln n), where d is the minimum number of colours needed and n the number of distinct arc endpoints. Optical networks make it possible to transmit data at very high speeds, of the order of several gigabits per second. Electronic switches can not operate at such high speeds, so to enable data transmission at high speeds, it is necessary to keep the signal in optical form. Such networks are termed alloptical networks. Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 147–159, 1998. c SpringerVerlag Berlin Heidelberg 1998
148
Vijay Kumar
Wavelength division multiplexing (WDM) is a technology which allows for multiple signals to be carried over a link by laser beams with diﬀerent wavelengths. We can think of these signals as light beams of diﬀerent colours. As a signal is to be carried by the same beam of light throughout its path, a wavelength needs to be assigned to each connectivity request. To prevent interference, wavelengths must be assigned in such a way that no two paths that share a link are assigned the same wavelength. Several diﬀerent network topologies have been studied, including trees, rings, trees of rings, and meshes ([14,8,10,3,7]). Rings are a very common topology: nodes in an area are usually interconnected by means of a ring network. Also, sometimes WDM networks evolve from existing ﬁbre networks such as SONET rings. For the problem of bandwidth allocation in rings, Raghavan and Upfal [14] give an approximation algorithm within twice the optimal. We present an algorithm that has an asymptotic performance ratio of 1.5 + 1/2e + o(1), except when the bandwidth requirement is very small. Communication in SONET rings requires establishing pointtopoint paths and the allocation of bandwidth to paths in a conﬂictfree manner (see [2]). The algorithmic aspect of the task is identical to that in WDM networks. Our solution, therefore, extends to this problem as well.
2
Arc Colouring and Multicommodity Flows
We are given a family F of arcs. An overlap set is the set of all arcs in F that contain some particular point on the circle. We will refer to the size of the largest overlap set as the width of F . Let p0 , p1 , · · · pn−1 be the n distinct endpoints of arcs in F , in clockwise order starting from some arbitrary point on the circle. An arc that runs clockwise from pi to pi+1 for some i, or from pn−1 to p0 , is an arc of unit length. The chromatic number of F , denoted by γ(F ), is the smallest number of colours required to colour F . Let d be the width of F . We begin by adding extra arcs of unit length to F in order to get a family of arcs of uniform width, that is, one in which all overlap sets are of equal cardinality. Consider a point P on the circle, between some pi and pi+1 . Let there be d arcs containing P . We add d−d arcs of unit length to F which run from pi to pi+1 . Doing this for every pair of consecutive endpoints, we obtain a new family F of arcs which is of uniform width d. This transformation helps simplify the description of our algorithm, and it is straightforward to show that γ(F ) = γ(F ). Now suppose we were to take each arc Ai of F that contains the point p0 , and cut it at p0 to obtain two arcs: arc A1i beginning at p0 , and arc A2i terminating at p0 . The new family of arcs obtained is equivalent to a set of intervals of the real line, and can be represented as such. Let P0 , P1 , · · · , Pn be the n endpoints of intervals in such a representation, ordered from left to right. Arcs of the type A1i can be represented as intervals Si1 beginning at P0 , while arcs of type A2i can be represented as intervals Si2 terminating at Pn . Any other arc runs from pi to pj , and does not contain p0 . Such an arc Ai is represented as an interval Si from Pi to Pj . Let I be the resulting set of intervals. I is of uniform width, that is, there are exactly d intervals passing over any point between P0
Approximating Circular Arc Colouring and Bandwidth Allocation
149
and Pn . I can be partitioned into d unitwidth sets of intervals, I1 , I2 , . . . , Id , such that Si1 is contained in Ii . Note that a ccolouring of I in which each Si1 gets the same colour as the corresponding Si2 is equivalent to a ccolouring of F . We will refer to such a colouring of I as a circular colouring. Consider a multicommodity network N constructed as follows. The vertices of N are labelled xi,j , i = 1, 2, . . . , d; j = 0, 1, 2, . . . , 2n − 1. An interval Si ∈ Ij originating at Pk and terminating at Pl is represented by an edge from xj,2k to xj,2l−1 . If some edge terminates at xi,2k−1 and another begins at xj,2k , for some i, j and k, then we add an edge from xi,2k−1 to xj,2k . All edges have unit capacity, and an edge can only carry an integral quantity of each commodity. If a vertex has no edges incident on it, it is removed from N . The source si for commodity i is located at xi,0 , and the corresponding destination ti is the vertex xj,2n−1 such that Si2 ∈ Ij . Let us refer to the set of all vertices labelled xi,j for some i as row j. We will use the term column i to refer to the subgraph of N induced by the set {xi,j  j = 0, 1, 2, . . . , 2n − 1}. We will use the term layer i to mean the set of edges that run between or cross over rows 2i and 2i + 1. In other words, these are the edges which have exactly one endpoint in the set {xj,k  j ≤ 2i}. Note that the number of rows in the network is 2n. We have added the “extra” n rows for the permuting of colours between columns. Recall that when at a point P some intervals terminate and new intervals begin, the new intervals get a permutation of the colours present on the old intervals. Lemma 1. A feasible ﬂow of the d commodities in N is equivalent to a circular dcolouring of I. The proof is deferred to the full paper. The network N can be used to decide if the given family of arcs is dcolourable. We can also use a similar technique to decide if it is kcolourable, for any k > d. Let F be a family of arcs of uniform width k obtained by adding arcs of unit length to F . It can be easily shown that Lemma 2. F is kcolourable if and only if F is kcolourable. So to determine the smallest k such that F is kcolourable, we keep adding unitlength arcs to F to obtain a successively larger unitwidth family F of arcs till we come to a point where the width k of F is equal to γ(F ). In terms of the multicommodity ﬂow network, this is equivalent to adding extra sources and sinks as well as extra edges. The extra edges help us route the original d commodities. k−d columns will have to be added to the network before a feasible ﬂow can be found. The extra commodities are easy to route. Let N be the ﬂow network corresponding to F . Lemma 3. If commodities 1, 2, · · · , d can be routed in N from their sources to the respective destinations, then all the commodities can be routed. The proof is omitted for lack of space. Lemma 3 implies that we can modify N so that it contains the same d sources and d sinks as N . The remaining sources and sinks can be removed. Henceforth, we will consider a network N with d commodities.
150
2.1
Vijay Kumar
Approximating the Multicommodity Flow Problem
It is relatively straightforward to set up the multicommodity ﬂow problem as a 01 integer program. Soving such a program is NPcomplete [4], but relaxing the integrality condition converts it into a linear programming problem which can be solved in polynomial time. We set aside the integrality condition and obtain an optimal solution. Next, we seek to use the information contained in the fractional solution to obtain a good integer solution. To do this, we use a technique called randomized rounding [13]. Randomized rounding involves ﬁnding a solution to the rational relaxation of an integer problem, and using information derived from that solution to obtain a provably good integer solution. We begin with a network that has d columns, and keep adding columns till a feasible solution to the LP relaxation is obtained. Let f be a ﬂow obtained by solving the linear program. f can be decomposed into d ﬂows f1 , f2 , · · · , fd , one for each commodity. Each fi can further be broken up into a set of paths P1 , P2 , · · · , Pp from the source of commodity i to its destination. To do this, consider the edge of fi carrying the smallest amount mj , and ﬁnd a sourcedestination path Pj containing that edge. Associate amount mj with the path, and subtract amount mj from the ﬂow carried in fi by each edge along this path. Repeat this process till no ﬂow remains. This process p of breaking a ﬂow into a set of paths is called path stripping [13]. Note that j=1 mj = 1. In order to obtain an integer solution, we will select one path out of these p paths, and use it to route commodity i. To select a path, we cast a pfaced die where m1 , m2 , · · · , mp are the probabilities associated with the p faces. Performing such a selection for each commodity, we obtain a set S of d paths to route the d commodities. However, these paths may not constitute a feasible solution since some edge capacity constraints may be violated. Note that in the fractional solution, an edge can carry more than one commodity. It is possible that more than one of these commodities may select a path containing this edge, since the d coin tosses to select the paths are performed independently. However, these conﬂicts can be resolved by adding extra columns to the network. If there are h paths in S that pass over some edge e, h − 1 will have to be rerouted. Consider all the k edges in layer i of the network. There are d paths that use some of these edges. Let di edges out of these k edges be contained in some path, di ≤ d. That means that ri = d − di paths will have to be rerouted. Let r = max{ri }. Beginning at the ﬁrst layer and proceeding layerbylayer, arbitrarily select the paths to be rerouted in case of conﬂicts. No more than r paths are selected in any layer. The set of paths obtained can be routed easily by adding r columns to the network. The task is analogous to rcolouring a set of line intervals which has width r. Thus we get a 01 integer ﬂow which routes all the commodities simultaneously. The network has k + r columns, corresponding to a k + r colouring of the family F of arcs. A bound on the value of k + r would give us a measure of the goodness of our solution.
Approximating Circular Arc Colouring and Bandwidth Allocation
2.2
151
Algorithm Performance
Consider again the edges in layer i of the network. Let Ei be the set of such edges. di of these edges are selected by the d commodities in the randomized selection step. In order to minimize r, the number of columns to be added, we need to show that di is close to d with high probability. In the selection step, each commodity randomly chooses a path, thereby selecting one of the k edges of Ei . This is akin to a ball being randomly placed in one of k bins. The situation can be modelled by the classical occupancy problem [11], where d balls are to be randomly and independently distributed into k bins. Let Z be the random variable representing the number of nonempty bins at the end. It can be shown that E(Z) is minimized when the distribution is uniform. In that case, it is a simple exercise to show that E(Z) is at least d − d/e, where e is the base of the natural logarithm. To get a high conﬁdence bound on r, we use a famous result in probability theory, called Azuma’s Inequality [1]. Let X0 , X1 , · · · be a martingale sequence, and Xk − Xk−1  ≤ ck for all k. Azuma’s Inequality says that Theorem 1. For all t > 0 and for any λ > 0, Pr[Xt − X0  ≥ λ] ≤ 2 ). 2 exp(− λt 2 2
k=1
ck
Let Xi denote the expected value of Z after i balls have been distributed. X0 , X1 , · · · , Xd is a martingale sequence, and application of Azuma’s Inequality yields √ 2 Corollary 1. Pr[Z − E(Z) ≥ λ d] ≤ 2 exp(− λ2 ) √ Substituting 4 ln n for λ, we ﬁnd that with probability 1 − n22 , Z does not √ deviate from its expected value by more than 2 d ln n. That is, with high probability, the number of paths that need to be rerouted due to conﬂicts at layer i √ is no more than d/e + 2 d ln n. The probability that more than this many paths need to be rerouted at any layer is no more than n · n22 = O( n1 ). So with high √ probability, r, the number of additional columns, is no more than d/e + 2 d ln n. So we have a√randomized algorithm that ﬁnds a feasible integral ﬂow using upto k + d/e + 2 d ln n network columns. A feasible fractional solution requires k columns, which implies that an integer solution would have at least k columns. In terms of √ the original arc colouring problem, we obtain a colouring that uses k + d/e + 2 d ln n colours, where k is a lower bound on the number of colours required by an optimal algorithm. This gives us our result: Theorem 2. With high probability, our algorithm √ can colour a family of arcs of width d using no more than OP T + d/e + 2 d ln n colours, where n is the number of distinct arc endpoints and OP T the number of colours required by an optimal algorithm. For the case where ln n = o(d), our algorithm has an asymptotic performance ratio of 1 + 1/e. In most applications, this is the interesting range of values. On the other hand, if d is suﬃciently small, it is possible to solve the problem optimally in polynomial time: for the case when d ln d = O(ln n), a polynomial time algorithm is presented in [5].
152
3
Vijay Kumar
The Bandwidth Assignment Problem in Optical Rings
We can represent a ring network as a circle, using points and arcs to denote nodes and paths respectively. Let n denote the number of nodes in the ring. We are given a set of communication requests, where each request is a (source, destination) pair, and source and destination are points on the circle. The task is to associate an arc with each request that connects the corresponding source and destination, and assign a colour to each arc in such a way that the set of arcs overlapping any particular point P on the circle does not contain more than one occurence of any colour. We deﬁne an instance to be a collection of requests and arcs (uncoloured as yet). That is, some of the requests may have been routed. We say that a collection C of arcs is derivable from I if C can be obtained from I by routing the requests of I. Let D(I) denote the collection of all such sets of arcs derivable from I. A solution for an instance I is some C ∈ D(I) together with a valid colouring of C. An optimal solution is the one that uses the fewest colours among all solutions. When we solve an LP relaxation of the problem, an arc may receive several colours in fractional quantities. If arc a receives quantity x of colour i, we will say that a fraction of weight x of a receives colour i. An undivided arc has weight 1. While working with fractional solutions, we will freely split arcs into fractions. We will also extend the notion of weight to intervals of the real line. We will use the term interval set to mean a collection of intervals of the real line. The crosssection of an interval set S at point P is the sum of weights of all intervals of S that contain P . The width of an interval set S is the largest crosssection of S over all points P . In the case of a set of unsplit intervals, the width is the size of the largest clique in the corresponding interval graph. A conﬂicting pair of arcs is a pair of arcs (a1 , a2 ) such that every point on the circle is contained in at least one of (a1 , a2 ), and there is some point on the circle overlapped by both a1 and a2 . A parallel routing is a collection of arcs that does not contain any conﬂicting pairs. In the following, we examine some interesting and helpful properties of parallel routings. Let C be a parallel routing, and Se the set of all arcs in C that contain a link e of the ring. Lemma 4. Se does not contain the whole circle. Proof. Assume otherwise. Let a be the arc in Se whose clockwise endpoint is farthest from e, and let b have the farthest anticlockwise endpoint. Clearly a and b together contain the whole circle, and overlap each other over e. This means that they constitute a conﬂicting pair, which is not possible in a parallel routing. As a and b together do not contain the whole circle, some link f is not contained in either: Lemma 5. For every link e there is another link f such that no arc of C contains both e and f .
Approximating Circular Arc Colouring and Bandwidth Allocation
153
Each of e and f is a complement of the other. The removal of e and f would break the ring into two halves. A complementary bisection CB(e, f ) is a pair of halves created by the removal of two links e and f which are complements of each other. Lemma 6. If both the endpoints of an arc lie in the same half of some complementary bisection CB(e, f ), then in any parallel routing, that arc is contained entirely in that half. The following lemma lets us restrict our attention to parallel routings in the search for an optimal solution. The simple proof is omitted and can be found in the full paper. Lemma 7. For any instance I there is an optimal solution Z whose arcs form a parallel routing. Deﬁne a (c, w) colour partition of a family of arcs to be a partition into c families of arcs C1 , C2 , · · · , Cc each of width 1 and an interval set S of width w. The size of such a partition is deﬁned to be c + w. An optimal colour partition is one of minimum size. Colourpartitioning is related to colouring. It is easy to show that Lemma 8. An optimal colouring of a family of arcs that uses k colours is equivalent to an optimal colour partition of size k. The bandwidth allocation problem can now be looked upon as the problem of routing a set of requests to minimise the size of the optimal colour partition of the resultant routing, and obtaining such a colour partition. 3.1
The Allocation Algorithm
We can route a subset of the requests in I, the given instance, in accordance with Lemmas 6 and 7. We select a link e randomly, and let us assume for the moment that we know a link f with the following property: f is the complement of e in some optimal solution Zopt whose arcs constitute a parallel routing P . According to Lemma 7, such a solution must exist. Consider a request r for which there is a sourcedestination path p which does not include either of e and f . In Zopt , such a request r must be routed over p, in accordance with Lemma 6. We route every such request r using the corresponding p. Let I be the instance resulting from such routing. Clearly, P is still derivable from I . The remaining requests are the ones whose source and destination lie in different halves of CB(e, f ). We will refer to such requests as crossover requests. We set up an integer program IP (I ) to route the crossover requests of I to obtain I ∈ D(I) such that the size of the colour partition of I is the smallest among all the members of D(I). Our next step is to solve LP (I ), the LP relaxation of IP (I ) to get an optimal fractional solution Zf . Finally, we use information from Zf to obtain an integer solution ZI provably close to Zf . We try to replace the fractional quantities in Z with integer values in such a way that the resulting solution ZI is a feasible solution to IP (I ) and
154
Vijay Kumar
further, with high probability the objective function value of ZI is close to that of Zf . We assumed above that we know the edge f . However, this is not so. We can remedy the situation by running the algorithm for all the possible n − 1 choices of f and taking the best of the solutions obtained, giving us a solution no worse than the one we would get if we knew the identity of f . 3.2
Integer Programming and LP Relaxation
Let r1 , r2 , · · · , rl be the l crossover requests in I . Each ri can either be routed as arc bi , which overlaps link e, or as b¯i , the complementary arc. Let {a1 , a2 , · · · , am } be the collection of arcs obtained by taking all the arcs of the kind bi and b¯i together with the arcs in I . Let xi be the indicator variable that is 1 if ri is routed as bi and 0 otherwise. Since all arcs bi must have distinct colours, we can without loss of generality require that if arc bi is selected for ri , it must bear colour i. Otherwise, colour i will not be used. In other words, xi is the quantity of colour i that is used. If these colours are not suﬃcient for all the arcs, some arcs are allowed to remain uncoloured. Let {a1 , a2 , · · · , am } be the collection of all the arcs, including arcs of the kind bi or b¯i . Let yi,j be the indicator variable that is 1 if arc ai gets colour j, and 0 otherwise. yi,0 = 1 if ai is uncoloured, and 0 otherwise. To avoid colour conﬂicts, we require that for each link g and colour j, no more than amount xj of colour j should be present on all the arcs that contain link g. A feasible solution to this integer program IP (I ) is equivalent to a colour partition, since each colour i is present on a family of arcs of width 1, and the uncoloured arcs constitute an interval set since none of them contain link e. The objective function is therefore set up to minimize the size of this colour partition. Consider a feasible solution F to IP (I ). F contains some I ∈ D(I), since each request of I has been assigned an arc. Each colour i is present on a family of arcs of width 1, and the uncoloured arcs constitute an interval set since none of them contain link e. Therefore, F contains a colour partition of I . As the objective function is set up to minimise the size of the colour partition, an optimal solution must represent an I with the smallestsized colour partition among all the members of D(I). The next step in our algorithm is to obtain an optimal solution to LP (I ), the LP relaxation of IP (I ). But before we relax the integrality condition and solve the resulting linear program, we will introduce an additional constraint: colour i is not a valid colour for b¯i . This is not required in the integer program since if ri is routed as b¯i , xi is 0 and colour i is not used at all. However, with the relaxation it is possible for ri to be split between bi and b¯i . We wish to ensure that bi and b¯i do not end up sharing colour i. Since the additional constraint is redundant in the integer program, it does not alter the solution space of the integer program, and hence does not change the optimal solution. We solve the linear program to get an optimal fractional solution Zf . Our rounding technique requires our fractional solution to satisfy the following property:
Approximating Circular Arc Colouring and Bandwidth Allocation
155
Property 1. For each i such that xi = 0, the corresponding b¯i is entirely uncoloured. It is not possible to express this property as a linear constraint. We modify Zf by recolouring techniques to obtain a suboptimal fractional solution Z that satisﬁes it. A description of the recolouring techniques involved is deferred to the full paper. The recolouring process may cause an increase in the objective function value and a decrease in the total amount of colour used. The last step in our bandwidth allocation algorithm is the computation of a good integer solution ZI to the integer program IP (I ) formulated above. This involves rounding oﬀ the fractional quantities in the fractional solution Z to integer values in a randomized fashion. Z resembles the solution to the multicommodity ﬂow problem in Section 2.1 and can be looked upon as a collection of ﬂows. Let P be a point in the middle of link e. Quantity xi of colour i ﬂows from P round the circle and back to P . The ﬂow of colour i can be decomposed into paths P1 , P2 , · · · , Pp , where each Pj is a family ofcircular arcs of width 1. An amount mj of colour i is associated with p Pj , and 1 mj = xi . We associate probability mj with each Pj , and use a coin toss to select one of them. With probability xi , some Pk is selected. We use the arcs of Pk to carry a unit amount of colour i. With probability 1 − xi no path is selected, in which case ri will be routed as arc b¯i (and may be selected to carry some other colour). We repeat this procedure independently for each colour i. If two or more diﬀerent colours select some arc ai , we randomly pick one of them for ai . If no colour picks ai , it is added to the interval set of uncoloured arcs. At the end of this procedure, all fractional quantities have been converted into 0 or 1, and the constraints are still satisﬁed. Let us see how far this integer solution is from the optimal. 3.3
Algorithm Performance
First of all, the objective function value of the optimal fractional solution Zf is obviously a lower bound on that of an optimal solution to IP (I ). Let us compare our ﬁnal integer solution ZI with Zf . Let zI , z and z ∗ be the objective funtion values of ZI , Z and Zf respectively, and let ∆ = zI − z ∗ . In the following, we try to bound ∆. Let ∆1 = zI − z and ∆2 = z − z ∗ . Then ∆ = ∆1 + ∆2 . As we mentioned earlier, the objective function value may increase during lthe recolouring process while the amount of colour used may decrease. Let c = 1 xi denote the total amount of colour in Z. Let cf and c be the corresponding quantities for Zf and ZI respectively. Our recolouring technique achieves the following bound on ∆2 , the cost of recolouring. Lemma 9. 0 ≤ z − z ∗ ≤ cf − c ≤ cf /2 ≤ z ∗ /2. The details are deferred to the full paper. Let us now estimate ∆1 . Let S be the uncoloured interval set contained in Z and let w be lits width. Let S be the uncoloured interval set of width w in ZI . Let c = 1 xi denote the total amount of colour in Z. Let c be the corresponding quantity in case of ZI . The
156
Vijay Kumar
following bounds, due to Hoeﬀding [9], are useful in estimating c − c. Consider a quantity X that is the sum of n independent Poisson trials, Then Lemma 10. Pr[X − E(X) ≥ nδ] ≤ e−nδ Pr[X − E(X) ≥ δE(X)] ≤ e−
δ2 3
2
E(X)
f or δ > 0.
(1)
where 0 < δ < 1.
(2)
Let there be m colours in use in the fractional solution Z. Each of these is involved in cointossing and path selection. √ Lemma 11. Pr[c − c ≥ m ln c] ≤ 1c Proof. We can regard c as a sum of m Poisson trials with associated probabilities xi . The expected value of c is c. The result follows from (1) when substituted for δ.
ln c m
is
Next, let us bound w − w. We use the following result due to McDiarmid [9]. Lemma 12. Let X1 , X2 , . . . , Xn be independent random variables, with Xi taking values in a set Ai for each i. Suppose that the (measurable) function f : ΠAi → R satisﬁes ¯ − f (X¯ ) ≤ ci f (X) ¯ and X¯ diﬀer only in the ith coordinate. Let Y be the whenever the vectors X , X2 , . . . , Xn ). Then for any φ > 0, random variable f (X1 Pr[Y − E(Y ) > φ i c2i /2] ≤ 2e−φ . √ Lemma 13. Pr[w − E[w ] > m ln c] ≤ 2c . Proof. w is a function of m inpependent choices. ci is 1 if xi = 1, and 2 if 0 < xi < 1. So i c2i /2 √is no more than m, and Lemma 12 yields Pr[w − E[w ] > φ m] ≤ 2e−φ . Substituting ln c for φ gives us the desired expression. Lemmas 14 to 20 seek to bound E[w ]. Let wp , w1,p and w2,p denote the cross sections of S, S1 and S2 respectively at a point p on the ring. Let wp , w1,p and w2,p be the respective quantities for S , S1 and S2 . Using Lemma 12 it is straightforward to establish the following two bounds. Lemma 14. Pr[w1,p − w1,p  > m(ln n + 2 ln c)] ≤ nc2 2 . 2 Lemma 15. Pr[w2,p − w2,p  > c/e + m 2 (ln n + 2 ln c)] ≤ nc2 . √ Lemma 16. Pr[wp − wp  > c/e + (1 + 1/ 2) m(ln n + 2 ln c)] ≤ nc4 2 . − w1,p  + w2,p − w2,p , the result follows directly Proof. As wp − wp  ≤ w1,p from Lemmas 14 and 15.
Lemma 16 implies that
Approximating Circular Arc Colouring and Bandwidth Allocation
√ Lemma 17. Pr[maxp {wp − wp } > c/e + (1 + 1/ 2) m(ln n + 2 ln c)] ≤
157 4 c2 .
We will use the following lemma, the validity of which follows from the deﬁnition of expectation. Lemma 18. For any random variable X and value x0 , suppose that Pr[X ≥ x0 ] ≤ p. Let xmax be the largest possible value of X. Then: E(X) ≤ (1 − p)x0 + pxmax . Lemma 19. E(maxp {wp − wp }) ≤ c/e + 2 m(ln n + ln c) + 8/c. Proof. Follows from Lemmas 17 and 18 and the fact that wp − wp can not exceed 2c. Lemma 20. E(w ) ≤ w + c/e + 2 m(ln n + 2 ln c) + 8/c. Proof. w ≤ w + maxp {wp − wp }, so E(w ) ≤ w + E(maxp {wp − wp }). This in conjunction with Lemma 19 yields the result. The following bound on w follows from Lemmas 13 and 20: Lemma 21. With probability at least 1 − 2c , √ w ≤ w + c/e + 2 m(ln n + 2 ln c) + 8/c + m ln c. Lemma 22. With probability at least 1 − 3c , ∆1 ≤ c/e + 2 m(ln n + 2 ln c) + √ 8/c + m ln c. Proof. We know that ∆1 = zI − z = (c + w ) − (c + w) = (c − c) + (w√ − w). 1 Lemma 11 tells us that with probability at least 1 − c , c − c < m ln c. Lemma 21 gives us a similar high probability bound on w − w. Together, they directly imply the above bound on ∆1 .
Lemma 23. With high probability, zI is no more than z ∗ ( 32 + √ O( z ∗ ln n).
1 2e
+ o(1)) +
Proof. ∆ = ∆1 + ∆2 . Let c = cf − x · z ∗ , where cf is the total amount of colour in Zf . This means that c ≤ cf − x · cf , since cf is a lower bound on z ∗ . Lemma 9 implies that ∆2 ≤ x · z ∗ , and that x can not be more than 12 . Together with Lemma 22, this implies that with √ high probability, ∆ ≤ x · z ∗ + c/e + 2 m(ln n + 2 ln c) + 8/c + m ln c. √ The expression on the right reduces to z ∗ (x − xe + 1e + o(1)) + O( z ∗ ln n). Since ∆ = zI − z ∗ , and x can not exceed 12 (Lemma 9), we have our result. zI is the size of the colour partition of I computed by our algorithm. Since a colour partition of size zI results in a colouring that uses zI colours, and since z ∗ , the value of an optimal solution to LP (I ), is a lower bound on the value of an optimal solution to IP (I ), we have our main result:
158
Vijay Kumar
Theorem 3. With high probability, our algorithm requires no more than OP T √ (1.5 + 1/2e + o(1)) + O( OP T ln n) wavelengths to accomodate a given set I of communication requests, where OP T is the smallest number of wavelengths suﬃcient for I. Some of the √ latest WDM systems involve over a hundred wavelengths. In such a system, OP T ln n is likely to be considerably smaller than OP T , giving us a performance ratio close to 1.5 + 1/2e. In the case of SONET rings the available bandwidth is often much larger, which means that ln n is typically o(OP T ).
References 1. Azuma, K. Weighted Sum of Certain Dependent Random Variables. Tohoku Mathematical Journal, 19:357367, 1967. 151 2. Cosares, S., Carpenter, T., and Saniee, I. Static Routing and Slotting of Demand in SONET Rings. Presented at the TIMS/ORSA Joint National Meeting, Boston, MA, 1994. 148 3. Erlebach, T. and Jansen, K. Call Scheduling in Trees, Rings and Meshes. In Proc. 30th Hawaii International Conf. on System Sciences, 1997. 148 4. Even, S., Itai, A., and Shamir, A. On the complexity of timetable and multicommodity ﬂow problems, SIAM Journal of Computing, 5(1976),691703. 150 5. Garey, M.R., Johnson, D.S., Miller, G.L. and Papadimitriou, C.H. The Complexity of Coloring Circular Arcs and Chords. SIAM J. Alg. Disc. Meth., 1(2):216227, 1980. 147, 151 6. Golumbic, M. C., Algorithmic Graph Theory and Perfect Graphs, Academic Press, 1980. 7. Kaklamanis, C. and Persiano, P. Eﬃcient wavelength routing on directed ﬁber trees. In Proc. 4th Annual European Symposium on Algorithms, 1996. 148 8. Kumar, V. and Schwabe, E.J. Improved access to optical bandwidth in trees. In Proc 8th Annual ACMSIAM Symp. on Discrete Algorithms, pp. 437444, 1997. 148 9. McDiarmid, C. On the method of bounded diﬀerences. In J. Siemons, editor, Surveys in Combinatorics, volume 141 of LMS Lecture Notes Series, pages 148– 188. 1989. 156 10. Mihail, M., Kaklamanis, C., and Rao, S. Eﬃcient Access to Optical Bandwidth. In Proc IEEE Symp on Foundations of Comp Sci, pp. 548557, 1995. 148 11. Motwani, R., and Raghavan, P. Randomized Algorithms, Cambridge University Press, 1995. 151 12. Orlin, J.B., Bonuccelli, M.A., and Bovet, D.P. An O(n2 ) Algorithm for Coloring Proper Circular Arc Graphs. SIAM J. Alg. Disc. Meth., 2(2):8893, 1981. 147 13. Raghavan, P. Randomized Rounding and Discrete HamSandwiches: Provably Good Algorithms for Routing and Packing Problems. PhD Thesis, CS Division, UC Berkeley, 1986. 150 14. Raghavan, P., and Upfal, E. Eﬃcient Routing in AllOptical Networks. In Proc 26th ACM Symp on Theory of Computing, pp. 134143, 1994. 148 15. Shih, W.K. and Hsu, W.L. An Approximation Algorithm for Coloring CircularArc Graphs. SIAM Conference on Discrete Mathematics, 1990. 147
Approximating Circular Arc Colouring and Bandwidth Allocation
159
16. Settembre, M. and Matera, F. Alloptical implementations of high capacity TDMA networks. Fiber and Integrated Optics, 12:173186, 1993. 17. Tucker, A. Coloring a Family of Circular Arcs. SIAM J. Appl. Math., 29(3):493502, 1975. 147
Approximating Maximum Independent Set in kCliqueFree Graphs Ingo Schiermeyer Lehrstuhl f¨ ur Diskrete Mathematik und Grundlagen der Informatik, Technische Universit¨ at Cottbus, D03013 Cottbus, Germany, Fax: +49 355 693042
[email protected] Abstract. In this paper we study lower bounds and approximation algorithms for the independence number α(G) in kcliquefree graphs G. Ajtai et al. [1] showed that there exists an absolute constant c1 such that ¯ for any kcliquefree graph G on n vertices and with average degree d, ¯ d)/k) n. α(G) ≥ c1 log((log d¯ We improve this lower bound for α(G) as follows: Let G be a connected kcliquefree graph on n vertices with maximum degree ∆(G) ≤ n − 2. ¯ − 2)2 ) − d(k ¯ − 2)2 + 1)/(d(k ¯ − 2)2 − 1)2 ¯ − 2)2 log(d(k Then α(G) ≥ n(d(k for d¯ ≥ 2. For graphs with moderate maximum degree Halld´ orsson and J. Radhakrishnan [9] presented an algorithm with a O(∆/ log log ∆) performance ratio. We will show that log log ∆ in the denominator can be replaced by log ∆ to improve the performance ratio of this algorithm. This is based on our improved lower bound for α(G) in kcliquefree graphs. For graphs with moderate to large values of ∆ Halld´ orsson and J. Radhakrishnan [9] presented an algorithm with a ∆/6(1 + o(1)) performance ratio. We will show that, for a given integer q ≥ 3, this performance ratio can be improved to ∆/2q(1 + o(1)).
Key words: Graph, Maximum Independent Set, kClique, Algorithm, Complexity, Approximation
1
Introduction
We use Bondy & Murty [5] and Garey & Johnson [7] for terminology and notation not deﬁned here and consider simple graphs only. An independent set (clique) I in a graph G on n vertices is a set of vertices in which no (every) two are adjacent. The cardinality of an independent set (clique) of maximum cardinality will be denoted by α(G) and ω(G), respectively. Obviously, an independent set I in G forms a clique in GC and vice versa. The computation of α(G) and ω(G) are wellknown NPcomplete problems (cf. [7]). Considerable progress has been achieved in the last few years concerning the nonapproximability of these problems. Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 159–168, 1998. c SpringerVerlag Berlin Heidelberg 1998
160
Ingo Schiermeyer
In [2] Arora et al. proved the following theorem. Theorem 1. If P = N P then there exists an > 0 such that no polynomial time approximation algorithm for α(G) can have a performance ratio of O(n ). This was improved by H˚ astad [8] as follows. Theorem 2. For any > 0 there is no polynomial time approximation algorithm for α(G) with a performance ratio of O(n1− ) unless N P = co − RP . Boppana and Halld´ orsson [4] developed a RamseyAlgorithm with a performance ratio of O(n/log 2 n). In spite of considerable eﬀort, no approximation algorithm with a better performance ratio is known so far. Since the general problem is apparently hard, it is natural to ask what kind of restrictions make the problem easier to approximate. A large number of approximation results have been obtained in terms of the maximum vertex degree ∆(G) of G. Among these graphs with bounded maximum degree have been studied intensively (cf. e.g. [3], [9], [10]). For graphs with moderate maximum degree Halld´orsson and J. Radhakrishnan [9] presented an algorithm with a O(∆/loglog∆) performance ratio. We will show that log log ∆ in the denominator can be replaced by log ∆ to improve the performance ratio of this algorithm. This is based on an improved lower bound for α(G) in kcliquefree graphs which we are going to prove in the next section. For graphs with moderate to large values of ∆ Halld´orsson and J. Radhakrishnan [9] presented an algorithm with a ∆/6(1 + o(1)) performance ratio. We will show that, for a given integer q ≥ 3, this performance ratio can be improved to ∆/2q(1 + o(1)). Additional notation For an independent set algorithm Alg, Alg(G) is the size of the solution obtained by the algorithm applied on the graph G. The performance ratio of the algorithm in question is deﬁned by ρ = max G
2
α(G) . Alg(G)
The Independence Number in kCliqueFree Graphs
In [1] Ajtai et al. showed the following theorem for kcliquefree graphs. Theorem 3. There exists an absolute constant c1 such that for any kcliquefree graph G, ¯ log((log d)/k) α(G) ≥ c1 n. d¯
Approximating Maximum Independent Set in kCliqueFree Graphs
161
Here we show how the approach of Shearer [13], [14] can be extended to kcliquefree graphs to improve the above theorem. As a key observation we will make use of the following corollary which can be deduced from Tur´an’s theorem [16]. For a vertex v of G let E(G[N (v)]) denote the cardinality of the edge set of G[N (v)], i.e. the graph induced by the neighbours of the vertex v. Corollary 4. In a kcliquefree graph G, E(G[N (v)]) ≤ (d(v))2
k−3 2(k − 2)
for every vertex v ∈ V (G). ¯ where In [13] Shearer showed for trianglefree graphs that α(G) ≥ nf (d) f (d) = (d log d − d + 1)/(d − 1)2 , f (0) = 1, f (1) = 1/2 and d¯ is the average degree of G. Note that f is the solution to the diﬀential equation (d + 1)f (d) = 1 + (d − d2 )f (d),
f (0) = 1.
(1)
In [14] Shearer slightly strengthened this result by replacing the diﬀerential equation (1) with the diﬀerence equation (d + 1)f (d) = 1 + (d − d2 )[f (d) − f (d − 1)], f (0) = 1. (2) ¯ with n f (di ), where d1 , d2 , . . . , dn is the degree sequence and the term nf (d) i=1 of the graph G. The solution of the diﬀerence equation lies above the solution of the diﬀerential equation (for d ≥ 2); however, for d → ∞ the asymptotic behaviour is the same. For a suitable constant c, 0 ≤ c ≤ 1, we extend the diﬀerence equation (2) to the following diﬀerence equation (d + 1)f (d) = 1 + c(d − d2 )[f (d) − f (d − 1)], f (d) =
1 , 0 ≤ d ≤ k − 2, (3) d+1
n and will show that α(G) ≥ i=1 f (di ) in kcliquefree graphs. The corresponding diﬀerential equation is (d + 1)f (d) = 1 + c(d − d2 )f (d),
f (d) =
1 , 0 ≤ d ≤ k − 2. d+1
(4)
1 with the solution f (d) = (d/c log d/c − d/c + 1)/(d/c − 1)2, f (d) = d+1 ,0 ≤ d ≤ k − 2. Again the solution of the diﬀerence equation lies above the solution of the diﬀerential equation (for d ≥ 2); however, for d → ∞ the asymptotic behaviour is the same. We will need the following technical lemma.
162
Ingo Schiermeyer 2
−d)f (d−1) Lemma 5. Suppose f (d) = 1+c(d for d ≥ 1 and f (d) = cd2 +(1−c)d+1 k − 2. Then 1 (i) f (d) ≥ d+1 for d ≥ 0, (ii) f (d) is decreasing and (iii) f (d − 1) − f (d) is decreasing (i.e. f is convex).
1 d+1 , 0
≤d≤
Proof. (extract) (i) can be shown by induction using the diﬀerence equation. By induction and using the diﬀerence equation and (i) we obtain (ii). By a tedious calculation we can show that f (d − 1) − f (d + 1) < 2(f (d − 1) − f (d)) implying (iii). ✷ Before stating our main theorem we will make some useful assumptions. Since the computation of α(G) is additive with respect to the components of G we may assume that G is connected. Next we may assume that G satisﬁes ∆(G) ≤ n − 2. Otherwise, α(G) = α(G − v) for a vertex v ∈ V (G) with d(v) = ∆(G) = n − 1 and we could reduce the problem size. Therefore we may assume from now on that G is connected and has maximum degree ∆(G) ≤ n − 2. This leads to the following useful corollary. Corollary 6. For every vertex v ∈ V (G) there are two vertices u ∈ N (v) and w∈ / N [v] = N (v) ∪ {v} such that uw ∈ E(G). Theorem 7. Let G be a connected kcliquefree graph on n vertices with ∆(G) ≤ 2 −d)f (d−1) 1 n − 2. Let f (d) = d+1 , 0 ≤ d ≤ k − 2, f (d) = 1+c(d cd2 +(1−c)d+1 for d ≥ k − 1. Then n 1 α(G) ≥ i=1 f (di ) for c = (k−2) 2. Corollary 8. Let G be a connected kcliquefree graph on n vertices with ∆(G) ≤ ¯ ≥ n · f (∆) ≥ n(∆(k − 2)2 log(∆(k − 2)2 ) − ∆(k − n − 2. Then α(G) ≥ n · f (d) 2 2 2 2) + 1)/(∆(k − 2) − 1) for d¯ ≥ 2. Remark: If necessary, we will use in the following the notation fk (d) instead of f (d). Proof. Note that f (d) and [f (d) − f (d + 1)] are decreasing as d → ∞. We will prove n the theorem by induction on n. Clearly iti holds for n = 1. Let S = i=1 f (di ) and let i be a vertex of G. Deﬁne N to be the set of neighbours of vertex i and N2i to be the set of vertices in G which are at distance 2 from i. For q ∈ N2i let niq be the number of neighbours in N i , i.e. niq is the number of common neighbours of q and i. Deﬁne Hi to be the graph formed from G i i by deleting i and its neighbours. Let d1 , . . . , dn be the degree sequence of Hi , where n = V (Hi ). Let Ti = l f (dil ). Then Ti = S − f (di ) −
f (dj ) +
j∈N i
Hence if we can ﬁnd an i such that
q∈N2i
[f (dq − niq ) − f (dq )].
(5)
Approximating Maximum Independent Set in kCliqueFree Graphs
1 − f (di ) −
f (dj ) +
j∈N i
[f (dq − niq ) − f (dq )] ≥ 0
163
(6)
q∈N2i
the result will follow by induction (adjoin i to a maximum independent set in Hi .) In fact we will show that (6) holds on average. Let
A=
n
[1 − f (di ) −
i=1
f (dj ) +
j∈N i
[f (dq − niq ) − f (dq )]].
(7)
q∈N2i
By interchanging the order of summation, we obtain
A=
n
[1 − (di + 1)f (di ) +
i=1
[f (di − niq ) − f (di )]].
(8)
q∈N2i
Note that q ∈ N2i ⇔ i ∈ N2q and niq = nqi . Let Bi =
[f (di − niq ) − f (di )]].
(9)
q∈N2i
Thus we have f (di − niq )− f (di ) ≥ niq [f (di − 1)− f (di )] since f (d)− f (d+ 1) is a decreasing function of d. Let tj (i) denote the number of neighbours of a vertex j ∈ N i in N i . Hence Bi ≥ [
(dj − tj (i) − 1)][f (di − 1) − f (di )]].
(10)
j∈N i
Let E be the edge set of G. Then summing up both sides of (10) over i gives n
Bi ≥
i=1
[(dj − tj (i) − 1)[f (di − 1) − f (di )]
(i,j)∈E
+(di − ti (j) − 1)[f (dj − 1) − f (dj )]].
(11)
Since f (d) − f (d + 1) is decreasing we have (di − dj )[[f (dj − 1) − f (dj )]− [f (di − 1) − f (di )]] ≥ 0 which implies n i=1
Bi ≥
[(di − tj (i) − 1)[f (di − 1) − f (di )]
(i,j)∈E
+(dj − ti (j) − 1)[f (dj − 1) − f (dj )]]
(12)
164
Ingo Schiermeyer
≥
n
max(1, (
i=1
1 d2 − di ))[f (di − 1) − f (di )]. k−2 i
(13)
applying corollary 4 and 6. Especially, every missing edge in G[N i ] contributes (at least) two edges between G[N i ] and G[N2i ]. This leads to the term 1 2 k−2 di − di . Now we try to ﬁnd a suitable constant ck such that 1 d2 − di ≥ ck (d2i − di ). k−2 i
(14)
Therefore, ck ≤
(1 −
1 (k−2)2
and thus ck =
max(1,
k−3 k−2 )di
−1
di − 1
=1−
k−3 di · k − 2 di − 1
satisﬁes 1 1 d2i − di )) ≥ (d2 − di ). k−2 (k − 2)2 i
(15)
Substituting (13) into (8) then gives
A≥
n
1 − (di + 1)f (di ) + ck (d2i − di )[f (di − 1) − f (di )].
(16)
i=1
Hence A ≥ 0 since we have chosen f so that each term in the sum in (16) is 0. Hence an i satisfying (6) must exist completing the proof. ✷ Remark: As indicated after (6) the proof provides a polynomial time algon rithm to construct an independent set of size at least i=1 f (di ). We will call this algorithm kcliquefree Algorithm(G).
3
Approximating Maximum Independent Set
In [9] Halld´ orsson and J. Radhakrishnan present an approximation algorithm based on Theorem 3 by Ajtai, Erd¨ os, Koml´ os and Szemer´edi [1] named AEKS. It contains the algorithm called CliqueCollection which is based on the subgraph removal approach introduced in [4]. For a given integer l it ﬁnds in G a maximal collection of disjoint cliques of size l; in other words, S is a set of mutually nonintersecting cliques of size l such that the graph G − S contains no lcliques. Such a collection can be found in O(∆l−1 n) time by exhaustive search for a
Approximating Maximum Independent Set in kCliqueFree Graphs
165
(l1)clique in the neighbourhood of each vertex. That is polynomial whenever l = O(log∆ n). As in [9] an independent set is maximal (MIS) if adding any further vertices to the set violates its independence. An MIS is easy to ﬁnd and provides a suﬃcient general lower bound of α(G) ≥ n/(∆ + 1). Combining CliqueCollection and MIS leads to the algorithm AEKSSR(G) presented in [9]. AEKSSR(G) G ← G − CliqueCollection(G, c1 log log ∆) return max (AEKS(G’), MIS(G)) end Theorem 9. The performance ratio of AEKSSR is O(∆/ log log ∆). Using Theorem 7 we can show the following improved performance ratio of AEKSSR. Theorem 10. The performance ratio of AEKSSR is O(∆/ log ∆). Proof. Let k denote c1 log ∆, and let n denote the order of V (G ). A maximum independent set collects at most one vertex from each kclique, for at most α(G) ≤ n/k + n ≤ 2 max(n/k, n ), while the size of the solution found by AEKSSR is at least AEKS − SR(G) ≥ max(
k k 1 n, n ) ≥ max(n/k, n ). ∆+1 ∆ ∆+1
The ratio between the two of them clearly satisﬁes the claim. ✷ Observe that this combined method runs in polynomial time for ∆ as large as n1/ log n . We now turn our attention to approximation algorithms for moderate to large maximum degree. Using Theorem 7 we will show how the method presented in [9] with an asymptotic ∆/6(1 + o(1)) performance ratio can be improved to achieve an asymptotic performance ratio of ∆/2q(1 + o(1)) for a given integer q ≥ 3. First we recall the used approximation algorithms. 2opt. Khanna et al. [11] studied a simple local search algorithm called 2opt in [9]. Starting with an initial maximal independent set I, it tries all possible ways of adding two vertices and removing only one while retaining the independence property. Hence it suﬃces to look at pairs adjacent to a common vertex in I. The following was shown by Khanna et al. [11]: Lemma 11. α(G) ≥ 2 − opt ≥
1+τ ∆+2 n.
166
Ingo Schiermeyer
For kclique free graphs Halld´orsson and Radhakrishnan [9] obtained improved bounds. Lemma 12. On a kclique free graph G, α(G) ≥ 2 − opt ≥
2 ∆+k−1 n.
2 Remark: In [9] the weaker lower bound ∆+k n was shown. However, their proof admits the stronger lower bound stated above. Actually, if A is a maximal independent set, each vertex in V − A has at least one neighbour in A. Since G is kclique free, for each vertex v ∈ A, at most k2 (instead of k1) vertices can be adjacent only to u and some other vertices not in A. The algorithm CliqueRemovalk then can be described as follows.
CliqueRemovalk A0 ← M IS(G) for l = k downto 2 do S ← CliqueCollection(G, l) G←G−S Al ← l − clique − f reeAlgorithm(G) od Output Ai of maximum cardinality end Theorem 13. CliqueRemovalp, using 2opt and lcliquefree achieves a performance ratio of at most
[
k p 1 ∆ ∆ +2+ + (Hp−1 − Hk + )]/(p + 1) 2 j(j − 1)fj (∆) 2 k j=3
for graphs of maximum degree ∆ ≥ 3 in polynomial time O(nk ), where p = ω(G) + 1. Proof. Let nt denote the number of vertices in the tcliquefree graph. Thus, n ≥ np ≥ . . . ≥ n3 ≥ n2 ≥ 0. From the approach of Nemhauser and Trotter [12] we may assume that n2 = 0. The size of the optimal solution is τ n, which can be bounded by p
τn ≤
1 1 1 1 (n3 − n2 ) + . . . + (np+1 − np ) = ni + n. 2 p i(i − 1) p i=3
(17)
Then our algorithm is guaranteed to ﬁnd an independent set of size at least
max[
1+τ n, ∆+2
max
k+1≤t≤p
2 nt , f3 (∆)n3 , . . . , fk (∆)nk ] ∆+t−1
by Lemma 11 and Lemma 12. Thus, the performance ratio ρ achieved by the algorithm is bounded by
Approximating Maximum Independent Set in kCliqueFree Graphs
ρ ≤ min[
τn
τn
, 1+τ , 2 ∆+2 n ∆+t−1 nt
167
τn τn ,..., ]. f3 (∆)n3 fk (∆)nk
As in [9] we derive from this , respectively, that ρ , ∆+2−ρ
(18)
τ ∆+t−1 · n, t = 3, 4, . . . , p ρ 2
(19)
1 τ · n, j = 3, . . . , k ρ fj (∆)
(20)
τ≥
nt ≤
nj ≤
Combining (17),(20) and (19), we ﬁnd that τ≤
τ 1 s∆,p + ρ p
where
s∆,p =
k j=3
=
k j=3
p 1 ∆+i−1 + j(j − 1)fj (∆) 2i(i − 1) i=k+1
1 1 1 1 + [(Hp − Hk ) + ∆( − )]. j(j − 1)fj (∆) 2 k p
Thus, τ≤
1 . p(1 − s∆,p /ρ)
(21)
Hence, from (18) and (21) ρ 1 ≤ ∆+2−ρ p(1 − s∆,p /ρ) which simpliﬁes to ρ≤
∆ + 2 + ps∆,p p+1
and we obtain the claimed inequality. ✷
168
Ingo Schiermeyer
If we now assume that ∆ and p are growing functions, then the ∆/k term will dominate for a ∆/2k asymptotic ratio. Corollary 14. CliqueRemovalp , using 2opt and lcliquefree achieves a performance ratio of ∆/2k (1 + o(1)) in polynomial time of O(nk ). Acknowledgments. We thank the three anonymous referees for their helpful suggestions and corrections. Very recently M. M. Halld´orsson kindly lead our attention to some related work in [15].
References 1. M. Ajtai, P. Erd¨ os, J. Koml´ os and E. Szemer´edi, On Tur´ an’s theorem for sparse graphs, Combinatorica 1 (4) (1981) 313  317. 159, 160, 164 2. S. Arora, C. Lund, R. Motwani, M. Sudan and M. Szegedy, Proof verification and hardness of approximation problems, Proc. 33rd IEEE FoCS, 1992, 14  23. 160 3. P. Berman and M. F¨ urer, Approximating maximum independent sets by excluding subgraphs, Proc. Fifth ACMSIAM Symp. on Discrete Algorithms, 1994, 365  371. 160 4. R. B. Boppana and M. M. Halld´ orsson, Approximating maximum independent set by excluding subgraphs, BIT 32 (1992) 180  196. 160, 164 5. J. A. Bondy and U. S. R. Murty, Graph Theory with Applications (Macmillan, London and Elsevier, New York, 1976). 159 6. Y. Caro, New Results on the Independence Number, Technical Report, TelAviv University, 1979. 7. M. R. Garey and D. S. Johnson, Computers and Intractability, A Guide to the Theory of N P Completeness, W. H. Freeman and Company, New York, 1979. 159 8. J. H˚ astad, Clique is hard to approximate within n1− , 37th Annual Symposium on Foundations of Computer Science, 1996, 627  636. 160 9. M. M. Halld´ orsson and J. Radhakrishnan, Improved approximations of Independent Sets in BoundedDegree Graphs, SWAT’94, LNCS 824 (1994) 195  206. 159, 160, 164, 165, 166, 167 10. M. M. Halld´ orsson and J. Radhakrishnan, Greed is Good: Approximating Independent Sets in Sparse and BoundedDegree Graphs, Algorithmica 18 (1997) 145  163. 160 11. S. Khanna, R. Motwani, M. Sudan and U. Vazirani, On syntactic versus computational views of approximability, Proc. 35th IEEE FoCS, 1994, 819  830. 165 12. G. L. Nemhauser and L. E. Trotter. Jr., Vertex Packings: Structural Properties and Algorithms, Mathematical Programming 8 (1975) 232  248. 166 13. J. B. Shearer, A Note on the Independence Number of TriangleFree Graphs, Discrete Math. 46 (1983) 83  87. 161 14. J. B. Shearer, A Note on the Independence Number of TriangleFree Graphs, II, J. Combin. Ser. B 53 (1991) 300  307. 161 15. J. B. Shearer, On the Independence Number of Sparse Graphs, Random Structures and Algorithms 5 (1995) 269  271. 168 16. P. Tur´ an, On an extremal problem in graph theory (in Hungarian), Mat. Fiz. Lapok 48 (1941) 436  452. 161 17. V. K. Wei, A Lower Bound on the Stability Number of a Simple Graph, Technical memorandum, TM 81  11217  9, Bell laboratories, 1981.
Approximating an Interval Scheduling Problem Frits C.R. Spieksma Department of Mathematics, Maastricht University, P.O. Box 616, NL6200 MD Maastricht, The Netherlands, Tel.:+31433883359, Fax:+31433211889,
[email protected] Abstract. In this paper we consider a general interval scheduling problem. We show that, unless P = N P, this maximization problem cannot be approximated in polynomial time within arbitrarily good precision. On the other hand, we present a simple greedy algorithm that delivers a solution with a value of at least 12 times the value of an optimal solution. Finally, we investigate the quality of an LPrelaxation of a formulation for the problem, by establishing an upper bound on the ratio between the value of the LPrelaxation and the value of an optimal solution.
1
Introduction
Consider the following problem. Given are n ktuples of intervals on the real line, that is for each interval l a starting time sl and a ﬁnishing time fl (> sl ) is known, l = 1, . . . , kn. We assume that all starting and ﬁnishing times are integers. An interval is said to be active at time t iﬀ t ∈ [sl , fl ). Two intervals intersect iﬀ there is a time t during which both intervals are active. The problem is to select as many intervals as possible such that (i) no two selected intervals intersect, and (ii) at most one interval is selected from each ktuple. A ktuple of intervals is sometimes referred to as a job. We refer to this problem as the Job Interval Selection Problem with k intervals per job or JISPk for short. (Observe that an instance where the number of intervals per job is not the same for all jobs is easily transformed to an instance of JISPk for some k by duplicating intervals). An alternative way of looking at JISPk is by adopting a graphtheoretical point of view. Indeed, let us construct a graph that has a node for each interval and in which two nodes are connected if the corresponding intervals belong to the same job (the job edges) or if the corresponding intervals intersect (the intersection edges). (Notice that an edge in this graph can be a job edge as well as an interval edge; this reﬂects the case when two intervals of a same job intersect). JISPk is now equivalent to ﬁnding a maximum stable set in this graph. Obviously, the graph induced by the job edges consists of n disjoint cliques of size k, and the graph induced by the intersection edges is an interval graph. Thus, the graph constructed is the edge union of an interval graph and a graph consisting of n disjoint cliques of size k. Notice that in case k = 1 the problem reduces to ﬁnding a maximum stable set in an interval graph. Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 169–180, 1998. c SpringerVerlag Berlin Heidelberg 1998
170
Frits C.R. Spieksma
JISPk belongs to the ﬁeld of interval scheduling problems. These problems arise in a variety of settings. Here, we simply refer to Carter and Tovey ([3]), Fischetti et al. ([6] ) and Kroon et al. ([11]) and the references contained therein for examples of applications related to interval scheduling. JISPk is considered in Nakajima and Hakimi ([12]) and in Keil ([9]). Keil ([9]) proves that the problem of determing whether it is possible to select n intervals is N Pcomplete for JISP3, whereas he shows that this question is solvable in polynomial time for JISP2. (This improved results in Nakajima and Hakimi ([12])). On the other hand, Kolen ([10]) proved that given an integer K, the question whether one can select at least K intervals is already NPcomplete for JISP2. Our focus in this paper is on the following question: when restricting oneself to polynomial time algorithms, how good (in terms of quality of the solution) can one solve instances of JISPk, k ≥ 2, in the worst case? Obviously, it follows from Keil ([9]) that, unless P = N P, no polynomial time algorithm is able to solve JISPk exactly. Even more, we establish in Sect. 3 that, unless P = N P, no PTAS (see Sect. 2) exists for JISPk, for all k ≥ 2. On the other hand we present in Sect. 4 a polynomial time approximation algorithm that delivers a solution with a value of at least 12 times the value of an optimal solution. In Sect. 5 we formulate JISPk as an integer programming model and establish bounds on the value of the LPrelaxation in terms of the value of an optimal solution. For an overview of nonapproximability results for ‘classical’ scheduling problems, we refer to Hoogeveen et al. ([8]).
2
Preliminaries
A more extensive introduction to the issue of approximation and complexity can be found in Papadimitriou and Yannakakis ([13]) and Crescenzi and Kann ([4]). Here, we shortly list and describe some of the concepts we need. – A polynomial time ρapproximation algorithm for a maximization problem P is a polynomial time algorithm that, for all instances, outputs a solution with a value that is at least equal to ρ times the value of an optimal solution of P . – A polynomial time approximation scheme (PTAS) is a family of polynomial time (1 − )approximation algorithms for all > 0. – An Lreduction. Given two maximization problems A and B, an Lreduction from A to B is a pair of functions R and S such that:  R and S are computable in polynomial time,  For any instance I of A with optimum cost OP T (I), R(I) is an instance of B with optimum cost OP T (R(I)), such that OP T (R(I)) ≤ α · OP T (I), for some positive constant α.
(1)
Approximating an Interval Scheduling Problem
171
 For any feasible solution s of R(I), S(s) is a feasible solution of I such that OP T (I) − c(S(s)) ≤ β · (OP T (R(I)) − c(s)), (2) for some positive constant β, where c(S(s)) and c(s) denote the costs of S(s) and s respectively. An Lreduction is an approximation preserving reduction, that is, if problem B can be approximated within 1 − then problem A can be approximated within 1 − αβ (assuming that there is an Lreduction from A to B). – The class MAX SNP is a class that contains optimization problems that are approximable in polynomial time within a constant factor. – The problem Maximum Bounded 3Satisfiability (MAX3SATB): Input: A set of Boolean variables X = {x1 , x2 , . . . , xn } and a set C = {C1 , C2 , . . . , Cr } of clauses over X. Each clause Cj (j = 1, . . . , r) consists of precisely three literals and each variable xi (i = 1, . . . , n) occurs at most three times in C (either as literal xi or as literal x¯i ). Goal: Find a truth assignment for the variables such that the number of satisﬁed clauses in C is maximum. Measure: The number of satisﬁed clauses in C. Papadimitriou and Yannakakis ([13]) proved the following result: Lemma 2.1. MAX3SATB is MAX SNPhard. Arora et al. ([1]) proved the following result: Lemma 2.2. If there exists a PTAS for some MAX SNPhard problem, then P = N P. We now have sketched the tools that enable us to prove that JISPk has no PTAS (unless P = N P): this can be done by exhibiting an Lreduction from MAX3SATB and using Lemma’s 2.1 and 2.2.
3
A Nonapproximability Result
Theorem 3.1. JISPk does not have a PTAS unless P = N P for each fixed k ≥ 2. Proof. We prove the theorem by presenting an Lreduction from MAX3SATB to JISP2. The result then follows from Lemma 2.1 and Lemma 2.2. Recall that C = {C1 , C2 , . . . , Cr } is a set consisting of r disjunctive clauses, each containing exactly 3 literals. Let x1 , x2 , . . . , xn denote the variables in the r clauses and, for each i = 1, . . . , n, let m(i) denote the number of occurrences of variable xi (either as literal xi or as literal x ¯i ). Arbitrarily index the occurrences of variable xi as occurrence 1, 2, . . . , m(i). Notice that without loss of generality we can assume that each variable occurs at least twice in C, thus we have 2 ≤ m(i) ≤ 3 for all i and that i m(i) = 3r.
172
Frits C.R. Spieksma
We now construct an instance of JISP2, that is a graph G = (V, E) which is the edge union of an interval graph and a matching. Let I denote an instance of MAX3SATB and R(I) the corresponding instance of JISP2 with corresponding optimal values OP T (I) and OP T (R(I)). For each variable xi in I, i = 1, . . . , n, we have a subgraph H1i = (V 1i , E1i ) in R(I), where V 1i = {Ti1 , Fi1 , Ti2 , Fi2 , . . . , Ti,m(i) , Fi,m(i) } and E1i = {{Tij , Fij } ∪ {Tij , Fi,j+1 } j = 1, . . . , m(i)} (indices modulo m(i)). So for each variable xi in I we have a cycle consisting of 2m(i) nodes in R(I) (see Fig. 1).
Ti1 Fi,m(i) Fi1
Ti2
.
.
. Ti,m(i)
Fi2
Fig. 1. The subgraph H1i . When no ambiguity is likely to arise, we refer to the nodes Tij (Fij ), j = 1, . . . , m(i), in subgraph H1i as T nodes (F nodes). For each clause Cj in I, j = 1, . . . , r, we have a subgraph H2j = (V 2j , E2j ) in R(I) as depicted in Fig. 2.
p1j
p3j
p2j
Fig. 2. The subgraph H2j . Again, when no ambiguity is likely to arise, we refer to the nodes p1j , p2j and p3j in subgraph H2j as pnodes. Notice that the size of a maximum stable set in the graph H2j is bounded by 8; moreover, if one is not allowed to use
Approximating an Interval Scheduling Problem
173
pnodes in a stable set, no more than 7 nodes from H2j can be in a stable set, j = 1, . . . , r. To connect the subgraphs introduced sofar in R(I), consider some clause Cj , and consider the ﬁrst variable occurring in this clause Cj , say xi . Let this be the qth occurrence of this variable xi in C, q ∈ {1, 2, 3}. If the variable xi occurs as literal xi add the edge {p1j , Fiq } to E. If the variable xi occurs as literal x¯i add the edge {p1j , Tiq } to E. Consider now the second (third) variable occurring in Cj , say xl , and let this be the qth occurrence of this variable xl in C, q ∈ {1, 2, 3}. If the variable xl occurs as literal xl add the edge {p2j , Flq } ({p3j , Flq }) to E. If the variable xl occurs as literal x ¯l add the edge {p2j , Tlq } ({p3j , Tlq }) to E. This is done for all clauses Cj , j = 1, . . . , r. Now the graph G = (V, E) is completely speciﬁed. Let us argue that the resulting graph G is the edge union of an interval graph and a matching, which implies that we have constructed an instance of JISP2. Observe that no node in G has degree exceeding 3. We now exhibit a perfect matching M in G; these edges are the job edges (see Sect. 1). M consists of two parts: edges in ∪i H1i and edges in ∪j H2j . For the ﬁrst part we take ∪i {{Tij , Fij } j = 1, . . . , m(i)}. For the second part we take, for each j = 1, . . . , r, the bold edges depicted in Fig. 3.
p1j
p3j
p2j
Fig. 3. The subgraph H2j .
Obviously, M is indeed a matching. Also, one easily veriﬁes that the remaining edges in G (the intersection edges) form a set of disjoint paths, which corresponds to an interval graph. In order to show that this reduction fulﬁlls inequalities (1) and (2), consider the following. Observe that v ≡ OP T (I) ≥ 12 r. (Indeed, by considering the assignment: all variables true, and: all variables false, it follows that each clause is true in at least in one of both assignments). We have: OP T (R(I)) ≤ 3r + 8r = 11r ≤ 22v = 22 · OP T (I), which proves (1). The ﬁrst inequality follows from the fact that
174
Frits C.R. Spieksma
– at most m(i) nodes can be selected from each H1i , i = 1, . . . , n (see Fig. 1), and i m(i) = 3r, and – at most 8 nodes can be selected from each subgraph H2j , j = 1, . . . , r (see Fig. 2). To establish (2), we do the following. Consider an arbitrary solution to R(I), that is any stable set s in G with size c(s). We will map this solution s using intermediate solutions s and s to a solution of MAX3SATB, called S(s). To do this we need the following deﬁnition. A stable set s in G is called consistent iﬀ for each i = 1, . . . , n, m(i) nodes from V 1i are in s. Now we state a procedure which takes as input a stable set s. The output of the procedure is a consistent stable set called s with the property that c(s ) ≥ c(s). Procedure Consider s. For i = 1, . . . , n, consider V 1i . There are two possibilities. 1. m(i) nodes from V 1i are in s. Then either all T nodes or all F nodes from V 1i are in s and we leave s unaltered. 2. Less than m(i) nodes from V 1i are in s. Let cT (cF ) be the number of T nodes (F nodes) in V 1i that are connected to pnodes that are in s. (Notice that cT + cF ≤ 3). Distinguish two subcases: • If cT > cF (cT < cF ), it follows that cF ≤ 1 (cT ≤ 1). Modify s by selecting all F nodes from V 1i (and undo the selection of any T nodes in s), and, if cF = 1, undo in s the selection of the pnode connected to an F node. Notice that this modiﬁcation does not decrease the number of nodes in the stable set. • cT = cF . In that case, select from V 1i all T nodes, and undo the selection of a pnode connected to a T node. (Notice that there can be at most 1 such node). Again, modifying s in this way does not decrease the number of selected nodes. End of Procedure After applying this procedure to any stable set s in G, a consistent solution s is delivered. Now we describe how to modify s to get solution s . Consider in s those subgraphs H2j whose corresponding pnodes all three cannot be chosen, due to nodes from ∪i V 1i in s . Suppose there are r − l of those subgraphs in s . Then we modify s such that in l subgraphs H2j 8 nodes are selected and in r − l subgraphs H2j 7 nodes (this is always possible, see Figs. 1 and 2). This gives us a consistent solution s with c(s ) ≥ c(s ). Since s is consistent, it is now straightforward to identify the corresponding solution S(s) in MAX3SATB: simply set variable xi , i = 1, . . . , n true if all T nodes in subgraph H1i are selected in s , else set xi false. How many clauses in I are satisﬁed by this truth assignment? Observe that the construction of G implies that if for some consistent stable set s each pnode from some H2j is connected to a node in
Approximating an Interval Scheduling Problem
175
∪i V 1i that is in s, then the corresponding truth assignment renders clause Cj not satisﬁed, and vice versa. Thus, by the construction of s , it follows that a subgraph H2j for which 7 nodes are in s corresponds to a not satisﬁed clause, and otherwise the clause is satisﬁed, j = 1, . . . , r. This implies that l clauses in I are satisﬁed by this truth assignment. Again, let v = OP T (I), and let c(S(s)) = l. The following (in)equalities are true: – c(s) ≤ c(s ) (by construction), – c(s ) = 3r + 8l + 7(r − l) = 10r + l (by construction), and – OP T (R(I)) ≥ 3r + 8v + 7(r − v) = 10r + v (consider the truth assignment that is optimum for I; evidently, we can exhibit in R(I)) a corresponding stable set of size 10r + v). Thus OP T (R(I)) − c(s) ≥ OP T (R(I)) − c(s ) ≥ 10r + v − (10r + l) = v − l = OP T (I) − c(S(s)), which proves (2).
This reduction is based on an NPcompleteness proof in Kolen ([10]) (which in turn was inspired by a reduction in Garey et al. ([7])). There are a number of implications that can be observed from this reduction. First of all, the reduction remains valid if there are restrictions on the number of intervals that is active at time t for some t. More speciﬁcally, let ωt (I) be the number of intervals in I that is active at time t, and deﬁne the maximum intersection as ω(I) = maxt ωt (I). Notice that Theorem 3.1 remains true even when ω(I) ≤ 2 (whereas the problem becomes trivial when ω(I) ≤ 1). Also, the reduction remains valid for short processing times. Indeed, even if fl − sl = 2 for all intervals l, Theorem 3.1 remains true (whereas the problem again becomes trivial in the case that fl − sl = 1 for all l). Finally, observe the following. As mentioned in Sect. 1, Keil ([9]) proves that the question whether one can select n intervals in a JISP2 instance is solvable in polynomial time. In fact, this result can also be proved as follows. Graphs for which the size of a maximum matching equals the size of a minimum vertex cover are said to have the K¨ onig property. Since the complement of a minimum vertex cover is a maximum stable set, it follows that for graphs with the K¨ onig property the cardinality of a maximum stable set can be found in polynomial time. Now, the size of a maximum matching for a graph corresponding to a JISP2 instance equals n. So the question Keil ([9]) answered is equivalent to the question whether the graph corresponding to a JISP2 instance has the K¨ onig property. This problem can be solved in polynomial time (see Plummer ([14]) and the references contained therein).
4
An Approximation Algorithm
In this section we describe a simple ‘fromlefttoright’ algorithm, and show that it is 12 approximation algorithm. The algorithm can informally be described as
176
Frits C.R. Spieksma
follows: start ”at the left”, and take, repeatedly, the earliest ending feasible interval. Applied to any instance I of JISPk, this gives at least 12 OP T (I). A more formal description of the algorithm, referred to as GREEDY, is as follows. Let G(I) be the set of intervals selected from I by GREEDY, and let J(i) be the set of intervals belonging to the job corresponding to interval i, i = 1, . . . , kn. GREEDY: T := −∞; G(I) := ∅; S := set of all intervals in I; while maxi∈S si ≥ T do begin i∗ :=arg(mini∈S {fi  si ≥ T }) (break ties arbitrarily); G(I) := G(I) ∪ {i∗ }; S := S \ J(i∗ ); T := fi∗ ; end; Obviously, GREEDY is a polynomial time algorithm. Theorem 4.1. GREEDY is a 12 approximation algorithm for JISPk, k ≥ 1. Moreover, there exist instances of JISPk for which this bound is tight, for all k ≥ 2. Proof. Consider some instance I of JISPk. Applying GREEDY gives us a solution with G(I) intervals selected. The idea of the proof is to partition I into two instances I1 and I2 , and show that for each of those instances it is impossible to select more than G(I) intervals. Clearly, then no more than 2G(I) intervals can be selected, proving the ﬁrst part of the theorem. Now, let I1 consist of the jobs whose intervals are selected by GREEDY, and let I2 consist of all other jobs. Obviously, OP T (I1 ) ≤ G(I), since I1 contains no more as G(I) jobs. Let the ﬁnishing times of all intervals selected by GREEDY be indexed e1 < e2 < . . . < eG(I) and let e0 = −∞. For each interval in I2 we know that it is active at ej − 1 for some j = 1, . . . , G(I). (Otherwise it would have been selected by GREEDY). In other words, all intervals in I2 that have a starting time in [ej−1 , ej ) have a ﬁnishing time after time ej , j = 1, . . . , G(I). Thus at most one of those can be in a solution of I2 . Since there are only G(I) such timeintervals [ej−1 , ej ), at most G(I) intervals can be selected. Summarizing, we have: OP T (I) ≤ OP T (I1 ) + OP T (I2 ) ≤ G(I) + G(I). To show that this is best possible for GREEDY, consider the instance of JISP2 depicted in Fig. 4 (where the interval corresponding to job 2 has multiplicity 2). It is easy to see that for this instance I, OP T (I) = 2, whereas G(I) = 1. Remark 4.1. Notice that, for k = 1, GREEDY reduces to a special case of an algorithm described by Carlisle and Lloyd ([2]) and Faigle and Nawijn ([5]), and hence always ﬁnds an optimal solution.
Approximating an Interval Scheduling Problem
177
job 1: job 2:
Fig. 4. A worstcase instance for GREEDY.
5
An IPformulation for JISPk
Consider now the following Integer Programming formulation (IP ) for JISPk which assumes wlog that job i consists of intervals k(i − 1) + 1, k(i − 1) + 2, . . . , ki. Let xl = 1 if interval l is selected and 0 otherwise, and let A(l) = {j : interval j is active at fl − 1}, l = 1, . . . , kn. (Notice that l ∈ A(l)). kn (IP ) Maximize l=1 xl subject to xk(i−1)+1 + . . . + xki ≤ 1 for all i = 1, . . . , n, for all l = 1, . . . , kn, j∈A(l) xj ≤ 1 xl ∈ {0, 1}
for all l = 1, . . . , kn.
(3) (4) (5)
Constraints (3) express that at most 1 interval per job can be selected, while constraints (4) ensure that no intersection occurs in the set of selected intervals. Constraints (5) are the integrality constraints. Let vLP (I) denote the value of the LPrelaxation of (IP ) with respect to instance I of JISPk. Theorem 5.1. vLP (I) ≤ 2 · OP T (I) for all I. Moreover, this bound is asymptotically tight. Proof. The idea is as follows. Let us construct a solution which is feasible to the dual of the LPrelaxation of (IP ). This solution will have a value, say vD (I), bounded by 2 · OP T (I) for all I. Then, by LPduality we are done: vLP (I) ≤ vD (I) ≤ 2 · OP T (I) for all I. Associating zvariables to the ﬁrst set of constraints of (IP ) and yvariables to the second set of constraints, we get the following dual of the LPrelaxation of (IP ) (let A−1 (l) = {j : interval l is active at fj − 1}, l = 1, . . . , kn): n kn (D) Minimize l=1 yl + i=1 zi subject to zl/k + j∈A−1 (l) yj ≥ 1 for all l = 1, . . . , kn, all variables ≥ 0. One can think of the zvariables as horizontal lines, such that zi ‘touches’ intervals k(i − 1) + 1, . . . , ki, (i = 1, . . . , n) and of the yvariables as vertical lines such that yl is at time fl − 1 and ‘touches’ all intervals in A(l) (l = 1, . . . , kn). The dual problem (D) is now to give the dual variables nonnegative weights such that total weight is minimized and every interval receives at least weight 1 from those dual variables by which it is touched.
178
Frits C.R. Spieksma
Consider now the set of all optimal solutions to (IP ) with respect to some instance I (so the optimal integral solutions), and consider for each optimal solution the increasing sequence of ﬁnishing times of intervals selected in that optimal solution. Let EARLY OP T (I) be the set of intervals in I corresponding to ﬁnishing times in the lexicographic smallest sequence. Let SIST ERS(I) be the set of intervals whose corresponding jobs have an interval in EARLY OP T (I) (formally SIST ERS(I) = ∪i (J(i) \ i)), and let REST (I) be the set of all remaining intervals. Thus, we have partitioned the set of intervals in I into three subsets. We now construct the following dual solution: 1) yl = 1 for all l ∈ EARLY OP T (I). Notice that the construction leading to EARLY OP T (I) implies that each interval from REST (I) is touched by some yl , l ∈ EARLY OP T (I). (Indeed, suppose not, then there exists an ”earlier” optimal solution than EARLY OP T (I) which is impossible.) Thus, by choosing these weights, each interval from EARLY OP T (I) as well as each interval from REST (I) receives weight 1. Total weight spent: OP T (I). 2) z l = 1 for all l ∈ EARLY OP T (I). This implies that each interval from k EARLY OP T (I) as well as from SIST ERS(I) receives weight 1. Total weight spent: OP T (I). 3) All other dual variables are 0. It is easy to verify that this constitutes a feasible dual solution with weight 2 · OP T (I). The ﬁrst part of the theorem then follows. To establish the second part, consider the following instance, depicted in Fig. 5 (where the interval corresponding to job 2 has multiplicity k).
1 k
1 k
...
job 1:
job 2:
1 k
k−1 k
Fig. 5. An instance of JISPk. It is not hard to verify that the numbers above the intervals in Fig. 5 are the optimal LPvalues of the corresponding xvariables. Thus, for this instance we have that vLP (I) = 2 − k1 , whereas OP T (I) clearly equals 1. Remark 5.1. Notice that we actually proved a slightly stronger statement than announced in Theorem 5.1. Indeed, let vDIP (I) be the value corresponding to the formulation which arises when to problem D the constraints y, z ∈ {0, 1} are added. Arguments in the proof of Theorem 5.1 imply that vDIP (I) ≤ 2 · OP T (I) and the instance in Fig. 5 shows that this inequality is tight for each k ≥ 2.
Approximating an Interval Scheduling Problem
179
Although the bound in Theorem 5.1 is asymptotically tight, there remains a sizable gap for JISPk instances with small values of k (for k = 2, the gap is 32 versus 2). The following theorem closes part of this gap. Theorem 5.2. vLP (I) ≤
5 3
· OP T (I) for all JISP2 instances I.
Proof. We reﬁne the proof of Theorem 5.1. Construct the following dual solution. 1) yl = 23 for all l ∈ EARLY OP T (I). It follows (see the proof of Theorem 5.1) that each interval from EARLY OP T (I) as well as each interval from REST (I) receives weight 23 . Total weight spent: 23 OP T (I). 2) z l = 13 for all l ∈ EARLY OP T (I). This implies that each interval from 2 EARLY OP T (I) as well as from SIST ERS(I) receives weight 13 . Total weight spent: 13 OP T (I). To proceed, we construct from instance I an instance I by deleting from I all intervals in EARLY OP T (I). Obviously, OP T (I ) ≤ OP T (I). 3) yl = 13 for all l ∈ EARLY OP T (I ). Notice that each interval from EARLY OP T (I ) as well as each interval from REST (I ) receives weight 1 1 3 . Total weight spent: at most 3 OP T (I). Construct now the instance I by taking all intervals from SIST ERS(I) and SIST ERS(I ). Observe that there are no 2 intervals present in I belonging to a same job. Thus, we are now dealing with ﬁnding a maximum stable set on an interval graph. Such an instance is solvable by GREEDY as explained earlier. Set 4) yl = 13 for all l ∈ G(I ). Notice that each interval from I is touched by some yl , l ∈ G(I ). Notice also that G(I ) ≤ OP T (I), thus total weight spent: at most 13 OP T (I). All other dual variables get weight 0. If we sum total weight spent in 1)4) it follows we have spent not more as 53 OPT. It remains to argue that each interval from the instance has received weight at least 1. Take any interval from I and distinguish 5 cases: i: It belongs to EARLY OP T (I). Then it gets 23 from 1) and 13 from 2). ii: It belongs to SIST ERS(I). Then it gets 13 from 2), 13 from 3) (since each interval from SIST ERS(I) is either an EARLY OP T (I ) or a REST (I ) interval) and it gets 13 from 4). iii: It belongs to REST (I) and EARLY OP T (I ). Then it gets 23 from 1) and 1 3 from 3). iv: It belongs to REST (I) and REST (I ). Then it gets 23 from 1) and 13 from 3). v: It belongs to REST (I) and SIST ERS(I ). Then it gets 23 from 1) and 13 from 4). This completes the proof.
180
Frits C.R. Spieksma
References 1. Arora, S., Lund, C., Motwani, R., Sudan, M., Szegedy, M.: Proof verification and hardness of approximation problems. Proceedings of the 33rd IEEE Symposium on the Foundations of Computer Science (1992) 14–23 171 2. Carlisle, M.C., Lloyd, E.L.: On the kcoloring of intervals. Discrete Applied Mathematics 59 (1995) 225–235 176 3. Carter, M.W., Tovey, C.A.: When is the classroom assignment problem hard? Operations Research 40 (1992) S28–S39 170 4. Crescenzi, P., Kann, V.: A compendium of NP optimization problems. http://www.nada.kth.se/nada/~viggo/problemlist/compendium.html 170 5. Faigle, U., Nawijn, W.M.: Note on scheduling intervals online. Discrete Applied Mathematics 58 (1995) 13–17 176 6. Fischetti, M., Martello, S., Toth, P.: Approximation algorithms for fixed job schedule problems. Operations Research 40 (1992) S96–S108 170 7. Garey, M.R., Johnson, D.S., Stockmeyer, L.: Some simplified NPcomplete graph problems. Theoretical Computer Science 1 (1976) 237–267 175 8. Hoogeveen, J.A., Schuurman, P., Woeginger, G.J.: Nonapproximability results for scheduling problems with minsum criteria. Eindhoven University of Technology, COSOR Memorandum 9724, to appear in the Proceedings of the 6th IPCO Conference, Houston. 170 9. Keil, J.M.: On the complexity of scheduling tasks with discrete starting times. Operations Research Letters 12 (1992) 293–295 170, 175 10. Kolen, A.W.J., personal communication. 170, 175 11. Kroon, L.G., Salomon, M., van Wassenhove, L.N.: Exact and approximation algorithms for the tactical fixed interval scheduling problem. Operations Research 45 (1997) 624–638 170 12. Nakajima, K., Hakimi, S.L.: Complexity results for scheduling tasks with discrete starting times. Journal of Algorithms 3 (1982) 344–361 170 13. Papadimitriou, C.H., Yannakakis, M.: Optimization, approximation and complexity classes. Journal of Computer and System Sciences 43 (1991) 425–440 170, 171 14. Plummer, M.D.: Matching and vertex packing: how ”hard” are they? Annals of Discrete Mathematics 55 (1993) 275–312 175
Finding Dense Subgraphs with Semidefinite Programming Extended Abstract Anand Srivastav1 and Katja Wolf 2 1
Mathematisches Seminar, ChristianAlbrechtsUniversit¨ at zu Kiel, LudewigMeynStr. 4, D24098 Kiel, Germany
[email protected] 2 Zentrum f¨ ur Paralleles Rechnen, Universit¨ at zu K¨ oln, Weyertal 80, D50931 K¨ oln, Germany
[email protected] Abstract. In this paper we consider the problem of computing the heaviest kvertex induced subgraph of a given graph with nonnegative edge weights. This problem is known to be N Phard, but its approximation complexity is not known. For the general problem only an approxima˜ 0.3885 ) has been proved (Kortsarz and Peleg (1993)). tion ratio of O(n In the last years several authors analyzed the case k = Ω(n). In this case Asahiro et al. (1996) showed a constant factor approximation, and for dense graphs Arora et al. (1995) obtained even a polynomialtime approximation scheme. We give a new approximation algorithm for arbitrary graphs and k = n/c for c > 1 based on semidefinite programming and randomized rounding which achieves for some c the presently best (randomized) approximation factors. Key Words. Subgraph Problem, Approximation Algorithms, Randomized Algorithms, Semidefinite Programming.
1
Introduction
For an undirected graph G = (V, E) with nonnegative edge weights wij for (i, j) ∈ E and an integer k ≤ n = V  the Heaviest Subgraph problem is to determine a subset S of k vertices such that the weight of the subgraph induced by S is maximized. We measure the weight of the subgraph by computing / E, implicitly ω(S) = i∈S,j∈S wij . (For convenience, we set wij = 0 for (i, j) ∈ assuming that G is a complete graph.) The unweighted case of the problem (wij = 1 for (i, j) ∈ E) is called Densest Subgraph. These problems arise in several applications. (See [4,15] for a detailed discussion.) Both problems are N Phard, which can be easily seen by a reduction from Maximum Clique. The Heaviest Subgraph problem remains N Phard when the weights satisfy the triangle inequality [15]. A promising and often successful approach to cope with the hardness of a combinatorial optimization problem is to design polynomialtime approximation algorithms. Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 181–191, 1998. c SpringerVerlag Berlin Heidelberg 1998
182
Anand Srivastav and Katja Wolf
Given an instance I of a maximization problem and an (approximation) algorithm A the approximation ratio RA (I) is deﬁned by RA (I) = OP T (I)/A(I) ≥ 1, while rA (I) = 1/RA (I) ≤ 1 is called the approximation factor. We will use both notations, but for the comparison of constantfactor approximations rA will be more convenient. Previous Work. For the case where the weights satisfy the triangle inequality Hassin, Rubinstein and Tamir [12] describe an algorithm which is similar to a greedy solution for constructing a maximum matching by repeatedly choosing the heaviest edge. Their algorithm has approximation ratio 2. Arora, Karger and Karpinski [3] model the Densest Subgraph problem as a quadratic 0/1 program and apply random sampling and randomized rounding techniques resulting in a polynomialtime approximation scheme (that is, a family of algorithms Aε with approximation ratio (1 + ε) for each ε > 0) for problem instances satisfying k = Ω(n) and E = Ω(n2 ), or for instances where each vertex has degree Ω(n). The general weighted problem without triangle inequality restrictions is considered in [2,9,14]. Kortsarz and Peleg [14] devise an approximation algorithm ˜ 0.3885 ). Asahiro et al. [2] analyze a which achieves an approximation ratio of O(n greedy heuristic which repeatedly deletes a vertex with the least weighted degree from the current graph until k vertices are left. They derive the following bounds for the approximation ratio Rgreedy 1 1 n 2 n 2 2 + 2k − O 1/n ≤ Rgreedy ≤ 2 + 2k + O 1/n 2 nk − 1 − O(1/k) ≤ Rgreedy ≤ 2 nk − 1 − O(n/k 2 )
for for
n/3 ≤ k ≤ n, k < n/3.
Goemans [9] studies a linear relaxation of the problem. Linear programming yields a fractional solution, subsequent randomized rounding gives an integer solution which may exceed the allowed number of vertices but this is repaired in a greedy manner. His algorithm has expected approximation ratio 2 + O(n−1/2 ) for k = n/2. Independently of our work, Feige and Seltser [7] have developed an algorithm which is based on a diﬀerent semideﬁnite programming relaxation and uses a normbased rounding procedure while ours takes directions of vectors into account. Their approximation ratio is roughly n/k. For k n1/3 they point out the limits of the method in comparison to [14]. The Results. We present a randomized rounding algorithm for arbitrary graphs and k = n/c, c > 1, which outputs for every suﬃciently small ε > 0 a kvertex subgraph of expected weight at least r(c)HSopt where HSopt is the value of an optimal solution and r(c) = (1 − c/n)(1 − ε)2 (β/c2 +
c4 (c
(c2 − 1)(c − 1)(1 − ε)αβ ) − α + ε) − c2 (c2 − 1)(c − 1)(1 − ε)α
(α > 0.87856 and β > 0.79607 are the constants derived in the approximation algorithms by Goemans and Williamson for MaxCut and MaxDiCut [10].)
Finding Dense Subgraphs with Semidefinite Programming
183
The following table shows the values of r for some interesting values of k (assuming n to be suﬃciently large and ε suﬃciently small so that the factor (1 − c/n)(1 − ε)2 is negligible). We have listed the expected approximation factor for choosing a random subgraph in the ﬁrst column, the approximation factor rgreedy = 1/Rgreedy in the second column and our approximation factor r(c) in the third column. k
random
rgreedy
r(c)
n/2
0.25
0.4
0.4825
n/3
0.1
0.25
0.3353
n/4
0.0625
0.16
0.2387
Note that in all cases shown in the table we have an improvement on the approximation factors due to Asahiro et al. [2]. For k = n/2 our factor is slightly smaller than the factor of 0.5 achieved by Goemans [9] and Feige and Seltser [7], while for k = n/3 our factor is better. An example due to M. Langberg for k = n/2 shows that in this case the approximation guarantee of our relaxation cannot be better than 0.5. The paper is organized as follows. In Section 2 we show how the Heaviest Subgraph problem can be formulated as a quadratic program. A relaxation of the program can be solved within any desired precision in polynomial time with the help of semideﬁnite programming. Section 3 is dedicated to the analysis of the expected approximation factor of the algorithm for k = n/c, c > 1. We conclude in Section 4 and outline how the approximation factor could be further improved.
2
Modeling the Problem as a Semidefinite Program
In this section we will derive a suitable formulation for the Heaviest Subgraph as a nonlinear program and state our approximation algorithm. We introduce a variable xi for each vertex i ∈ V = {1, . . . , n} and, in addition, another variable x0 to express whether a vertex belongs to the subgraph or not. i ∈ S ⇔ x0 xi = 1 . The optimal value for the Heaviest Subgraph can be obtained as a solution to the following program wij (1 + x0 xi )(1 + x0 xj ) maximize 14 (i,j)∈E
subject to
n i=1
x0 xi = 2k − n
(HS)
x0 , x1 , . . . , xn ∈ {−1, 1} . The term (1 + x0 xi )(1 + x0 xj )/4 = (1 + x0 xi + x0 xj + xi xj )/4 evaluates to 1 if i and j ∈ S and to 0 otherwise. Thus, an edge (i, j) having both endpoints
184
Anand Srivastav and Katja Wolf
in the induced subgraph on S contributes wij to the objective function. The constraints guarantee that this subgraph has size k. Since it is N Phard to ﬁnd a solution to this integer program, we relax the integrality constraint and permit the variables to be vectors in the unit sphere in IRn+1 . The product is replaced by the inner product of two vectors. Let B1 be the unit sphere in IRn+1 B1 = {x ∈ IRn+1  x 2 = 1}. maximize
1 4
wij (1 + x0 · xi + x0 · xj + xi · xj )
(i,j)∈E n
subject to
i=1
x0 · xi = 2k − n
(SDP )
x0 , x1 , . . . , xn ∈ B1 .
Using the variable transformation yij := xi · xj we may translate the above program into an equivalent semideﬁnite program. 1 4
maximize
wij (1 + y0i + y0j + yij )
(i,j)∈E n
subject to
i=1
y0i = 2k − n
yii = 1 for i = 0, . . . , n Y = (yij ) symmetric and positive semideﬁnite. This program can be solved within an additive error of δ of the optimum in time polynomial in the size of the input and log(1/δ) by, for example, interiorpoint algorithms or the ellipsoid method (see [1]). As the solution matrix Y is positive semideﬁnite, a Cholesky decomposition of the Gram matrix Y = (v0 , v1 , . . . , vn )T (v0 , v1 , . . . , vn ) with vectors vi may be computed in time O(n3 ). This is described in [11]. Observe that the diagonal elements yii = 1 ensure that
vi 2 = 1. We separate the vectors  belonging to the subgraph or not  according to their position relative to a random hyperplane through the origin. Unfortunately, the resulting subgraph can have too many vertices, leading to an infeasible solution. But this defect is repaired by repeatedly removing a vertex with the least weighted degree until we end up with exactly k vertices. If the size of the subgraph obtained after the rounding is less than k, we include arbitrary vertices. The random experiment and the repairing step are repeated several times and ﬁnally the best output is chosen. Algorithm SUBGRAPH 1. Relaxation: Solve the semideﬁnite program and compute a Cholesky decomposition of Y in order to construct solution vectors v0 , . . . , vn ∈ B1 .
Finding Dense Subgraphs with Semidefinite Programming
185
2. Randomized Rounding: Randomly choose a unit length vector rt ∈ IRn+1 (to be considered as the normal of a hyperplane through the origin) and set St = {1 ≤ i ≤ n  sgn(vi · rt ) = sgn(v0 · rt )} (Here sgn( ) denotes the signum function.) 3. Repairing: • If St  < k, arbitrarily add k − St  vertices to the graph. • If St  > k, determine a vertex i ∈ St with minimum weighted degree j∈St wij and remove it from St . Repeat this operation until St has k vertices. Denote the resulting vertex set by S˜t . 4. Iteration: Let T = T (ε) for a small ε > 0, repeat the steps 2 and 3 for t = 1, . . . , T , and output the best solution found in one of the T runs. (T will be ﬁxed in the analysis of the algorithm in Section 3). We observe the following relation between the sets St after the rounding and S˜t after the repairing. Here we only need to consider the case St  > k, because otherwise we may simply add arbitrary vertices increasing the weight of the subgraph. Lemma 1. After the removal of the vertices we have ω(S˜t ) ≥
k (k − 1) ω(St ) . St  (St  − 1)
The above inequality is tight, e.g., for a complete graph whose edges have equal weight. Proof. If we sum up the weights of the subgraphs induced by St − {i} for all i ∈ St , each edge is counted St  − 2 times because it disappears when one of its endpoints is removed. So ω(St − {i}) = (St  − 2) ω(St ) . i∈St
Thus, an average argument implies that after the ﬁrst deletion of a vertex v with minimum weighted degree the weight of the remaining subgraph is (St  − 2) i∈St ω(St − {i}) ≥ ω(St ) . ω(St − {v}) ≥ St  St  The claim is then obtained by induction .
3
Analysis of the Algorithm
The analysis of the performance of our approximation algorithm is split into two parts. We ﬁrst estimate the expected weight and number of vertices of the
186
Anand Srivastav and Katja Wolf
subgraph after the rounding phase. The reasoning is similiar to the MaxCut and MaxDiCut approximation introduced by Goemans and Williamson in [10]. We refer to this article for the details of the method. In the second part, we consider the expected approximation factor after the repairing step by relating the weight of the induced subgraph and the number of vertices after the rounding in an appropriate way. Frieze and Jerrum [8] used analogous techniques for the MaxBisection problem. We restrict ourselves to the case k = n/c, c > 1. The approximation factors for k ∈ {n/2, n/3, n/4} are given in the table in Section 1. Lemma 2. Let HSopt denote the optimum of the program (HS) and SDPopt the optimum of the semidefinite relaxation (SDP ). For t = 1, . . . , T the subgraph induced by St after the rounding satisfies (i) (ii)
E[ω(St )] ≥ β SDPopt ≥ β HSopt α k ≤ E[St ] ≤ (1 − α) n + α k .
Here α > 0.87856 and β > 0.79607 are the constants Goemans and Williamson proved in the approximation algorithms for MaxCut and MaxDiCut [10]. The derivation of the bounds closely follows the methods they applied in their analysis. For completeness we will repeat the key ideas here. Proof. The probability that two vectors vi and vj are on opposite sides of the random hyperplane is proportional to the angle between those two vectors and is arccos (vi · vj ) . Pr[sgn(vi · rt ) = sgn(vj · rt )] = π Due to the linearity of expectation we have E[ω(St )] = wij Pr[sgn(vi · rt ) = sgn(vj · rt ) = sgn(v0 · rt )] . (i,j)∈E
In order to determine the above probability we deﬁne the following events A: Bi : Bj : B0 :
sgn(vi · rt ) = sgn(vj · rt ) = sgn(v0 · rt ) sgn(vi · rt ) = sgn(vj · rt ) = sgn(v0 · rt ) sgn(vj · rt ) = sgn(vi · rt ) = sgn(v0 · rt ) sgn(v0 · rt ) = sgn(vi · rt ) = sgn(vj · rt )
and observe that Pr[A] + Pr[Bi ] + Pr[Bj ] + Pr[B0 ] = 1 and that, for instance, Pr[Bi ] = Pr[sgn(vj · rt ) = sgn(v0 · rt )] − Pr[A]. Similar equations hold for Pr[Bj ] and Pr[B0 ]. Combining these equations leads to 1 arccos(v0 · vi ) + arccos(v0 · vj ) + arccos(vi · vj ) Pr[A] = 1 − 2π β 1 + v0 · vi + v0 · vj + vi · vj . ≥ 4
Finding Dense Subgraphs with Semidefinite Programming
187
The last inequality can be veriﬁed using calculus. Hence, we obtain E[ω(St )] ≥ β SDPopt ≥ β HSopt because of the relaxation. Computing the expected number of vertices in St we get E[St ] = =
n
Pr[sgn(vi · rt ) = sgn(v0 · rt )]
i=1 n
1 1 − arccos(v0 · vi ) π i=1
=n−
n 1 arccos(v0 · vi ) π i=1
≤n−α
n 1 − v0 · vi i=1
2
= (1 − α) n + α k . In the last equation we used the cardinality constraint of the relaxation (SDP ). Note that arccos(−v0 · vi ) α π − arccos(v0 · vi ) = ≥ (1 + v0 · vi ) π π 2 leads to the lower bound for the expected number of vertices of the subgraph. We continue the analysis for k = n/c for some constant c > 1. The main diﬃculty stems from the fact that so far we have only computed the expected size and weight of the subgraph, but we need to relate the size and weight to the expectations, for example by a largedeviation argument. Unfortunately, our random variables are not independent, so Chernoﬀtype bounds cannot be used. Fortunately, the Markov inequality already helps. Lemma 3. Let ε > 0 be some small constant. Pr St  ∈ / [(α − ε)n/c , n] ≤ p (ε) < 1 . Proof. We apply Markov’s inequality and the lower bound for the expected number of vertices Pr St  < (α − ε) n/c = Pr n − St  > (1 − α/c + ε/c) n n − E[St ] (1 − α/c + ε/c) n n − α n/c ≤ =: p (ε) < 1 . (1 − α/c + ε/c) n
≤
188
Anand Srivastav and Katja Wolf
By repeating the rounding experiment T = T (ε) times, we can make sure that in some run, say τ , Sτ  ∈ [(α − ε) n/c , n]
(∗)
with probability at least (1 − ε). Theorem 1. For k = n/c, c > 1 the algorithm SUBGRAPH computes a subgraph S with expected weight E[ω(S)] ≥ (1 − c/n)(1 − ε)2 rˆ(c) HSopt . rˆ(c) is given by rˆ(c) = β/c2 +
c4 (c
(c2 − 1)(c − 1)(1 − ε)αβ − α + ε) − c2 (c2 − 1)(c − 1)(1 − ε)α
Proof. Remember that in the algorithm we ﬁnally choose the best subgraph of the T iterations. We deﬁne three random variables for each rounding experiment t = 1, . . . , T Xt = ω(St ) ,
Yt = n − St  ,
Zt =
Xt Yt . + f SDPopt n − n/c
f > 0 is a constant (depending on c) which we shall later ﬁx in a suitable way. The intuition behind our deﬁnition of Zt is judging a set St by its weight and its violation of the cardinality constraint. Lemma 2 ensures (1) E[Zt ] ≥ β/f + α . A random subgraph R with n/c vertices has expected weight
E[ω(R)] =
wij Pr[i and j ∈ R] =
(i,j)∈E
Hence, SDPopt ≥ HSopt ≥ Zt ≤
1 c2
1 ω(V ) . c2
ω(V ), and
c2 c ω(V ) n − St  ≤ + . + 1 n − n/c f c−1 f c2 ω(V )
(2)
(1) and (2) imply that Pr[Zt ≤ (1 − ε)(β/f + α)] ≤
c2 /f + c/(c − 1) − (β/f + α) =: p < 1. c2 /f + c/(c − 1) − (1 − ε)(β/f + α)
Repeating the rounding experiment T = T (ε) times we can guarantee that for Zτ = max1≤t≤T Zt the “error probability” becomes very small: Pr[Zτ ≤ (1 − ε)(β/f + α)] ≤ pT < ε .
Finding Dense Subgraphs with Semidefinite Programming
189
Thus, with probability 1 − ε we have Zτ ≥ (1 − ε)(β/f + α). ¿From now on we may assume that this inequality holds. We may even assume that the set Sτ satisﬁes the condition (∗) Sτ  ∈ [(α − ε) n/c , n] . We let Xτ = ω(Sτ ) = λ SDPopt for some λ, and Sτ  = µ n for some µ ∈ [(α − ε)/c , 1]. Then, Zτ =
n − µn λ c λ + = + (1 − µ) f n − n/c f c−1
fc (1 − µ) (3) c−1 We split the µinterval [(α − ε)/c , 1] into two parts [(α − ε)/c , 1/c[ and [1/c , 1] and consider them separately. In case of µ ∈ [(α − ε)/c , 1/c[, the number of vertices after the rounding is too small and no vertices have to be removed. Then λ ≥ (1 − ε)(β + α f ) −
ω(S˜τ ) ≥ ω(Sτ ) = λ SDPopt fc (1 − µ) SDPopt ≥ (1 − ε)(β + α f ) − c−1 f (c − α + ) SDPopt ≥ (1 − ε)(β + α f ) − c−1
(4)
For µ ∈ [1/c , 1] the number of vertices is too large and some vertices have been deleted. Here we apply Lemma 1 in order to estimate the weight of the subgraph induced by S˜τ n/c · (n/c − 1) ω(Sτ ) µ n · (µ n − 1) c λ ≥ 1− SDPopt . n c2 µ2
ω(S˜τ ) ≥
With the lower bound (3) for λ we can estimate
λ c2 µ2 :
fc (1 − ε)(β + α f ) − c−1 (1 − µ) λ ≥ min 2 2 2 2 µ∈[1/c,1] c µ µ∈[1/c,1] c µ
= min (1 − ε)(β + α f ) − f , (1 − ε) (β + α f ) c−2 ,
min
(5)
and the last equation follows from the fact that the minimum is attained for µ = 1/c or µ = 1, as the above function has no minimum in the interior of the interval. Comparing the factor in (4) and the ﬁrst expression in (5) yields that the former is smaller than the latter. We may now choose f so that the minimum of the resulting two factors
f (c − α + ) , (1 − ε) (β + α f ) c−2 min (1 − ε)(β + α f ) − c−1
190
Anand Srivastav and Katja Wolf
is maximized. Since the ﬁrst term is a decreasing linear function of f and the second term is an increasing function, the minimum is maximized when both expressions are equal, that is for f=
(c2 − 1)(c − 1)(1 − ε)β c2 (c − α + ε) − (c2 − 1)(c − 1)(1 − ε)α
So the following inequality holds ω(S˜τ ) ≥ (1 −
β c (c2 − 1)(c − 1)(1 − ε)αβ )(1 − ε) 2 + 4 SDPopt n c c (c − α + ε) − c2 (c2 − 1)(c − 1)(1 − ε)α
Observe that the weight of the subgraph produced by the algorithm is at least ω(S˜τ ). Hence it is suﬃcient to compute the expectation of ω(S˜τ ), and we get the claim of the theorem. The following example due to Michael Langberg shows that for k = n/2 the integrality ratio between SDPopt and HSopt is at least 2. Consider the complete graph on n vertices. A feasible vector conﬁguration to the semideﬁnite program of weight approximately n2 /4 can be achieved by setting all vectors vi equal to a single vector perpendicular to v0 . In that conﬁguration each edge contributes 0.5 to the objective of the semideﬁnite program, yielding a total weight of E/2. On the other hand the optimal solution has weight E/4, thus the approximation factor of our algorithm for k = n/2 cannot be better than 0.5.
4
Conclusion
The approximation complexity of the Heaviest Subgraph problem is not known, while the complexity of the related Maximum Clique problem is wellstudied [13]. Any result in this direction would be of great interest. On the positive side, better approximation algorithms relying on stronger relaxations might be devised. Feige and Goemans [6] gain a better approximation ratio for MaxDiCut by adding valid inequalities and using diﬀerent rounding schemes.
References 1. F. Alizadeh. Interior point methods in semidefinite programming with applications to combinatorial optimization. SIAM Journal on Optimization 5(1): 1351, 1995. 184 2. Y. Asahiro, K. Iwama, H. Tamaki, and T. Tokuyama. Greedily finding a dense subgraph. In Proceedings of the 5th Scandinavian Workshop on Algorithm Theory (SWAT). Lecture Notes in Computer Science, 1097, pages 136148, SpringerVerlag, 1996. 182, 183 3. S. Arora, D. Karger, and M. Karpinski. Polynomial time approximation schemes for dense instances of N Phard problems. In Proceedings of the 27th Annual ACM Symposium on Theory of Computing, pages 284293, 1995. 182
Finding Dense Subgraphs with Semidefinite Programming
191
4. B. Chandra and M.M. Halld´ orsson. Facility dispersion and remote subgraphs. In Proceedings of the 5th Scandinavian Workshop on Algorithm Theory (SWAT). Lecture Notes in Computer Science, 1097, pages 5365, SpringerVerlag, 1996. 181 5. P. Crescenzi and V. Kann. A compendium of N P optimization problems. Technical report SI/RR95/02, Dipartimento di Scienze dell’Informazione, Universit` a di Roma “La Sapienza”. The problem list is continuously updated and available as http://www.nada.kth.se/theory/problemlist.html. 6. U. Feige and M.X. Goemans. Approximating the value of two prover proof systems, with applications to Max 2Sat and Max DiCut. In Proceedings of the 3rd Israel Symposium on the Theory of Computing and Systems, pages 182189, 1995. 190 7. U. Feige and M. Seltser. On the densest ksubgraph problem. Technical report, Department of Applied Mathematics and Computer Science, The Weizmann Institute, Rehovot, September 1997. 182, 183 8. A. Frieze and M. Jerrum. Improved approximation algorithms for Max kCut and Max Bisection. Algorithmica 18: 6781, 1997. 186 9. M.X. Goemans. Mathematical programming and approximation algorithms. Lecture given at the Summer School on Approximate Solution of Hard Combinatorial Problems, Udine, September 1996. 182, 183 10. M.X. Goemans and D.P. Williamson. Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming. In Journal of the ACM 42(6): 11151145, 1995. A preliminary version has appeared in Proceedings of the 26th Annual ACM Symposium on Theory of Computing, pages 422431, 1994. 182, 186 11. G.H. Golub and C.F. van Loan. Matrix Computations. North Oxford Academic, 1986. 184 12. R. Hassin, S. Rubinstein and A. Tamir. Approximation algorithms for maximum dispersion. Technical report, Department of Statistics and Operations Research, Tel Aviv University, June 1997. 182 13. J. H˚ astad. Clique is hard to approximate within n1−ε . In Proceedings of the 37th Annual IEEE Symposium on Foundations of Computer Science, pages 627636, 1996. 190 14. G. Kortsarz and D. Peleg. On choosing a dense subgraph. In Proceedings of the 34th Annual IEEE Symposium on Foundations of Computer Science, pages 692701, 1993. 182 15. S.S. Ravi, D.J. Rosenkrantz and G.K. Tayi. Facility dispersion problems: Heuristics and special cases. In Proceedings of the 2nd Workshop on Algorithms and Data Structures. Lecture Notes in Computer Science, 519, pages 355366, SpringerVerlag, 1991. 181
Best Possible Approximation Algorithm for MAX SAT with Cardinality Constraint Maxim I. Sviridenko
Sobolev Institute of Mathematics, Russia
Abstract. In this work we consider the MAX SAT problem with the additional constraint that at most p variables have a true value. We obtain (1 − e−1 )approximation algorithm for this problem. Feige [5] proves that for the MAX SAT with cardinality constraint with clauses without negations this is the best possible performance guarantee unless P = NP
1
Introduction
An instance of the Maximum Satisﬁability Problem (MAX SAT) is deﬁned by a collection C of boolean clauses, where each clause is a disjunction of literals drawn from a set of variables {x1 , . . . , xn }. A literal is either a variable x or its negation x ¯. In addition for each clause Cj ∈ C, there is an associated nonnegative weight wj . An optimal solution to a MAX SAT instance is an assignment of truth values to variables x1 , . . . , xn that maximizes the sum of the weights of the satisﬁed clauses (i.e. clauses with at least one true literal). In this work we consider the cardinality constrained MAX SAT (CCMAX SAT). A feasible truth assignment of this problem contains at most P true variables. The MAX SAT is one of central problems in theoretical computer science. The best known approximation algorithm for the MAX SAT has performance guarantee slightly better than 0.77 [2]. In [8] it is shown that the MAX E3SAT, the version of the MAX SAT problem in which each clause is of length exactly three, cannot be approximated in polynomial time to within a ratio greater than 7/8, unless P = N P . It seems that for the general MAX 3SAT there exists an approximation algorithm with performance guarantee 7/8 [9]. The best known positive and negative results for the MAX2SAT are 0,931 [6] and 21/22 [8], respectively. We can see that there is a gap between positive and negative results for the MAX SAT. A class MPSAT is deﬁned in [10] and it is proved that for all problems belonging to the MPSAT there exists an approximation scheme. Since the planar CCMAX SAT belongs to the MPSAT (see the deﬁnition of this class in [10]) an existence of an approximation scheme for this problem follows. It’s known that an existence of an approximation algorithm with perfomance guarantee better than 1 − e−1 for the CCMAX SAT with clauses without negations implies P = N P [5].
Supported by the grant 970100890 of the Russian Foundation for Basic Research.
Klaus Jansen, Jos´ e Rolim (Eds.): APPROX’98, LNCS 1444 , pp. 193–199, 1998. c SpringerVerlag Berlin Heidelberg 1998
194
Maxim I. Sviridenko
In this work we present an approximation algorithm for the CCMAX SAT with performance guarantee 1−e−1. We use the method of randomized rounding of linear relaxation. Notice that for satisﬁability problems without cardinality constraint best known algorithms (sometimes best possible) are obtained by using semideﬁnite programming relaxation (compare [3] and [6,4,9]) but for the CCMAX SAT problem the best possible approximation is obtained via linear programming relaxation.
2
Linear relaxation and approximation algorithm
Consider the following integer program max wj zj ,
(1)
Cj ∈C
subject to
i∈Ij+
yi +
(1 − yi ) ≥ zj
for all Cj ∈ C,
(2)
i∈Ij− n
yi ≤ P,
(3)
i=1
0 ≤ zj ≤ 1
for all Cj ∈ C,
yi ∈ {0, 1} i = 1, . . . , n,
(4) (5)
where Ij+ (respectively Ij− ) denotes the set of variables appearing unnegated (respectively negated) in Cj . By associating yi = 1 with xi set true, yi = 0 with xi false, zj = 1 with clause Cj satisﬁed, and zj = 0 with clause Cj not satisﬁed, the integer program (1)(5) corresponds to the CCMAX SAT problem. The similar integer program was ﬁrst used by Goemans and Williamson [3] for designing an approximation algorithm for the MAX SAT problem. Let M ≥ 1 be some integer constant. We deﬁne Min the next section. n Consider the problem (1)(5) with additional constraint i=1 yi ≤ M . We can ﬁnd an optimal solution (y1 , z1 ) of this problem in polynomial time by complete enumeration. Consider the problem (1)(5) with another additional constraint n i=1 yi ≥ M and let (y2 , z2 ) be an αapproximation solution of this problem. Clearly, the best of these two solutions is an αapproximation solution of the CCMAX SAT. Consequently, without loss of generality we may consider the problem (1)(5) with constraint ni=1 yi ≥ M . For t = M, . . . , P consider now linear programs LPt formed by replacing yi ∈ {0, 1} constraints with the constraints 0 ≤ yi ≤ 1 and by replacing (3) with the constraint n yi = t. (6) i=1
Let Ft∗ be a value of an optimal solution of LPt . Let k denote an index such that Fk∗ = maxM≤t≤n Ft∗ . Since any optimal solution of the problem (1)(5) with
Best Possible Approximation Algorithm for MAX SAT
195
constraint ni=1 yi ≥ M is a feasible solution of LPt for some t, we obtain that Fk∗ is an upper bound of the optimal value of this problem. We now present a randomized approximation algorithm for the CCMAX SAT. Description of algorithm 1. Solve the linear programs LPt for all t = M, . . . , P . Let (y ∗ , z ∗ ) be an optimal solution of LPk . 2. The second part of the algorithm consists of k independent steps. On each step algorithm chooses an index i from the set {1, . . . , n} at random with probability y∗ Pi = ki . Let S denote the set of the chosen indices. Notice that P ≥ k ≥ S. We set xi = 1 if i ∈ S and xi = 0 otherwise. Our ﬁnal algorithm consists of two steps. The ﬁrst step is to solve linear programs LPt for all t = M, . . . , P . We can do it by using any known polynomial algorithm for linear programming. The second step is a derandomization the randomized part of the algorithm. We will show in the section 4 that derandomization can be done in polynomial time. In the next section we evaluate an expectation of the value of the rounded solution.
3 3.1
Analysis of algorithm Preliminaries
In this subsection we state some technical lemmas. Lemma 1. The probability of realization of at least one among the events A1 , . . . , An is given by P r(Ai ) − P r(Ai1 ∩ Ai2 ) + . . . P r(A1 ∪ . . . ∪ An ) = 1≤i1 1 − e−1 for all clauses Cj with Ij−  ≥ 3, we have E(f2 (S)) ≥ (1 − e−1 )Fk∗ . We can derandomize this algorithm using the following procedure
Best Possible Approximation Algorithm for MAX SAT
199
Description of derandomization Derandomized algorithm consists of k steps. On sth step we choose an index is which maximizes a conditional expectation, i.e. E(f2 (S)i1∈ S, . . . , is−1∈ S, isinS) = max E(f2 (S)i1∈ S, . . . , is−1∈ S, j∈ S). j∈{1,...,n}
Since max
j∈{1,...,n}
E(f2 (S)i1 ∈ S, . . . , is−1 ∈ S, j ∈ S) ≥ E(f2 (S)i1 ∈ S, . . . , is−1 ∈ S)
˜ ≥ E(f2 (S)) at the end of derandomization we obtain a solution S˜ such that f2 (S) −1 ∗ ∗ ˜ ˜ ≥ (1 − e )Fk . Since Fk ≥ f1 (S) ≥ f2 (S) this solution is an (1 − e−1 )approximation solution for IP1 . We can calculate a conditional expectations in polynomial time using their linearity, lemma 2 and the fact that Ij−  ≤ 3 in IP2 .
References 1. Alon, N., Spencer, J.H.: Probabilistic Method. Wiley, 1992. 198 2. Asano, T.: Approximation algorithms for MAX SAT: Yannakakis vs. GoemansWilliamson. In Proceedings of the 5nd Israel Symposium on Theory and Computing Systems (1997) 182–189 193 3. Goemans, M., Williamson, D.: New 3/4approximation algorithms for the maximum satisﬁability problem. SIAM Journal on Discrete Mathematics 7 (1994) 656–666 194 4. Goemans M., Williamson, D.: Imroved approximation algorithms for maximum cut and satisﬁability problems using semideﬁnite programming Journal of ACM 42 (1995) 1115–1145 194 5. Feige, U.: A threshold of ln n for approximating set cover. Journal of ACM (to appear) 193 6. Feige, U., Goemans, M.: Approximating the value of twoprover proof systems, with applications to MAX 2SAT and MAXDICUT. In Proceedings of the 3nd Israel Symposium on Theory and Computing Systems (1995) 182–189 193, 194 7. Feller, W.: An Introduction to Probability Theory and Its Applications. John Wiley & Sons New York (1968) 195 8. Hastad, J.: Some optimal inapproximability results. In Proceedings of the 28 Annual ACM Symp. on Theory of Computing (1996) 1–10 193 9. Karloﬀ, H., Zwick, U.: A 7/8approximation algorithm for MAX 3SAT? In Proceedings of the 38th FOCS (1997) 406–415 193, 194 10. Khanna, S., Motwani, R.: Towards syntactic characterization of PTAS. In Proceedings of the 28 Annual ACM Symp. on Theory of Computing (1996) 329–337 193