 # Experimental evaluation of kernelization algorithms to Dominating Set

The theoretical notions of graph classes with bounded expansion and that are nowhere dense are meant to capture structural sparsity of real world networks that can be used to design efficient algorithms. In the area of sparse graphs, the flagship problems are Dominating Set and its generalization r-Dominating Set. They have been precursors for model checking of first order logic on sparse graph classes. On class of graphs of bounded expansions the r-Dominating Set problem admits a constant factor approximation, a fixed-parameter algorithm, and an efficient preprocessing routine: the so-called linear kernel. This should be put in constrast with general graphs where Dominating Set is APX-hard and W-complete. In this paper we provide an experimental evaluation of kernelization algorithm for Dominating Set in sparse graph classes and compare it with previous approaches designed to the preprocessing for Dominating Set.

## Authors

##### This week in AI

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

## 1 Kernelization of Dominating Set

In the -Dominating Set problem, we are given a graph and a parameter . Our goal is to find smallest size of a set of vertices such that for every vertex there exists a vertex such that the distance between and in is at most . Sets fulfilling this condition (not necessarily with the smallest size) will be called dominating sets. Dominating Set problem is a special case of this problem where . In decision versions of this problem we take additional parameter in input and are asked whether size of smallest possible dominating set is at most .

In arbitrary graphs the Dominating Set problem on -vertex graphs is unlikely to be approximable in polynomial time within factor for any  , -hard when parameterized by the solution size  (and thus unlikely to be fixed-parameter tractable), and does not admit an algorithm running in time for any unless the Strong Exponential Time Hypothesis fails . This is in stark contrast with planar graphs where Dominating Set admits a PTAS via the classic Baker’s technique, is fixed-parameter tractable purely due to the degeneracy of planar graphs , and — what is most relevant for this work — admits an efficient preprocessing routine: the so-called linear kernel . That is, one can in polynomial time compress an input to the (decision version of the) Dominating Set problem on planar graphs to an equivalent instance with and .

The preprocessing routine of  consists of a number of relatively simple and local reduction rules, and thus is easy to implement. In  and a follow-up work  an experimental study of these rules is conducted on random planar graphs, showing that they can be preprocessed very efficiently for Dominating Set.

Since the work of , the study in subsequent years showed that the (parameterized) tractability of Dominating Set is not only limited to planar graphs, but applies to much wider sparse graph classes. Here the crucial notions are that of bounded expansion and nowhere dense, introduced by Nešetřil and Ossona de Mendez , that aim at capturing structural sparsity of real world networks. Establishing fixed-parameter tractability of -Dominating Set in these graph classes turned out to be a cornerstone result for a later proof that these graph classes are exactly the boundaries of tractability of model checking of first order logic .

Recent results of Drange et al.  and Eickmeyer et al.  show that bounded expansion and nowhere dense graph classes are also limits for efficient preprocessing (so-called linear and polynomial kernels) for -Dominating Set. Both these works treat a slight generalization of the problem where only a subset is required to be dominated and their essence lies in introducing new reduction rule that is capable of identifying a vertex whose removal from does not change the answer for the problem.

This reduction rule can be made oblivious to the actual graph class where it is applied (only the proof that it leads to a small kernel involves the assumption on the graph class). Inspired by the experimental results of [2, 1], in this work we perform an experimental evaluation of this new reduction rule in random planar graphs and in a number of real-worls sparse graphs using the benchmark from .

Instead of treating the general -Dominating Set problem, we choose to evaluate algorithms to classical (-)Dominating Set only, for the following reasons:

1. There has been previous experimental work on this topic [2, 1], so we can compare our results to already tested approaches.

2. For we have a few easy reductions which will help us a lot in reducing our graphs.

3. The linear kernel for -Dominating Set from  is a quite involved algorithm where a few blowups of parameters appear. Because of that it seems that this approach is rather impractical. However the earlier work of Drange et al.  provides a different algorithm for linear kernel for -Dominating Set which is more ,,lightweight” than the more general one.

Throughout all of our experiments we will consider a bit generalized version of Dominating Set, where each vertex can be one of two colors, either white or black. Our goal is to pick smallest number of vertices so that all black vertices are dominated. Black vertices serve role of both dominators and dominatees, whereas white vertices serve role of dominators only. If we denote by the set of black vertices then by we denote size of solution to such problem. If all vertices are black then we get classical version of Dominating Set what is expressed by equality .

Formally speaking, since what we get at the end is an instance of problem where some vertices are black and some are white, this is not precisely an instance of typical Dominating Set. However this can be easily fixed by adding two vertices and , where we put an edge and for every white vertex , declare all vertices in our graph as black and increase target size of dominating set by one. Since has degree , it is optimal to put into solution, so these two instances are equivalent and new one is an instance of typical Dominating Set.

## 2 The evaluated algorithm

Let us try to express the gist of algorithm from  in relatively short space. Let us introduce a notion of strict core. We say that is a strict core of if . It is obvious that is a strict core.

The main loop of the algorithm maintains a set of black vertices that is guaranteed to be a strict core. In one step, it looks for a vertex such that is a strict core as well. For such (which will be called an irrelevant dominatee), the algorithm recolors white and restarts.

By we will denote set of ’s neighbors. By we will denote . We can also define as . We will say that set is -scattered if

 ∀u≠v,u,v∈BN[u]∩N[v]=∅.

### Reduction rule description.

Let be our current strict core (which are our black vertices). Assume that we have a set and set of vertices which is -scattered in and so that all vertices from have equal and nonempty set of neighbors in , which we denote henceforth by . Let be and be . is the set of vertices outside of that can possibly dominate and is the set of all black vertices that vertices from can dominate. Assume that . Then any vertex of is an irrelevant dominatee.

### Proof of rule’s correctness.

Let us now prove correctness of the rule above. Let be any vertex of . We want to prove that (which is equal to ). Let be any optimal dominating set of . If it contains any vertex of then it dominates whole and in particular , so it dominates , so this case is resolved. So now we consider case when . Since vertices of are not dominated from then each of them needs to have its private dominator in . Let set of their dominators be called . We know that . Since we have that . However we know that we can dominate in a cheap way. If we delete from our solution and put vertices that dominate we know that all vertices that were dominated are still dominated (because ) and that size of our solution became smaller. Therefore we arrive at a contradiction in that case with assumption that does not contain any vertex from . This concludes proof of the correctness of this reduction rule.

### Practical application of that rule.

In original paper it is proved that if we are dealing with graphs from class with bounded expansion and is sufficiently large (larger than , where is number so that we are asked whether and is some constant depending on parameters of ) then we can always apply that rule in polynomial time. However, we strived for making this approach as practical as possible, so we propose a different way of looking for places where we can apply this rule.

1. We firstly greedily compute a dominating set of which will be called .

2. Then we apply one of the uniform quasi-wideness algorithm on graph and its subset to get a big -scattered set after deleting small set ; we use the champion of experimental evaluation of uniform quasi-wideness algorithms from  for that purpose.

3. We let , so that is -scattered in .

4. We group vertices of according to , where .

5. For every such group of vertices with equal neighborhoods in and second neighborhood in we greedily compute some dominating set of , where and .

6. If this greedy procedure returned set of size we can take any vertices of and recolor them to white.

7. After processing all these groups we look at vertex with greatest . If this value is at most then we end this procedure and otherwise we let and we return to step 2.

Note that we can use this reduction in parallel to many groups. We do not have to restart whole procedure if one group yielded an irrelevant dominatee and if we see that is bigger then then we can whiten that many vertices at once, not only one of them.

## 3 Other used reduction rules

Apart from that reduction we used a set of simple ones and two reduction rules introduced by Alber et al. in [2, 1].

Let us describe these simple rules:

1. If there is an edge between two white vertices, remove it.

2. If there is a white vertex so that it has no black neighbors, remove it.

3. If there is a white vertex and vertex such that and are adjacent and then remove (in fact previous rule is a special case of this one for non-isolated vertices.

4. If and are adjacent and and is black then can be colored white.

5. If there exists an isolated black vertex, put it into solution.

6. If there exists a black vertex with only one neighbor , put into solution.

Note that whenever we put any vertex into solution, we remove it from graph and make all its neighbors white.

It may seem not intuitive, but in fact these rules are more powerful than they seem. For example, these rules alone are sufficient to fully solve (which means, reduce to empty graph) significant part of random maximum planar graphs with vertices.

As already mentioned, we also use reduction rules proposed by Alber et al., we refer description of them to original papers [2, 1]. Apart from a number of simple rules subsumed by the rules discussed above, Alber et al.  introduce two rules, one operating in a neighborhood of a single vertex, and one operating in a neighborhood of two vertices. However one detail to note is that since we operate on graphs with vertices that are black and white, not only black ones, these rules need to be slightly adjusted, but doing this is straightforward. On the other hand, when these rules deduce that it is optimal for some vertex to be picked as dominator we can simply put it into solution, remove it and whiten its neighbors instead of enforcing this artificially by putting gadget vertices as in original version.

## 4 Tested approaches

In all our evaluated algorithms we included all simple rules enumerated in previous section. We chose six algorithms to evaluation which are identified by whether they use or not sparsity reduction and by which subset of the two reduction rules of  they use. However we decided to drop approaches where we use reduction in the neighborhood of two vertices but not the one in the neighborhood of the single vertex as this set seems unnatural. We call these approaches off.none, off.one, off.both, on.none, on.one, on.both, where on/off stands for whether sparsity reduction was used and none/one/both stands for what set of Alber et al. reductions we used (one means just reduction for a neighborhood of a single vertex).

## 5 Experimental setup, Hard- and Software

The experiments on kernelization of Dominating Set has been performed on an Asus K53SC laptop with Intel® Core™ i3-2330M CPU @ 2.20GHz x 2 processor and with 7.7GiB of RAM.

All implementation has been done in C++. The code is available at .

## 6 Test data

### Random planar graphs.

The first part of our benchmark dataset are random planar graphs generated by LEDA library This allows us to compare our results with these presented in [2, 1]. We try to distinguish planar graphs by their number of edges and by their edge density, so we distinguish groups with and edges and we distinguish groups with densities approximately and (first group in our tests are more precisely maximum planar graphs, where holds). As a result we get six groups with following sets of parameters :

In every group we generated graphs, so there are of them in total.

Note that LEDA can generate graphs with isolated vertices and they get lost in conversion between formats (from LEDA format to list of edges), but any reasonable algorithm deletes them at the beginning, so they don’t matter much. However for the sake of clarity we specify that we do not take into account such isolated vertices when stating graph’s size, so in fact real densities are a bit bigger than declared and in respective groups.

### Real-world sparse graphs.

We used also the benchmark set of real-world sparse graphs from different sources gathered earlier for experimental evaluation of algorithms in graphs of bounded expansion and nowhere dense graph classes . We used two test groups from : the “small” graphs, consisting of graphs up to edges, and the “medium” graphs, consisting of graphs between and edges. We refer to  for a detailed discusion of the composition of these benchmark sets.

## 7 Results and discussion

Full results for random planar graphs are presented in Table 1 and for real-world sparse graphs are presented in Table 2

. Before proceeding to results description let us mention that experiments with these algorithms focused on performance of different kinds of reduction rules measured by whether they reduce our graph or not. Rules were not implemented with focus on their running time and they were applied exhaustively until no rule can be used. That is why we do not provide exact running times of these algorithms. However to give a rough estimate of order of magnitude, execution of all tested approaches on all tests took more or less 1-2 hours in total.

First, our results confirm the experimental findings of Alber et al. [2, 1] that their basic reduction rules are very powerful with respect to sparse graphs. Furthermore, the main strength of their reduction rules lies in the combination of both rules (as opposed to the first rule alone): this effect is very strong in random planar graphs, but also visible in the results in real-world sparse graphs.

It turned out that in fact on vast majority of tests it does not make a difference whether we apply sparsity reduction or not. However when looking at logs we noted that in fact sparsity reduction is applied significantly more often than it may seem than when looking at just results, however probably in many cases what sparsity reduction reduced was easily discoverable by some combination of simple rules. Cases where sparsity reduced something that was not covered by simple rules existed, however they were very rare. One surprising observation when looking at these results is that using sparsity reduction sometimes

worsened results. However there is a fine explanation behind why this could hypothetically be a case. Note that in order for some rules to be applied we need to know that some vertex has some particular color. And if sparsity reduction tells us that some vertex is black, but can be colored white without changing an answer then it may look like a profit, but we shut a way for us to deduce something based on fact that is black.

We now sketch how to mitigate this problem. Some white vertices are white because they were already dominated by some vertex that was put into solution and some are white because some reduction rule told us that such vertex is an irrelevant dominatee. We could introduce an intermediate gray color. It would mean that if is gray then there is no vertex from already determined part of solution that dominates , however we know that is an irrelevant dominatee, meaning that any optimal solution to remaining instance also dominates . So in fact it would mean that in reduction rules we would be allowed to choose whether is black or white. Evaluating such an enhanced approach is a topic for future work.

## References

•  Jochen Alber, Nadja Betzler, and Rolf Niedermeier. Experiments on data reduction for optimal domination in networks. Annals OR, 146(1):105–117, 2006.
•  Jochen Alber, Michael R. Fellows, and Rolf Niedermeier. Polynomial-time data reduction for dominating set. Journal of the ACM, 51(3):363–384, 2004.
•  Noga Alon and Shai Gutner. Linear time algorithms for finding a dominating set of fixed size in degenerated graphs. Algorithmica, 54(4):544–556, 2009.
•  Rodney G. Downey and Michael R. Fellows. Fixed-parameter tractability and completeness I: basic results. SIAM J. Comput., 24(4):873–921, 1995.
•  Pål Grønås Drange, Markus Sortland Dregi, Fedor V. Fomin, Stephan Kreutzer, Daniel Lokshtanov, Marcin Pilipczuk, Michał Pilipczuk, Felix Reidl, Fernando Sánchez Villaamil, Saket Saurabh, Sebastian Siebertz, and Somnath Sikdar. Kernelization and sparseness: the case of dominating set. In 33rd Symposium on Theoretical Aspects of Computer Science, STACS, pages 31:1–31:14, 2016.
•  Kord Eickmeyer, Archontia C. Giannopoulou, Stephan Kreutzer, O-joung Kwon, Michał Pilipczuk, Roman Rabinovich, and Sebastian Siebertz. Neighborhood complexity and kernelization for nowhere dense classes of graphs. In 44th International Colloquium on Automata, Languages, and Programming, ICALP, pages 63:1–63:14, 2017.
•  Uriel Feige. A threshold of ln n for approximating set cover. J. ACM, 45(4):634–652, 1998.
•  Martin Grohe, Stephan Kreutzer, and Sebastian Siebertz. Deciding first-order properties of nowhere dense graphs. Journal of the ACM, 64(3):17:1–17:32, 2017.
•  Wojciech Nadara. Kernelization of dominating set. Code repository, 2018.
•  Wojciech Nadara, Marcin Pilipczuk, Roman Rabinovich, Felix Reidl, and Sebastian Siebertz. Empirical evaluation of approximation algorithms for generalized graph coloring and uniform quasi-wideness. In Gianlorenzo D’Angelo, editor, 17th International Symposium on Experimental Algorithms, SEA 2018, June 27-29, 2018, L’Aquila, Italy, volume 103 of LIPIcs, pages 14:1–14:16. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2018.
•  Jaroslav Nešetřil and Patrice Ossona de Mendez. Sparsity - Graphs, Structures, and Algorithms, volume 28 of Algorithms and combinatorics. Springer, 2012.
•  Mihai Patrascu and Ryan Williams. On the possibility of faster SAT algorithms. In Moses Charikar, editor, Proceedings of the Twenty-First Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2010, Austin, Texas, USA, January 17-19, 2010, pages 1065–1075. SIAM, 2010.