Counting and Enumeration Problems with Bounded Treewidth

  • Reinhard Pichler
  • Stefan Rümmele
  • Stefan Woltran
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6355)


By Courcelle’s Theorem we know that any property of finite structures definable in monadic second-order logic (MSO) becomes tractable over structures with bounded treewidth. This result was extended to counting problems by Arnborg et al. and to enumeration problems by Flum et al. Despite the undisputed importance of these results for proving fixed-parameter tractability, they do not directly yield implementable algorithms. Recently, Gottlob et al. presented a new approach using monadic datalog to close the gap between theoretical tractability and practical computability for MSO-definable decision problems. In the current work we show how counting and enumeration problems can be tackled by an appropriate extension of the datalog approach.


Model Check Tree Decomposition Winning Strategy Enumeration Problem Input Structure 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Afrati, F.N., Chirkova, R.: Selecting and using views to compute aggregate queries. In: Eiter, T., Libkin, L. (eds.) ICDT 2005. LNCS, vol. 3363, pp. 383–397. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  2. 2.
    Arnborg, S., Lagergren, J., Seese, D.: Easy problems for tree-decomposable graphs. Journal of Algorithms 12(2), 308–340 (1991)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Bagan, G.: MSO queries on tree decomposable structures are computable with linear delay. In: Ésik, Z. (ed.) CSL 2006. LNCS, vol. 4207, pp. 167–181. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  4. 4.
    Bodlaender, H.L.: A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput. 25(6), 1305–1317 (1996)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Ceri, S., Gottlob, G., Tanca, L.: Logic Programming and Databases. Springer, Heidelberg (1990)CrossRefGoogle Scholar
  6. 6.
    Cohen, S., Nutt, W., Serebrenik, A.: Rewriting aggregate queries using views. In: Proc. PODS 1999, pp. 155–166. ACM, New York (1999)Google Scholar
  7. 7.
    Courcelle, B.: Graph rewriting: An algebraic and logic approach. In: Handbook of Theoretical Computer Science, vol. B, pp. 193–242. Elsevier Science Publishers, Amsterdam (1990)Google Scholar
  8. 8.
    Courcelle, B.: Linear delay enumeration and monadic second-order logic. Discrete Applied Mathematics 157(12), 2675–2700 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Downey, R.G., Fellows, M.R.: Parameterized Complexity. Springer, New York (1999)CrossRefzbMATHGoogle Scholar
  10. 10.
    Eiter, T., Faber, W., Fink, M., Woltran, S.: Complexity results for answer set programming with bounded predicate arities and implications. Annals of Mathematics and Artificial Intelligence 51(2-4), 123–165 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Flum, J., Frick, M., Grohe, M.: Query evaluation via tree-decompositions. Journal of the ACM 49(6), 716–752 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Flum, J., Grohe, M.: Parameterized Complexity Theory. Springer, Heidelberg (2006)zbMATHGoogle Scholar
  13. 13.
    Frick, M., Grohe, M.: The complexity of first-order and monadic second-order logic revisited. In: Proc. LICS 2002, pp. 215–224 (2002)Google Scholar
  14. 14.
    Gottlob, G., Pichler, R., Wei, F.: Monadic datalog over finite structures with bounded treewidth. In: Proc. PODS 2007, pp. 165–174. ACM, New York (2007)Google Scholar
  15. 15.
    Grohe, M.: Descriptive and parameterized complexity. In: Flum, J., Rodríguez-Artalejo, M. (eds.) CSL 1999. LNCS, vol. 1683, pp. 14–31. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  16. 16.
    Grumbach, S., Rafanelli, M., Tininini, L.: On the equivalence and rewriting of aggregate queries. Acta Inf. 40(8), 529–584 (2004)MathSciNetCrossRefzbMATHGoogle Scholar
  17. 17.
    Jakl, M., Pichler, R., Rümmele, S., Woltran, S.: Fast counting with bounded treewidth. In: Cervesato, I., Veith, H., Voronkov, A. (eds.) LPAR 2008. LNCS (LNAI), vol. 5330, pp. 436–450. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  18. 18.
    Kemp, D.B., Stuckey, P.J.: Semantics of logic programs with aggregates. In: Proc. ISLP, pp. 387–401 (1991)Google Scholar
  19. 19.
    Kloks, T.: Treewidth. LNCS, vol. 842. Springer, Heidelberg (1994)zbMATHGoogle Scholar
  20. 20.
    Klug, A.C.: Equivalence of relational algebra and relational calculus query languages having aggregate functions. J. ACM 29(3), 699–717 (1982)MathSciNetCrossRefzbMATHGoogle Scholar
  21. 21.
    Libkin, L.: Elements of Finite Model Theory. Springer, Heidelberg (2004)CrossRefzbMATHGoogle Scholar
  22. 22.
    Szeider, S.: Monadic second order logic on graphs with local cardinality constraints. In: Ochmański, E., Tyszkiewicz, J. (eds.) MFCS 2008. LNCS, vol. 5162, pp. 601–612. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  23. 23.
    Vardi, M.Y.: The complexity of relational query languages (extended abstract). In: Proc. STOC 1982, pp. 137–146. ACM, New York (1982)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Reinhard Pichler
    • 1
  • Stefan Rümmele
    • 1
  • Stefan Woltran
    • 1
  1. 1.Vienna University of TechnologyViennaAustria

Personalised recommendations