Capacitated domination faster than O(2n ) Marek Cygan1 , Marcin Pilipczuk1 , and Jakub Onufry Wojtaszczyk2 1 Dept. of Mathematics, Computer Science and Mechanics, University of Warsaw, Poland 2 Institute of Mathematics, Polish Academy of Sciences [cygan,malcin,onufry]@mimuw.edu.pl Abstract. In this paper we consider the C APACITATED D OMINATING S ET problem — a generalisation of the D OMINATING S ET problem where each vertex v is additionally equipped with a number c(v), which is the number of other vertices this vertex can dominate. We provide an algorithm that solves C APACITATED D OMINATING S ET exactly in O(1.89n ) time and polynomial space. Despite the fact that the C APACITATED D OMINATING S ET problem is quite similar to the D OMINATING S ET problem, we are not aware of any published algorithms solving this problem faster than the straightforward O∗ (2n )3 solution prior to this paper which was stated as an open problem at Dagstuhl seminar 08431 in 2008 and IWPEC 2008. We also provide an exponential approximation scheme for C APACITATED D OM INATING S ET which is a trade-off between the time complexity and the approximation ratio of the algorithm. 1 Introduction The field of exact exponential-time algorithms for NP-hard problems has attracted a lot of attention in recent years (see Woeginger’s survey [21]). Many difficult problems can be solved much faster than by the obvious brute-force algorithm; examples include I NDEPENDENT S ET [13], D OMINATING S ET [12, 20] , C HROMATIC N UMBER [2] and BANDWIDTH [7, 10]. A few powerful techniques have been developed, including Measure & Conquer [12] and inclusion/exclusion principle applications [2, 3, 17]. However, there is still a bunch of problems for which no faster solution than the obvious one is known. These include S UBGRAPH I SOMORPHISM and C HROMATIC I NDEX which are mentioned as open problems in [1, 14]. In order to define the C APACITATED D OMINATING S ET problem let us introduce some basic notions. Let G = (V, E) be an undirected graph. Given F ⊂ E we write V (F ) to denote the set of all endpoints of the edges in F . Given W ⊂ V by G[W ] we denote the subgraph induced by W . We say a vertex v ∈ V dominates u ∈ V if u = v or uv ∈ E, i.e. a vertex dominates 3 By O∗ we denote standard big O notation but omitting polynomial factors. itself and all its neighbours. By N [v] = {v} ∪ {u : uv ∈ E} we denote the set of vertices dominated S by v. We extend this notation to any subset W ⊂ V by putting N [W ] = v∈W N [v], we say that a set W dominates a vertex u if u ∈ N [W ]. The set N [W ] is called the closed neighbourhood of W . The D OMINATING S ET problem asks for the smallest set that dominates the whole V . In the C APACITATED D OMINATING S ET problem each vertex v is additionally equipped with a number c(v), which is the number of other vertices this vertex can dominate. Formally, we say that a set S ⊂ V is a capacitated dominating set if there exists fS : V \ S → S such that fS (v) is a neighbour of v for each v ∈ V \ S and |fS−1 (v)| ≤ c(v) for each v ∈ S. The function fS is called a dominating function for the set S. The C APACITATED D OMINATING S ET problem asks for the smallest possible size of a capacitated dominating set. Note that for a given set S checking whether it is a capacitated dominating set is a polynomial–time problem which can be solved using max–flow or maximum matching techniques. Finding an algorithm faster than O∗ (2n ) for D OMINATING S ET was an open problem until 2004. Currently the fastest algorithm by van Rooij et al. runs in O(1.5048n ) [20]. The problem of solving C APACITATED D OMINATING S ET faster than the check-all-subsets O∗ (2n ) algorithm was posted by van Rooij in 2008 at Dagstuhl seminar [14] and on IWPEC 2008 open problem list. In this paper we present an algorithm providing the positive answer to this question. Note that at first glance breaking O∗ (2n ) barrier for the C APACITATED D OMINATING S ET problem seems a hard task, since even the brute-force O∗ (2n ) algorithm involves matching or max–flow techniques. A standard approach to improving exponential time algorithms is through fixed parameter tractability (see eg. [18]). However from the parameterized point of view, Dom et al. [9] showed that this problem is W [1]-hard when parameterized by both treewidth and solution size, and Bodlaender et al. [4] showed that even the planar version parameterized by the solution size is also W [1]-hard. Superpolynomial approximation was recently considered as a way of coping with hardness of approximation of different NP-hard problems. Results in this field include a subexponential approximation algorithm for BANDWIDTH on trees [11] and exponential approximation schemes for C HROMATIC N UMBER [5, 6] or BANDWIDTH on arbitrary graphs [8, 15]. Our results. In Section 2 we provide an algorithm which solves the C A PACITATED D OMINATING S ET problem in O(1.89n ). The algorithm constructs n O∗ ( n/3 ) = O(1.89n ) reductions of the input graph into a C ONSTRAINED C APACITATED D OMINATING S ET problem instance (defined in Section 2.1), each solvable in polynomial time. Section 2.3 tackles the exponential approximation of C APACITATED D OMINATING S ET. More precisely, we provide an approximation algorithm that for a given c ∈ (0, 13 ), in time n ∗ O ( ) = O∗ ((1/(cc (1 − c)1−c ))n ), cn 1 +c)-approximation in the case of c < 41 or a (2−3c)-approximation computes a ( 4c 1 in the case of 4 ≤ c < 13 . This result should be compared to the trivial approx n ∗ imation scheme that works in O ( cn ) time too: iterate over all subsets of V that have size at most cn or at least (1 − c)n and return the smallest feasible solution found. However, this algorithm has an approximation factor of 1c − 1, which is between 2× and 4× worse than our ratio. All algorithms in this paper require polynomial space. Our algorithm for C APACITATED D OMINATING S ET is somewhat similar to one of the first algorithms to break O∗ (2n ) for the classical D OMINATING S ET problem, namely the algorithm of Randerath and Schiermeyer [19]. Their algorithm also involves matching arguments and our algorithm, applied to D OMI NATING S ET , can be viewed as a simplification of their algorithm. However we do not know whether their algorithm could be used to solve the C APACITATED D OMINATING S ET problem. 2 C APACITATED D OMINATING S ET 2.1 C ONSTRAINED C APACITATED D OMINATING S ET In this section we introduce a constrained version of the C APACITATED D OM INATING S ET problem, namely the C ONSTRAINED C APACITATED D OMINATING S ET problem, which can be solved in polynomial time. The input of C ONSTRAINED C APACITATED D OMINATING S ET is an undirected graph G = (V, E), a set U ⊆ V and a capacity function c : V → {0, . . . , n − 1}. We ask for a smallest capacitated dominating set S ⊆ V containing U such that each vertex outside U dominates at most one other vertex. Formally we ask for a dominating function fS satisfying |fS−1 (v)| ≤ 1 |fS−1 (v)| for each ≤ c(v) v ∈S\U for each v∈U (1) Let G = (V, E) with U ⊆ V and a capacity function c : V → {0, . . . , n−1} be a C ONSTRAINED C APACITATED D OMINATING S ET instance. Consider the following graph G0 = (V 0 , E 0 ): – for any v ∈ V \ U we have v ∈ V 0 ; – for any v ∈ U we have c(v) copies v1 , v2 , . . . , vc(v) of v in V 0 ; – for any v ∈ V \ U and u ∈ U the edge ui v ∈ E 0 for all i iff uv ∈ E; – for v, w ∈ V \ U we have vw ∈ E 0 iff vw ∈ E and c(v) + c(w) > 0; – there are no edges of the form vi wj or vi vj for v, w ∈ U . (E,0) (D,2) (F,0) (M,0) (L,1) (K,0) (H,0) (A,2) (B,3) (C,2) U={A,B,C} H’ E’ D’ F’ K’ M’ L’ A01 A02 B10 B20 B30 C10 C20 Fig. 1. From the constrained capacitated dominating set {A, B, C, D, L} (where U = {A, B, C}) to a matching. By a pair (X, i) we denote a vertex X with its capacity c(X) = i. We show a correspondence between feasible solutions of C ONSTRAINED C APACITATED D OMINATING S ET in G and matchings in G0 . Lemma 1. Let S be a capacitated dominating set in G with a dominating function fS satisfying condition 1. Then one may construct in polynomial time a matching φ(S, fS ) in G0 satisfying |φ(S, fS )| = |V | − |S|. Proof. Let us define the matching φ(S, fS ) as follows: – for each v ∈ / S such that fS (v) ∈ / U add vfS (v) to φ(S, fS ); – for each v ∈ / S such that u = fS (v) ∈ U add vui to φ(S, fS ), where ui is a copy of u in G0 and different copies ui are chosen for different vertices v with fS (v) = u (note that |fS−1 (u)| ≤ c(u), so there are enough vertices ui ). Note that every vertex v ∈ V \ S is an endvertex of an edge in the matching φ(S, fS ). The second endvertex is fS (v) (in the case fS (v) ∈ / U ) or a copy of fS (v) in G0 (in the case fS (v) ∈ U ). Note that by condition 1, every vertex w ∈ S \ U is an endvertex of at most one chosen edge, thus φ(S, fS ) is indeed a matching. Moreover, every edge in φ(S, fS ) has exactly one endpoint in V \ S. Therefore |φ(S, fS )| = |V | − |S|. t u Lemma 2. Let M be a matching in G0 . Then one may construct in polynomial time a feasible solution ψ(M ) to the C ONSTRAINED C APACITATED D OM INATING S ET problem with dominating function fψ(M ) satisfying |ψ(M )| = |V | − |M |. Proof. Consider the following capacitated dominating set ψ(M ) with dominating function fψ(M ) : – U ⊆ ψ(M ); – for u ∈ U and for each i such that ui v ∈ M , we take fψ(M ) (v) = u; – for any edge vw ∈ M , where v, w 6∈ U one of the endpoints (say v) has to satisfy c(v) > 0, we add v to ψ(M ) and set fψ(M ) (w) = v; – for any v 6∈ U which is not an endpoint of any edge in M we add v to ψ(M ). It is easy to verify that the above procedure does indeed give a feasible solution to C ONSTRAINED C APACITATED D OMINATING S ET. We have |ψ(M )| = |V |−|M | since for each edge in M , exactly one of its endpoints does not belong to ψ(M ). t u We conclude this section with the following theorem. Theorem 3. The C ONSTRAINED C APACITATED D OMINATING S ET problem can be solved in polynomial time. Proof. By Lemmas 1 and 2, to find the solution of the C ONSTRAINED C APAC ITATED D OMINATING S ET problem it is enough to find any maximum matching in G0 , which can be done in polynomial time (see e.g. [16]). 2.2 From C ONSTRAINED C APACITATED D OMINATING S ET to C APACITATED D OMINATING S ET Let us start with the following simple observation. Let S be any capacitated dominating set and let fS be a dominating function for S. Let US = {v ∈ S : |fS−1 (v)| ≥ 2}. We have X v∈S 1 + |fS−1 (v)| = |S| + X v∈S |fS−1 (v)| = n, thus in particular |US | ≤ n/3. Moreover, S with the function fS is a feasible solution for the C ONSTRAINED C APACITATED D OMINATING S ET instance with the graph G and the set US . Therefore the following algorithm solves C APAC ITATED D OMINATING S ET: 1. For each U ⊆ V satisfying |U | ≤ n/3 solve the C ONSTRAINED C APACI TATED D OMINATING S ET instance with graph G and subset U . 2. Return the smallest capacitated dominating set from the constructed C ON STRAINED C APACITATED D OMINATING S ET instances. The C ONSTRAINED C APACITATED D OMINATING S ET problem can be solved in polynomial time and there are dn/3e X k=0 n k =O ∗ n = O(1.89n ) dn/3e possible sets U (i.e. sets of cardinality at most n/3), thus the whole algorithm works in O(1.89n ) time. 2.3 Approximating C APACITATED D OMINATING S ET It is known that D OMINATING S ET is as hard to approximate as S ET C OVER and since C APACITATED D OMINATING S ET generalizes D OMINATING S ET it is hard to approximate it as well. Thus there probably does not exists a polynomial time algorithm solving C APACITATED D OMINATING S ET with a constant approximation ratio. If we do not have enough time to obtain an exact solution for the C APACITATED D OMINATING S ET problem we can use the following constant approximation scheme. Instead of investigating all subsets U ⊆ V satisfying |U | ≤ n/3 we can check only smaller sets, namely |U | ≤ cn for some constant c ∈ (0, 13 ). Thus the approximation algorithm has the following form: 1. For each U ⊆ V satisfying |U | ≤ cn solve the C ONSTRAINED C APACI TATED D OMINATING S ET instance with graph G and subset U . 2. Return the smallest capacitated dominating set from the constructed C ON STRAINED C APACITATED D OMINATING S ET instances. Theorem any fixed constant c ∈ (0, 13 ) the described algorithm runs in 4. For n ∗ ∗ O ( cn ) = O ((1/(cc (1 − c)1−c ))n ) time and polynomial space. For c ≤ 1/4 1 the approximation ratio is at most ( 4c + c) and for c ≥ 1/4 the approximation ratio is at most 2 − 3c. Proof. For each subset U ⊆ V the algorithm uses polynomial time only, thus the time bound follows directly from the Stirling formula which can be used to n bound the number of subsets cn . To calculate the approximation ratio let us consider some optimal solution OP T ⊆ V together with a function fOP T : V \ OP T → OP T . By OP T0 , OP T1 and OP T2 let us denote subsets of OP T containing vertices which dominate exactly zero, exactly one and at least two vertices from V \ OP T , according to fOP T , respectively. By m, m0 , m1 , m2 we denote the cardinalities of sets OP T , OP T0 , OP T1 and OP T2 respectively. We may assume that m2 > cn since otherwise our algorithm finds the optimal solution. By s let us denote the average number of vertices from V \ OP T which a vertex from OP T2 dominates, i.e. s = (n − m − m1 )/m2 . Since our algorithm checks all subsets U ⊆ V satisfying |U | ≤ cn it obviously considers the subset U0 ⊆ OP T2 , |U0 | ≤ cn containing vertices which dominate the largest number of vertices from V \ OP T . For this particular subset U0 note that there exists a feasible solution to C ONSTRAINED C APACITATED D OMI NATING S ET of size m + (m2 − cn)(s − 1): we take OP T and for each vertex −1 v ∈ OP T2 \ U0 we take all but one vertices from fOP T (v) since then each vertex outside U0 dominates at most one other vertex. Thus the approximation ratio can be bounded by α = 1+(m2 −cn)(s−1)/ m. Note that if we keep m2 fixed and increase m0 and m1 , the approximation ratio decreases — we increase m and decrease s — therefore w.l.o.g. we may assume m0 = m1 = 0. Denoting x = n/m2 , we obtain α ≤ 1+(1−cx)(x−2) for 3 ≤ x ≤ 1c . The bound for α is a concave function of x with maximum at 1 1 + 1. However when c ≥ 14 we have x0 ≤ 3. This gives α ≤ 4c + c for x0 = 2c 1 1 1 c ≤ 4 and α ≤ 2 − 3c for 4 ≤ c ≤ 3 . t u In Table 1 we gather a few examples of obtained approximation ratios and running times. We compare the running times of our approximation scheme with the running times of the trivial approximation algorithm needed to obtain the same approximation ratio. This algorithm iterates over all subsets of V that have size at most cn or at least (1−c)n and returns the smallest feasible solution found. c ratio time trivial time 1/3 1 (exact) O(1.89n ) O? (2n ) 1/4 5/4 O(1.76n ) O(1.99n ) 1/6 5/3 O(1.57n ) O(1.94n ) 1/10 13/5 O(1.39n ) O(1.81n ) 0.02506 . . . 10 O(1.13n ) O(1.36n ) Table 1. Sample c values, approximation ratios and running times of the algorithm described in Theorem 4 and running times of the trivial approximation algorithm with the same approximation ratio. References 1. Omid Amini, Fedor V. Fomin, and Saket Saurabh. Counting subgraphs via homomorphisms. In Proc. ICALP’09, pages 71–82, 2009. 2. Andreas Björklund and Thore Husfeldt. Inclusion–exclusion algorithms for counting set partitions. In Proc. FOCS’06, pages 575–582, 2006. 3. Andreas Björklund, Thore Husfeldt, Petteri Kaski, and Mikko Koivisto. Fourier meets möbius: fast subset convolution. In Proc. STOC’07, pages 67–74, 2007. 4. Hans Bodlaender, Daniel Lokshtanov, and Eelko Penninkx. Planar capacitated dominating set is W [1]-hard. In Proc. IWPEC’09 (to appear), 2009. 5. Nicolas Bourgeois, Bruno Escoffier, and Vangelis Th. Paschos. Efficient approximation by “low-complexity” exponential algorithms. Cahier du LAMSADE 271, LAMSADE, Universite Paris-Dauphine, 2007. 6. Marek Cygan, Lukasz Kowalik, and Mateusz Wykurz. Exponential-time approximation of weighted set cover. Inf. Process. Lett., 109(16):957–961, 2009. 7. Marek Cygan and Marcin Pilipczuk. Faster exact bandwidth. In Proc. WG’08, pages 101– 109, 2008. 8. Marek Cygan and Marcin Pilipczuk. Exact and approximate bandwidth. In Proc. ICALP’09, pages 304–315, 2009. 9. Michael Dom, Daniel Lokshtanov, Saket Saurabh, and Yngve Villanger. Capacitated domination and covering: A parameterized perspective. In Proc. IWPEC’08, pages 78–90, 2008. 10. Uriel Feige. Coping with the NP-hardness of the graph bandwidth problem. In Proc. SWAT’00, pages 10–19, 2000. 11. Uriel Feige and Kunal Talwar. Approximating the bandwidth of caterpillars. In APPROXRANDOM, pages 62–73, 2005. 12. Fedor V. Fomin, Fabrizio Grandoni, and Dieter Kratsch. Measure and conquer: Domination - a case study. In Proc. ICALP’05, pages 191–203, 2005. 13. Fedor V. Fomin, Fabrizio Grandoni, and Dieter Kratsch. Measure and conquer: a simple O(20.288n ) independent set algorithm. In Proc. SODA’06, pages 18–25, 2006. 14. Fedor V. Fomin, Kazuo Iwama, and Dieter Kratsch. Moderately exponential time algorithms, Dagstuhl seminar, 2008. 15. Martin Fürer, Serge Gaspers, and Shiva Prasad Kasiviswanathan. An exponential time 2approximation algorithm for bandwidth. In Proc. IWPEC’09, to appear, 2009. 16. Marcin Mucha and Piotr Sankowski. Maximum matchings via gaussian elimination. In Proc. FOCS’04, pages 248–255, 2004. 17. Jesper Nederlof. Fast polynomial-space algorithms using möbius inversion: Improving on steiner tree and related problems. In Proc. ICALP’09, pages 713–725, 2009. 18. Rolf Niedermeier. Invitation to Fixed-Parameter Algorithms. 2006. 19. Ingo Schiermeyer. Efficiency in exponential time for domination-type problems. Discrete Applied Mathematics, 156(17):3291–3297, 2008. 20. Johan M. M. van Rooij, Jesper Nederlof, and Thomas C. van Dijk. Inclusion/exclusion meets measure and conquer: Exact algorithms for counting dominating sets. In Proceedings of ESA’09, pages 554–565, 2009. 21. Gerhard J. Woeginger. Exact algorithms for NP-hard problems: A survey. In Combinatorial Optimization, pages 185–208, 2001.
© Copyright 2024 Paperzz