Countless algorithmic problems in graph theory require to detect a structure with prescribed properties in an input graph. Rather than finding one such object, it is sometimes more desirable to generate all of them. This is for instance useful in certain applications to database search [YYH05], network analysis [GK07], bioinformatics [Mar15a, Dam04], and cheminformatics [Bar93]. Enumeration algorithms for graph problems seem to have been first mentioned in the early 70’s with the pioneer works of Tiernen [Tie70] and Tarjan [Tar73] on cycles in directed graphs and of Akkoyunlu [Akk73]. However, they already appeared in disguise in earlier works [PU59, Mar64]. To this date, several intriguing questions on the topic remain unsolved. We refer the reader to [Mar15b] for a more in-depth introduction to enumeration algorithms and to [Was16] for a listing of enumeration algorithms and problems.
The objects we wish to enumerate in this paper are the (inclusion-wise) minimal dominating sets of a given graph. In general, the number of these objects may grow exponentially with the order of the input graph. Therefore, in stark contrast to decision or optimization problems, looking for a running time polynomially bounded by is not a reasonable, let alone meaningful, efficiency criterion. Rather, we aim here for algorithms whose running time is polynomially bounded by the size of both the input and output data, called output-polynomial algorithms.
Because dominating sets are among the most studied objects in graph theory and algorithms, their enumeration (and counting) have attracted an increasing attention over the past 10 years. The problem of enumerating minimal dominating sets (hereafter referred to as Dom-Enum) has a notable feature: it is equivalent to the extensively studied hypergraph problem Trans-Enum. In Trans-Enum, one is given a hypergraph (i.e. a collection of sets, called hyperedges) and is asked to enumerate all the minimal transversals of (i.e. the inclusion-minimal sets of elements that meet every hyperedge). It is not hard to see that Dom-Enum is a particular case of Trans-Enum: the minimal dominating sets of a graph are exactly the minimal transversals of the hypergraph of closed neighborhoods of . Conversely, Kanté, Limouzy, Mary, and Nourine proved that every instance of Trans-Enum can be reduced to a co-bipartite111The complement of a bipartite graph. instance of Dom-Enum [KLMN14]. Currently, the best output-sensitive algorithm for Trans-Enum is due to Fredman and Khachiyan and runs in quasi-polynomial time [FK96]. It is a long-standing open problem whether this complexity bound can be improved (see for instance the surveys [EG02, EMG08]). Therefore, the equivalence between the two problems is an additional motivation to study Dom-Enum, with the hope that techniques from graph theory will be used to obtain new results on the Trans-Enum problem. So far, output-polynomial algorithms have been obtained for Dom-Enum in several classes of graphs, including planar graphs and degenerate graphs [EGM03], classes of graphs of bounded tree-width, clique-width [Cou09], or mim-width [GHK18], path graphs and line graphs [KLMN12], interval graphs and permutation graphs [KLM13], split graphs [KLM15], graphs of girth at least 7 [GHKV15], chordal graphs [KLM15], and chordal bipartite graphs [GHK16]. A succinct survey of results on Dom-Enum can be found in [KN14]. The authors of [KLM15] state as an open problem the question to design an output-polynomial algorithm for bipartite graphs (the problem also appeared in [KN14, GHK16]). We address this problem with the following result.
There is an output-polynomial time algorithm enumerating minimal dominating sets in triangle-free graphs.
In particular, the result holds for enumerating minimal dominating sets in bipartite graphs.
Our algorithm decomposes the graph by iteratively removing closed neighborhoods in the fashion of [EGM03], then constructs partial minimal dominating sets by adding the neighborhoods back one after the other. It relies on the crucial property that in triangle-free graphs, the generation of all potential extensions of a partial minimal dominating set to a new neighborhood is closely related to the enumeration of minimal dominating sets in split graphs, for which tools have already been developed [KLMN14]. We note that triangle-free graphs already received attention in the context of enumeration of other objects, for instance maximal independent sets [HT93, Bys04], using different techniques.
A natural technique to enumerate valid solutions to a given problem (for instance, sets of vertices satisfying a given property) is to build them element by element. If during the construction one detects that the current partial solution cannot be extended into a valid one, then it can be discarded along with all the other partial solutions that contain it. Note that in order to apply this technique, one should be able to decide whether a given partial solution can be completed into a valid one. It turns out that for minimal dominating sets, this problem (that we will denote by Dcs) is NP-complete [KLMN11], even when restricted to split graphs [KLM15]. We show that it remains NP-complete in bipartite graphs.
Dcs restricted to bipartite graphs is NP-complete.
In particular, Dcs is NP-complete in triangle-free graphs. This suggests that the aforementioned technique is unlikely to be used to improve Theorem 1.1.
All graphs in this paper are finite, undirected, simple, and loopless. If is a graph, then is its set of vertices and is its set of edges. Edges are denoted by (or ) instead of . We assume that vertices are assigned distinct indices; these will be used to choose vertices in a deterministic way, typically selecting the vertex of smallest index. A clique (respectively an independent set) in a graph is a set of pairwise adjacent (respectively non-adjacent) vertices. The subgraph of induced by , denoted by , is the graph ; is the graph .
If the vertex set of a graph can be partitioned into one part inducing a clique and one part inducing an independent set (respectively two independent sets, two cliques), we say that is a split (respectively bipartite, co-bipartite) graph. If is a split graph with clique and stable set and , we use and as shorthands for and , respectively. Graphs where every cycle is of length at least are referred to as triangle-free graphs. If is a function, we write when there is a constant such that .
Neighbors and domination.
Let be a graph and . We note the set of neighbors of in defined by ; is the set of closed neighbors defined by . For a given , we respectively denote by and the sets defined by and . Let be a set of vertices of . We say that is dominating a subset if . It is minimally dominating if no proper subset of dominates . The set is a (minimal) dominating set of if it (minimally) dominates . The set of all minimal dominating sets of is denoted by and the problem of enumerating given is denoted by Dom-Enum. Let . A vertex is said to be a private neighbor of some if . Intuitively, this means that is not dominated by any other vertex of . Note that can be its own private neighbor. The set of private neighbors of in is denoted by and we drop the subscript when it can be inferred from the context. Observe that is a minimal dominating set of if and only if and for every , .
The aim of graph enumeration algorithms is to generate a set of objects related to a graph . We say that an algorithm enumerating with input an -vertex graph is output-polynomial if its running time is polynomially bounded by the size of the input and output data, i.e. . If an algorithm enumerates by spending -time (respectively -time) before it outputs the first element, between two output elements, and after it outputs the last element, then we say that it runs with polynomial delay (respectively linear delay). It is easy to see that every polynomial delay algorithm is also output-polynomial. Note however that some problems have output-polynomial algorithms but no polynomial delay ones, unless P=NP [Str10]. When discussing the space used by an enumeration algorithm, we ignore the space where the solutions are output.
3 Minimal domination in triangle-free graphs
In this section, we give an output-polynomial time algorithm to enumerate minimal dominating sets in triangle-free graphs. The algorithm is inspired from the one of [EGM03] and constructs dominating sets one neighborhood at a time.
A peeling of a graph is a sequence such that , , and for every ,
for some . We call the vertex sequence of the peeling; note that is only known after peeling the whole graph.
In the following, we consider a triangle-free graph and a fixed peeling with vertex sequence . For every , we denote by the set of minimal dominating sets of in . Recall that these sets may contain vertices of , which is a crucial point. Then .
Let and . We denote by the pair where is obtained from by successively removing the vertex of smaller index in satisfying , until no such vertex exists.
Clearly, there is a unique way to build given and . By construction, the obtained set is a minimal dominating set of .
Let and .
If dominates then and .
Otherwise, and .
First note that since , for all . Hence whenever dominates . If does not dominate then does. Moreover, . Since is not connected to any vertex in , it cannot steal any private neighbors to the elements of . Hence for all and . ∎
The relation as introduced in Definition 3 defines a tree on vertex set
with leaves , and root (the empty set being the only dominating set of the empty vertex set ). Our algorithm will search this tree in order to enumerate every minimal dominating set of . Proposition 3 guarantees that for every and every , the pair is the parent of some with (possibly ). Consequently, every branch of the tree leads to a different minimal dominating set of . In particular, for every , we have .
Given a set , we now focus on the enumeration of every such that has for parent. From Proposition 3, we know that either or has for parent. Consequently, we refer to and as the trivial extensions of , and focus on the non-trivial ones.
We call candidate extension of any (inclusion-wise) minimal set such that dominates in , avoiding the trivial cases where . Then, is a candidate extension of if and only if , and, for every , . Note that possibly not all candidate extensions of form with a minimal dominating set of . In fact, there is no guarantee that any candidate extension forms a minimal dominating set of : it might be that has a unique child, given by its trivial extension. We denote by the set of candidate extensions of . We point out that by the minimality assumption, the vertex appears in no element of .
Let and . Then .
We argue that for every there is an element of whose intersection with is precisely . This will prove , hence as desired.
Let . We consider the set , which dominates . By definition of , we have for every . Therefore, every subset of that dominates contains . Consider an inclusion-wise minimal subset of that dominates . We have , hence the conclusion. ∎
Lemma 3 above ensures that is bounded by . Hence, it is reasonable to test each of the candidate extensions even though might be the parent of only one set in . It now suffices to explain how to enumerate to complete the algorithm (formally described in Theorem 3.2).
Let and . We define and . As is triangle-free and is included in the neighborhood of , is an independent set. Let be the split graph obtained from where is completed into a clique; note that the independent set is maximal in since . Recall that for any , we defined and . We set . The following result is implicit in [KLMN14].
Let be a split graph with maximal stable set and clique . Let . Then, if and only if and for all .
Let us assume that for all and that dominates . Then either and also dominates . Or ; in this case because dominates . As , also dominates . The minimality of follows from our first assumption. Hence .
Conversely, let . Clearly , so we suppose by contradiction that for some . By minimality of , we have , which implies . Consequently, we must have . As , there exists a vertex . Since and , we have . However, in this case and so , which contradicts the minimality of . ∎
We now characterize depending on whether has to be dominated by the extension or not. The condition in the statement below prevents from having the trivial extension - in which case it is the only one.
Let , and . Then
either and ,
Let us first consider the case . Let . Since is dominated by any vertex of , only the stable set of is to be dominated by . In other words minimally dominates : and for all . By Proposition 3, , which proves the inclusion . Conversely, let . By Proposition 3, and for all . Since is already dominated by , . Hence , as desired.
From now on and until the end of the proof we assume that . Let denote the vertex set of the clique of . Let . We know that must be a dominating set of . Indeed, by definition of , dominates , and either , in which case also dominates , or and also dominates since . There are two cases to consider.
If is a minimal dominating set of , then since has to dominate , we have and consequently .
Otherwise, is not a minimal dominating set of . This implies that it has a vertex with no private neighbor in . By definition of , this means that . Therefore there is exactly one such vertex. Then, if we write , is a minimal dominating set of . Since is a private neighbor of , we must have , and consequently . Finally, by definition of , for any , we have . This shows that we have
and proves the following inclusion:
To prove the reverse inclusion, we first consider . By Proposition 3, and for all . Since , . Thus . Now we consider a set of the form , for some and such that . By Proposition 3, for all . Since for all and , for all . Since , . This proves the reverse inclusion and concludes the proof. ∎
In [KLMN14], authors give a polynomial delay algorithm to enumerate minimal dominating sets in split graphs.
Theorem 3.1 ([Klmn14]).
There is an algorithm that, given a split graph with vertices and edges, outputs with delay every minimal dominating set of , using space.
The above algorithm relies on the observation that for every split graph , the set is in bijection with and it forms an independent set system. A family of sets is an independent set system if implies that for all . We show that there is a polynomial delay algorithm to enumerate given and using the same observations.
Let be a split graph with maximal stable set and clique and let be a minimal dominating set of . Then .
Let be a split graph with maximal stable and clique . Then:
and are in bijection,
is an independent set system.
There is an algorithm that, given and , enumerates in output-polynomial time and using at most space.
Lemma 3 allows us to consider two cases depending on whether has a neighbor in or not. Let . As usual we denote by and the maximal stable set and the clique of , respectively.
In the case where , we start enumerating . This can be done with polynomial delay and space as in the proof of Theorem 3.1, using the fact that is an independent set system and that testing if an arbitrary set belongs to can be done in polynomial time using Lemma 3. That is, we construct elements of from the empty set to every inclusion-wise maximal . Repetitions are avoided using a linear ordering on vertices of ; see [KLMN14] for details. Then, for every element output by the above algorithm, we check in polynomial time if it dominates . If it does not, then we extend into its unique corresponding minimal dominating set such that (i.e. ), and output . Otherwise, for every such that for all , (which can be tested in time polynomial in the order of ), we output . Lemma 3 guarantees that the above algorithm indeed outputs .
Note that the only elements which do not lead to an element of are the for which no vertex satisfies the desired conditions. However, we will show that . Indeed, consider the map that, given removes one arbitrary vertex from , and completes the dominating set by adding the vertices in the independent set which are no longer dominated. Then, maps elements of , to the set . Moreover, every element in this second set is the image of at most elements by . This implies the desired bound.
Consequently, this means that while enumerating , we might throw out a fraction at most of all the solutions we found which do not lead to elements in . This shows that the algorithm has output-polynomial time. ∎
We are now ready to prove Theorem 1.1, that we restate here in a more accurate form.
There is an algorithm that, given a triangle-free graph on vertices, outputs in total time and using at most space.
We first arbitrarily choose a peeling of our input graph with vertex sequence . This takes time .
Recall that the relation defines a tree on vertex set
with leaves and root . Let us describe how to enumerate the children in of for every given vertex . If dominates , then is the only pair whose parent is . Otherwise, we proceed as follows:
output the trivial child ;
start (or resume, if it had already been started) the algorithm of Lemma 3 and pause it after one element of has been output;
if is not a minimal dominating set of in , or if it is but , discard and loop to (2);
output and loop to (2).
In order to enumerate , i.e. the set of leaves of , we perform a DFS and output each visited leaf. For each vertex of , enumerating its children can be done in at most steps with the above algorithm, according to Lemmas 3 and 3. Besides, the number of vertices of at distance from the root is at most its number of leaves, hence has at most vertices. Therefore we can enumerate in steps. Regarding the space, we observe that whenever we visit a vertex, we do not need to compute the whole set of its children. Instead, it is enough in order to continue the DFS to compute the next unvisited child only, which can be done using the algorithm above (and pausing it afterward). Therefore, when we visit some , we only need to store the data of the (paused) algorithms enumerating the children of the ancestors of and the data of the algorithm enumerating the children of , i.e. space. Therefore the described algorithm uses polynomial space, as claimed. ∎
4 The extension problem is hard in bipartite graphs
We recall that Dcs denotes the problem of deciding, given a graph and a set , whether there exists a minimal dominating set of such that . This problem is known to be NP-complete for general graphs [KLMN11]. It has later been proved that the variant where we search for a minimal dominating set containing , and avoiding a given vertex set remains intractable even on split graphs [KLM15]. We show that Dcs is still hard for bipartite graphs and thus triangle-free graphs. As a consequence, one cannot expect to improve Theorem 1.1 by testing if subsets of can be extended into minimal dominating sets of . The following is a restatement of Theorem 1.2.
Dcs restricted to bipartite graphs is NP-complete.
Since Dcs is NP-complete in the general case, it is clear that Dcs is in NP even when restricted to bipartite graphs. Let us now present a reduction from SAT.
Given an instance of SAT with variables and clauses , we construct a bipartite graph and a set such that there exists a minimal dominating set containing if and only if there exists a truth assignment that satisfies all the clauses. The graph has vertex partition , defined as follows.
The first part contains two special vertices and , and for every variable , one vertex for each of the literals and . The second part contains one vertex per clause , one vertex per variable , and two special vertices and . For every we make adjacent to the two literals and and for every we make adjacent to and to every literal contains. Finally, we add edges to form the path and set . Clearly this graph can be constructed in polynomial time from . The construction is illustrated in Figure 1.
Let us show that can be extended into a minimal dominating set of if and only if has a truth assignment that satisfies all the clauses. The proof is split into two claims. A partial assignment of is a truth assignment of a subset of the variables . Observe that a partial assignment may satisfy all the clauses (i.e. the values of the non-assigned variables do not matter). A partial assignment that satisfies all the clauses is called a minimal assignment if no proper subset of the assigned variables admits such a partial assignment.
Let be a set containing at most one literal for each variable. Then minimally dominates if and only if its elements form a minimal assignment of .
Proof of Claim 4..
Let be as above and let . Since , the set contains a neighbor of . By construction, is a literal appearing in . Hence a partial assignment of the variables of satisfying all its clauses is given by the literals present in . Moreover, has a private neighbor , by minimality of . The assignment given by is hence minimal: not specifying the value of the variable of would leave the clause unsatisfied.
If is a minimal dominating set of containing , then and it contains at most one literal for each variable.
Proof of Claim 4..
Notice that . If belongs to for some , then , a contradiction to the minimality of . For similar reasons . Hence . Besides, for every , contains at most one of and , as otherwise would be empty, again contradicting the minimality of . This proves the claim.
If can be extended into a minimal dominating set of , then by combining the two claims above, we deduce that has truth assignment that satisfies all clauses. Conversely, if has such a truth assignment, then there is a set as in the statement of Claim 4. In , every element of has a private neighbor, as a consequence of the minimality of and the fact that no element of has a neighbor among the clause variables. Besides, each of has a private neighbor (because contains at most one of the two literals for each variable) and it is easy to see that the same holds for and . Hence is a minimal dominating set of .
Given an instance of SAT, we constructed in polynomial time an instance of Dcs that is equivalent to . This proves that Dcs is NP-hard. ∎
In this paper, we proved that the set of minimal dominating sets of a graph can be enumerated in output-polynomial time in triangle-free graphs, and hence in bipartite graphs. It remains open whether a polynomial delay algorithm exists for these classes.
The most general open problem on the topic discussed in this paper is whether the minimal dominating sets of a co-bipartite graph can be enumerated in output-polynomial time. Indeed, as noted in the introduction this would imply that such an algorithm also exists for the general case. Other classes where no output-polynomial time algorithms are known include unit disk graphs and graphs of bounded expansion, according to [KN14, GHK16].
The authors wish to thank Paul Ouvrard for extensive discussions on the topic of this paper. We also gratefully acknowledge support from Nicolas Bonichon and the Simon family for the organization of the Pessac Graph Workshop, where this research was done. Last but not least, we thank Peppie for her unwavering support during the work sessions.
- [Akk73] Eralp Abdurrahim Akkoyunlu. The enumeration of maximal cliques of large graphs. SIAM Journal on Computing, 2(1):1–6, 1973.
- [Bar93] John M. Barnard. Substructure searching methods: Old and new. Journal of Chemical Information and Computer Sciences, 33(4):532–538, 1993.
- [Bys04] Jesper Makholm Byskov. Enumerating maximal independent sets with applications to graph colouring. Operations Research Letters, 32(6):547–556, 2004.
- [Cou09] Bruno Courcelle. Linear delay enumeration and monadic second-order logic. Discrete Applied Mathematics, 157(12):2675–2700, 2009.
- [Dam04] Peter Damaschke. Parameterized enumeration, transversals, and imperfect phylogeny reconstruction. In Rod Downey, Michael Fellows, and Frank Dehne, editors, Parameterized and Exact Computation, pages 1–12, Berlin, Heidelberg, 2004. Springer Berlin Heidelberg.
Thomas Eiter and Georg Gottlob.
Hypergraph transversal computation and related problems in logic and
European Workshop on Logics in Artificial Intelligence, pages 549–564. Springer, 2002.
- [EGM03] Thomas Eiter, Georg Gottlob, and Kazuhisa Makino. New results on monotone dualization and generating hypergraph transversals. SIAM Journal on Computing, 32(2):514–537, 2003. arxiv:cs/0204009.
- [EMG08] Thomas Eiter, Kazuhisa Makino, and Georg Gottlob. Computational aspects of monotone dualization: A brief survey. Discrete Applied Mathematics, 156(11):2035--2049, 2008.
- [FK96] Michael L. Fredman and Leonid Khachiyan. On the complexity of dualization of monotone disjunctive normal forms. Journal of Algorithms, 21(3):618--628, 1996.
- [GHK16] Petr A. Golovach, Pinar Heggernes, Mamadou M. Kanté, Dieter Kratsch, and Yngve Villanger. Enumerating minimal dominating sets in chordal bipartite graphs. Discrete Applied Mathematics, 199:30 -- 36, 2016. Special Issue: Sixth Workshop on Graph Classes, Optimization, and Width Parameters 2013.
- [GHK18] Petr A. Golovach, Pinar Heggernes, Mamadou Moustapha Kanté, Dieter Kratsch, Sigve H. Sæther, and Yngve Villanger. Output-polynomial enumeration on graphs of bounded (local) linear mim-width. Algorithmica, 80(2):714--741, Feb 2018. arxiv:1509.03753.
- [GHKV15] Petr A. Golovach, Pinar Heggernes, Dieter Kratsch, and Yngve Villanger. An incremental polynomial time algorithm to enumerate all minimal edge dominating sets. Algorithmica, 72(3):836--859, Jul 2015.
- [GK07] Joshua A. Grochow and Manolis Kellis. Network motif discovery using subgraph enumeration and symmetry-breaking. In Annual International Conference on Research in Computational Molecular Biology, pages 92--106. Springer, 2007.
- [HT93] Mihály Hujtera and Zsolt Tuza. The number of maximal independent sets in triangle-free graphs. SIAM Journal on Discrete Mathematics, 6(2):284--288, 1993.
- [KLM13] Mamadou Moustapha Kanté, Vincent Limouzy, Arnaud Mary, Lhouari Nourine, and Takeaki Uno. On the enumeration and counting of minimal dominating sets in interval and permutation graphs. In International Symposium on Algorithms and Computation, pages 339--349. Springer, 2013.
- [KLM15] Mamadou Moustapha Kanté, Vincent Limouzy, Arnaud Mary, Lhouari Nourine, and Takeaki Uno. A polynomial delay algorithm for enumerating minimal dominating sets in chordal graphs. In International Workshop on Graph-Theoretic Concepts in Computer Science, pages 138--153. Springer, 2015. arxiv:1407.2036.
- [KLMN11] Mamadou Moustapha Kanté, Vincent Limouzy, Arnaud Mary, and Lhouari Nourine. Enumeration of minimal dominating sets and variants. In International Symposium on Fundamentals of Computation Theory, pages 298--309. Springer, 2011. arxiv:1407.2053.
- [KLMN12] Mamadou Moustapha Kanté, Vincent Limouzy, Arnaud Mary, and Lhouari Nourine. On the neighbourhood helly of some graph classes and applications to the enumeration of minimal dominating sets. In International Symposium on Algorithms and Computation, pages 289--298. Springer, 2012.
- [KLMN14] Mamadou Moustapha Kanté, Vincent Limouzy, Arnaud Mary, and Lhouari Nourine. On the enumeration of minimal dominating sets and related notions. SIAM Journal on Discrete Mathematics, 28(4):1916--1929, 2014. arxiv:1407.2053.
- [KN14] Mamadou Moustapha Kanté and Lhouari Nourine. Minimal dominating set enumeration. In Ming-Yang Kao, editor, Encyclopedia of Algorithms, pages 1--5. Springer US, Boston, MA, 2014.
- [Mar64] M. P. Marcus. Derivation of maximal compatibles using boolean algebra. IBM Journal of Research and Development, 8(5):537--538, Nov 1964.
- [Mar15a] Andrea Marino. An application: Biological graph analysis. In Analysis and Enumeration: Algorithms for Biological Graphs, pages 37--44. Atlantis Press, Paris, 2015.
- [Mar15b] Andrea Marino. Enumeration algorithms. In Analysis and Enumeration: Algorithms for Biological Graphs, pages 13--35. Atlantis Press, Paris, 2015.
- [PU59] M. C. Paull and S. H. Unger. Minimizing the number of states in incompletely specified sequential switching functions. IRE Transactions on Electronic Computers, EC-8(3):356--367, Sept 1959.
- [Str10] Yann Strozecki. Enumeration complexity and matroid decomposition. PhD thesis, Paris 7, 2010.
- [Tar73] Robert Tarjan. Enumeration of the elementary circuits of a directed graph. SIAM Journal on Computing, 2(3):211--216, 1973.
- [Tie70] James C. Tiernan. An efficient search algorithm to find the elementary circuits of a graph. Communications of the ACM, 13(12):722--726, 1970.
- [Was16] Kunihiro Wasa. Enumeration of enumeration algorithms. Preprint arxiv:1605.05102, 2016. See also https://kunihirowasa.github.io/enum/index (accessed on September 2018).
- [YYH05] Xifeng Yan, Philip S. Yu, and Jiawei Han. Substructure similarity search in graph databases. In Proceedings of the 2005 ACM SIGMOD international conference on Management of data, pages 766--777. ACM, 2005.