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?orklund, Husfeldt and Koivisto for computing the chromatic polynomial, the classical algorithm of Kohn, Gottlieb, Kohn, and Karp 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 O(2n+o(n) ); in particular in time O(2n n3 ) for trees and in time 2n+O( n) for planar graphs....
Omid Amini, Fedor V. Fomin, Saket Saurabh