Document Open Access Logo

Weighted Counting of Matchings in Unbounded-Treewidth Graph Families

Authors Antoine Amarilli , Mikaël Monet

Thumbnail PDF


  • Filesize: 0.78 MB
  • 15 pages

Document Identifiers

Author Details

Antoine Amarilli
  • LTCI, Télécom Paris, Institut Polytechnique de Paris, France
Mikaël Monet
  • Univ. Lille, Inria, CNRS, Centrale Lille, UMR 9189 CRIStAL, F-59000 Lille, France


We thank Florent Capelli and Sébastien Tavenas for discussions on the problem, in particular on how to prove Proposition 5.2.

Cite AsGet BibTex

Antoine Amarilli and Mikaël Monet. Weighted Counting of Matchings in Unbounded-Treewidth Graph Families. In 47th International Symposium on Mathematical Foundations of Computer Science (MFCS 2022). Leibniz International Proceedings in Informatics (LIPIcs), Volume 241, pp. 9:1-9:15, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2022)


We consider a weighted counting problem on matchings, denoted PrMatching(𝒢), on an arbitrary fixed graph family 𝒢. The input consists of a graph G ∈ 𝒢 and of rational probabilities of existence on every edge of G, assuming independence. The output is the probability of obtaining a matching of G in the resulting distribution, i.e., a set of edges that are pairwise disjoint. It is known that, if 𝒢 has bounded treewidth, then PrMatching(𝒢) can be solved in polynomial time. In this paper we show that, under some assumptions, bounded treewidth in fact characterizes the tractable graph families for this problem. More precisely, we show intractability for all graph families 𝒢 satisfying the following treewidth-constructibility requirement: given an integer k in unary, we can construct in polynomial time a graph G ∈ 𝒢 with treewidth at least k. Our hardness result is then the following: for any treewidth-constructible graph family 𝒢, the problem PrMatching(𝒢) is intractable. This generalizes known hardness results for weighted matching counting under some restrictions that do not bound treewidth, e.g., being planar, 3-regular, or bipartite; it also answers a question left open in [Amarilli et al., 2016]. We also obtain a similar lower bound for the weighted counting of edge covers.

Subject Classification

ACM Subject Classification
  • Mathematics of computing → Matchings and factors
  • Treewidth
  • counting complexity
  • matchings
  • Fibonacci sequence


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


  1. Antoine Amarilli, Pierre Bourhis, and Pierre Senellart. Tractable lineages on treelike instances: Limits and extensions. In PODS, pages 355-370, 2016. URL:
  2. Antoine Amarilli, Mikaël Monet, and Pierre Senellart. Conjunctive queries on probabilistic graphs: Combined complexity. In PODS, pages 217-232, 2017. URL:
  3. Antoine Amarilli, Mikaël Monet, and Pierre Senellart. Connecting width and structure in knowledge compilation. In ICDT, volume 98, pages 6:1-6:17, 2018. URL:
  4. Antoine Amarilli and Mikaël Monet. Weighted counting of matchings in unbounded-treewidth graph families. In, 2022. Full version with proofs. URL:
  5. Stefan Arnborg, Jens Lagergren, and Detlef Seese. Easy problems for tree-decomposable graphs. Journal of Algorithms, 12(2):308-340, 1991. URL:
  6. Paul Beame, Guy Van den Broeck, Eric Gribkoff, and Dan Suciu. Symmetric weighted first-order model counting. In PODS, pages 313-328, 2015. URL:
  7. Jin-Yi Cai and Xi Chen. Complexity Dichotomies for Counting Problems: Volume 1, Boolean Domain. Cambridge University Press, 2017. Google Scholar
  8. Jin-Yi Cai, Pinyan Lu, and Mingji Xia. Holographic reduction, interpolation and hardness. Computational Complexity, 21(4):573-604, 2012. URL:
  9. Venkat Chandrasekaran, Nathan Srebro, and Prahladh Harsha. Complexity of Inference in Graphical Models. In UAI, pages 70-78, 2008. URL:
  10. Chandra Chekuri and Julia Chuzhoy. Polynomial bounds for the grid-minor theorem. Journal of the ACM, 63(5):1-65, 2016. URL:
  11. Víctor Dalmau and Peter Jonsson. The complexity of counting homomorphisms seen from the other side. Theor. Comput. Sci., 329(1):315-323, 2004. URL:
  12. Nilesh N. Dalvi and Dan Suciu. The dichotomy of probabilistic inference for unions of conjunctive queries. Journal of the ACM, 59(6):30, 2012. URL:
  13. Robert Ganian, Petr Hliněnỳ, Alexander Langer, Jan Obdržálek, Peter Rossmanith, and Somnath Sikdar. Lower bounds on the complexity of MSO1 model-checking. JCSS, 1(80):180-194, 2014. URL:
  14. Catherine Greenhill. The complexity of counting colourings and independent sets in sparse graphs and hypergraphs. computational complexity, 9(1):52-72, 2000. URL:
  15. M.Monet ( monet). Holant problems and holographic reduction: simple graphs or multigraphs? Theoretical Computer Science Stack Exchange. URL: (version: 2019-05-18).
  16. Stephan Kreutzer and Siamak Tazari. Lower bounds for the complexity of monadic second-order logic. In LICS, pages 189-198, 2010. URL:
  17. Johan Kwisthout, Hans L. Bodlaender, and Linda C. van der Gaag. The necessity of bounded treewidth for efficient inference in Bayesian networks. In ECAI, pages 237-242, 2010. URL:
  18. Salil P Vadhan. The complexity of counting in sparse, regular, and planar graphs. SIAM Journal on Computing, 31(2):398-427, 2001. URL:
  19. Leslie G Valiant. The complexity of computing the permanent. Theoretical computer science, 8(2):189-201, 1979. URL:
  20. Leslie G. Valiant. The complexity of enumeration and reliability problems. SIAM J. Comput., 8(3):410-421, 1979. URL:
  21. Wikipedia. Blossom algorithm, 2022. URL:
  22. Wikipedia. Cassini and Catalan identities, 2022. URL:
  23. Wikipedia. Inverse function theorem, 2022. URL:
  24. Wikipedia. Planar graphs, 2022. URL:
  25. Wikipedia. Treewidth, 2022. URL:
  26. Mingji Xia, Peng Zhang, and Wenbo Zhao. Computational complexity of counting problems on 3-regular planar graphs. Theor. Comput. Sci., 384(1):111-125, 2007. URL:
  27. Mingji Xia and Wenbo Zhao. #3-regular bipartite planar vertex cover is #P-complete. In International Conference on Theory and Applications of Models of Computation, pages 356-364. Springer, 2006. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail