Counting Euler Tours in Undirected Bounded Treewidth Graphs

Authors Nikhil Balaji, Samir Datta, Venkatesh Ganesan

Thumbnail PDF


  • Filesize: 0.55 MB
  • 15 pages

Document Identifiers

Author Details

Nikhil Balaji
Samir Datta
Venkatesh Ganesan

Cite AsGet BibTex

Nikhil Balaji, Samir Datta, and Venkatesh Ganesan. Counting Euler Tours in Undirected Bounded Treewidth Graphs. In 35th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2015). Leibniz International Proceedings in Informatics (LIPIcs), Volume 45, pp. 246-260, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2015)


We show that counting Euler tours in undirected bounded tree-width graphs is tractable even in parallel - by proving a GapL upper bound. This is in stark contrast to #P-completeness of the same problem in general graphs. Our main technical contribution is to show how (an instance of) dynamic programming on bounded clique-width graphs can be performed efficiently in parallel. Thus we show that the sequential result of Espelage, Gurski and Wanke for efficiently computing Hamiltonian paths in bounded clique-width graphs can be adapted in the parallel setting to count the number of Hamiltonian paths which in turn is a tool for counting the number of Euler tours in bounded tree-width graphs. Our technique also yields parallel algorithms for counting longest paths and bipartite perfect matchings in bounded-clique width graphs. While establishing that counting Euler tours in bounded tree-width graphs can be computed by non-uniform monotone arithmetic circuits of polynomial degree (which characterize #SAC^1) is relatively easy, establishing a uniform #SAC^1 bound needs a careful use of polynomial interpolation.
  • Euler Tours
  • Bounded Treewidth
  • Bounded clique-width
  • Hamiltonian cycles
  • Parallel algorithms


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. van T. Aardenne-Ehrenfest and N. G. de Bruijn. Circuits and trees in oriented linear graphs. Simon Stevin: Wis-en Natuurkundig Tijdschrift, 28:203, 1951. Google Scholar
  2. Eric Allender, Jia Jiao, Meena Mahajan, and V. Vinay. Non-commutative arithmetic circuits: Depth reduction and size lower bounds. Theor. Comput. Sci., 209(1-2):47-86, 1998. Google Scholar
  3. Vikraman Arvind, Bireswar Das, Johannes Köbler, and Sebastian Kuhnert. The isomorphism problem for k-trees is complete for logspace. Information and Computation, 217:1-11, 2012. Google Scholar
  4. Nikhil Balaji and Samir Datta. Tree-width and logspace: Determinants and counting Euler tours. CoRR, abs/1312.7468, 2013. Google Scholar
  5. Nikhil Balaji and Samir Datta. Bounded treewidth and space-efficient linear algebra. CoRR, abs/1412.2470, 2014. Google Scholar
  6. Nikhil Balaji and Samir Datta. Bounded treewidth and space-efficient linear algebra. In Theory and Applications of Models of Computation, pages 297-308. Springer, 2015. Google Scholar
  7. Nikhil Balaji, Samir Datta, and Venkatesh Ganesan. Counting Euler tours in undirected bounded treewidth graphs. arXiv:1510.04035v1 [cs.CC], 2015. URL:
  8. Graham Brightwell and Peter Winkler. Counting Eulerian circuits is #p-complete. In ALENEX/ANALCO, pages 259-262, 2005. Google Scholar
  9. Prasad Chebolu, Mary Cryan, and Russell Martin. Exact counting of Euler tours for generalized series-parallel graphs. J. Discrete Algorithms, 10:110-122, 2012. Google Scholar
  10. Prasad Chebolu, Mary Cryan, and Russell Martin. Exact counting of Euler tours for graphs of bounded treewidth. CoRR, abs/1310.0185, 2013. Google Scholar
  11. Bruno Courcelle. The monadic second-order logic of graphs. i. recognizable sets of finite graphs. Information and computation, 85(1):12-75, 1990. Google Scholar
  12. David Cox, John Little, and Donal O’shea. Ideals, varieties, and algorithms, volume 3. Springer, 1992. Google Scholar
  13. B. Das, S. Datta, and P. Nimbhorkar. Log-space algorithms for paths and matchings in k-trees. Theory Comput. Syst., 53(4):669-689, 2013. Google Scholar
  14. Heinz-Dieter Ebbinghaus and Jörg Flum. Finite model theory. Perspectives in Mathematical Logic. Springer, 1995. Google Scholar
  15. Michael Elberfeld, Andreas Jakoby, and Till Tantau. Logspace versions of the theorems of Bodlaender and Courcelle. In FOCS, pages 143-152, 2010. Google Scholar
  16. Wolfgang Espelage, Frank Gurski, and Egon Wanke. How to solve NP-hard graph problems on clique-width bounded graphs in polynomial time. In WG, pages 117-128. Springer, 2001. Google Scholar
  17. Uffe Flarup and Laurent Lyaudet. On the expressive power of permanents and perfect matchings of matrices of bounded pathwidth/cliquewidth. Theory of Computing Systems, 46(4):761-791, 2010. Google Scholar
  18. Qi Ge and Daniel Štefankovič. The complexity of counting Eulerian tours in 4-regular graphs. Algorithmica, 63(3):588-601, 2012. Google Scholar
  19. Martin Charles Golumbic. Algorithmic graph theory and perfect graphs, volume 57. Elsevier, 2004. Google Scholar
  20. Frank Gurski and Egon Wanke. Line graphs of bounded clique-width. Discrete Mathematics, 307(22):2734-2754, 2007. Google Scholar
  21. Frank Harary and C St JA Nash-Williams. On Eulerian and Hamiltonian graphs and line graphs. Canadian Mathematical Bulletin, 8:701-709, 1965. Google Scholar
  22. W. Hesse, E. Allender, and D.A.M. Barrington. Uniform constant-depth threshold circuits for division and iterated multiplication. Journal of Computer and System Sciences, 65:695-716, 2002. Google Scholar
  23. J. A. Makowsky, U. Rotics, I. Averbouch, and B. Godlin. Computing graph polynomials on graphs of bounded clique-width. In WG, pages 191-204, 2006. Google Scholar
  24. Sang-il Oum and Paul D. Seymour. Approximating clique-width and branch-width. J. Comb. Theory, Ser. B, 96(4):514-528, 2006. Google Scholar
  25. WT Tutte and CAB Smith. On unicursal paths in a network of degree 4. The American Mathematical Monthly, 48(4):233-237, 1941. Google Scholar
  26. V. Vinay. Counting auxiliary pushdown automata. In Structure in Complexity Theory, pages 270-284, 1991. Google Scholar
  27. Heribert Vollmer. Introduction to circuit complexity - a uniform approach. Texts in theoretical computer science. Springer, 1999. Google Scholar
  28. Egon Wanke. k-nlc graphs and polynomial algorithms. Discrete Applied Mathematics, 54(2):251-266, 1994. Google Scholar