Counting H-Colorings of Partial k-Trees

  • Josep Díaz
  • Maria Serna
  • Dimitrios M. Thilikos
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2108)


The problem of counting all H-colorings of a graph G of n vertices is considered. While the problem is, in general, #P-complete, we give linear time algorithms that solve the main variants of this problem when the input graph G is a k-tree or, in the case where G is directed, when the underlying graph of G is a k-tree. Our algorithms remain polynomial even in the case where k = O(log n) or in the case where the size of H is O(n). Our results are easy to implement and imply the existence of polynomial time algorithms for a series of problems on partial k-trees such as core checking and chromatic polynomial computation.


Polynomial Time Algorithm Input Graph Tree Decomposition Linear Time Algorithm Counting Problem 
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. [ACP93]
    S. Arnborg, D.G. Corneil, and A. Proskurowski Complexity of finding embeddings in a k-tree. SIAM Journal on Algebraic and Discrete Mathematics, 8:277–284, 1993.MathSciNetCrossRefGoogle Scholar
  2. [ALS91]
    Stefan Arnborg, Jens Lagergren, and Detlef Seese Easy problems for tree-decomposable graphs. Journal of Algorithms, 12:308–340, 1991.zbMATHCrossRefMathSciNetGoogle Scholar
  3. [And98]
    Artur Andrzejak An algorithm for the Tutte polynomials of graphs of bounded treewidth. Discrete Mathematics, 190(1-3):39–54, 1998.zbMATHCrossRefMathSciNetGoogle Scholar
  4. [Arn85]
    Stefan Arnborg Efficient algorithms for combinatorial problems on graphs with bounded decomposability-A survey. BIT, 25:2–23, 1985.zbMATHCrossRefMathSciNetGoogle Scholar
  5. [BDGJ99]
    Russ Bubley, Martin Dyer, Catherine Greenhill, and Mark Jerrum On approximately counting colorings of small degree graphs. SIAM Journal on Computing, 29(2):387–400, 1999.CrossRefMathSciNetGoogle Scholar
  6. [BK96]
    H.L. Bodlaender and T. Kloks Efficient and constructive algorithms for the pathwidth and treewidth of graphs. Journal of Algorithms, 21:358–402, 1996.zbMATHCrossRefMathSciNetGoogle Scholar
  7. [Bod90]
    Hans Leo Bodlaender Polynomial algorithms for graph isomorphism and chromatic index on partial k-trees. Journal of Algorithms, 11:631–643, 1990.zbMATHCrossRefMathSciNetGoogle Scholar
  8. [Bod96]
    H.L. Bodlaender A linear time algorithm for finding tree-decompositions of small treewidth. SIAM Journal on Computing, 25:1305–1317, 1996.zbMATHCrossRefMathSciNetGoogle Scholar
  9. [Bod97]
    Hans L. Bodlaender Treewidth: algorithmic techniques and results. In Mathematical foundations of computer science 1997 (Bratislava), pages 19–36. Springer, Berlin, 1997.CrossRefGoogle Scholar
  10. [CDF]
    Colin Cooper, Martin Dyer, and Alan Frieze On Marcov chains for randomly H-coloring a graph. Journal of Algorithms (to appear).Google Scholar
  11. [CM93]
    Bruno Courcelle and M. Mosbah Monadic second-order evaluations on tree-decomposable graphs. Theor. Comp. Sc., 109:49–82, 1993.zbMATHCrossRefMathSciNetGoogle Scholar
  12. [CMR]
    B. Courcelle, J.A. Makowski, and U. Rotics On the fixed parameter complexity of graph enumeration problems definable in monadic second order logic. Discrete Applied Mathematics (to appear).Google Scholar
  13. [Cou90a]
    Bruno Courcelle Graph rewriting: an algebraic and logical approach. In Jan van Leeuwen, editor, Handbook of Theoretical Computer Science, volume B, pages 192–242, Amsterdam, 1990. North Holland Publ. Comp.Google Scholar
  14. [Cou90b]
    Bruno Courcelle The monadic second-order logic of graphs. I. Recognizable sets of finite graphs. Inform. and Comput., 85(1):12–75, 1990.zbMATHCrossRefMathSciNetGoogle Scholar
  15. [DFJ99]
    Martin Dyer, Alan Frieze, and Mark Jerrum On counting independent sets in sparse graphs. In 40th Annual Symposium on Foundations of Computer Science, pages 210–217, 1999.Google Scholar
  16. [DG00]
    M.E. Dyer and C.S. Greenhill The complexity of counting graph homomorphisms. In 11th ACM/SIAM Symposium on Discrete Algorithms, pages 246–255, 2000.Google Scholar
  17. [DNS00]
    Josep Díaz, Jaroslav Ne#x0161;etřil, and Maria Serna H-coloring of large degree graphs. Technical Report No. 2000-465, KAM-DIMATIA Series, Charles University, 2000.Google Scholar
  18. [Edw86]
    K. Edwards The complexity of coloring problems on dense graphs. Theoretical Computer Science, 16:337–343, 1986.CrossRefGoogle Scholar
  19. [GHN00]
    Anna Galluccio, Pavol Hell, and Jaroslav Nešetřil The complexity of Hcolouring of bounded degree graphs. Discrete Math., 222(1-3):101–109, 2000.zbMATHCrossRefMathSciNetGoogle Scholar
  20. [GJ79]
    M.R. Garey and D.S. Johnson Computers and Intractability: A Guide to the Theory of NP-Completeness. Freeman, San Francisco, 1979.zbMATHGoogle Scholar
  21. [HN90]
    P. Hell and J. Nešetřil On the complexity of H-coloring. Journal of Combinatorial Theory, series B, 48:92–110, 1990.zbMATHCrossRefGoogle Scholar
  22. [HN92]
    P. Hell and J. Nešetřil The core of a graph. Discrete Mathematics, 109: 117–126, 1992.zbMATHCrossRefMathSciNetGoogle Scholar
  23. [Jer95]
    M. Jerrum A very simple algorithm for stimating the number of k-colorings of a low degree graph. Random Structures and Algorithms, 7:157–165, 1995.zbMATHCrossRefMathSciNetGoogle Scholar
  24. [JS97]
    Klaus Jansen and Petra Scheffler Generalized coloring for tree-like graphs. Discrete Appl. Math., 75(2):135–155, 1997.zbMATHCrossRefMathSciNetGoogle Scholar
  25. [Lev73]
    L. Levin Universal sequential search problems. Problems of Information Transmissions, 9:265–266, 1973.Google Scholar
  26. [Neš99]
    Jaroslav Nešetřil Aspects of structural combinatorics (graph homomorphisms and their use). Taiwanese J. Math., 3(4):381–423, 1999.MathSciNetzbMATHGoogle Scholar
  27. [Ree92]
    B. Reed Finding approximate separators and computing tree-width quickly. In 24th ACM Symposium on Theory of Computing, pages 221–228, 1992.Google Scholar
  28. [RS85]
    Neil Robertson and Paul D. Seymour Graph minors — a survey. In I. Anderson editor, Surveys in Combinatorics, pages 153–171. Cambridge Univ. Press, 1985.Google Scholar
  29. [TP97]
    J.A. Telle and A. Proskurowski Algorithms for vertex partitioning problems on partial k-trees. SIAM Journal on Discrete Mathematics, 10:529–550, 1997.zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • Josep Díaz
    • 1
  • Maria Serna
    • 1
  • Dimitrios M. Thilikos
    • 1
  1. 1.Departament de Llenguatges i Sistemes InformáticsUniversitat Politécnica de CatalunyaBarcelonaSpain

Personalised recommendations