{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,8,21]],"date-time":"2026-08-21T13:55:12Z","timestamp":1787320512120,"version":"build-2736575974"},"reference-count":61,"publisher":"Society for Industrial & Applied Mathematics (SIAM)","issue":"2","content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["SIAM J. Discrete Math."],"published-print":{"date-parts":[[2012,1]]},"abstract":"<jats:p>We introduce a generic approach for counting subgraphs in a graph. The main idea is to relate counting subgraphs to counting graph homomorphisms. This approach provides new algorithms and unifies several well-known results in algorithms and combinatorics, including the recent algorithm of Bj\u00f6rklund, Husfeldt, and Koivisto for computing the chromatic polynomial, the classical algorithm of Kohn et al. for counting Hamiltonian cycles, Ryser's formula for counting perfect matchings of a bipartite graph, and color-coding-based algorithms of Alon, Yuster, and Zwick. By combining our method with known combinatorial bounds, ideas from succinct data structures, partition functions, and the color coding technique, we obtain the following new results. The number of optimal bandwidth permutations of a graph on n vertices excluding a fixed graph as a minor can be computed in time $ 2^{n+o(n)} $, in particular, in time $\\mathcal{O}(2^{n}n^3)$ for trees and in time $2^{n+\\mathcal{O}(\\sqrt{n})}$ for planar graphs. Counting all maximum planar subgraphs, subgraphs of bounded genus, or more generally subgraphs excluding a fixed graph M as a minor can be done in $2^{\\mathcal{O}(n)}$ time. Counting all subtrees with a given maximum degree (a generalization of counting Hamiltonian paths) of a given graph can be done in time $2^{\\mathcal{O}(n)}$. A generalization of Ryser's formula is, Let G be a graph with an independent set of size $\\ell$. Then the number of perfect matchings in G can be found in time $\\mathcal{O}(2^{n-\\ell} n^3)$. Let ${\\cal H}$ be a graph class excluding a fixed graph M as a minor. Then the maximum number of vertex disjoint subgraphs from ${\\cal H}$ in a graph G on n vertices can be found in time $2^{\\mathcal{O}(n)}$. In order to show this, we prove that there exists a constant $c_M$ depending only on M such that the number of nonisomorphic n-vertex graphs in ${\\cal H}$ is at most $c_M^n$. Let F be a k-vertex graph of treewidth t and let G be an n-vertex graph. A subgraph of G isomorphic to F (if one exists) can be found in $\\mathcal{O}(4.32^k \\cdot k \\cdot t \\cdot n^{t+1})$ expected time using $\\mathcal{O}(\\log{k} \\cdot n^{t+1})$ space.<\/jats:p>","DOI":"10.1137\/100789403","type":"journal-article","created":{"date-parts":[[2012,5,22]],"date-time":"2012-05-22T19:36:30Z","timestamp":1337715390000},"page":"695-717","source":"Crossref","is-referenced-by-count":20,"title":["Counting Subgraphs via Homomorphisms"],"prefix":"10.1137","volume":"26","author":[{"given":"Omid","family":"Amini","sequence":"first","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Fedor V.","family":"Fomin","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Saket","family":"Saurabh","sequence":"additional","affiliation":[],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"351","published-online":{"date-parts":[[2012,5,22]]},"reference":[{"key":"R1","doi-asserted-by":"publisher","DOI":"10.1090\/S0894-0347-1990-1065053-0"},{"key":"R2","doi-asserted-by":"publisher","DOI":"10.1145\/210332.210337"},{"key":"R3","doi-asserted-by":"publisher","DOI":"10.1137\/0608024"},{"key":"R4","doi-asserted-by":"crossref","unstructured":"L. Babai,\n                      Moderately exponential bound for graph isomorphism\n                      , in Fundamentals of Computational Theory, Lecture Notes in Comput. Sci. 117, Springer-Verlag, Berlin, 1981, pp. 34\u201350.","DOI":"10.1007\/3-540-10854-8_4"},{"key":"R5","doi-asserted-by":"crossref","unstructured":"L. Babai, W. M. Kantor, and E. M. Luks,\n                      Computational complexity and the classification of finite simple groups\n                      , in Proceedings of Foundations of Computer Science, 1983, pp. 162\u2013171.","DOI":"10.1109\/SFCS.1983.10"},{"key":"R6","doi-asserted-by":"publisher","DOI":"10.1016\/0020-0190(94)00151-0"},{"key":"R7","unstructured":"R. Beals, R. Chang, W. I. Gasarch, and J. Tor\u00e1n,\n                      On finding the number of graph automorphisms\n                      , Chic. J. Theoret. Comput. Sci. (1999)."},{"key":"R8","doi-asserted-by":"publisher","DOI":"10.1137\/0209055"},{"key":"R9","doi-asserted-by":"publisher","DOI":"10.1016\/j.jctb.2010.03.001"},{"key":"R10","doi-asserted-by":"crossref","unstructured":"A. Bj\u00f6rklund,\n                      Determinant sums for undirected Hamiltonicity\n                      , in Proceedings of Foundations of Computer Science, 2010, pp. 173\u2013182.","DOI":"10.1109\/FOCS.2010.24"},{"key":"R11","doi-asserted-by":"publisher","DOI":"10.1007\/s00453-007-9149-8"},{"key":"R12","doi-asserted-by":"crossref","unstructured":"A. Bj\u00f6rklund and T. Husfeldt,\n                      Inclusion-exclusion algorithms for counting set partitions\n                      , in Proceedings of Foundations of Computer Science, 2006, pp. 575\u2013582.","DOI":"10.1109\/FOCS.2006.41"},{"key":"R13","doi-asserted-by":"crossref","unstructured":"A. Bj\u00f6rklund, T. Husfeldt, P. Kaski, and M. Koivisto,\n                      Fourier meets M\u00f6bius: Fast subset convolution\n                      , in Proceedings of the Symposium on the Theory of Computing, 2007, pp. 67\u201374.","DOI":"10.1145\/1250790.1250801"},{"key":"R14","doi-asserted-by":"publisher","DOI":"10.1137\/070683933"},{"key":"R15","unstructured":"R. Blankenship and B. Oporowski,\n                      Book embeddings of graphs and minor-closed classes\n                      , in Proceedings of the 32nd Southeastern International Conference on Combinatorics, Graph Theory and Computing, 2001."},{"key":"R16","doi-asserted-by":"crossref","unstructured":"H. L. Bodlaender, M. R. Fellows, and M. T. Hallett,\n                      Beyond NP-completeness for problems of bounded width (extended abstract): Hardness for the W hierarchy\n                      , in Proceedings of the Symposium on the Theory of Computing, 1994, pp. 449\u2013458.","DOI":"10.1145\/195058.195229"},{"key":"R17","doi-asserted-by":"publisher","DOI":"10.1007\/s00373-006-0647-2"},{"key":"R18","doi-asserted-by":"crossref","unstructured":"C. Borgs, J. Chayes, L. Lov\u00e1sz, V. T. S\u00f3s, and K. Vesztergombi,\n                      Counting graph homomorphisms\n                      , in Topics in Discrete Mathematics, Algorithms Combin. 26, Springer, Berlin, 2006, pp. 315\u2013371.","DOI":"10.1007\/3-540-33700-8_18"},{"key":"R19","doi-asserted-by":"publisher","DOI":"10.1002\/jgt.3190060302"},{"key":"R20","doi-asserted-by":"publisher","DOI":"10.1016\/j.tcs.2010.06.018"},{"key":"R21","doi-asserted-by":"publisher","DOI":"10.1016\/j.tcs.2004.08.008"},{"key":"R22","doi-asserted-by":"publisher","DOI":"10.1016\/S0304-3975(02)00017-8"},{"key":"R23","unstructured":"F. Dorn\n                      Planar subgraph isomorphism revisited\n                      , in Proceedings of the Symposium on Theoretical Aspects of Computer Science, 2010, pp. 263\u2013274."},{"key":"R24","doi-asserted-by":"crossref","unstructured":"R. G. Downey and M. R. Fellows,\n                      Parameterized Complexity\n                      , Springer-Verlag, New York, 1999.","DOI":"10.1007\/978-1-4612-0515-9"},{"key":"R25","doi-asserted-by":"crossref","unstructured":"J. Dunagan and S. Vempala,\n                      On Euclidean embeddings and bandwidth minimization\n                      , Proceedings of RANDOM-APPROX, 2001, pp. 229\u2013240.","DOI":"10.1007\/3-540-44666-4_26"},{"key":"R26","doi-asserted-by":"publisher","DOI":"10.1002\/1098-2418(200010\/12)17:3\/4<260::AID-RSA5>3.0.CO;2-W"},{"key":"R27","doi-asserted-by":"publisher","DOI":"10.7155\/jgaa.00014"},{"key":"R28","doi-asserted-by":"publisher","DOI":"10.1007\/s004530010020"},{"key":"R29","doi-asserted-by":"crossref","unstructured":"U. Feige,\n                      Coping with the NP-hardness of the graph bandwidth problem\n                      , in Scandinavian Symposium and Workshops on Algorithm Theory, Lecture Notes in Comput. Sci. 1851, Springer-Verlag, Berlin, 2000, pp. 10\u201319.","DOI":"10.1007\/3-540-44985-X_2"},{"key":"R30","doi-asserted-by":"publisher","DOI":"10.1137\/05064299X"},{"key":"R31","doi-asserted-by":"publisher","DOI":"10.1007\/s00453-007-9002-0"},{"key":"R32","doi-asserted-by":"crossref","unstructured":"F. V. Fomin and D. Kratsch,\n                      Exact Cxponential Algorithms\n                      , Texts Theoret. Comput. Sci. EATCS Ser., Springer, Berlin, 2010.","DOI":"10.1007\/978-3-642-16533-7"},{"key":"R33","doi-asserted-by":"publisher","DOI":"10.1006\/jagm.1994.1042"},{"key":"R34","doi-asserted-by":"crossref","unstructured":"M. X. Goemans,\n                      Minimum bounded degree spanning trees\n                      , in Proceedings of Foundations of Computer Science, 2006, pp. 273\u2013282.","DOI":"10.1109\/FOCS.2006.48"},{"key":"R35","doi-asserted-by":"crossref","unstructured":"M. Grohe,\n                      The complexity of homomorphism and constraint satisfaction problems seen from the other side\n                      , J. ACM, 54 (2007).","DOI":"10.1145\/1206035.1206036"},{"key":"R36","doi-asserted-by":"publisher","DOI":"10.1112\/plms\/s2-17.1.75"},{"key":"R37","doi-asserted-by":"publisher","DOI":"10.1016\/0095-8956(90)90132-J"},{"key":"R38","unstructured":"P. Hell and J. Ne\u0161et\u0159il,\n                      Graphs and Homomorphisms\n                      , Oxford Lecture Ser. Math. Appl. 28, Oxford University Press, Oxford, New York, 2004."},{"key":"R39","doi-asserted-by":"crossref","unstructured":"J. E. Hopcroft and R. E. Tarjan,\n                      Efficient planarity testing\n                      , J. ACM, 21 (1974) pp. 549\u2013568.","DOI":"10.1145\/321850.321852"},{"key":"R40","doi-asserted-by":"publisher","DOI":"10.1007\/s00453-007-9008-7"},{"key":"R41","doi-asserted-by":"publisher","DOI":"10.1016\/0167-6377(82)90044-X"},{"key":"R42","doi-asserted-by":"publisher","DOI":"10.1137\/S0097539799363359"},{"key":"R43","doi-asserted-by":"crossref","unstructured":"S. Kohn, A. Gottlieb, and M. Kohn,\n                      A generating function approach to the traveling salesman problem\n                      , in Proceedings of the Annual ACM Conference, 1977, pp. 294\u2013300.","DOI":"10.1145\/800179.810218"},{"key":"R44","doi-asserted-by":"crossref","unstructured":"M. Koivisto,\n                      An ${O}(2^n)$ algorithm for graph coloring and other partitioning problems via inclusion-exclusion\n                      , in Proceedings of Foundations of Computer Science, 2006, pp. 583\u2013590.","DOI":"10.1109\/FOCS.2006.11"},{"key":"R45","doi-asserted-by":"crossref","unstructured":"M. Koivisto,\n                      Partitioning into sets of bounded cardinality\n                      , in IWPEC 2009, Lecture Notes in Comput. Sci. 5917, Springer-Verlag, Berlin, 2009, pp. 258\u2013263.","DOI":"10.1007\/978-3-642-11269-0_21"},{"key":"R46","doi-asserted-by":"publisher","DOI":"10.1007\/s00454-009-9135-9"},{"key":"R47","doi-asserted-by":"publisher","DOI":"10.1007\/BF02280291"},{"key":"R48","doi-asserted-by":"publisher","DOI":"10.1006\/jagm.1994.1028"},{"key":"R49","doi-asserted-by":"publisher","DOI":"10.1137\/S0097539799364092"},{"key":"R50","doi-asserted-by":"crossref","unstructured":"M. Naor, L. J. Schulman, and A. Srinivasan,\n                      Splitters and near-optimal derandomization\n                      , in Proceedings of Foundations of Computer Science, 1995, pp. 182\u2013191.","DOI":"10.1109\/SFCS.1995.492475"},{"key":"R51","unstructured":"A. Nijenhuis and H. S. Wilf,\n                      Combinatorial Algorithms\n                      , Academic Press, New York, 1978."},{"key":"R52","doi-asserted-by":"publisher","DOI":"10.1016\/j.jctb.2006.01.006"},{"key":"R53","doi-asserted-by":"publisher","DOI":"10.2307\/1969046"},{"key":"R54","unstructured":"N. Robertson and P. D. Seymour,\n                      Graph minors\n                      I-XXIII, J. Combin. Theory Ser. B, pp. 1984\u20132010."},{"key":"R55","doi-asserted-by":"crossref","unstructured":"H. J. Ryser,\n                      Combinatorial mathematics\n                      , Carus Math. Monogr. 14, Mathematical Association of America, Washington, DC, 1963.","DOI":"10.5948\/UPO9781614440147"},{"key":"R56","doi-asserted-by":"publisher","DOI":"10.1137\/0601042"},{"key":"R57","doi-asserted-by":"publisher","DOI":"10.1016\/0304-3975(79)90044-6"},{"key":"R58","doi-asserted-by":"crossref","unstructured":"V. Vassilevska, R. Williams, and S. L. M. Woo,\n                      Confronting hardness using a hybrid approach\n                      , in Proceedings of the 17th Annual ACM-SIAM Symposium on Discrete Algorithms, 2006, pp. 1\u201310.","DOI":"10.1145\/1109557.1109558"},{"key":"R59","doi-asserted-by":"crossref","unstructured":"V. Vassilevska and R. Williams,\n                      Finding, minimizing, and counting weighted subgraphs\n                      , in Proceedings of the Symposium on the Theory of Computing, 2009, pp. 455\u2013464.","DOI":"10.1145\/1536414.1536477"},{"key":"R60","doi-asserted-by":"publisher","DOI":"10.1145\/321921.321925"},{"key":"R61","doi-asserted-by":"publisher","DOI":"10.1007\/s00224-010-9261-z"}],"container-title":["SIAM Journal on Discrete Mathematics"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/epubs.siam.org\/doi\/pdf\/10.1137\/100789403","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,8,21]],"date-time":"2026-08-21T12:58:33Z","timestamp":1787317113000},"score":1,"resource":{"primary":{"URL":"https:\/\/epubs.siam.org\/doi\/10.1137\/100789403"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2012,1]]},"references-count":61,"journal-issue":{"issue":"2","published-print":{"date-parts":[[2012,1]]}},"alternative-id":["10.1137\/100789403"],"URL":"https:\/\/doi.org\/10.1137\/100789403","relation":{},"ISSN":["0895-4801","1095-7146"],"issn-type":[{"value":"0895-4801","type":"print"},{"value":"1095-7146","type":"electronic"}],"subject":[],"published":{"date-parts":[[2012,1]]}}}