Tuesday, 29 July 2008

on counting of special case of trees on a graph

I'll answer a question raised in the comments:



Problem: Count the number of induced trees of size k.



According to this paper by Erdös, Saks and Sos, it is NP-complete to decide given a graph G and an integer k, if G contains an induced tree of size k. So, it's probably pretty damn hard to count them. Apparently, it remains NP-complete even for bipartite graphs.



Actually, the argument is pretty simple so I'll include it here. Given a graph H and an integer k, it is well-known that the problem of deciding if H has an independent set of size k is NP-complete. Suppose that H has n vertices. Let G be the graph obtained from H by first adding a disjoint copy of Pn (a path on n vertices), and then connecting one end of Pn to all the vertices in H. Clearly, H has an independent set of size k if and only if G contains an induced tree of size n+k.

No comments:

Post a Comment