Abstract
Graph homomorphism, also called H-coloring, is a natural generalization of graph coloring: There is a homomorphism from a graph G to a complete graph on k vertices if and only if G is k-colorable. During recent years the topic of exact (exponential-time) algorithms for NP-hard problems in general, and for graph coloring in particular, has led to extensive research. Consequently, it is natural to ask how the techniques developed for exact graph coloring algorithms can be extended to graph homomorphisms. By the celebrated result of Hell and Nesetril, for each fixed simple graph H, deciding whether a given simple graph G has a homomorphism to H is polynomial-time solvable if H is a bipartite graph, and NP-complete otherwise. The case where H is the cycle of length 5, is the first NP-hard case different from graph coloring. We show that for an odd integer \(k\ge 5\), whether an input graph G with n vertices is homomorphic to the cycle of length k, can be decided in time \(\min \{ \binom{n}{\lfloor n/k\rfloor}, 2^{n/2}\}\cdot n^{{\mathcal{O}(1)}}\). We extend the results obtained for cycles, which are graphs of treewidth two, to graphs of bounded treewidth as follows: if H is of treewidth at most t, then whether input graph G with n vertices is homomorphic to H can be decided in time \((t +3)^{n}\cdot n^{{\mathcal{O}(1)}}\).
Similar content being viewed by others
Author information
Authors and Affiliations
Corresponding authors
Rights and permissions
About this article
Cite this article
Fomin, F., Heggernes, P. & Kratsch, D. Exact Algorithms for Graph Homomorphisms. Theory Comput Syst 41, 381–393 (2007). https://doi.org/10.1007/s00224-007-2007-x
Issue Date:
DOI: https://doi.org/10.1007/s00224-007-2007-x