Abstract:
|
The problem of counting all H-colorings of a graph G of n vertices is
considered. While the problem is, in general #P-complete, we give
linear time algorithms that solve the main variants of this problem
when the input graph G is a k-tree or, in the case where G is
directed, when the underlying graph of G is a k-tree. Our algorithms
remain polynomial even in the case where k=O(log n) or in the case
where the size of H is O(n). Our results are easy to implement and
imply the existence of polynomial time algorithms for a series of
problems on partial k-trees such as core checking and chromatic
polynomial computation. |