# Enumerating minimal dominating sets in triangle-free graphs

It is a long-standing open problem whether the minimal dominating sets of a graph can be enumerated in output-polynomial time. In this paper we prove that this is the case in triangle-free graphs. This answers a question of Kanté et al. Additionally, we show that deciding if a set of vertices of a bipartite graph can be completed into a minimal dominating set is a NP-complete problem.

## Authors

• 24 publications
• 10 publications
• 12 publications
• 6 publications
• ### Complexity of fall coloring for restricted graph classes

We strengthen a result by Laskar and Lyle (Discrete Appl. Math. (2009), ...
05/12/2019 ∙ by Juho Lauri, et al. ∙ 0

• ### Enumerating minimal dominating sets in the (in)comparability graphs of bounded dimension posets

Enumerating minimal transversals in a hypergraph is a notoriously hard p...
04/15/2020 ∙ by Marthe Bonamy, et al. ∙ 0

• ### Maximum Weight Independent Sets for (S_1,2,4,Triangle)-Free Graphs in Polynomial Time

The Maximum Weight Independent Set (MWIS) problem on finite undirected g...
06/22/2018 ∙ by Andreas Brandstädt, et al. ∙ 0

• ### Upper paired domination versus upper domination

A paired dominating set P is a dominating set with the additional proper...

• ### Counting Minimal Transversals of β-Acyclic Hypergraphs

We prove that one can count in polynomial time the number of minimal tra...
08/15/2018 ∙ by Benjamin Bergougnoux, et al. ∙ 0

• ### On the Enumeration of Minimal Hitting Sets in Lexicographical Order

It is a long-standing open problem whether there exists an output-polyno...
05/03/2018 ∙ by Thomas Bläsius, et al. ∙ 0

• ### On the maximum number of minimal connected dominating sets in convex bipartite graphs

The enumeration of minimal connected dominating sets is known to be noto...
08/06/2019 ∙ by Mohamed Yosri Sayadi, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

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.

###### Theorem 1.1.

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.

###### Theorem 1.2.

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.

The paper is organized as follows. In Section 2 we give the necessary definitions. We prove Theorems 1.1 and 1.2 in Sections 3 and 4, respectively. We conclude with possible future research directions in Section 5.

## 2 Preliminaries

### Graphs.

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 , .

### Enumeration.

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 ,

 Vi−1=Vi∖N[vi]

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 .

###### Definition .

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 .

###### Proposition .

Let and .
If dominates then and .
Otherwise, and .

###### Proof.

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

 p⋃i=0{(D,i)∣i∈{1,…,p}, D∈D(G,i)},

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 .

###### Proof.

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].

###### Proposition .

Let be a split graph with maximal stable set and clique . Let . Then, if and only if and for all .

###### Proof.

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.

###### Lemma .

Let , and . Then

• either and ,

• or and

 C(D∗,i)=(D(Z)∖DS=∅(Z))∪⎧⎪⎨⎪⎩Q∪{u}∣∣ ∣ ∣∣Q∈DS=∅(Z),u∈N(vi+1), and∀x∈Q, Priv(Q∪{u},x)∩Vi+1≠∅⎫⎪⎬⎪⎭.
###### Proof.

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

 X∈⎧⎪⎨⎪⎩Q∪{u}∣∣ ∣ ∣∣Q∈DS=∅(Z),u∈N(vi+1), and∀x∈Q, Priv(Q∪{u},x)∩Vi+1≠∅⎫⎪⎬⎪⎭, (1)

and proves the following inclusion:

 C(D∗,i)⊆(D(Z)∖DS=∅(Z))∪⎧⎪⎨⎪⎩Q∪{u}∣∣ ∣ ∣∣Q∈DS=∅(Z),u∈N(vi+1), and∀x∈Q, Priv(Q∪{u},x)∩Vi+1≠∅⎫⎪⎬⎪⎭.

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.

###### Proposition ([Klmn14]).

Let be a split graph with maximal stable set and clique and let be a minimal dominating set of . Then .

###### Proposition ([Klmn14]).

Let be a split graph with maximal stable and clique . Then:

1. ,

2. and are in bijection,

3. is an independent set system.

###### Lemma .

There is an algorithm that, given and , enumerates in output-polynomial time and using at most space.

###### Proof.

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.

If , then by Lemma 3 , and we can enumerate the elements of with polynomial delay using the algorithm of Theorem 3.1 on .

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.

###### Theorem 3.2.

There is an algorithm that, given a triangle-free graph on vertices, outputs in total time and using at most space.

###### Proof.

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

 p⋃i=0{(D,i)∣i∈{1,…,p}, D∈D(G,i)},

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:

1. output the trivial child ;

2. start (or resume, if it had already been started) the algorithm of Lemma 3 and pause it after one element of has been output;

3. if is not a minimal dominating set of in , or if it is but , discard and loop to (2);

4. output and loop to (2).

The algorithm terminates when the algorithm of Lemma 3 in step (2) completes the enumeration of . The correctness of the algorithm is a consequence of the following inclusions:

 {D∈D(G,i+1)∣Parent(D,i+1)=(D∗,i)}⊆ {D∈D(G,i+1)∣D∗⊆D} ⊆ {D∗∪X∣X∈C(D∗,i)} ∪{D∗∪{vi+1}} ∪{D∗}

Notice that it uses at most space, since we only store the data of the algorithm of Lemma 3, of size at most , and the data to perform step (3), which is clearly also polynomial in .

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.

###### Theorem 4.1.

Dcs restricted to bipartite graphs is NP-complete.

###### Proof.

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.

###### Claim .

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.

###### Claim .

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. ∎

## 5 Conclusion

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].

## Acknowledgements

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.