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


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 [29], network analysis [13], bioinformatics [22,5], and cheminformatics [2].Enumeration algorithms for graph problems seem to have been first mentioned in the early 70's with the pioneer works of Tiernen [27] and Tarjan [26] on cycles in directed graphs and of Akkoyunlu [1].However, they already appeared in disguise in earlier works [24,21].To this date, several intriguing questions on the topic remain unsolved.We refer the reader to [23] for a more in-depth introduction to enumeration algorithms and to [28] for a listing of enumeration algorithms and problems.

Preliminaries
Graphs.All graphs in this paper are finite, undirected, simple, and loopless.If G is a graph, then V (G) is its set of vertices and E(G) ⊆ V (G) 2 is its set of edges.Edges are denoted by xy (or yx) instead of {x, y}.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 G is a set of pairwise adjacent (respectively non-adjacent) vertices.The subgraph of G induced by X ⊆ V (G), denoted by If the vertex set of a graph G 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 G is a split (respectively bipartite, co-bipartite) graph.Graphs where every cycle is of length at least 4 are referred to as triangle-free graphs.If f is a function, we write f (n) = poly n when there is a constant c ∈ N such that f (n) = O(n c ).

Neighbors and domination.
Let G be a graph and x ∈ V (G).We note N (x) the set of neighbors of x in G defined by Intuitively, this means that y is not dominated by any other vertex of S. Note that x can be its own private neighbor.The set of private neighbors of x ∈ S in G is denoted by Priv G (S, x) and we drop the subscript when it can be inferred from the context.Observe that S is a minimal dominating set of G if and only if V (G) ⊆ N [S] and for every x ∈ S, Priv(S, x) = ∅.
Enumeration.The aim of graph enumeration algorithms is to generate a set of objects X (G) related to a graph G.We say that an algorithm enumerating X (G) with input an n-vertex graph G is output-polynomial if its running time is polynomially bounded by the size of the input and output data, i.e. n + |X (G)|.If an algorithm enumerates X (G) by spending poly(n)-time (respectively O(n)-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 S TA C S 2 0 1 9

16:4
Enumerating Minimal Dominating Sets in Triangle-Free Graphs (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 [25].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 by the one of [7] and constructs dominating sets one neighborhood at a time.
A peeling of a graph G is a sequence (V 0 , . . ., V p ) such that V p = V (G), V 0 = ∅, and for every i ∈ {1, . . ., p}, for some v i ∈ V i .We call (v 1 , . . ., v p ) the vertex sequence of the peeling; note that p is only known after peeling the whole graph.
In the following, we consider a triangle-free graph G and a fixed peeling (V 0 , . . ., V p ) with vertex sequence (v 1 , . . ., v p ).For every i ∈ {0, . . ., p}, we denote by D(G, i) the set of minimal dominating sets of V i in G. Recall that these sets may contain vertices of G − V i , which is a crucial point.Then D(G, p) = D(G).Clearly, there is a unique way to build Parent(D, i + 1) given D and i.By construction, the obtained set D * is a minimal dominating set of V i .Hence every set in D(G, i + 1) can be obtained by completing some D * in D(G, i); we develop this point below.
it cannot steal any private neighbors to the elements of D * .Hence Priv(D, x) ∩ V i+1 = ∅ for all x ∈ D. Now, remark that since v i+1 does not steal private neighbors to the elements of D * , it is indeed itself the only node with no privates in V i and is removed by the parent function.Hence The Parent relation as introduced in Definition 3 defines a tree on vertex set and root (∅, 0) (the empty set being the only dominating set of the empty vertex set V 0 ).Our algorithm will search this tree in order to enumerate every minimal dominating set of G. Proposition 4 guarantees that for every i < p and every D * ∈ D(G, i), the pair (D * , i) is the parent of some (D, i + 1) with D ∈ D(G, i + 1) (possibly D = D * ).Consequently, every branch of the tree leads to a different minimal dominating set of G.In particular, for every i < p, we have Given a set D * ∈ D(G, i), we now focus on the enumeration of every D ∈ D(G, i + 1) such that (D, i + 1) has (D * , i) for parent.From Proposition 4, we know that either (D * , i + 1) or (D * ∪ {v i+1 }, i + 1) has (D * , i) for parent.Consequently, we refer to X = ∅ and X = {v i+1 } as the trivial extensions of (D * , i), and focus on the non-trivial ones.
We call candidate extension of (D * , i) any (inclusion-wise) minimal set X ⊆ V (G) such that D * ∪ X dominates V i+1 in G, avoiding the trivial cases where X ∈ {∅, {v i+1 }}.Then, X is a candidate extension of (D * , i) if and only if X ∈ {∅, {v i+1 }}, V i+1 ⊆ N [D * ∪ X] and, for every x ∈ X, Priv(D * ∪ X, x) ∩ V i+1 = ∅.Note that possibly not all candidate extensions of (D * , i) form with D * a minimal dominating set of V i+1 .In fact, there is no guarantee that any candidate extension forms a minimal dominating set of V i+1 : it might be that (D * , i) has a unique child, given by its trivial extension.We denote by C(D * , i) the set of candidate extensions of (D * , i).We point out that by the minimality assumption, the vertex v i+1 appears in no element of C(D * , i), as v i+1 itself is a trivial extension.
Proof.We argue that for every X ∈ C(D * , i) there is an element of D(G, i + 1) whose intersection with Let X ∈ C(D * , i).We consider the set X ∪ D * , which dominates V i+1 .By definition of C(D * , i), we have Priv(X ∪ D * , x) ∩ V i+1 = ∅ for every x ∈ X.Therefore, every subset of X ∪ D * that dominates V i+1 contains X.Consider an inclusion-wise minimal subset D of X ∪ D * that dominates V i+1 .We have X ⊆ D , hence the conclusion.
Lemma 5 above ensures that C(D * , i) is bounded by D(G).Hence, it is reasonable to test each of the candidate extensions even though D * might be the parent of only one set in D(G, i + 1).It now suffices to explain how to efficiently enumerate C(D * , i) to complete the algorithm (formally described in Theorem 12).
Let i ∈ {0, . . ., p − 1} and D * ∈ D(G, i).We define As G is triangle-free and S is included in the neighborhood of v i+1 , S is an independent set.Let Z i D * be the split graph obtained from G[C ∪ S] where C is completed into a clique; note that the independent set S is maximal in The following result is implicit in [17].
Proposition 6.Let H be a split graph with maximal stable set S and clique C. Let X ⊆ V (H).Then, X ∈ D(H) if and only if S ⊆ N [X] and Priv(X, x) ∩ S = ∅ for all x ∈ X.
Proof.Let us assume that S ⊆ N [X] and Priv(X, x) ∩ S = ∅ for all x ∈ X.Then, either X ∩ C = ∅ or X ∩ C = ∅.In the first case, X dominates C. In the other case, X = S because S ⊆ N [X] and V (H) = C ∪ S. Remark that C ⊆ N (S) as S is assumed maximal.Hence, X also dominates C. The minimality of X follows from our first assumption.Hence X ∈ D(H).
Conversely, let X ∈ D(H).Clearly N [X] ⊇ S, so we suppose by contradiction that Priv(X, x) ∩ S = ∅ for some x ∈ X.By minimality of X, we have Priv(X, x) = ∅, which implies Priv(X, x) ⊆ C. Consequently, we must have X ∩ C = {x}, or else x ∈ S but is not its own private, in which case it must have a neighbor in C which contradicts Priv(X, x) = ∅.As C ⊆ N (S), there exists some vertex y ∈ S ∩ N (x).Since y ∈ Priv(X, x) and X ∩ C = {x}, we have y ∈ X.However, in this case N [y] ⊆ N [x] and so Priv(X, y) = ∅, which contradicts the minimality of X.

S TA C S 2 0 1 9 16:6 Enumerating Minimal Dominating Sets in Triangle-Free Graphs
We now characterize C(D * , i) depending on whether v i+1 has to be dominated by the extension or not.The condition D * ∈ D(G, i) \ D(G, i + 1) in the statement below prevents (D * , i) from having the trivial extension ∅ -in which case it is the only one.
), only the stable set S of Z is to be dominated by X.In other words X minimally dominates S: S ⊆ N [X] and Priv(X, x) ∩ S = ∅ for all x ∈ X.By Proposition 6, X ∈ D(Z), which proves the inclusion C(D * , i) ⊆ D(Z).Conversely, let X ∈ D(Z).By Proposition 6, S ⊆ N [X] and Priv(X, x) ∩ S = ∅ for all x ∈ X.Since v i+1 is already dominated by D * , X ∈ C(D * , i).Hence C(D * , i) = D(Z), as desired.
From now on and until the end of the proof we assume that D * ∩ N (v i+1 ) = ∅.Let C denote the vertex set of the clique of Z.Let X ∈ C(D * , i).We know that X must be a dominating set of Z. Indeed, by definition of C(D * , i), X dominates S, and either X ∩ C = ∅, in which case X also dominates C, or X = S and X also dominates C since C ⊆ N (S).There are two cases to consider.
If X is a minimal dominating set of Z, then since X has to dominate v i+1 , we have Otherwise, X is not a minimal dominating set of Z.This implies that it has a vertex u with no private neighbor in Z.By definition of C(D * , i), this means that Priv(D * ∪ X, u) ∩ V i+1 = {v i+1 }.Therefore there is exactly one such vertex.Then, if we write Q = X \ {u}, Q is a minimal dominating set of Z. Since v i+1 is a private neighbor of u, we must have Q ∩ S = ∅, and consequently Q ∈ D S=∅ (Z).Finally, by definition of C(D * , i), for any x ∈ Q ⊂ X, we have Priv(X, x) ∩ V i+1 = ∅.This shows that we have and proves the following inclusion: To prove the reverse inclusion, we first consider X ∈ D(Z) \ D S=∅ (Z).By Proposition 6, S ⊆ N [X] and Priv(X, x) This proves the reverse inclusion and concludes the proof.
In [17], authors give a polynomial delay algorithm to enumerate minimal dominating sets in split graphs.

Theorem 8 ([17]
).There is an algorithm that, given a split graph H with n vertices and m edges, outputs with O(n + m) delay every minimal dominating set of H, using O(n 2 ) space.
The above algorithm relies on the observation that for every split graph H, the set D C (H) = {D C | D ∈ D(H)} is in bijection with D(H) and it forms an independence system.A family of sets S is an independence system if S ∈ S implies that S \ {s} ∈ S for all s ∈ S. We show that there is a polynomial delay algorithm to enumerate C(D * , i) given i ∈ {1, . . ., p − 1} and D * ∈ D(G, i) using the same observations.Proposition 9 ([17]).Let H be a split graph with maximal stable set S and clique C and let D be a minimal dominating set of H. Then D S = S \ N (D C ).

Proposition 10 ([17]
).Let H be a split graph with maximal stable S and clique C. Then: In the case where D * ∩ N (v i+1 ) = ∅, we start enumerating D C (Z).This can be done with polynomial delay and space as in the proof of Theorem 8, using the fact that D C (Z) is an independence system and that testing if an arbitrary set A belongs to D C (Z) can be done in polynomial time using Lemma 10.That is, we construct elements of D C (Z) from the empty set to every inclusion-wise maximal A ∈ D C (Z). Repetitions are avoided using a linear ordering on vertices of C; see [17] for details.Then, for every set A ∈ D C (Z) output by the above algorithm, we check in polynomial time if it dominates Z.If it does not, then we extend A into its unique corresponding minimal dominating set D ∈ D(Z) such that D ∩ C = A (i.e.D = A ∪ S \ N (A)), and output D. Otherwise, for every u ∈ N (v i+1 ) such that for all x ∈ A, Priv(A ∪ {u}, x) ∩ V i+1 = ∅ (which can be tested in time polynomial in the order of Z), we output A ∪ {u}.Lemma 7 guarantees that the above algorithm indeed outputs C(D * , i).
Note that the only elements D ∈ D(Z) which do not lead to an element of C(D * , i) are the D ∈ D S=∅ (Z) for which no vertex u ∈ N (v i+1 ) satisfies the desired conditions.However, we will show that |D S=∅ (Z)| ≤ n|D(Z) \ D S=∅ (Z)|.Indeed, consider the map f that, given D ∈ D S=∅ (Z) removes one arbitrary vertex from D, and completes the dominating set by adding the vertices in the independent set which are no longer dominated.Then, f maps elements of D S=∅ (Z), to the set D(Z) \ D S=∅ (Z).Moreover, every element in this second set is the image of at most |C| ≤ n elements by f .This implies the desired bound.
Consequently, this means that while enumerating D(Z), we might throw out a fraction at most n n+1 of all the solutions we found which do not lead to elements in C(D * , i).This shows that the algorithm has output-polynomial time.
We are now ready to prove Theorem 1, that we restate here in a more accurate form.Proof.We first arbitrarily choose a peeling (V 0 , . . ., V p ) of our input graph G with vertex sequence (v 1 , . . ., v p ).This takes time poly n.
Recall that the Parent relation defines a tree T on vertex set Notice that it uses at most poly n space, since we only store the data of the algorithm of Lemma 11, of size at most poly n, and the data to perform step (3), which is clearly also polynomial in n.
In order to enumerate D(G), i.e. the set of leaves of T , we perform a DFS and output each visited leaf.For each vertex of T , enumerating its children can be done in at most poly(n) • |D(G)| steps with the above algorithm, according to Lemmas 5 and 11.Besides, the number of vertices of T at distance i from the root is at most its number of leaves, hence T has at most O(n • |D(G)|) vertices.Therefore we can enumerate D(G) in poly(n) • |D(G)| 2 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 (D, i) ∈ V (T ), we only need to store the data of the i − 1 (paused) algorithms enumerating the children of the ancestors of (D, i) and the data of the algorithm enumerating the children of D, i.e. i • poly n 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 G and a set A ⊆ V (G), whether there exists a minimal dominating set D of G such that A ⊆ D. This problem is known to be NP-complete for general graphs [15].It has later been proved that the variant where we search for a minimal dominating set containing A, and avoiding a given vertex

Definition 3 .
Let i ∈ {0, . . ., p − 1} and D ∈ D(G, i + 1).We denote by Parent(D, i + 1) the pair (D * , i) where D * is obtained from D by successively removing the vertex x of smaller index in D satisfying Priv(D, x) ∩ V i = ∅, until no such vertex exists.

2 .
D C (H) and D(H) are in bijection, 3. D C (H) is an independence system.Lemma 11.There is an algorithm that, given i ∈ {0, . . ., p − 1} and D * ∈ D(G, i), enumerates C(D * , i) in output-polynomial time O(poly(n) • |C(D * , i)|) and using at most poly(|V (G)|) space.Proof.Lemma 7 allows us to consider two cases depending on whether v i+1 has a neighbor in D * or not.Let Z = Z i D * .As usual we denote by S and C the maximal stable set and the clique of Z, respectively.If D * ∩ N (v i+1 ) = ∅, then by Lemma 7 C(D * , i) = D(Z), and we can enumerate the elements of C(D * , i) with polynomial delay using the algorithm of Theorem 8 on D(Z).

12 .
There is an algorithm that, given a triangle-free graph G on n vertices, outputs D(G) in total time poly(n) • |D(G)| 2 and using at most poly n space.
(2), D ∈ D(G, i)}, with leaves {(D, p) | D ∈ D(G)} and root (∅, 0).Let us describe how to enumerate the children in T of (D * , i) for every given vertex D* ∈ D(G, i).If D * dominates V i+1 , then (D * , i + 1)is the only pair whose parent is (D * , i).Otherwise, we proceed as follows:1.outputthetrivialchildD * ∪ {v i+1 }; 2. start (or resume, if it had already been started) the algorithm of Lemma 11 and pause it after one element X of C(D * , i) has been output;3.ifD*∪X is not a minimal dominating set of V i+1 in G, or if it is but Parent(D * ∪X, i+1) = (D * , i), discard X and loop to (2); 4. output D * ∪ X and loop to(2).The algorithm terminates when the algorithm of Lemma 11 in step (2) completes the enumeration of C(D * , i).The correctness of the algorithm is a consequence of the following inclusions: