Combining Two Worlds: Parameterised Approximation for Vertex Cover Ljiljana Brankovic1, and Henning Fernau2 1
School of Electrical Engineering and Computer Science The University of Newcastle, Callaghan, NSW 2308, Australia
[email protected] 2 Fachbereich 4, Abteilung Informatik Universit¨ at Trier, 54286 Trier, Germany
[email protected]
Abstract. We explore opportunities for parameterising constant factor approximation algorithms for vertex cover. We provide a simple algoand has rithm that works on any approximation ratio of the form 2l+1 l+1 complexity that outperforms an algorithm by Bourgeois et al. derived from a sophisticated exact parameterised algorithm. In particular, for l = 1 (factor 1.5 approximation) our algorithm runs in time O∗ (1.09k ). Additionally, we present an improved polynomial-time approximation algorithm for graphs of average degree four.
1
Introduction
minimum vertex cover: A hard problem and how to deal with it. Given a graph G = (V, E), where V is the set of vertices and E the set of edges of G, a vertex cover C of G is a subset of V whose removal leaves only isolated vertices. The problem of finding a minimum vertex cover in an arbitrary graph, called minimum vertex cover or minvc for short, has long attracted the attention of an army of theoretical computer scientists around the globe. minvc is one of the most studied NP-hard graph problems in complexity theory. In particular, it has been the paradigmatic test-bed problem for the development of parameterised algorithms, being among the first problems presented in any introduction to that field. Minimum vertex cover can be formulated as a decision problem as follows: Problem name: vertex cover (VC) Given: A graph G = (V, E) Parameter: a positive integer k Output: Is there a vertex cover C ⊆ V such that |C| ≤ k? Both the polynomial-time approximation approach and the fixed-parameter approach to VC have their advantages and limitations. It is therefore of interest to combine both approaches, aiming at better approximation factors by allowing
Supported by the RGC CEF grant G0189479 of The University of Newcastle.
O. Cheong, K.-Y. Chwa, and K. Park (Eds.): ISAAC 2010, Part I, LNCS 6506, pp. 390–402, 2010. Springer-Verlag Berlin Heidelberg 2010
Combining Two Worlds: Parameterised Approximation for Vertex Cover
391
FPT-time [4]. We refer the reader to the survey by D´ aniel Marx [19] for more details on how parameterised complexity can be extended to approximation algorithms. In this paper we follow the definition by Y.Chen et al. [10], which in our context can be phrased as follows. Given a graph G and a parameter k such that a minimum vertex cover C ∗ of G satisfies |C ∗ | ≤ k, a parameterised approximation algorithm with (constant) approximation ratio ρ for minimum vertex cover produces a vertex cover C such that |C| ≤ ρ|C ∗ |. Such an algorithm runs in time O∗ (f (k)) for some function f , where O∗ notation suppresses polynomial factors and O∗ (f (k)) replaces O(f (k)poly(n)). Earlier results on VC. We report on three approaches to the problem: (1) polynomial-time approximation, (2) parameterised (exact) algorithms and (3) parameterised (and exponential-time) approximation. (1) Despite all efforts, the best known constant factor approximation algorithm for general graphs is still (basically) a factor 2 approximation. More specif1 ). I. ically, G. Karakostas [17] derived an approximation factor of 2 − Θ( √log n Dinur and S. Safra [13] showed that there is no polynomial-time approximation √ algorithm for minvc achieving an approximation ratio better than 10 5 − 21 ≈ 1.36067, unless P = NP. Moreover, assuming that the Unique Games Conjecture is true, no approximation factor of the form 2 − ε is possible for any ε > 0, as shown by S. Khot and O. Regev [18]. There are better results for some specific classes of graphs, most notably graphs with bounded degree: Lemma 1. [2] There exists a polynomial time factor 7/6 approximation algorithm for minimum vertex cover for any graph with maximum degree 3. Lemma 2. [15] There exists a polynomial time factor 3/2 approximation algorithm for minimum vertex cover for any graph with maximum degree 4. Lemma 3. [14] For an arbitrary graph with average degree davg , there exists a factor (4davg + 1)/(2davg + 3) approximation algorithm for minimum vertex cover, providing that the size of a minimum vertex cover is at least |V |/2. (2) For general graphs, several parameterised algorithms offer run times of about O∗ (1.28k ) [6,7,9,16,20]. For special classes of graphs, better run time bounds are known. For cubic√graphs, a race has led to O∗ (1.162k ) [8,21]. For graphs of bounded genus, O∗ (c k ) can be obtained [12]. Such run times cannot be obtained for general graphs unless the Exponential Time Hypothesis fails [5]. (3) The benefits of allowing exponential time to improve the approximation factors have been studied by several authors. For example, E. Dantsin et al. [11] showed how to transform an existing approximation algorithm for MAX SAT into an algorithm with a better approximation factor by allowing exponential time. In relation to our paper, the article by N. Bourgeois et al. [3] is the most relevant one, as it shows that if there exists an exact exponential time algorithm for computing minimum vertex covers that runs in time O∗ (γ n ), then an approximation factor of 2 − ρ, for ρ ∈ (0, 1] can be obtained with run time O∗ (γ ρn ). Furthermore, any parameterised algorithm for VC running in time O∗ (δ k ) that
392
L. Brankovic and H. Fernau
produces an associated feasible solution can be used to obtain a parameterised approximation algorithm with approximation ratio ρ and run time O∗ (δ ρk ). Main contributions. In this paper we present the first genuine parameterised approximation algorithm for minimum vertex cover. Our O∗ (1.09k ) 32 approximation algorithm is simple, yet faster than the O∗ (δ .5k ) = O∗ (1.13k ) algorithm by Bourgeois et al. that incorporates a quite sophisticated exact parameterised O∗ (1.28k ) algorithm known for VC. The main difference between our algorithm and earlier approaches lies in the fact that we exploit the target approximation factor in each branching step, as opposed to taking the exact (parameterised) algorithm as a black box. This way, we not only obtain far better running times, but our branching algorithms are distinguished by their simplicity. It is also the first such algorithm that introduces local-ratio techniques known from polynomial-time approximation, see [1], into parameterised algorithmics, combining them with the search tree analysis itself. We generalise this algorithm to any constant factor of the form 2l+1 l+1 . We also obtain improved polynomial-time approximation algorithms for graphs of average degree four.
2
A Parameterized
3 2
Approximation Algorithm
We consider simple undirected graphs and we use G = (V, E) to denote a graph G with the vertex set V and the edge set E. We use Δ(G) and δ(G) to denote the maximum and minimum degree in G, respectively, and dG (v) to denote the degree of the vertex v ∈ V within G, suppressing G if understood from the context. The neighbourhood of the vertex v is denoted by NG (v). Given a graph G and two nonadjacent vertices in G, u and v, those neighbours of u that are not also neighbours of v are called private neighbours of u with respect to v, referring informally to the set N (u)\N (v). Lemma 4. Consider a connected graph G with maximum degree Δ(G). We delete one or more vertices from G together with their incident edges, and we denote the resulting graph by G . If G contains any edges at all, then there exists a vertex y in G such that 0 < dG (y) < Δ(G). Proof. Consider a connected graph G = (V, E) with maximum degree Δ(G). Let G = (V , E ) be a graph obtained from G by deleting X ⊆ V (plus incident edges) and let Y be the set of neighbours of vertices from X in G that are not contained in X. Then dG (y) < Δ(G) for all y ∈ Y , as each vertex in Y has a neighbour in X in graph G. If dG (y) = 0 for all y ∈ Y , then the only neighbours of Y -vertices in G were from X. Since G is connected, there are no other vertices in G apart from vertices in X and Y , and thus V = Y and E = ∅. Main Strategy. The algorithm we present in this section is a combination local ratio techniques from polynomial time approximation, and two well-known techniques from parameterised algorithmics: reductions and bounded search trees. We associate with each node s of the search tree a VC instance (Gs = (Vs , Es ), ks ), together with the set Cs , Ms and Ts of vertices and set Ds of vertex pairs. For
Combining Two Worlds: Parameterised Approximation for Vertex Cover
393
the root r of the search tree we initially have Gr = G, kr = k, Cr = Dr = Mr = Tr = ∅, before we apply any reduction rules, etc. A leaf node of the search tree is achieved when E = ∅, or k < 0. If E = ∅ and k ≥ 0 for some leaf , then D = ∅ and an approximate cover is given by A = C ∪ M ∪ T . If for all leaves k < 0, then there does not exist an approximate cover for the given approximation factor. The vertices within each Cs , Ds and Ts have been either determined by explicit branching or by reduction rules. Additionally, to each node s within the search tree designed for approximation, we associate a set Ms to intentionally “worsen” the vertex cover, in order to improve the run time of the algorithm. The vertices are always added to Ms two at the time, such that the two added vertices are adjacent in the current graph. If a vertex, or a pair of vertices is put into Cs , Ds , Ms and Ts then these vertices are deleted from the current graph, together with their incident edges and the parameter ks is decremented accordingly. In particular, we add a vertex v to the set Cs in search for a minimum vertex cover (respecting previous choices) that contains v, and we decrement ks by 1; we add a pair of vertices (v, u) to Ds in search for a minimum vertex cover (respecting previous choices) that contains exactly one of these two vertices, and we decrement ks by 1; we select an edge in a current graph and we add its end vertices to Ms ; note that any vertex cover contains at least one vertex from each pair added to Ms , therefore we decrement ks by 1 for each vertex pair; finally, we always add three vertices at the time to the set Ts in search of a minimum vertex cover (respecting previous choices) that contains at least two of these three vertices; thus we decrement the parameter ks by 2. Therefore, ks = k − (|Cs | + |Ds | +
|Ms | 2|Ts | + ). 2 3
The partial approximative cover As at node s consists of Cs ∪Ms ∪Ts , and exactly one vertex from each pair of vertices in Ds . Thus the approximation factor of the s |+|Ts | partial vertex cover in the search tree node s is given by |Cs |+|Ds |+|M |Ms | 2|Ts | . |Cs |+|Ds |+
2
+
3
To achieve an approximation factor of 1.5, we choose |Ms | = 2(|Cs | + |Ds |). Whenever we put a new element into the cover Cs or into the set Ds , we may select an edge and put its end vertices into Ms . To achieve approximation factor 2(l−1) |Ts |, where we put l pairs into of 2l+1 2l , we choose |Ms | = 2l(|Cs | + |Ds |) + 3 Ms for each element in |Cs | and |Ds |, and l − 1 pairs for each 3 elements in |Ts |. More generally, whenever we put a vertex into the cover, we also add to Ms a certain (in general not necessarily integer) number of pairs of adjacent vertices to achieve a desired approximation factor. Note that an exact parameterized algorithm, as well as a polynomial time factor 2 approximation can be seen as special cases of this strategy, if we choose M = T = ∅ or C = D = T = ∅, respectively. In the latter case, there is no branching at all and the only vertices in the cover are pairs of adjacent vertices. Although the following theorem was already shown in [3], our reasoning is distinctively different and allows for further extensions.
394
L. Brankovic and H. Fernau
Theorem 1. If VC can be solved in time O∗ (δ k ) by some branching algorithm (as formalised above), then a factor-α approximation, α ∈ Q, 1 ≤ α < 2, can be computed in time O∗ (δ (2−α)τ (G) ). Reduction Rules. Some reduction rules that handle vertices of small degrees are given below. These rules have already been used extensively in the literature but we present them slightly differently in order to keep our main argument simple. Degree-0 Rule: Delete isolated vertices; they do not go into the cover. Degree-1 Rule: If v has a neighbour of degree one, put v into the cover and decrement the parameter. Since we are designing a 32 approximation algorithm, for every vertex of degree one we process in the above fashion, we can add a pair of adjacent vertices to Ms . Since at least two out of the three vertices added to the approximate cover must be included in any optimal cover, we are within the 32 ratio. Degree-2 Rule: [7] If N (y) = {x, z}, and x and z are adjacent, we add x and z to Cs and remove all three vertices x, y and z from the graph. If N (y) = {x, z}, and x and z are not adjacent, we add (x, y) to Ds , remove them from the graph and connect z to the remaining neighbours of x. Exactly one of the vertices x and y is in the cover and consequently we decrement the parameter k by 1. If later on, say in node t, z is put into the cover, then x is added the Ct and the pair (x, y) is deleted from Dt . If it is decided that z is not to go into the cover, then y is put into Ct and the pair (x, y) is deleted from Dt . Therefore, for each leaf such that E = ∅ and k ≥ 0, D = ∅, as each pair of vertices added to Ds for some node s gets eventually deleted, say in node t, and one of its vertices gets added to the corresponding set Ct . Triangles. [15] If there is a triangle we add all of its vertices to Ts (again, at least 2 of them must be in every vertex cover so we are within the 3/2 ratio). Approximation Preserving (AP) Degree-2 Rule. We apply the AP Degree2 Rule if there are no vertices of degree at most one but there is a vertex y of degree 2 with neighbours x and z such that there is no edge between x and z (otherwise we apply Degree-2 Rule). We choose one of the neighbours of y, say x, together with its neighbour u = y (as there are no vertices of degree 1, there must exist such vertex u), and we add vertices x and u to Ms . This triggers the Degree-1 Rule, putting z into the cover. Please note the difference between the Degree-2 Rule described in the previous section and the AP Degree-2 Rule described above. Importantly, while the Degree-0 Rule, Degree-1 Rule and AP Degree-2 Rule never increase degrees of vertices (as we only remove vertices and their incident edges), such a degree increase may happen with the Degree-2 Rule, as well as with the AP Degree-3 Rule described below. Approximation Preserving (AP) Degree-3 Rule. If there are no vertices of degree at most 2, but at least one vertex v of degree 3, we select a neighbour u of the vertex v and a neighbour x = v of u and add {x, u} to M ; in that way we have created a vertex of degree 2, namely v, and we apply the Degree-2 Rule to it; altogether we add 3 vertices to the vertex cover and some minimum cover must contain at least 2 of them, so we are within the 3/2 approximation ratio.
Combining Two Worlds: Parameterised Approximation for Vertex Cover
395
This provide a new way of dealing with vertices of degree three. Consequences. We will always assume that the mentioned reduction rules have been carried out before any branching takes place. To explicitly refer to the approximation factor, we will call such a graph 32 -reduced. So, a 32 -reduced graph contains no vertices of degree ≤ 3 and no triangles. One can easily prove: Lemma 5. In a 32 -reduced graph, any vertex v has a vertex u at distance two. Proof. Let G = (V, E) be a 32 -reduced graph. Consider some vertex v ∈ V . Since d(v) > 3, we have that N (v) = ∅. Consider any x ∈ N (v). As d(x) > 3 it follows that ∃u ∈ N (x) \ {v}. Since there are no triangles in G, it follows that u ∈ / N (v). Hence, d(v, u) = 2. The Branching Algorithm. In what follows we assume that we have a connected graph without cut vertices, otherwise we branch on a cut vertex and/or process each graph component separately. We assume that the graph G is 32 -reduced, so it has no vertices of degree less than 4 and no triangles. Consider a path xyz of length 2 and apply the following reasoning. 1) If at least one of the end vertices of the path, that is, x or z, is in some minimum cover (respecting the previous choices) then the cover remains unchanged if we add the edge xz and therefore we can treat xyz as a triangle and add all three vertices to Ts . 2) In the case that neither of the end vertices of the path (x and z) belongs to any minimum vertex cover (respecting the previous choices), then we remove x, z from the graph and add N (x) ∪ N (z) to the set Cs . Since we are not after a minimum vertex cover but rather a factor 32 approximation, we select |N (x) ∪ N (z)| disjoint edges and add their end vertices to the set Ms . The careful choice of the edges whose end vertices are added to Ms is crucial to the efficiency of the algorithm. In order to make such a choice we proceed as follows. We first apply repeatedly Degree-0, Degree-1, AP Degree-2 and the Triangle Rule, until no such rules can be applied. That leaves us with a trianglefree graph with minimum degree δ > 2. We then select a vertex v with the minimum degree δ > 2 and δ − 2 neighbours of v, say u1 , u2 , . . . , uδ−2 , and a unique neighbour ti for each vertex ui , 1 ≤ i ≤ δ − 2 (note that this is always possible to do, as each of the vertices ui , 1 ≤ i ≤ δ − 2 has degree at least δ). We put all vertices ui and ti , 1 ≤ i ≤ δ − 2, into Ms . Then, the vertex v has only 2 remaining neighbours and we apply the AP Degree-2 rule. Importantly, we did not increase any degrees in the graph (cf. Lemma 4) and we can add another |N (x) ∪ N (z)| − δ + 2 vertex pairs to M . We repeat this process as long as there are at least δ − 2 pairs of vertices to add to Ms . As the very last step, we repeat the process described above and obtain a vertex with degree d ≥ 3. In the case we have equality, that is, d = 3, we apply the AP Degree-3 Rule to it. The next step is a recursive call, so that the possible increase of degrees is now harmless. The main advantage of our algorithm over branching on a single vertex is that in this way we effectively increase the degree by at least 2, which significantly improves the run time of the algorithm.
396
L. Brankovic and H. Fernau
Algorithm 1. 1. Exhaustively apply the (approximation preserving) reduction rules. 2. If Δ(G) < 5, approximate in polynomial time, see Lemma 2. 3. Select a vertex v of maximum degree and a vertex u at distance two from v (see Lemma 5) so that |N (u) ∪ N (v)| is maximum. 4. If N (u) ∪ N (v) = N (v), the graph is bipartite; find exact cover in polynomial time. 5. Branch on two cases: 5a. At least one of u, v is in any minimum cover respecting previous choices. Put u, v, x into T , where x ∈ N (u) ∩ N (v). 5b. None of u, v is is some minimum cover respecting previous choices. Put (N (u) ∪ N (v)) into C. We select f = |N (u) ∪ N (v)| disjoint edges and put their end vertices into Cs . To formally reason about the correctness (and the claimed approximation factor), we recall that, when the procedure is started with k ≥ τ (G), there is a leaf node with an approximate cover A = C ∪ M ∪ T of size |A | = |C |+ |M |+ |T |, and a minimum cover C ∗ such that |C ∗ | ≥ |C |+ 12 |M |+ 23 |T |. Since |C | = 12 |M |, we have |C ∗ | ≥ |M | + 23 |T | = 23 ( 32 |M | + |T |) = 23 |A |. Theorem 2. We have given an O∗ (1.09τ (G)) time, polynomial space algorithm for a factor 32 approximation of minimum vertex cover. Proof. We consider a 32 -reduced connected graph G without cut vertices and we analyse branching in step 5. In the first branch, step 5a., three vertices are decided to be placed into the approximate vertex cover, i.e., into Ts , out of which at least two are also found in a minimum solution by assumption. We now consider the step 5b. and the case when |N (u) \ N (v)| ≥ 2. For the sake of simplicity, in what follows we refer to the maximum degree of the original graph G, Δ(G), simply as Δ. Since neither of the end vertices u and v are in any minimum vertex cover, we remove them from the graph and place all their neighbours (which is at least Δ + 2 vertices) in the vertex cover, that is, in the set Cs . We can now select Δ + 2 disjoint edges and put their end vertices into Ms as follows. We select a vertex v with the minimum degree δ, and select δ − 2 disjoint edges in such a way to reduce the degree of v to 2. We then apply the AP Degree-2 Rule to v and add a vertex to Cs and a pair of vertices to Ms . By Lemma 4, the minimum degree δ(G) is no more than Δ − 1 and thus we have used up at most Δ − 3 edges, whose end vertices we added to the set Ms . Therefore, for each vertex v we process in this way, we add a pair of connected vertices to Ms and a vertex to Cs , which decreases the parameter ks by 2, plus at most Δ − 3 pairs of vertices to Ms . We can repeat this process Δ+2 Δ−3 times, each time reducing ks by 2. If we reach a point where we do not have enough edges to reduce the degree of a vertex with minimum degree to 2, but we can reduce it to 3, we apply AP Degree-3 Rule, further reducing parameter ks by 2. Altogether, in this way we process at least Δ+3 Δ−3 vertices. To summarise, in step 5b., we reduce ks by at last Δ + 2 vertices we put into Cs , at least Δ + 2 Δ+3 pair of vertices we add to the set Ms , and by at least 2 Δ−3 for the vertices Δ+2 with minimum degree we process. So, we reduce k by 2(Δ + 2) + 2 Δ−3 , which attains its minimum of 22 for Δ = 5, 6, 7. This gives the branching vector (2, 22).
Combining Two Worlds: Parameterised Approximation for Vertex Cover
397
We now consider the step 5b. and the case when |N (u)\N (v)| = 1. We distinguish three cases. (1) There are no vertices at distance 3 from v — after removing the vertices v and u from the graph and putting all their neighbours in the set Cs , we are left with the graph with maximum degree 1 which we can process in linear time. (2) There is exactly 1 vertex at distance 3 from v — but then this is a cut vertex — a contradiction. (3) There are at least 2 vertices at distance 3 from v — after removing the vertices v and u from the graph and putting all their neighbours in the set Cs , we are left with at least one vertex of degree 1 — a vertex (other that u) at distance 2 from v, that has a neighbour at distance 3 from v. This allows us to put at least one extra vertex in the set Cs and at least one other vertex pair in Ms , which then brings us to the exactly same situation as in the case when |N (u) \ N (v)| ≥ 2 (Δ + 2 vertices added to set Cs and Δ + 2 edges to add to Ms ). This completes the proof.
3
Parameterised Approximation for a Factor of
2l+1 l+1
In this section we present a generic, scalable algorithm for parameterised factor (2l + 1)/(l + 1) approximation algorithm for minimum vertex cover. Since the case where l = 1 was dealt with in the previous section, we can now restrict our attention to the case when l > 1. We argue that this research direction is extremely fruitful when aiming at algorithms that could be practically competitive with polynomial-time, due to the quite small bases of the exponential part of the run-time estimate. Our reduction rules generalise as follows: Small Odd Cycles. If there is an odd cycle of length 2i + 1 ≤ 2l + 1, we add all of its vertices to the vertex cover (at least l + 1 of them must be in every vertex cover, so we are within the (2l + 1)/(l + 1) ratio). This rule is actually well-known, see, e.g., [15]. If i < l, we subsequently select l − i disjoint edges and add their end vertices to the set Ms , while remaining within the target ratio. Small Degree Rule. If v has degree l + 2 or less, select d(v) − 2 neighbours ui of v and a neighbour ti = v of each ui , and add all the verteces ui and ti , 1 ≤ i ≤ d(v) − 2 to the set Ms . We then apply the Degree-2 Rule to the vertex v. If v has degree l + 2 or less, select d(v) − 2 neighbours ui of v and a neighbour ti = v of each ui , and add all the vertices ui and ti , 1 ≤ i ≤ d(v) − 2 to the set Ms . We then apply the Degree-2 Rule to the vertex v. We then select l + 2 − d(v) additional disjoint edges if d(v) > 1, or l if d(v) = 1 and place their end vertices in Ms . Altogether, we have placed 2l + 1 vertices into Ms and Cs , out of which at least l + 1 are in a minimum vertex cover. We term a graph (2l + 1)/(l + 1)- reduced if none of the above reduction rules apply for some specified l > 1. The following property is not hard to show. Lemma 6. If l > 1, then a (2l + 1)/(l + 1)-reduced graph is either bipartite or for each vertex v there exists a vertex u at distance at least 3 from v, such that there exists a path of length four between them. Proof. Let G = (V, E) be a (2l + 1)/(l + 1)-reduced graph where l > 1. Let v be any vertex in G. We say that a vertex x is at level i if it is at distance i from
398
L. Brankovic and H. Fernau
v. Then there cannot exist any edges between vertices of the same level i for i < 3, as any such edge would create a cycle of length 5 or less, which do not exist in a (2l + 1)/(l + 1)-reduced graph for l > 1. If there exists an edge uw between vertices u and v at level 3, then u is a vertex at distance at least 3 from v such that there exists a path of length 4 between them. If such an edge does not exist, we select any vertex u at distance 4 from v. If there are no vertices at distance 4, then G is bipartite, as there are no edges between the vertices at the same level i; the two partitions are formed by the vertices at odd and even levels, respectively. Theorem 3. There exists a polynomial factor 2l+1 l+1 approximation algorithm for vertex cover for any graph with average degree davg ≤ 2.5l + 1. 2 ) algorithm from [15] guarantees the Proof. The polynomial-time factor-(2 − Δ (2l + 1)/(l + 1) or better factor for Δ ≤ 2l + 2. Further to this, by Lemma 3 there is a polynomial time algorithm for graphs with average degree davg and approxi4d +1 , assuming we are using a Nemhauser-Trotter reduction in mation factor 2davg avg +3 each search tree node. It follows that for the approximation factor of the form 2l+1 l+1 , there is a polynomial time algorithm whenever davg ≤ 2.5l + 1.
Therefore, we only need to consider Δ ≥ 2.5l + 1 + 1. We may also assume that the minimum degree in the graph G is δ = l + 3, as the vertices with degree less than l + 3 do not appear in a (2l + 1)/(l + 1)-reduced graph. Similarly, we assume that there are no odd cycles with length 2l + 1 or less. Our algorithm for l > 1 is quite similar to the algorithm for l = 1, but there is one important difference. In the algorithm for l = 1 in the first branch (5.a.), we add to the vertex cover the three vertices on a path of length 3. We do not generalise the length of the path to 2l + 1 as it may be expected, as the algorithm is much more efficient for larger l if we always take the path of length 5. We consider a vertex of degree Δ(G) and a vertex u at distance at least 3 from v, such that there exists a path of length 4 between them, see Lemma 6. Note that if such vertex u does not exist, then the graph G is bipartite and there is an exact polynomial time algorithm for finding a minimum vertex cover. For a (2l + 1)/(l + 1)-reduced graph, we distinguish two branches: In the first one, we assume that at least one of the vertices v and u is in some minimum cover (respecting previous choices). Then we can add an edge vu and thus create a cycle of length 5, which we add to the vertex cover, together with end verteces of l − i disjoint edges (see Small Odd Cycles reduction rule above). Altogether, we added 2l + 1 vertices into the partial approximative cover, at least l + 1 of which must be in any minimum cover. In the second branch we assume that neither v nor u are in any minimum cover and we add their neighbours to the vertex cover, together with the end vertices of l carefully chosen disjoint edges for each neighbour. Theorem 4. The running time of the factor (2l + 1)/(l + 1) approximation algorithm for l > 1 is relation: T (k) = described by the following recurrence 2 8s +10s+8as+7a , where T (k − 2s − 1 − a) + T k − (2s + 1 + a) 9s + 6 + 4a + 3s+1+a l = 2s + a, and a = 0 for l even and a = 1 for l odd.
Combining Two Worlds: Parameterised Approximation for Vertex Cover
l
2
3
4
399
10
1
1.28 l+1 1.09 1.064 1.051 1.0420 cl 1.04 1.024 1.017 1.0043 l
20
100
200
1
1.28 l+1 1.0118 1.00244 1.00122 cl 1.0014 1.00008 1.00002 Fig. 1. With growing l, the base cl quickly approaches one
Proof. We start from the recurrence relation T (k) = T (k − (l + 1)) + T (k − y) and analyse the second branch. As we assume that neither v nor u are contained in any minimum vertex cover, we take N (u) ∪ N (v) into the partial current cover Cs ; we refer to the remaining graph as G . Recall that dG (v) = Δ(G) and that the minimum degree in G is δ ≥ l + 3. As the distance between v and u is at least 3, they have no common neighbours and thus the total number of neighbours of v and u is |N (v) ∪ N (u)| ≥ Δ + l + 3. Additionally, for each vertex x ∈ N (v) ∪ N (u) we select l disjoint edges and add their end vertices to Ms . Thus we have put altogether at least (2l + 1)(Δ + l + 3) vertices into the approximate cover. To improve the efficiency of the algorithm, we select the l(Δ + l + 3) disjoint edges in such a way to create as many as possible vertices of degree l + 1, as such vertices can be processed simply by removing vertices and edges and thus without increasing the degrees of the remaining vertices in G . Hence, select a vertex z of minimum degree δ in G . We select δ − l − 1 disjoint edges such that after adding their end vertices to Ms we have d(z) = l + 1. We then process z by adding 2l to M + 1 vertices s . Since δ ≤ Δ − 1 (see Lemma 4), we can process
l(Δ+l+3) Δ−l−2
= l+
2l2 +5l) Δ−l−2
vertices this way. In total we put
into the partial approximate vertex cover at least (2l + 1) Δ + 2l + 3 +
2
2l2 +5l Δ−l−2
2l +5l vertices, y = (l + 1) Δ + 2l + 3 + Δ−l−2 of which must be in the minimum cover that can be found on the search tree path under consideration. For the worst case analysis of our algorithm we use the value of Δ for which y assumes the minimum value. Recall that we only need to consider Δ ≥ 2.5l + 1 + 1. We define Δmin = 2.5l + 1 + 1 and express Δ as Δ = Δmin + x, where x ∈ N0 . Then to perform the worst case analysis of our algorithm we need to find the value of x for which y assumes the minimum value. After considering several cases, we show that the minimum of y(x) always occurs at x = 1 and the above recurrence relation follows.
These recurrences lead to branching numbers only slightly above 1 when l is growing, proving the claimed scalability of our approach. Figure 1. shows the constant appearing in O∗ (constantk ) as a function of l. The upper curve cor1 responds to the O∗ ((1.28 l+1 )k ) algorithm derived from the Theorem 1 and the
400
L. Brankovic and H. Fernau
fastest known exact parameterised algorithm ; the lower curve corresponds to our 1 O∗ (ckl ) parameterised approximation described in this section. Values of 1.28 l+1 and constants cl for some values of l are listed in a small table.
4
An Approximation Algorithm for Graphs with davg ≤ 4
The seemingly unnatural condition of the result quoted in Lemma 3 can be satisfied by first applying a Nemhauser-Trotter reduction [7]. This might influence the average degree of the graph and hence the approximation factor. Lemma 7 describes situations when this type of reduction is not harmful to the average degree, and is crucial to Theorem 5, which gives a better approximation factor for the average degree 4 than the previously best known result [14]. Lemma 7. In a graph G with average degree davg , if one deletes x vertices and d at least avg 2 x edges, the remaining graph G has average degree davg ≤ davg . Proof. Let G = (V, E) be a graph and let |V | = n and |E| = m. Then G has an davg average degree davg = 2m n . After deleting x vertices and at least 2 x edges, we have the the new average degree davg ≤
d
2(m− avg 2 x) n−x
=
2m n
= davg .
Theorem 5. For any graph G with the average degree davg ≤ 4, there exist a polynomial factor 1.5 approximation vertex cover algorithm. Proof. Let G be a connected graph (otherwise we process each component separately) with the average degree ≤ 4. Suppose that there is in G a vertex v of degree 1 or, if not, a vertex of degree 2. Then we apply the Degree-1 Rule or Degree-2 Rule from Section 2, respectively; then we removed 2 vertices and at least 2 edges from G. We add to the vertex cover a vertex v and its neighbour u that together have at least 6 adjacent edges. In total we removed 4 vertices and at least 8 edges and thus by Lemma 7 we have not increased the degree of the graph. If there are no such vertices v and u then the average degree of the remaining graph is < 3 and by Lemma 3 there is a polynomial time approximation with a factor less than 32 . In what follows we can assume that δ(G) ≥ 3, and that davg > 3. Suppose next that G contains one or more vertices with degree 3. Among all such vertices we select a vertex v that has a neighbour u with degree at least 4 (if there is no such vertex, then G is disconnected— a contradiction). Then we add the vertex u to the cover, together with any of its other neighbours (excluding v). Since there are no vertices of degree 1 or 2 in G, we thus removed 2 vertices and at least 6 edges. Then v has degree at most 2, and we can process it as above. In total we removed 4 vertices and at least 8 edges. Suppose that all vertices in G have degree 4. Then we apply the algorithm from Lemma 2 to obtain the claimed approximation factor.
5
Conclusion and Future Directions
We presented the first genuine fixed-parameter approximation algorithms for minimum vertex cover, which combines local ratio arguments and the design
Combining Two Worlds: Parameterised Approximation for Vertex Cover
401
of a search tree. We ask wether this idea be applied to other problems where both exact fixed-parameter algorithms are known as well as local-ratio arguments providing (in general) factor-two approximations (e.g., factor 3/2 parameterised approximation algorithms for weighted vertex cover, edge dominating set, or feedback vertex set). Acknowledgments. The authors would like to thank anonymous referees for their generous feedback.
References 1. Bar-Yehuda, R.: One for the price of two: a unified approach for approximating covering problems. Algorithmica 27, 131–144 (2000) 2. Berman, P., Fujito, T.: On approximation properties of the independent set problem for degree 3 graphs. In: Sack, J.-R., Akl, S.G., Dehne, F., Santoro, N. (eds.) WADS 1995. LNCS, vol. 955, pp. 449–460. Springer, Heidelberg (1995) 3. Bourgeois, N., Escoffier, B., Paschos, V.T.: Efficient approximation of combinatorial problems by moderately exponential algorithms. In: Dehne, F. (ed.) WADS 2009. LNCS, vol. 5664, pp. 507–518. Springer, Heidelberg (2009) 4. Cai, L., Huang, X.: Fixed-Parameter Approximation: Conceptual Framework and Approximability Results. Algorithmica 57(2), 398–412 (2010) 5. Cai, L., Juedes, D.: On the existence of subexponential parameterized algorithms. J. Computer and System Sciences 67, 789–807 (2003) 6. Sunil Chandran, L., Grandoni, F.: Refined memorization for vertex cover. Information Processing Letters 93, 125–131 (2005) 7. Chen, J., Kanj, I.A., Jia, W.: Vertex cover: further observations and further improvements. J. Algorithms 41, 280–301 (2001) 8. Chen, J., Kanj, I.A., Xia, G.: Labeled search trees and amortized analysis: improved upper bounds for NP-hard problems. Algorithmica 43, 245–273 (2005) 9. Chen, J., Kanj, I.A., Xia, G.: Improved parameterized upper bounds for vertex cover. In: Kr´ aloviˇc, R., Urzyczyn, P. (eds.) MFCS 2006. LNCS, vol. 4162, pp. 238– 249. Springer, Heidelberg (2006) 10. Chen, Y., Grohe, M., Gr¨ uber, M.: On parameterized approximability. In: Bodlaender, H.L., Langston, M.A. (eds.) IWPEC 2006. LNCS, vol. 4169, pp. 109–120. Springer, Heidelberg (2006) 11. Dantsin, E., Gavrilovich, M., Hirsch, E.A., Konev, B.: MAX SAT approximation beyond the limits of polynomial-time approximation. Ann. Pure Appl. Logic 113(13), 81–94 (2001) 12. Demaine, E.D., Fomin, F.V., Hajiaghayi, M.T., Thilikos, D.M.: Subexponential parameterized algorithms on graphs of bounded genus and H-minor-free graphs. J. ACM 52(6), 866–893 (2005) 13. Dinur, I., Safra, S.: On the hardness of approximating minimum vertex cover. Annals of Mathematics 162, 439–485 (2005) 14. Halld´ orsson, M., Radhakrishnan, J.: Greed is Good: Approximating Independent Sets in Sparse and Bounded-Degree Graphs. Algorithmica 18(1), 145–163 (1997) 15. Hochbaum, D.S.: Efficient bounds for the stable set, vertex cover and set packing problems. Discrete Applied Mathematics 6, 243–254 (1983) 16. Kanj, I.: Vertex Cover: Exact and Approximation Algorithms and Applications. Phd Thesis, Texas A& M University (2001)
402
L. Brankovic and H. Fernau
17. Karakostas, G.: A better approximation ratio for the vertex cover problem. In: Caires, L., Italiano, G.F., Monteiro, L., Palamidessi, C., Yung, M. (eds.) ICALP 2005. LNCS, vol. 3580, pp. 1043–1050. Springer, Heidelberg (2005) 18. Khot, S., Regev, O.: Vertex cover might be hard to approximate to within 2 − ε. J. Computer and System Sciences 74, 335–349 (2008) 19. Marx, D.: Parameterized complexity and approximation algorithms. The Computer Journal 51(1), 60–78 (2008) 20. Niedermeier, R., Rossmanith, P.: Upper bounds for vertex cover further improved. In: Meinel, C., Tison, S. (eds.) STACS 1999. LNCS, vol. 1563, pp. 561–570. Springer, Heidelberg (1999) 21. Xiao, M.: A note on vertex cover in graphs with maximum degree 3. In: Thai, T. (ed.) COCOON 2010. LNCS, vol. 6196, pp. 150–159. Springer, Heidelberg (2010)