TRANSACTIONS OF THE AMERICAN MATHEMATICAL SOCIETY Volume 348, Number 4, April 1996 DUALITY AND POLYNOMIAL TESTING OF TREE HOMOMORPHISMS P. HELL, J. NE ˇ SET ˇ RIL, AND X. ZHU Abstract. Let H be a fixed digraph. We consider the H-colouring problem, i.e., the problem of deciding which digraphs G admit a homomorphism to H. We are interested in a characterization in terms of the absence in G of certain tree-like obstructions. Specifically, we say that H has tree duality if, for all digraphs G, G is not homomorphic to H if and only if there is an oriented tree which is homomorphic to G but not to H. We prove that if H has tree duality then the H-colouring problem is polynomial. We also generalize tree duality to bounded treewidth duality and prove a similar result. We relate these duality concepts to the notion of the X -property studied by Gutjahr, Welzl, and Woeginger. We then focus on the case when H itself is an oriented tree. In fact, we are particularly interested in those trees that have exactly one vertex of degree three and all other vertices of degree one or two. Such trees are called triads. We have shown in a companion paper that there exist oriented triads H for which the H-colouring problem is NP -complete. We contrast these with several families of oriented triads H which have tree duality, or bounded treewidth duality, and hence polynomial H-colouring problems. If P = NP , then no oriented triad H with an NP -complete H-colouring problem can have bounded treewidth duality; however no proof of this is known, for any oriented triad H. We prove that none of the oriented triads H with NP -complete H- colouring problems given in the companion paper has tree duality. 1. Introduction A homomorphism of a digraph G to a digraph H is a mapping of the vertex sets f : V (G) → V (H) which preserves the edges, i.e., such that xy ∈ E(G) implies f (x)f (y) ∈ E(H). If a homomorphism of G to H exists, we say G is homomorphic to H and write G → H. Otherwise we write G → H. A digraph G is a core if it is not homomorphic to any of its proper subgraphs. Let H be a fixed digraph. The H-colouring problem is the decision problem in which we are given an arbitrary digraph G and are to decide whether or not G is homomorphic to H. The name is due to the fact that for undirected graphs the K n -colouring problem simply asks whether or not G is n-colourable. It was shown in [17] that for undirected graphs H-colouring is polynomial when H is bipartite and NP -complete otherwise. The H-colouring problem for digraphs has received much recent attention, [3, 5, 6, 10, 11, 14, 15, 20, 21, 22, 23, 27, 28, 35]. Unlike the situation for undirected graphs, the boundary between easy and hard H-colouring problems for digraphs H is not understood, and it is not even known Received by the editors July 20, 1993. 1991 Mathematics Subject Classification. Primary 05C85; Secondary 68Q25. c 1996 American Mathematical Society 1281 License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use