Exact Algorithms for Finding the Minimum Independent Dominating Set in Graphs Chunmei Liu1 and Yinglei Song2 1
Dept. of Systems and Computer Science, Howard University, Washington, DC 20059, USA
[email protected] 2 Dept. of Computer Science, University of Georgia, Athens, GA 30602, USA
[email protected] Abstract. In this paper, we consider the Minimum Independent Dominating Set problem and develop exact exponential algorithms that √ |V | break the trivial O(2|V | ) bound. A simple O∗ ( 3 ) time algorithm is developed to solve this problem on general graphs. For sparse graphs, e.g. graphs with degree bounded by 3 and 4, we show that a few new branching techniques can be applied to these graphs and the resulting algorithms have time complexities O∗ (20.465|V | ) and O∗ (20.620|V | ), respectively. All our algorithms only need polynomial space.
1
Introduction
A dominating set in a graph G = (V, E) is a vertex subset D ⊆ V such that each vertex v ∈ V is either in D or connected to a vertex in D. Similarly, an independent dominating set is a dominating set I in G such that each pair of the vertices in I are not connected. The goal of the Minimum Independent Dominating Set problem is to find the independent dominating set of the minimum size in a given graph. This problem is of importance and has many practical applications in data communication and networks [13]. It has been shown to be NP-hard [8]. In [10], Halld´orsson shows that this problem is unlikely to be approximated within |V |1− , where is any positive number less than 1. For graphs of bounded degree, Kann [11] has shown that this problem is APXhard, which suggests it is NP-hard to approximate the minimum independent dominating set in such a graph within some constant ratio in polynomial time. Due to these inapproximability results for the minimum independent dominating set problem, exact solutions that need time O(2α|V | ), where α is a positive number less than 1.0, is more desirable in practice. In particular, a slight reduction in α may significantly reduce the amount of computation time when the graph is of large size. However, such algorithms are still not available for the minimum independent dominating set problem. Recently, with the growth of interests in developing exact exponential time algorithms for NP-hard optimization problems, the upper bound time complexities for many NP-hard problems have been significantly improved. For example, T. Asano (Ed.): ISAAC 2006, LNCS 4288, pp. 439–448, 2006. c Springer-Verlag Berlin Heidelberg 2006
440
C. Liu and Y. Song
a sophisticated algorithm [16] that needs time O(2|V |/4 ) has been developed to find the maximum independent set in a general graph G = (V, E). A O(20.114|E| ) time algorithm [1] has been available for computing the maximum independent set in a sparse graph. A few other efficient algorithms [2,4] have also been developed for this problem. The trivial O(2|V | ) bound for the Minimum Dominating Set problem, which needs to find the dominating set of minimum size in a graph, was broken very recently. Fomin et al. [7] used a deep graph theoretical result proposed by Reed [15] and developed an algorithm that can find the minimum dominating set in time O(20.955|V | ). Randerath and Schiermeyer [14] showed that matching based techniques are useful for reducing the size of the search space and as a result, an elegant algorithm of time complexity O∗ (20.919|V | ) can be developed. Grandoni [9] considered a reduction from the Minimum Dominating Set problem to the Minimum Set Cover problem and was able to find the minimum dominating set in time O∗ (20.919|V | ) with polynomial space. Using a dynamic programming technique that may require exponential space, the time complexity of this algorithm can be further improved to O∗ (20.850|V | ). Recent work [6] on new measures for analyzing backtracking algorithms showed that the worst time complexities of the Grandoni’s algorithms are in fact at most O(20.610|V | ) and O(20.598|V | ), respectively. On the other hand, recent work has shown that many NP-hard problems can be solved with improved time complexity on sparse graphs. For example, in [1], exact algorithms of time complexity O(20.171|V | ) and O(20.228|V | ) are designed to compute the maximum independent sets in graphs of degree bounded by 3 and 4, respectively. In [12], Kneis et al. proved a generic result on the tree width of cubic graphs, which leads to an O∗ (20.5|V | ) time algorithm for the Minimum Dominating Set problem. Fomin and Hoie [5] showed that the path width of a cubic graph is bounded by ( 16 + )|V |, where is any positive number and the minimum dominating set in a graph with degree bounded by 3 can be found in time O∗ (20.265|V | ). Fomin and Hois’s result on the pathwidth of cubic graph can also be used to compute the maximum independent set in graphs with degree bounded by 3 in time O∗ (20.167|V | ). However, tree decomposition or path decomposition based dynamic programming requires maintaining a dynamic programming table in each tree node and this algorithm thus may need exponential space to store the intermediate results needed in the dynamic programming. In this paper, we develop exact algorithms to solve the Minimum Independent Dominating Set problem in both general graphs and sparse graphs. Based on a maximal matching, we show that a simple algorithm can solve this √ |V | problem in O∗ ( 3 ) time and polynomial space. For sparse graphs, we use the number of edges in a graph as a new measure for analyzing its computational complexity and develop new branching techniques based on the fundamental topological units in these graphs. We show that these branching techniques can lead to algorithms that can find a minimum independent dominating set on graphs of degree bounded by 3 and 4 in time O∗ (20.465|V | ) and O∗ (20.620|V | ) respectively with polynomial space. Here, O∗ (.) implies the existence of an additional polynomial factor in the corresponding time complexity result.
Exact Algorithms for Finding the Minimum Independent Dominating Set
2
441
Preliminaries
The graphs in this paper are undirected graphs without loops. For a given graph G = (V, E) and a vertex v ∈ V , N (v) is the set of vertices that are connected to v in G and |N (v)| is the degree of v. N [v] is {v} ∪ N (v). The degree of a graph is the maximum degree of all its vertices. To simplify the notation, we use G − v to represent the graph obtained by removing v and all the edges incident on v from G. For a vertex subset U , we use G − U to denote the graph obtained from G by removing all vertices in U and the edges incident on them from G. For a subset U ⊆ V , N (U ) denotes the set of all vertices that are connected to at least one vertex in U ; G[U ] is the subgraph induced on U in G. We use d(G) to denote the size of the minimum independent dominating set in graph G. A path in a graph is a sequence of vertices v1 , v2 , · · · , vl such that there is a graph edge between vi and vi+1 (1 ≤ i < l). We use P = (v1 , v2 , · · · , vl ) to represent a path P of length l. A cycle of length l is a sequence of vertices v1 , v2 , · · · , vl such that there is a graph edge between vi and v(i+1) mod l . For simplicity of notations, we focus on the exponential part of time complexity results and ignore all their polynomial factors.
3 3.1
Algorithms On General Graphs
A matching in a graph G = (V, E) is a set of edges M ⊆ E such that no two edges in M are incident on the same vertex. A maximal matching in G is a matching M such that any edge set M ⊆ V is not a matching if M ⊂ M . The size of a matching is the number of edges in M . Theorem 1. For a given graph G = (V, E), there exists an algorithm that can √ |V | compute the minimum independent dominating set in G in time O∗ ( 3 ) and polynomial space. Proof. We can obtain a maximal matching M in graph G in polynomial time. We then consider the vertex set VM = {v |∃e ∈ M , such that e incident on v}. It is not difficult to see that V − VM form an independent set I in G. We now consider a minimum independent dominating set D in G. We must have D ∩ I = I − N (D ∩ VM ), since if it is not the case, there must exist a vertex v ∈ I such that v is not connected to any vertex in D. This is contradictory to the fact that D is also a dominating set. Based on this fact, we can enumerate subsets in VM that can be D ∩ VM . For each of the enumerated subset S, we can obtain DS = S ∪ (I − N (S)). We now only need to return the set DS that is a dominating set and has the minimum number of vertices. The number of √ |V | such subsets S is bounded by 3 and the time complexity of the algorithm is √ |V | bounded by O∗ ( 3 ). Enumeration of all such subsets only need polynomial space.
442
3.2
C. Liu and Y. Song
On Graphs of Degree Bounded by 3
We now consider finding the minimum independent dominating set problem on graphs of degree bounded by 3. Definition 1. In a given graph G = (V, E), a path P = (h, v1 , v2 , · · · , vl ) (l ≥ 1) is a sword if vertices v1 , v2 , · · · , vl−1 ) are all of degree 2, vl is of degree 1, and h is of degree at least 3. h is the head of the sword while vl is the tail; l is the length of the sword. Definition 2. In a given graph G = (V, E), a path P = (h, v1 , v2 , · · · , vl , t) (l ≥ 1) is a bridge if vertices v1 , v2 , · · · , vl are all of degree 2 and both h and t are of degree at least 3. h and t are the head and tail of the bridge; l is the length of the bridge. Definition 3. In a given graph G = (V, E), a cycle C = (b, v1 , v2 , · · · , vl ) (l ≥ 2) is a circle if vertices v1 , v2 , · · · , vl are of degree 2 and h is of degree at least 3. b and l are the base and the length of the circle, respectively. Lemma 1. For a given graph G = (V, E) and a given vertex v ∈ V , we have d(G) = minu∈N [v] {d(G − N [u])}+1. Proof. This is an obvious fact, since v must be dominated by a minimum dominating set D, i.e., ∃u ∈ N [v], u ∈ D. In addition, since D is independent, if u ∈ D, N (u) ∈ / D. We thus have d(G) = minu∈N [v] {d(G − N [u])}+1. Lemma 1 describes a simple branching operation based on which we can recursively solve the Minimum Independent Dominating Set problem by solving a few subproblems of smaller size. We use the number of edges E in a graph as the measure to evaluate the computation time of the branching. Lemma 2. Given a graph G = (V, E) of degree bounded by 3 and a sword (h, v1 ). If the number of vertices in each connected component is at least 10, the simple branching on h can be simplified by d(G) = min{d(G − N [h]), d(G − N [v1 ])}. This branching contributes a factor of at most 20.310 to the overall time complexity. Proof. Since v1 is of degree 1, a minimum dominating set in G must include one of h and v1 . If v1 is included in the dominating set, h is dominated by v1 . Thus we do not need to consider other neighbors of h. This leads to a simplified branching operation and we have d(G) = min{d(G − N [h]), d(G − N [v1 ])}. Now, the removal of N [v1 ] reduces at least 3 edges from G and the removal of N [h] reduces at least 4 edges, because a connected component contains at least 10 vertices. Assume the computation time is T (E), the recursion for this branching is: T (E) ≤ T (E − 3) + T (E − 4) (1) The equation x4 − x − 1 = 0 has a root in interval (1, 2) and its value is less than 20.310 . This number bounds the factor this branching can contribute to the overall time complexity.
Exact Algorithms for Finding the Minimum Independent Dominating Set
443
Lemma 3. Given a graph G = (V, E) of degree bounded by 3 and free of sword of length 1, if G contains a circle (b, v1 , v2 , · · · , vl ) where l ≥ 2, the simple branching on the base of the circle contributes a factor not larger than 20.310 to the overall time complexity. Proof. We assume the minimum independent dominating set in G is D. We analyze the simple case. When l = 2, the simple branching can be simplified as d(G) = min {d(G − b − v1 − v2 ), d(G − N [b])}. This is due to the fact that if b∈ / D, one of the v1 , v2 must be in D and we thus do not need to consider the third neighbor of b in this branching. v1 ∈ D and v2 ∈ D are the same and we thus do not need to distinguish between them. The recursion for time complexity T (E) is T (E) ≤ 2T (E − 4), which shows that it contributes a factor less than 20.310 . Now, we need to consider the cases where l > 2. In particular, we need to utilize the symmetry in the circle to avoid recomputation. It is not difficult to see that graphs G − N [v1 ] and G − N [vl ] differs only in the connected component induced by the rest of the vertices in the circle. This component is only a path and its minimum independent dominating set can be easily computed in polynomial time. We thus only need to solve the problem on G − N [v1 ] and obtain the solution for G − N [vl ] from that on G − N [v1 ] with some additional operations that take polynomial time. Based on this observation and the fact that G does not contain sword of length 1, the recursion relation is: T (E) ≤ T (E − l − 3) + 2T (E − l − 2)
(2)
and the branching contributes a factor less than 20.310 . Lemma 4. Given a graph G = (V, E) of degree bounded by 3 and free of circles and swords of length 1, if G contains a sword (h, v1 , v2 , · · · , vl ) where l ≥ 4, the simple branching operation on h contributes a factor of at most 20.310 to the overall time complexity. Proof. Figure 1(a) shows the branching on such a sword. Since G does not contain circles and sword of length 1, it is not difficult to check that the removal of N [v] reduces the number of edges by at least l + 4 since the path in the sword is now disconnected from the rest part of the graph and its minimum independent dominating set can be computed in polynomial time. Similarly, the removal of v1 reduces it by at least l + 2 and for each of the two neighbors of h, the number of edges is reduced by at least l + 3. We thus have the following recursion relation: T (E) ≤ T (E−l−4)+T (E−l−2)+2T (E−l−3) ≤ T (E−8)+T (E−6)+2T (E−7) (3) We consider the equation x8 − x2 − 2x − 1 = 0 and it has a root in the interval (1, 2) and its value is less than 20.310 . Lemma 5. Given a graph G = (V, E) of degree bounded by 3 and free of swords of length 1, if each of the connected component of G contains at least 10 vertices and it also contains a bridge (h, v1 , t), a simple branching on v1 contributes a factor less than 20.310 to the overall time complexity.
444
C. Liu and Y. Song
Proof. We consider two different cases, i.e., h is connected to t or not connected to t. The correctness of this branching is obvious. If h is connected to t, as shown in Figure 1(c), the removal of N [v1 ] reduces the number of edges in G by at least 5. In other two cases where h and l are included in the minimum dominating set respectively, at least 6 edges can be removed from G since the connected component G contains at least 10 vertices. We thus have T (E) ≤ T (E − 5) + 2T (E − 6). If h is not connected to t, as shown in Figure 1(d), a similar analysis can show that the recursion is T (E) ≤ 3T (E − 6). Both cases show that this branching contributes a factor less than 20.310 to the overall time complexity. Lemma 6. Given a graph G = (V, E) of degree bounded by 3 and free of swords of length 1, if each of the connected component of G contains at least 10 vertices and it also contains a bridge (h, v1 , v2 , t), we consider the following branching operations: 1. Neither v1 nor v2 is in the minimum independent dominating set. 2. One of v1 and v2 is in the minimum dominating set. These branching operations contribute a factor less than 20.310 to the overall time complexity. Proof. We also need to analyze two possible cases, where h is either connected t or not connected to it. In the case where h is connected to t, as shown in Figure 1(e), if none of v1 and v2 are in the minimum independent dominating set, both h and t must be in it. Therefore, at least 7 edges can be removed from G. In the second case where one of v1 and v2 is in the minimum independent dominating set, we can reduce the number of edges by at least 5. The recursion thus is T (E) ≤ T (E −7)+2T (E −5). If h is not connected to t, as shown in Figure 1(f), a similar analysis can show that the recursion is T (E) ≤ T (E − 9) + 2T (E − 5). Combining the two cases together, we can see that this branching contributes a factor less than 20.310 to the time complexity. Lemma 7. Given a graph G = (V, E) of degree bounded by 3 and free of swords of length 1, if each of the connected component of G contains at least 10 vertices and it also contains a bridge (h, v1 , v2 , · · · , vl , t) where l ≥ 3, we consider the following branching operations: 1. 2. 3. 4.
vl−1 is in the minimum independent dominating set; vl−2 is in the minimum independent dominating set, vl is not; vl is in the minimum independent dominating set, vl−2 is not; both vl and vl−2 are included in the minimum independent dominating set.
Proof. The correctness of the recursion is obvious. Note that if vl is not in the minimum independent dominating set, t must be in it. Similar analysis holds for vl−2 . If l = 3, we can consider the two cases where h and t are connected and not connected. If h and t are connected, as shown in Figure 1(g), based on the
Exact Algorithms for Finding the Minimum Independent Dominating Set
vl-3
vl-2
vl-1
vl
h
445
t
l (a) h
(b)
v1
t
h
(c)
h
t
(d)
v1
v2
h
t
(e) h
v1
v1
v2
t
(f)
v1
v2
(g)
v3
t
h
v1
v2
v3
t
(h)
Fig. 1. A few different cases where the algorithm branches on bridges and swords. (a) a sword of length l; (b) a bridge of length larger than 3; (c)(d)(e)(f)(g)(h) describe the branching on bridges of length 1, 2 and 3.
above observation that t must be in the minimum dominating set when vl is not, we have the recursion: T (E) ≤ T (E − 4) + T (E − 9) + T (E − 8) + T (E − 7)
(4)
If h and t are not connected, as shown in Figure 1(h), the recursion is: T (E) ≤ T (E − 4) + 2T (E − 10) + T (E − 8)
(5)
In the case where l > 3, as shown in Figure 1(b), we can get the following recursion: T (E) ≤ T (E − 4) + T (E − 9) + T (E − 8) + T (E − 7)
(6)
Considering all three possible cases, we are able to see that the branching factor is less than 20.310 . Lemma 8. Given a graph G = (V, E) of degree bounded by 3 and free of circles, bridges and swords of length 1, if G contains a sword (h, v1 , · · · , vl ) where l = 2 or 3 and at least one neighbor of h is of degree 3, the simple branching on h contributes a factor less than 20.310 to the overall time complexity.
446
C. Liu and Y. Song
Proof. The proof is based on similar case analysis and proof details will appear in a full version of the paper. Putting all the results we have obtained in the above lemmata together, we can obtain the following Theorem. Theorem 2. For a given graph G = (V, E) of degree bounded by 3, we can compute a minimum independent dominating set in G in time O∗ (20.465|V | ) and polynomial space. Proof. We sketch the algorithm as follows. This algorithm only considers applying the branching rules on connected components that have more than 10 vertices. For a connected component that has less than 10 vertices, we can find a minimum independent dominating set by exhaustive enumeration. Now, if a large component contains a sword of length 1, we can branch on this sword as described in Lemma 2 until no sword of length 1 exists in the graph. We then branch on the circles in G as described in Lemma 3 until the graph is free of circles. Next, we branch on the bridges in the graph as described in Lemmata 5, 6, 7 until the graph is free of bridges. We then consider branching on swords of length at least 4 as described in lemma 4 until the graph does not contain such swords. Now we consider a vertex that is of degree 3. If all its neighbors are of degree 2, we know that this vertex is the head of three swords; this connected component is a tree and we can use a dynamic programming algorithm to find its minimum independent dominating set in polynomial time. If 1 or 2 of its neighbors are of degree 2, we can branch on this vertex as described in lemma 8 until no such vertices exist. Last, if all of its three neighbors are of degree 3, a simple branching on this vertex will lead to the following recursion: T (E) ≤ 4T (E − 7)
(7)
since including any vertex in N [v] removes at least 7 edges from G. This branching is again applied until no such v exists in G. It also contributes a branching factor less than 20.310 to the overall time complexity. After all these branchings are applied, the graph now only contains paths and cycles that are vertex disjoint and we can use a dynamic programming algorithm to compute its minimum independent dominating set in polynomial time. Putting all these together, the above algorithm only needs time O∗ (20.310|E| ). Because |E| ≤ 3|V |/2, the time complexity of this algorithm is at most O∗ (20.465|V | ). This algorithm only needs polynomial space for branchings. 3.3
On Graphs of Degree Bounded by 4
In this section, we show that on graphs of degree bounded by 4, a similar algorithm can find the minimum independent dominating set in time O∗ (20.620|V | ). In fact, Lemmata 5, 6, and 7 can also be used to branch on the bridges in such a
Exact Algorithms for Finding the Minimum Independent Dominating Set
447
graph since the number of terms on the branching recursions does not increase and the number of edges reduced by branching is even more or at least the same. For the same reason, the branching in Lemma 2 can also be used to remove all the swords of length 1 from the graph. Lemma 9. For a graph G = (V, E) of degree bounded by 4 and containing a circle (b, v1 , v2 , · · · , vl ), if G is free of sword of length 1, the simple branching on base b contributes a factor less than 20.310 to the overall time complexity. Proof. The proof is similar to that of Lemma 3, details are shown in the full version of the paper. Lemma 10. For a graph G = (V, E) of degree bounded by 4, if G is free of circles and bridges and v is a vertex of degree 4, if at least one of the neighbors of v is of degree 3, a simple branching on v contributes a factor less than 20.310 to the overall computation time. Proof. The proof is similar to that of previous Lemmata and will be shown in the full version of the paper. Theorem 3. For a graph G = (V, E) of degree bounded by 4, we are able to compute a minimum independent dominating set in G in time O∗ (20.620|V | ) and polynomial space. Proof. We can develop an algorithm similar to the one we have described in the proof of Theorem 2. Proof details will be shown in a full version of the paper.
4
Conclusions
In this paper, we develop exact exponential algorithms to solve the Minimum Independent Dominating Set problem in both general and sparse graphs. The measure we have used to analyze the time complexities of our algorithms on sparse graphs is the number of edges in the graph. The recent work of Eppstein [3] and Fomin et al. [4,6], has shown that an improved measure for analyzing branching algorithms can sometimes lead to improved analysis results. It is thus possible that the measure we have used to evaluate the time complexities of our algorithms is not the optimal one and the actual time complexities of them are possibly better than we have obtained.
Acknowledgment We thank the anonymous reviewers for their comments and suggestions on an earlier version of the paper.
448
C. Liu and Y. Song
References 1. R. Beigel, “Finding maximum independent sets in sparse and general graphs”, Proceedings of SODA 1999, 856-857, 1999. 2. J. Chen, I. A. Kanj, and W. Jia, “Vertex Cover: Further Observations and Further Improvements”, Journal of Algorithms, 41: 280-301, 2001. 3. D. Eppstein, “Quasiconvex analysis of backtracking algorithms”, Proceedings of SODA 2004, 788-797, 2004. 4. F. V. Fomin, F. Grandoni, and D. Kratsch, “Measure and Conquer: A Simple O(20.288 n) Independent Set Algorithm”, Proceedings of SODA 2006, to appear. 5. F. V. Fomin and K. Hoie, “Pathwidth of cubic graphs and exact algorithms”, Information Processing Letters, 97(5): 191-196, 2006. 6. F. V. Fomin, F. Grandoni, and D. Krastch, “Measure and conquer: domination a case study”, Proceedings of ICALP 2005, 191-203, 2005. 7. F. V. Fomin, D. Kratsch, and G. J. Woeginger, “Exact(exponential) algorithms for the dominating set problem”, Proceedings of WG 2004, 245-256, 2004. 8. M. R. Garey and D. S. Johnson, “Computers and intractability, A guide to the theory of NP-completeness”, Freeman and Company, New York, NY, 1979. 9. F. Grandoni, “A note on the complexity of minimum dominating set”, Journal of Discrete Algorithms, in press. 10. M. M. Halld´ orsson, “Approximating the minimum maximal independence number”, Information Processing Letter, 46: 169-172, 1993. 11. V. Kann, “On the approximability of NP-complete optimization problems”, Ph.D. Thesis, Department of Numerical Analysis and Computing Science, Royal Institute of Technology, Stockholm, 1992. 12. J. Kneis, D. M¨ olle, S. Richter, and P. Rossmanith, “Algorithms based on the treewidth of sparse graphs”, Proceedings of WG 2005, 385-396, 2005. 13. F. Kuhn, T. Nieberg, T. Moscibroda, and R. Wattenhofer, “Local approximation schemes for ad hoc and sensor networks”, 2005 Workshop on Discrete Algorithms and Methods for Mobile Computing and Communications, 97-103, 2005. 14. B. Randerath, I. Schiermeyer, “Exact algorithms for MINIMUM DOMINATING SET”, Technical Report zaik-469, Zentrum f¨ ur Angewandte Informatik K¨ oln, Germany, 2004. 15. B. Reed, “Paths, stars and the number three”, Combinatorial Probabilistic Computing, 5: 277-295, 1996. 16. J. M. Robson, “ Finding a maximum independent set in time O(2n/4 ), Technical Report 1251-01, LABRI, Universit´e Bordeaux I, 2001.