Abstract
We propose a new methodology to develop heuristic algorithms using tree decompositions. Traditionally, such algorithms construct an optimal solution of the given problem instance through a dynamic programming approach. We modify this procedure by introducing a parameter W that dictates the number of dynamic programming states to consider. We drop the exactness guarantee in favour of a shorter running time. However, if W is large enough such that all valid states are considered, our heuristic algorithm proves optimality of the constructed solution. In particular, we implement a heuristic algorithm for the Maximum Happy Vertices problem using this approach. Our algorithm more efficiently constructs optimal solutions compared to the exact algorithm for graphs of bounded treewidth. Furthermore, our algorithm constructs higher quality solutions than state-of-the-art heuristic algorithms Greedy-MHV and Growth-MHV for instances of which at least 40% of the vertices are initially coloured, at the cost of a larger running time.
Similar content being viewed by others
Availability of data and materials
The instances used for experimentation are available https://github.com/LouisCarpentier42/HeuristicAlgorithmsUsingTreeDecompositions/tree/main/instances. The results of all experiments are available on https://github.com/LouisCarpentier42/HeuristicAlgorithmsUsingTreeDecompositions/tree/main/results.
Code Availability
All code is publicly available on https://github.com/LouisCarpentier42/HeuristicAlgorithmsUsingTreeDecompositions.
Notes
We thank Prof. Marco Ghirardi for providing us the instances.
We thank Prof. Marco Ghirardi for providing us with the source code of the matheuristic.
References
Agrawal, A.: On the parameterized complexity of happy vertex coloring. In: International Workshop on Combinatorial Algorithms, Springer, pp. 103–115 (2017)
Agrawal, A., Aravind, N., Kalyanasundaram, S., et al.: Parameterized complexity of happy coloring problems. Theoret. Comput. Sci. 835, 58–81 (2020)
Aravind, N., Kalyanasundaram, S., Kare, A.S.: Linear time algorithms for happy vertex coloring problems for trees. In: International Workshop on Combinatorial Algorithms, Springer, pp. 281–292 (2016)
Arnborg, S., Corneil, D.G., Proskurowski, A.: Complexity of finding embeddings in a k-tree. SIAM J. Algebraic Disc. Methods 8(2), 277–284 (1987)
Baker, B.S.: Approximation algorithms for NP-complete problems on planar graphs. J. ACM (JACM) 41(1), 153–180 (1994)
Bannach, M., Berndt, S.: Practical access to dynamic programming on tree decompositions. Algorithms 12(8), 172 (2019)
Blum, C., Pinacho, P., López-Ibáñez, M., et al.: Construct, merge, solve & adapt a new general algorithm for combinatorial optimization. Comput. Oper. Res. 68, 75–88 (2016)
Bodlaender, H.L., Bonsma, P., Lokshtanov, D.: The fine details of fast dynamic programming over tree decompositions. In: International Symposium on Parameterized and Exact Computation, Springer, pp. 41–53 (2013)
Bodlaender, H.L., Drange, P.G., Dregi, M.S., et al.: A c\(^\text{ k }n\) 5-approximation algorithm for treewidth. SIAM J. Comput. 45(2), 317–378 (2016)
Carpentier, L.: Developing heuristic algorithms for graph optimisation problems using tree decompositions. Master’s thesis (Supervisors: Prof. Jan Goedgebeur and Jorik Jooken), KU Leuven. Faculteit Ingenieurswetenschappen (2022)
Coolsaet, K., D’hondt, S., Goedgebeur, J.: House of graphs 2.0: A database of interesting graphs and more. Discrete Appl. Math. 325, 97–107 (2023)
Cygan, M., Fomin, F.V., Kowalik, Ł, et al.: Parameterized Algorithms, vol. 5. Springer, Cham, Switzerland (2015)
Dell, H., Komusiewicz, C., Talmon, N., et al.: The PACE 2017 parameterized algorithms and computational experiments challenge: The second iteration. In: 12th International Symposium on Parameterized and Exact Computation (IPEC 2017), Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2018)
Easley, D., Kleinberg, J.: Networks, Crowds, and Markets: Reasoning About a Highly Connected World. Cambridge University Press, New York, NY (2010)
Erdős, P., Rényi, A.: On the evolution of random graphs. Publ. Math. Inst. Hung. Acad. Sci. 5(1), 17–60 (1960)
Gao, H., Gao, W.: Kernelization for maximum happy vertices problem. In: Latin American Symposium on Theoretical Informatics, Springer, pp. 504–514 (2018)
Ghirardi, M., Salassa, F.: A simple and effective algorithm for the maximum happy vertices problem. TOP 30(1), 181–193 (2022)
Hamann, M., Strasser, B.: Graph bisection with pareto optimization. J. Exp. Algorithmics (JEA) 23, 1–34 (2018)
Hutter, F., Hoos, H.H., Leyton-Brown, K.: Sequential model-based optimization for general algorithm configuration. In: International conference on learning and intelligent optimization, Springer, pp. 507–523 (2011)
Jooken, J., Leyman, P., De Causmaecker, P.: A multi-start local search algorithm for the hamiltonian completion problem on undirected graphs. Journal of Heuristics 26(5), 743–769 (2020)
Karp, R.M.: Reducibility Among Combinatorial Problems. Springer (2010)
Kőnig, D.: Gráfok és mátrixok. Matematikai és Fizikai Lapok 38, 116–119 (1931)
Lewis, R., Thiruvady, D., Morgan, K.: Finding happiness: an analysis of the maximum happy vertices problem. Comput. Oper. Res. 103, 265–276 (2019)
Minty, G.J.: On maximal independent sets of vertices in claw-free graphs. J. Comb. Theory, Series B 28(3), 284–304 (1980)
Peeters, F.: Oplossingsmethodes voor het maximum happy vertices probleem. Master’s thesis (Supervisor: Prof. Patrick De Causmaecker), KU Leuven. Faculteit Ingenieurswetenschappen (2020)
Robertson, N., Seymour, P.D.: Graph minors. III. Planar tree-width. J. Comb. Theory, Ser. B 36(1), 49–64 (1984)
Tamaki, H.: Positive-instance driven dynamic programming for treewidth. J. Comb. Optim. 37(4), 1283–1311 (2019)
Thiruvady, D., Lewis, R., Morgan, K.: Tackling the maximum happy vertices problem in large networks. 4OR 18, 507–527 (2020)
Zhang, P., Li, A.: Algorithmic aspects of homophyly of networks. Theoret. Comput. Sci. 593, 117–131 (2015)
Acknowledgements
The research of Jan Goedgebeur was supported by Internal Funds of KU Leuven. Jorik Jooken is supported by a Postdocoral Fellowship of the Research Foundation Flanders (FWO) with contract number 1222524N. We gratefully acknowledge the support provided by the ORDinL project (FWO-SBO S007318N, Data Driven Logistics, 1/1/2018 - 31/12/2021). This research also received funding from the Flemish Government under the “Onderzoeksprogramma Artificiële Intelligentie (AI) Vlaanderen” programme. The computational resources and services used in this work were provided by the VSC (Flemish Supercomputer Center), funded by the Research Foundation - Flanders (FWO) and the Flemish Government - department EWI.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors have no competing interests to declare that are relevant to the content of this article.
Ethics approval
not applicable
Consent to participate
not applicable
Consent for publication
not applicable
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Carpentier, L., Jooken, J. & Goedgebeur, J. A heuristic algorithm using tree decompositions for the maximum happy vertices problem. J Heuristics 30, 67–107 (2024). https://doi.org/10.1007/s10732-023-09522-x
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10732-023-09522-x