htd – A Free, Open-Source Framework for (Customized) Tree Decompositions and Beyond

  • Michael Abseher
  • Nysret Musliu
  • Stefan Woltran
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10335)


Decompositions of graphs play a central role in the field of parameterized complexity and are the basis for many fixed-parameter tractable algorithms for problems that are NP-hard in general. Tree decompositions are the most prominent concept in this context and several tools for computing tree decompositions recently competed in the 1st Parameterized Algorithms and Computational Experiments Challenge. However, in practice the quality of a tree decomposition cannot be judged without taking concrete algorithms that make use of tree decompositions into account. In fact, practical experience has shown that generating decompositions of small width is not the only crucial ingredient towards efficiency. To this end, we present htd, a free and open-source software library, which includes efficient implementations of several heuristic approaches for tree decomposition and offers various features for normalization and customization of decompositions. The aim of this article is to present the specifics of htd together with an experimental evaluation underlining the effectiveness and efficiency of the implementation.


Tree decompositions Dynamic programming Software library 



This work has been supported by the Austrian Science Fund (FWF): P25607-N23, P24814-N23, Y698-N23.


  1. 1.
    Abseher, M.: htd 1.0.0-beta1 (2016).
  2. 2.
    Abseher, M., Bliem, B., Charwat, G., Dusberger, F., Hecher, M., Woltran, S.: The D-FLAT system for dynamic programming on tree decompositions. In: Fermé, E., Leite, J. (eds.) JELIA 2014. LNCS, vol. 8761, pp. 558–572. Springer, Cham (2014). doi: 10.1007/978-3-319-11558-0_39 Google Scholar
  3. 3.
    Abseher, M., Bliem, B., Charwat, G., Dusberger, F., Hecher, M., Woltran, S.: D-FLAT: progress report. Technical report, DBAI-TR-2014-86, TU Wien (2014).
  4. 4.
    Abseher, M., Dusberger, F., Musliu, N., Woltran, S.: Improving the efficiency of dynamic programming on tree decompositions via machine learning. In: Proceedings of IJCAI, pp. 275–282. AAAI Press (2015)Google Scholar
  5. 5.
    Abseher, M., Musliu, N., Woltran, S.: htd - A free, open-source framework for tree decompositions and beyond. Technical report, DBAI-TR-2016-96, TU Wien (2016).
  6. 6.
    Abseher, M., Musliu, N., Woltran, S.: Improving the efficiency of dynamic programming on tree decompositions via machine learning. Technical report, DBAI-TR-2016-94, TU Wien (2016).
  7. 7.
    Arnborg, S., Corneil, D.G., Proskurowski, A.: Complexity of finding embeddings in a \(k\)-tree. J. Algebraic Discrete Methods 8(2), 277–284 (1987)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Arnborg, S., Proskurowski, A.: Linear time algorithms for NP-hard problems restricted to partial \(k\)-trees. Discrete Appl. Math. 23(1), 11–24 (1989)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Bachoore, E.H., Bodlaender, H.L.: A branch and bound algorithm for exact, upper, and lower bounds on treewidth. In: Cheng, S.-W., Poon, C.K. (eds.) AAIM 2006. LNCS, vol. 4041, pp. 255–266. Springer, Heidelberg (2006). doi: 10.1007/11775096_24 CrossRefGoogle Scholar
  10. 10.
    Berry, A., Heggernes, P., Simonet, G.: The minimum degree heuristic and the minimal triangulation process. In: Bodlaender, H.L. (ed.) WG 2003. LNCS, vol. 2880, pp. 58–70. Springer, Heidelberg (2003). doi: 10.1007/978-3-540-39890-5_6 CrossRefGoogle Scholar
  11. 11.
    Bertelè, U., Brioschi, F.: On non-serial dynamic programming. J. Comb. Theor. Ser. A 14(2), 137–148 (1973)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Bodlaender, H.L., Koster, A.M.C.A.: Combinatorial optimization on graphs of bounded treewidth. Comput. J. 51(3), 255–269 (2008)CrossRefGoogle Scholar
  13. 13.
    Bodlaender, H.L., Koster, A.M.C.A.: Treewidth computations I. Upper bounds. Inf. Comput. 208(3), 259–275 (2010)MathSciNetCrossRefzbMATHGoogle Scholar
  14. 14.
    Charwat, G., Woltran, S.: Dynamic programming-based QBF solving. In: Proceedings of the 4th International Workshop on Quantified Boolean Formulas, vol. 1719, pp. 27–40. CEUR Workshop Proceedings (2016)Google Scholar
  15. 15.
    Clautiaux, F., Moukrim, A., Négre, S., Carlier, J.: Heuristic and meta-heuristic methods for computing graph treewidth. RAIRO Oper. Res. 38, 13–26 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  16. 16.
    Dechter, R.: Constraint Processing. Morgan Kaufmann, USA (2003)zbMATHGoogle Scholar
  17. 17.
    Dourisboure, Y.: Compact routing schemes for generalised chordal graphs. J. Graph Algorithms Appl. 9(2), 277–297 (2005)MathSciNetCrossRefGoogle Scholar
  18. 18.
    Downey, R.G., Fellows, M.R.: Parameterized Complexity. Monographs in Computer Science. Springer, New York (1999)CrossRefzbMATHGoogle Scholar
  19. 19.
    Ganzow, T., Gottlob, G., Musliu, N., Samer, M.: A CSP hypergraph library. Technical report, DBAI-TR-2005-50, TU Wien (2005).
  20. 20.
    Gaspers, S., Gudmundsson, J., Jones, M., Mestre, J., Rümmele, S.: Turbocharging treewidth heuristics. In: Proceedings of IPEC (2016, to appear)Google Scholar
  21. 21.
    Gogate, V., Dechter, R.: A complete anytime algorithm for treewidth. In: Proceedings of UAI, pp. 201–208. AUAI Press (2004)Google Scholar
  22. 22.
    Gottlob, G., Leone, N., Scarcello, F.: Hypertree decompositions and tractable queries. J. Comput. Syst. Sci. 64(3), 579–627 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  23. 23.
    Halin, R.: S-functions for graphs. J. Geom. 8, 171–186 (1976)MathSciNetCrossRefzbMATHGoogle Scholar
  24. 24.
    Hamann, M., Strasser, B.: Graph bisection with pareto-optimization. In: Proceedings of ALENEX, pp. 90–102. SIAM (2016)Google Scholar
  25. 25.
    Hammerl, T., Musliu, N.: Ant colony optimization for tree decompositions. In: Cowling, P., Merz, P. (eds.) EvoCOP 2010. LNCS, vol. 6022, pp. 95–106. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-12139-5_9 CrossRefGoogle Scholar
  26. 26.
    Hammerl, T., Musliu, N., Schafhauser, W.: Metaheuristic algorithms and tree decomposition. In: Kacprzyk, J., Pedrycz, W. (eds.) Springer Handbook of Computational Intelligence, pp. 1255–1270. Springer, Heidelberg (2015). doi: 10.1007/978-3-662-43505-2_64 CrossRefGoogle Scholar
  27. 27.
    Jégou, P., Terrioux, C.: Bag-connected tree-width: a new parameter for graph decomposition. In: Proceedings of ISAIM, pp. 12–28 (2014)Google Scholar
  28. 28.
    Kjaerulff, U.: Optimal decomposition of probabilistic networks by simulated annealing. Stat. Comput. 2(1), 2–17 (1992)CrossRefGoogle Scholar
  29. 29.
    Kloks, T.: Treewidth, Computations and Approximations. LNCS, vol. 842. Springer, Heidelberg (1994)zbMATHGoogle Scholar
  30. 30.
    Koster, A.M.C.A., van Hoesel, S.P.M., Kolen, A.W.J.: Solving frequency assignment problems via tree-decomposition 1. Electr. Notes Discrete Math. 3, 102–105 (1999)MathSciNetCrossRefzbMATHGoogle Scholar
  31. 31.
    Larranaga, P., Kujipers, C.M., Poza, M., Murga, R.H.: Decomposing bayesian networks: triangulation of the moral graph with genetic algorithms. Stat. Comput. 7(1), 19–34 (1997)CrossRefGoogle Scholar
  32. 32.
    Lauritzen, S.L., Spiegelhalter, D.J.: Local computations with probabilities on graphical structures and their application to expert systems. J. R. Stat. Soc. Ser. B 50, 157–224 (1988)MathSciNetzbMATHGoogle Scholar
  33. 33.
    Morak, M., Musliu, N., Pichler, R., Rümmele, S., Woltran, S.: Evaluating tree-decomposition based algorithms for answer set programming. In: Hamadi, Y., Schoenauer, M. (eds.) LION 2012. LNCS, pp. 130–144. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-34413-8_10 CrossRefGoogle Scholar
  34. 34.
    Musliu, N.: An iterative heuristic algorithm for tree decomposition. In: Cotta, C., van Hemert, J. (eds.) Recent Advances in Evolutionary Computation for Combinatorial Optimization. Studies in Computational Intelligence, vol. 153, pp. 133–150. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  35. 35.
    Musliu, N., Schafhauser, W.: Genetic algorithms for generalized hypertree decompositions. Eur. J. Ind. Eng. 1(3), 317–340 (2007)CrossRefGoogle Scholar
  36. 36.
    Niedermeier, R.: Invitation to Fixed-Parameter Algorithms. Oxford Lecture Series in Mathematics and Its Applications. Oxford University Press, Oxford (2006)CrossRefzbMATHGoogle Scholar
  37. 37.
    Robertson, N., Seymour, P.: Graph minors. III. Planar tree-width. J. Comb. Theor. Ser. B 36(1), 49–64 (1984)MathSciNetCrossRefzbMATHGoogle Scholar
  38. 38.
    Robertson, N., Seymour, P.: Graph minors. X. Obstructions to tree-decomposition. J. Comb. Theor. Ser. B 52(2), 153–190 (1991)MathSciNetCrossRefzbMATHGoogle Scholar
  39. 39.
    Shoikhet, K., Geiger, D.: A practical algorithm for finding optimal triangulations. In: Proceedings of AAAI/IAAI, pp. 185–190. AAAI Press/The MIT Press (1997)Google Scholar
  40. 40.
    Tarjan, R.E., Yannakakis, M.: Simple linear-time algorithm to test chordality of graphs, test acyclicity of hypergraphs, and selectively reduce acyclic hypergraphs. SIAM J. Comput. 13, 566–579 (1984)MathSciNetCrossRefzbMATHGoogle Scholar
  41. 41.
    van Wersch, R., Kelk, S.: Toto: an open database for computation, storage and retrieval of tree decompositions. Discrete Appl. Math. 217, 389–393 (2017)MathSciNetCrossRefzbMATHGoogle Scholar
  42. 42.
    Xu, J., Jiao, F., Berger, B.: A tree-decomposition approach to protein structure prediction. In: Proceedings of CSB, pp. 247–256 (2005)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Michael Abseher
    • 1
  • Nysret Musliu
    • 1
  • Stefan Woltran
    • 1
  1. 1.Institute of Information SystemsTU WienViennaAustria

Personalised recommendations