PACE Solver Description: HitS&DoSeS – Exact and Heuristic Solvers for the Dominating Set and Hitting Set Problems
Abstract
This article briefly describes the most important algorithms and techniques used in HitS&DoSeS, a dominating set and hitting set solver submitted to the PACE 2025 contest (10th Parameterized Algorithms and Computational Experiments Challenge). Used approaches for the exact and heuristic tracks are described, for both the dominating set and the hitting set problems.
Keywords and phrases:
dominating set, hitting set, exact algorithms, heuristic algorithms, large graphs, combinatorial optimization2012 ACM Subject Classification:
Mathematics of computing Graph algorithmsSupplementary Material:
Software: https://github.com/swacisko/pace-2025archived at
swh:1:dir:434f896b7cfd7ff42bfeeeaf03887aa2aba471e8
Funding:
This research received funding from the National Science Centre, Poland (grant No. 2023/49/N/ST6/02506, PI: Sylwester Swat).Editors:
Akanksha Agrawal and Erik Jan van LeeuwenSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Problem description
1.1 Dominating set
In the dominating set problem, the goal is to find a smallest subset of vertices of a given graph such that, for each node , the intersection is nonempty.
1.2 Hitting set
In the hitting set problem, the goal is to find, for a given family of sets over universe , a smallest subset such that each set in contains at least one element from .
2 Solver overview
In this paper we provide a short description of the most important algorithms implemented in solver HitS&DoSeS. Due to a large variety of used methods, this description does not contain full information about the algorithms , their details and their behaviour in many distinct situations.
The HitS&DoSeS solver was designed to deal with the generalized dominating set problem (GDS), defined as follows. Given an undirected simple graph and sets of vertices and , find the smallest subset such that, for each node , the intersection is nonempty.
The solver implemented within HitS&DoSeS for the hitting set problem works by solving the generalized dominating set problem for a bipartite graph with bipartition sets and sets , , where nodes in set represent elements from universe , nodes in represent sets from family , and there is an edge if and only if an element represented by is contained in the set represented by . This holds for both exact and heuristic solvers for the hitting set problem. Due to this, we will mainly focus on the description of the dominating set solver.
Many combinatorial optimization problems can be treated as an implicit hitting set problem. For example, in the directed feedback vertex set problem the goal is to find a set of vertices that hits all cycles in a given graph. In the GDS, however, the family of sets to hit is given explicitly. This fact may be treated both as an advantage and a disadvantage. On the one hand, the size of the family of sets to hit is clearly bounded (contrary to, e.g., the directed feedback vertex set, where the number of cycles in the graph can be exponential in the graph size). On the other hand, handling only a subset of all constraints can sometimes decrease the size of a problem to tackle and it usually brings some “natural noise” to the computation, which can be beneficial. In the heuristic solver implemented within HitS&DoSeS we simulate generation of sets to hit, as though they were not given explicitly. This enables us to easily add randomization and makes it easier to get out of local optima.
3 Preprocessing
We use an extensive set of data reduction rules for the dominating set problem. This set contains known rules for the dominating set problem ([1]), extensions of those rules, as well as a variety of new reduction rules that were designed, optimized and implemented to be applicable even for very large graph instances. For a given instance of the GDS, the goal is to find one of the following:
-
1.
a node that belongs to some optimal solution,
-
2.
a node that can be marked as hit (added to set ),
-
3.
a node that can be marked as excluded (added to set ),
-
4.
a modification in the graph structure that could make the graph smaller or the structure easier in some sense, usually measured as the size of a result obtained by the local search solver run on the reduced graph.
Designed rules are called exhaustively, until no rule can be applied further or for roughly 25% of total admissible running time, if the preprocessing did not terminate earlier. Many of our rules require lifting a solution after finding it for the reduced graph instance. This is usually due to the fact that it is often possible to conclude that there exists a solution that does not contain a node (the node can be added to ) or that a node can be marked as hit and added to , but only if certain additional constraints hold. Many of these constraints are usually fairly difficult to be taken into account when finding a solution using distinct heuristics and approaches, but it is much easier to fix a solution obtained for the reduced instance to make it a valid one for the original instance.
4 Exact algorithm
The exact algorithm is conceptually very simple: reduce the graph as much as possible using data reduction rules, then solve the reduced instance using a “general-purpose” solver, applied to the hitting-set formulation of the dominating set problem. In HitS&DoSeS we tested the following algorithms to solve the hitting set problem:
- 1.
- 2.
- 3.
We also considered a simple branch-and-reduce approach, but our proof-of-concept implementation proved to be much slower than the “general-purpose”-solver approach, hence its further development and optimization were abandoned. By default, the hitting set problem is solved using CP-SAT solver with three workers, as this proved to give the best results (compared to other approaches mentioned above).
5 Heuristic approach
The heuristic approach works in a CEGAR (counter-example guided abstraction refinement [6]) fashion. Starting with an empty set – a subset of a set containing all neighborhood-constraints (sets of the form ) generated for the GDS instance, and an initially empty set (a hitting set of sets in ), we iteratively add some subset of unsatisfied constraints (sets in not hit by ), then update to make it a valid hitting set of sets in .
In order to generate a set of constraints to add to , we select some number of nodes closest to in the considered graph , nodes farthest from , nodes of smallest/largest degree and several randomly selected nodes; we then add the corresponding constraints. However, the total number of added constraints is limited to at most , where is the set of all nodes for which the intersection is empty and are parameters whose values depend on basic graph characteristics.
After selecting the set of constraints to add, we find a hitting set of all sets in using a local search approach, then create a solution to by taking . Next we take and and try to optimize using a local search approach. If the size of could not be improved for a few subsequent iterations, a state perturbation is applied to try to get out of a found local optimum. A state perturbation is achieved by removing some small random subset of nodes in and/or sets in (and fixing afterwards).
6 Local search approach
Our local search solver for the hitting set problem works by, iteratively, removing a node from and adding a node back to , unless it is not necessary. A node to remove from is preferable over other nodes if it has a smaller value of a scoring function , where is equal to the number of sets in that are hit only by . In case of a tie, a bunch of other heuristics are used. A node to add to is preferable over other nodes if it has a greater value of a scoring function , where is equal to the number of sets in that are unhit by and contain . In case of a tie, a bunch of other heuristics are used, which form variations of rules that can be found in several existing heuristic dominating-set solvers (see, e.g., [11]).
Among the approaches used for tie-breaking, we use the following:
-
1.
tabu search to prohibit visiting the same state more than once,
-
2.
configuration checking strategy [5],
-
3.
selecting the less frequently chosen node if the two compared nodes do not have “similar” state-change frequencies,
-
4.
selecting the node that did not change its state for the longest time, if those times the two compared nodes are not “similar”.
To effficiently track changes to values necessary to select next node to add/remove we use a custom-made heap that allows efficient modification of those values without necessity of removing and reinserting the nodes from/to the set. Random node moves are also applied to increase variability. Such random moves usually consist in removing a node and some number of nodes closest to it from the current solution, then adding the same number of nodes back but using the standard comparator to select nodes to add back. Another method of increasing variability used in HitS&DoSeS consists in “freezing” some nodes - prohibiting it from being selected for some number of consecutive iterations.
A variation to the standard add/remove approach is admitted and sometimes executed. This variation allows adding a node to only if it will result in being a valid solution. Since we start improvement with a valid solution, such a node always exists, but it might be the same that was just removed from . We observed that this usually cuts the search space, but significantly improves the convergence speed for some instances.
7 Availability
The source code of HitS&DoSeS is freely available and can be found at
https://github.com/swacisko/pace-2025.
References
- [1] Jochen Alber, Michael Fellows, and Rolf Niedermeier. Polynomial time data reduction for dominating set. Journal of the ACM, 51, May 2004. doi:10.1145/990308.990309.
- [2] Gilles Audemard and Laurent Simon. Predicting learnt clauses quality in modern sat solvers. In IJCAI’09: Proceedings of the 21st International Joint Conference on Artificial Intelligence, pages 399–404, July 2009. URL: http://ijcai.org/Proceedings/09/Papers/074.pdf.
- [3] Armin Biere, Tobias Faller, Katalin Fazekas, Mathias Fleury, Nils Froleyks, and Florian Pollitt. CaDiCaL 2.0. In Computer Aided Verification - 36th International Conference, CAV 2024, Montreal, QC, Canada, July 24-27, 2024, Proceedings, Part I, volume 14681 of Lecture Notes in Computer Science, pages 133–152. Springer, 2024. doi:10.1007/978-3-031-65627-9_7.
- [4] Suresh Bolusani, Mathieu Besançon, Ksenia Bestuzheva, Antonia Chmiela, João Dionísio, Tim Donkiewicz, Jasper van Doornmalen, Leon Eifler, Mohammed Ghannam, Ambros Gleixner, Christoph Graczyk, Katrin Halbig, Ivo Hedtke, Alexander Hoen, Christopher Hojny, Rolf van der Hulst, Dominik Kamp, Thorsten Koch, Kevin Kofler, Jurgen Lentz, Julian Manns, Gioni Mexi, Erik Mühmer, Marc E. Pfetsch, Franziska Schlösser, Felipe Serrano, Yuji Shinano, Mark Turner, Stefan Vigerske, Dieter Weninger, and Lixing Xu. The SCIP Optimization Suite 9.0. ZIB-Report 24-02-29, Zuse Institute Berlin, February 2024. URL: https://nbn-resolving.org/urn:nbn:de:0297-zib-95528.
- [5] Shaowei Cai and Kaile Su. Configuration checking with aspiration in local search for sat. Proceedings of the AAAI Conference on Artificial Intelligence, 26(1):434–440, September 2021. doi:10.1609/aaai.v26i1.8133.
- [6] Edmund Clarke, Orna Grumberg, Somesh Jha, Yuan Lu, and Helmut Veith. Counterexample-guided abstraction refinement for symbolic model checking. J. ACM, 50(5):752–794, September 2003. doi:10.1145/876638.876643.
- [7] Q. Huangfu and Julian Hall. Parallelizing the dual revised simplex method. Mathematical Programming Computation, 10, March 2015. doi:10.1007/s12532-017-0130-5.
- [8] Alexey Ignatiev, Antonio Morgado, and Joao Marques-Silva. Rc2: an efficient maxsat solver. Journal on Satisfiability, Boolean Modeling and Computation, 11:53–64, September 2019. doi:10.3233/SAT190116.
- [9] Laurent Perron and Frédéric Didier. CP-SAT. URL: https://developers.google.com/optimization/cp/cp_solver/.
- [10] Laurent Perron and Vincent Furnon. OR-Tools. URL: https://developers.google.com/optimization/.
- [11] Enqiang Zhu, Yu Zhang, Shengzhi Wang, Darren Strash, and Chanjuan Liu. A dual-mode local search algorithm for solving the minimum dominating set problem. CoRR, July 2023. doi:10.48550/arXiv.2307.16815.
