Dominating Set on Bipartite Graphs Mathieu Liedloff

advertisement
Dominating Set on Bipartite Graphs
Mathieu Liedloff∗
Abstract
Finding a dominating set of minimum cardinality is an NP-hard
graph problem, even when the graph is bipartite. In this paper we are
interested in solving the problem on graphs having a large independent
set. Given a graph G with an independent set of size z, we show that
the problem can be solved in time O∗ (2n−z ), where n is the number
of vertices of G. As a consequence, our algorithm is able to solve the
dominating set problem on bipartite graphs in time O∗ (2n/2 ). Another
implication is an algorithm for general graphs whose running time is
O(1.7088n ).
1
Introduction
In the last years, we experience a growing interest in the design and analysis
of exact exponential time algorithms to solve NP-hard problems. Several
surveys have been published recently (see e.g. [3, 14, 15]).
Known results. Given a graph G = (V, E), a subset D ⊆ V is a
dominating set of G if every vertex of V either belongs to D or has at least
one neighbor in D. The minimum dominating set problem requires to find
a dominating set of minimum cardinality of a given graph. This problem
is well known to be NP-hard and several exact exponential time algorithms
for solving it on general graphs, as well as on some graph classes, have been
published during the last years.
The first non trivial algorithms for the problem was proposed in 2004. In
[6], Fomin et al. provided an O(1.9379n ) time algorithm for general graphs
and algorithms for split graphs, bipartite graphs and graphs of maximum degree three. The running time of these algorithms are O(1.4143n ), O(1.7321n )
and O(1.5144n ) respectively. Independently and using different approaches,
∗
Laboratoire d’Informatique Théorique et Appliquée, Université Paul Verlaine - Metz,
57045 Metz Cedex 01, France. Email: liedloff (at) univ-metz.fr
1
Randerath and Schiermeyer published an O(1.8899n ) time algorithm [10], and
Grandoni gave an O(1.8026n ) time algorithm [8, 9], both for general graphs.
By refining the analysis of this latter algorithm, Fomin et al. [2] established
an O(1.5263n ) time algorithm using polynomial space and an O(1.5137n )
time algorithm using exponential space. By now, the best known algorithm
is due to van Rooij and Bodlaender [13]. They obtained an O(1.5134n ) time
and polynomial space algorithm, and an O(1.5063n ) time algorithm that uses
exponential space.
We are insterested in exact algorithms to find a minimum dominating set
on special graph classes. As already mentioned, Fomin et al. provide in [6]
algorithms for split graphs, bipartite graphs and graphs of maximum degree
three. In [5], Fomin and Høie give an O(1.2010n ) time algorithm for graphs of
maximum degree three. In [1], Dorn shows that a minimum dominating set√ in
a planar graph can be found in sub-exponential time giving an O(15.8895 n )
time algorithm. In [7], Gaspers et al. provide algorithms for chordal graphs,
circle graphs and dense graphs
Concerning bipartite graphs, the only previously known algorithm is the
one published in [6] having running time O(1.7321n ). Since by now the general algorithm of Fomin et al. [2] has worst case running time O(1.5137n ), it
has been asked whether there is an algorithm finding a minimum dominating
set on bipartite graphs in time O(αn ), with α < 1.5.
Our results. In this paper, we provide an algorithm computing a minimum dominating set on graphs having a large independent set. Given a
graph G with an independent set of size z, the worst case running time of
our algorithm is O∗ (2n−z ). Moreover, the algorithm leads to two interesting
results. First, we show that a minimum dominating set of a bipartite graph
can be computed in time O(1.4143n ), providing the best known algorithm
for this graph class. The second consequence is a new algorithm for arbitrary
graphs having running time O(1.7088n ). Besides the O(1.5137n ) time algorithm of Fomin et al. using the Branch & Reduce paradigm, our Dynamic
Programming based algorithm is the best known for general graphs.
2
Preliminaries
Let G = (V, E) be an undirected and simple graph. The number of its vertices
is denoted by n. For a vertex v ∈ V , we denote by N (v) the neighborhood
of v and by N [v] = N (v) ∪ {v} the closed neighborhood of v. Given a subset
of vertices S ⊆ V , N [S] denotes the set ∪v∈S N [S] and N (S) denotes the set
N [S] \ S.
A subset D ⊆ V such that every vertex of V \ D has at least one neighbor
2
in D is a dominating set of G. The minimum cardinality of a dominating set
of a graph G is denoted by γ(G).
A subset of vertices S ⊆ V is an independent set of a graph G = (V, E)
if the vertices of S are pairwise non adjacent. The problem asking to find
an independent set of maximum size is well known to be NP-hard. An
independent set S of a graph G is maximal if S is not properly contained in
an other independent set. It is well-known that each maximal independent
set of a graph G is also a dominating set of G.
A graph G = (V, E) is bipartite if the set of its vertices can be partitioned
into two independent sets.
Through out this paper, we use the (by now standard) O∗ notation introduced by Woeginger [14]. We write f (n) = O∗ (g(n)) if f (n) ≤ p(n) · g(n)
for some polynomial p(n).
3
Solving the dominating set problem on graphs
with a large independent set
Let G be a graph with an independent set of size z with 1 ≤ z ≤ n. In
this section we show that a minimum dominating set of a such graph can
be found in time O∗ (2n−z ). Note that although the maximum independent
set problem is NP-hard, there exists several exponential time algorithms for
solving this problem exactly [12, 11, 4]. E.g. the one by Fomin et al. has
running time O(1.2210n ) [4].
Theorem 1 Given a graph G and an independent set of size z of G, a
minimum dominating set of G can be computed in time O∗ (2n−z ).
Proof. Let G = (V, E) be a graph and I = {v1 , v2 , . . . , vz } ⊆ V an independent set of size z. We denote by J the set V \ I.
To compute a dominating set of minimum size, the presented algorithm
uses two stages. The first one, called “preprocessing”, computes for each
subset X ⊆ J a subset DX ⊆ I of minimum cardinality such that X ⊆
N [DX ]. The second stage, called “Domination”, computes for each set DJ ⊆
J a dominating set D of smallest size for G fulfilling the condition D∩J = DJ .
The calculations done during the preprocessing stage will be used to speed
up the execution of the domination stage. In the next, we describe this two
stages, prove their correctness and study their running times.
Stage : Preprocessing
For each subset X ⊆ J and each integer k, 1 ≤ k ≤ z, we denote by
Opt[X, k] a set DX,k of smallest size, if any, such that :
3
(i) DX,k ⊆ {v1 , v2 , . . . , vk }, and
(ii) X ⊆ N [DX,k ].
The computation of Opt[X, k] is done by using a dynamic programming
approach. The algorithm starts by initializing Opt so that for all k, 1 ≤ k ≤ z,
we let
Opt[∅, k] = ∅
(1)
and for all subsets X ⊆ J we let :
{v1 } if X ⊆ N [v1 ],
Opt[X, 1] =
{∞} otherwise.
(2)
The special set {∞} denotes a sentinel meaning that a subset fulfilling
the requested properties does not exist. Moreover, we let the cardinality of
{∞} be ∞.
The computation of Opt[X, k] is done by considering the sets X by increasing order of cardinality and the values of k by increasing order. Finally,
for every non empty subset X ⊆ J and every integer k ≥ 2, the set Opt[X, k]
is obtained from the following formula:
Opt[X, k] =
The set of minimum cardinality chosen amongst
Opt[X, k − 1] and {vk } ∪ Opt[X \ N [vk ], k − 1].
(3)
It is not hard to show that this stage computes for each subset X ⊆ J
and each integer k, 1 ≤ k ≤ z, a set DX,k = Opt[X, k] of smallest size
such that (i) DX,k ⊆ {v1 , v2 , . . . , vk } and (ii) X ⊆ N [DX,k ]. Consider the
initializations (1) and (2). If the set X is empty then a set DX,k = ∅ is
clearly a set of minimum cardinality fulfilling (i) and (ii) for every k. If k
is equal to 1, for every subset X, the only way to have X ⊆ N [DX,k ] is to
take v1 in DX,k . However in that case, either X ⊆ N [v1 ] and DX,k = {v1 } is
a solution of minimum size fulfilling (i) and (ii), or X 6⊆ N [v1 ] and thus no
set DX,k ⊆ {v1 } can fulfill the condition (ii). As previously explained, in the
latter case we store the sentinel {∞}.
We consider now the formula (3). When Opt[X, k] is computed, all the
sets Opt[X 0 , k 0 ] with k 0 < k and X 0 ⊆ J were previously computed. There
are two possibilities: either vk belongs to Opt[X, k], or vk 6∈ Opt[X, k]. If vk ∈
Opt[X, k] then it sufficient to know an optimal solution for the subproblem
X 0 = X \N [vk ] and k 0 = k −1, which is given by Opt[X 0 , k 0 ]. If vk 6∈ Opt[X, k]
then we have Opt[X, k] = Opt[X, k − 1]. Finally, we keep the set having the
smallest cardinality amongst these two possibilities.
4
Given a set X and an integer k, the computation of Opt[X, k] require
no more than polynomial time. Since the computation of Opt[X, k] is done
for every X ⊆ J and every integer k, 1 ≤ k ≤ z, the running time of the
preprocessing stage is O∗ (z2|J| ) = O∗ (2n−z ). We note that the storage of all
the sets Opt[X, k] request space bounded by O∗ (2n−z ).
Stage: Domination
Given a set DJ ⊆ J, in this stage we compute a set D = DJ ∪ DI of
minimum size such that D is a dominating set of G respecting the condition
D ∩ J = DJ . As we will show in the next, the set DI ⊆ I is given by
DI = DI1 ∪ DI2 where DI1 = I \ N (DJ ) and DI2 = Opt[J \ (N [DJ ] ∪ N (DI1 )), z]
(see Fig. 1).
J
I
2
DI
DJ
D1I
Figure 1: An example of a graph having an independent set I together with
sets DJ , DI1 and DI2 . (Dashed lines represent neighborhoods of the sets.)
Claim 2 Amongst all dominating sets S of G such that S ∩ J = DJ , the set
D = DJ ∪ DI1 ∪ DI2 is one of smallest cardinality.
Proof. First, we show that D = DJ ∪ DI1 ∪ DI2 is a dominating set. Let v
be a vertex in J. If v ∈ N [DJ ] then v has at least one neighbor in DJ or
belongs to DJ . If v 6∈ N [DJ ], we distinguish two cases. (1) If v ∈ N (DI1 )
then v has at least one neighbor in DI1 . (2) If v 6∈ N (DI1 ) then v belongs to
J \ (N [DJ ] ∪ N (DI1 )) and thus, by definition of Opt[J \ (N [DJ ] ∪ N (DI1 )), z],
v has at least one neighbor in DI2 . Consider now v being a vertex of I.
Then either v ∈ N (DJ ) and thus v has at least one neighbor in DJ , or
v ∈ (I \ N (DJ )) and then v is in DI1 .
Now we show that D is of minimum cardinality amongst all dominating
sets S fulfilling S ∩ J = DJ . Since D ∩ J = DJ and I is an independent set
of G, the vertices of I \ N (DJ ) cannot have any neighbor in the dominating
set and thus should belong to the dominating set. Consequently, for any
dominating set S we have DI1 ⊆ S. Then, since D ∩ J = DJ , the vertices
of J \ (N [DJ ] ∪ N (DI1 )) can only be dominated by some vertices of I. A
5
subset DI2 ⊆ I of minimum size such that J \ (N [DJ ] ∪ N (DI1 )) ⊆ N [DI2 ] was
computed during the preprocessing stage. Namely, DI2 is given by Opt[J \
(N [DJ ] ∪ N (DI1 )), z]. Note that by the minimality of DI2 , it follows that DI1
and DI2 are disjoint. Consequently, D = DJ ∪ DI1 ∪ DI2 is a dominating set
of minimum size fulfulling D ∩ J = DJ .
Note that given a set DJ ⊆ J, and using the results coming from the
preprocessing stage, the computation of D = DJ ∪ DI1 ∪ DI2 can be done in
polynomial time.
Finally, by enumerating all the 2|J| = 2n−z possible subsets for DJ =
D ∩ J, the algorithm finds a minimum dominating set D of the graph G in
time O∗ (2n−z ).
Since every bipartite graph has an independent set of size at least n/2, as
an immediate consequence of Theorem 1, we obtain the following corollary.
Corollary 3 Given a bipartite graph G, a minimum dominating set of G
can be computed in time O∗ (2n/2 ) = O(1.4143n ).
4
Dominating set on general graphs
The algorithm described in the previous section can be used to solve the minimum dominating set problem on general graphs. By using a simple greedy
strategy, we start by computing in polynomial time a maximal independent
set I of the given graph G. (E.g. choose a vertex v of G, add it to I, remove
N [v] from G, and continue this process until G is empty.) Let z = 0.2271n.
If |I| ≥ z then we use the algorithm of Theorem 1 to compute a minimum
dominating set in time O∗ (20.7729n ) = O(1.7088n ). If |I| < z then γ(G) < z
since I is also a (not necessary minimum) dominating set of G. In that case,
we enumerate all subsets of vertices of G of size at most z and keep the
one being a dominating set of minimum size. By using the Stirling approximation and standard calculations, we state that the time needed for a such
enumeration is bounded by
z n z n n−z X
n
n
n!
=O z
= O(1.7088n ).
≤z
=z
(z)!(n − z)!
z
n−z
k
z
k=0
Since given a set D, checking whether it is a dominating set require a polynomial time, the overall running time is O(1.7088n ) which prove the following
Theorem.
Theorem 4 Given a graph G, a minimum dominating set of G can be computed in time O(1.7088n ).
6
References
[1] Dorn, F., Designing Subexponential Algorithms: Problems, Techniques
& Structures, Ph.D. thesis, University of Bergen, Norway, July 2007.
[2] Fomin, F.V., F. Grandoni, and D. Kratsch, Measure and conquer: Domination - A case study, Proceedings of ICALP 2005 , Springer-Verlag,
2006, Berlin, LNCS 3380, pp. 192–203.
[3] Fomin, F.V., F. Grandoni, and D. Kratsch, Some new techniques in
design and analysis of exact (exponential) algorithms, Bull. EATCS , 87
(2005), pp. 47–77.
[4] Fomin, F.V., F. Grandoni, D. Kratsch, Measure and conquer: A simple O(20.288n ) independent set algorithm, Proceedings of SODA 2006 ,
(2006), pp. 18–25.
[5] Fomin, F.V., and K. Høie, Pathwidth of cubic graphs and exact algorithms, Inform. Process. Lett. 97 (2006), pp. 191–196.
[6] Fomin, F.V., D. Kratsch, and G. J. Woeginger, Exact (exponential)
algorithms for the dominating set problem, Proceedings of WG 2004 ,
Springer-Verlag, Berlin, 2004, LNCS 3353, pp. 245–256.
[7] Gaspers, S., D. Kratsch, M. Liedloff, Exponential Time Algorithms for
the Minimum Dominating Set Problem on Some Graph Classes, Proceedings of SWAT 2006 , LNCS 4059, (2006), pp. 148–159.
[8] Grandoni, F., Exact algorithms for hard graph problems, Ph.D. thesis,
University of Rome “Tor Vergata”, Italy, March 2004.
[9] Grandoni, F., A note on the complexity of minimum dominating set, J.
Discrete Algorithms 4 (2006), pp. 209–214.
[10] Randerath, B., and I. Schiermeyer, Exact algorithms for Minimum Dominating Set, Technical Report zaik-469, Zentrum fur Angewandte Informatik, Köln, Germany, 2004.
[11] Robson, J. M., Algorithms for maximum independent sets, Journal of
Algorithms 7 (1986), pp. 425–440.
[12] Tarjan, R. E., A. E. Trojanowski, Finding a maximum independent set,
SIAM Journal on Computing, 6, (1977), pp. 537–546.
7
[13] van Rooij, J. M. M., H. L. Bodlaender, Design by measure and conquer:
a faster exact algorithm for dominating set, Proceedings of STACS 2008,
to appear.
[14] Woeginger, G. J., Exact algorithms for NP-hard problems: A survey,
Combinatorial Optimization - Eureka, You Shrink!, Springer-Verlag,
2003, Berlin, LNCS 2570, pp. 185–207.
[15] Woeginger, G. J., Space and time complexity of exact algorithms: Some
open problems, Proceedings of IWPEC 2004, Springer-Verlag, 2004,
Berlin, LNCS 3162, pp. 281–290.
8
Download