  Let H be a graph, and let C_H(G) be the number of (subgraph isomorphic)
copies of H contained in a graph G. We investigate the fundamental problem of
estimating C_H(G). Previous results cover only a few specific instances of this
general problem, for example, the case when H has degree at most one
(monomer-dimer problem). In this paper, we present the first general subcase of
the subgraph isomorphism counting problem which is almost always efficiently
approximable. The results rely on a new graph decomposition technique.
Informally, the decomposition is a labeling of the vertices such that every
edge is between vertices with different labels and for every vertex all
neighbors with a higher label have identical labels. The labeling implicitly
generates a sequence of bipartite graphs which permits us to break the problem
of counting embeddings of large subgraphs into that of counting embeddings of
small subgraphs. Using this method, we present a simple randomized algorithm
for the counting problem. For all decomposable graphs H and all graphs G, the
algorithm is an unbiased estimator. Furthermore, for all graphs H having a
decomposition where each of the bipartite graphs generated is small and almost
all graphs G, the algorithm is a fully polynomial randomized approximation
scheme.
  We show that the graph classes of H for which we obtain a fully polynomial
randomized approximation scheme for almost all G includes graphs of degree at
most two, bounded-degree forests, bounded-length grid graphs, subdivision of
bounded-degree graphs, and major subclasses of outerplanar graphs,
series-parallel graphs and planar graphs, whereas unbounded-length grid graphs
are excluded.
