Theory of Computing Systems

, Volume 63, Issue 5, pp 987–1026 | Cite as

Counting Edge-injective Homomorphisms and Matchings on Restricted Graph Classes

  • Radu CurticapeanEmail author
  • Holger Dell
  • Marc Roth
Part of the following topical collections:
  1. Special Issue on Theoretical Aspects of Computer Science (STACS 2017)


We consider the #W[1]-hard problem of counting all matchings with exactly k edges in a given input graph G; we prove that it remains #W[1]-hard on graphs G that are line graphs or bipartite graphs with degree 2 on one side. In our proofs, we use that k-matchings in line graphs can be equivalently viewed as edge-injective homomorphisms from the disjoint union of k length-2 paths into (arbitrary) host graphs. Here, a homomorphism from H to G is edge-injective if it maps any two distinct edges of H to distinct edges in G. We show that edge-injective homomorphisms from a pattern graph H can be counted in polynomial time if H has bounded vertex-cover number after removing isolated edges. For hereditary classes \(\mathcal {H}\) of pattern graphs, we complement this result: If the graphs in \(\mathcal {H}\) have unbounded vertex-cover number even after deleting isolated edges, then counting edge-injective homomorphisms with patterns from \(\mathcal {H}\) is #W[1]-hard. Our proofs rely on an edge-colored variant of Holant problems and a delicate interpolation argument; both may be of independent interest.


Matchings Homomorphisms Line graphs Counting complexity Parameterized complexity 



The authors thank Cornelius Brand and Markus Bläser for interesting discussions, and Johannes Schmitt for pointing out a proof of Lemma 20 and allowing us to use it in this paper.


  1. 1.
    Cai, J.-Y., Zhiguo, F.: Holographic algorithm with matchgates is universal for planar #CSP over boolean domain. arXiv:abs/1603.07046 (2016)
  2. 2.
    Cai, J.-Y., Hemachandra, L.A.: On the power of parity polynomial time. Mathematical Systems Theory 23(2), 95–106 (1990). MathSciNetzbMATHGoogle Scholar
  3. 3.
    Cai, J.-Y., Lu, P.: Holographic algorithms: From art to science. J. Comput. Syst. Sci. 77(1), 41–61 (2011). MathSciNetzbMATHGoogle Scholar
  4. 4.
    Cai, J.-Y., Lu, P., Xia, M.: Holographic algorithms by Fibonacci gates and holographic reductions for hardness. In: Proceedings of the 49th Annual Symposium on Foundations of Computer Science, FOCS, pp. 644–653. (2008)
  5. 5.
    Cai, J.-Y., Pinyan, L., Xia, M.: Computational complexity of holant problems. SIAM J. Comput. 40(4), 1101–1132 (2011). MathSciNetzbMATHGoogle Scholar
  6. 6.
    Cai, J.-Y., Pinyan, L., Xia, M.: Holographic algorithms with matchgates capture precisely tractable planar #CSP. SIAM J. Comput. 46(3), 853–889 (2017). MathSciNetzbMATHGoogle Scholar
  7. 7.
    Chen, J., Chor, B., Fellows, M., Huang, X., Juedes, D.W., Kanj, I.A., Ge, X.: Tight lower bounds for certain parameterized NP-hard problems. Inf. Comput. 201(2), 216–231 (2005). MathSciNetzbMATHGoogle Scholar
  8. 8.
    Chen, Y., Thurley, M., Weyer, M.: Understanding the complexity of induced subgraph isomorphisms. In: Proceedings of the 35th International Colloquium on Automata, Languages and Programming, ICALP, pp. 587–596. (2008)
  9. 9.
    Chudnovsky, M., Robertson, N., Seymour, P., Thomas, R.: The strong perfect graph theorem. Ann. Math. 164, 51–229 (2006). MathSciNetzbMATHGoogle Scholar
  10. 10.
    Creignou, N., Hermann, M.: Complexity of generalized satisfiability counting problems. Inf. Comput. 125(1), 1–12 (1996). MathSciNetzbMATHGoogle Scholar
  11. 11.
    Curticapean, R.: Counting matchings of size k is #W[1]-hard. In: Proceedings of the 40th International Colloquium on Automata, Languages and Programming, ICALP, pp. 352–363. (2013)
  12. 12.
    Curticapean, R.: The Simple, Little and Slow Things Count: on Parameterized Counting Complexity. Saarland University, PhD thesis (2015)zbMATHGoogle Scholar
  13. 13.
    Curticapean, R., Dell, H., Marx, D.: Homomorphisms are a good basis for counting small subgraphs. In: Proceedings of the 49th ACM Symposium on Theory of Computing, STOC, pp. 210–223. (2017)
  14. 14.
    Curticapean, R., Marx, D.: Complexity of counting subgraphs Only the boundedness of the vertex-cover number counts. In: Proceedings of the 55th Annual Symposium on Foundations of Computer Science, FOCS, pp. 130–139, IEEE. (2014)
  15. 15.
    Curticapean, R., Xia, M.: Parameterizing the permanent Genus, apices, minors, evaluation mod 2k. In: Proceedings of the 56th Annual Symposium on Foundations of Computer Science, FOCS, pp. 994–1009. (2015)
  16. 16.
    Dagum, P., Luby, M.: Approximating the permanent of graphs with large factors. Theor. Comput. Sci. 102(2), 283–305 (1992). MathSciNetzbMATHGoogle Scholar
  17. 17.
    Dalmau, V., Jonsson, P.: The complexity of counting homomorphisms seen from the other side. Theor. Comput. Sci. 329(1-3), 315–323 (2004). MathSciNetzbMATHGoogle Scholar
  18. 18.
    Dell, H., Husfeldt, T., Marx, D., Taslaman, N., Wahlen, M.: Exponential time complexity of the permanent and the Tutte polynomial. ACM Trans. Algorithms 10(4), 21 (2014). MathSciNetzbMATHGoogle Scholar
  19. 19.
    Flum, J., Grohe, M.: The parameterized complexity of counting problems. SIAM J. Comput. 33(4), 892–922 (2004). MathSciNetzbMATHGoogle Scholar
  20. 20.
    Flum, J., Grohe, M.: Parameterized complexity theory. Springer, Berlin (2006)zbMATHGoogle Scholar
  21. 21.
    Frick, M.: Generalized model-checking over locally tree-decomposable classes. Theor. Comput. Sci. 37(1), 157–191 (2004). MathSciNetzbMATHGoogle Scholar
  22. 22.
    Grohe, M.: The complexity of homomorphism and constraint satisfaction problems seen from the other side. J. ACM 54(1), 1 (2007). MathSciNetzbMATHGoogle Scholar
  23. 23.
    Grohe, M., Schwentick, T., Segoufin, Luc: When is the evaluation of conjunctive queries tractable?. In: Proceedings of the 33rd ACM Symposium on Theory of Computing, STOC, pp. 657–666. (2001)
  24. 24.
    Guruswami, V.: Maximum cut on line and total graphs. Discret. Appl. Math. 92(2-3), 217–221 (1999). MathSciNetzbMATHGoogle Scholar
  25. 25.
    Harary, F.: Graph Theory. Addison-Wesley, Reading (1969)zbMATHGoogle Scholar
  26. 26.
    Jerrum, M.: Two-dimensional monomer-dimer systems are computationally intractable. J. Stat. Phys. 48(1-2), 121–134 (1987). MathSciNetGoogle Scholar
  27. 27.
    Jerrum, M., Sinclair, A., Vigoda, E.: A polynomial-time approximation algorithm for the permanent of a matrix with nonnegative entries. J. ACM 51(4), 671–697 (2004). MathSciNetzbMATHGoogle Scholar
  28. 28.
    Kasteleyn, P.W. : Graph theory and crystal physics. In: Graph Theory and Theoretical Physics, pp. 43–110. Academic Press (1967)Google Scholar
  29. 29.
    Lehot, P.G.H.: An optimal algorithm to detect a line graph and output its root graph. J. ACM 21(4), 569–575 (1974). MathSciNetzbMATHGoogle Scholar
  30. 30.
    Lovász, L.: Large Networks and Graph Limits, volume 60 of Colloquium Publications. American Mathematical Society. (2012)
  31. 31.
    Lozin, V.V., Mosca, R.: Independent sets in extensions of 2K 2-free graphs. Discret. Appl. Math. 146(1), 74–80 (2005). zbMATHGoogle Scholar
  32. 32.
    Meeks, K.: The challenges of unbounded treewidth in parameterised subgraph counting problems. Discret. Appl. Math. 198, 170–194 (2016). MathSciNetzbMATHGoogle Scholar
  33. 33.
    Roth, M.: Counting restricted homomorphisms via Möbius inversion over matroid lattices. In: 25th Annual European Symposium on Algorithms, ESA 2017, September 4-6, 2017, Vienna, Austria, pp. 63:1–63:14. (2017)
  34. 34.
    Sbihi, N.: Algorithme de recherche d’un stable de cardinalite maximum dans un graphe sans etoile. Discret. Math. 29, 53–76 (1980). zbMATHGoogle Scholar
  35. 35.
    Temperley, H.N.V., Fisher, M.E.: Dimer problem in statistical mechanics - an exact result. Philos. Mag. 6(68), 1478–6435 (1961). MathSciNetzbMATHGoogle Scholar
  36. 36.
    Vadhan, S.P.: The complexity of counting in sparse, regular, and planar graphs. SIAM J. Comput. 31(2), 398–427 (2001). MathSciNetzbMATHGoogle Scholar
  37. 37.
    Valiant, L.G.: The complexity of computing the permanent. Theor. Comput. Sci. 8(2), 189–201 (1979). MathSciNetzbMATHGoogle Scholar
  38. 38.
    Valiant, L.G.: Holographic algorithms. SIAM J. Comput. 37(5), 1565–1594 (2008). MathSciNetzbMATHGoogle Scholar
  39. 39.
    Šoltés, Ľ.: Forbidden induced subgraphs for line graphs. Discret. Math. 132(1), 391–394 (1994). MathSciNetzbMATHGoogle Scholar
  40. 40.
    Williams, V.V., Williams, R.: Finding, minimizing, and counting weighted subgraphs. SIAM J. Comput. 42(3), 831–854 (2013). MathSciNetzbMATHGoogle Scholar
  41. 41.
    Xia, M., Zhang, P., Zhao, W.: Computational complexity of counting problems on 3-regular planar graphs. Theor. Comput. Sci. 384(1), 111–125 (2007). Theory and Applications of Models of Computation. MathSciNetzbMATHGoogle Scholar
  42. 42.
    Zhang, X.-D., Bylka, S.: Disjoint triangles of a cubic line graph. Graphs and Combinatorics 20(2), 275–280 (2004). MathSciNetzbMATHGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC, part of Springer Nature 2018

Authors and Affiliations

  1. 1.Basic Algorithms Research Copenhagen (BARC) and IT University of CopenhagenKøbenhavnDenmark
  2. 2.Cluster of Excellence (MMCI)Saarland UniversitySaarbrückenGermany
  3. 3.Cluster of Excellence (MMCI) and Graduate School of Computer ScienceSaarland UniversitySaarbrückenGermany

Personalised recommendations