Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

The structure of bi-arc trees

2007, Discrete Mathematics

Discrete Mathematics 307 (2007) 393 – 401 www.elsevier.com/locate/disc The structure of bi-arc trees Tomás Feder1 , Pavol Hella , Jing Huangb a School of Computing Science, Simon Fraser University, Burnaby, BC, Canada V5A 1S6 b Department of Mathematics and Statistics, University of Victoria, P.O. Box 3045, Victoria, BC, Canada V8W 3P4 Received 27 June 2003; received in revised form 9 August 2004; accepted 26 September 2005 Available online 28 August 2006 Abstract Bi-arc graphs generalize (reflexive) interval graphs and those (irreflexive) bipartite graphs whose complements are circular arc graphs. They are relevant for the so-called list homomorphism problem: when H is a bi-arc graph, the problem is polynomial time solvable, otherwise it is NP-complete. Bi-arc graphs have a forbidden structure characterization, and can be recognized in polynomial time. More importantly for this paper, bi-arc graphs can be characterized by the existence of a conservative majority function. (This function plays an important role in proving the correctness of a polynomial time list homomorphism algorithm.) The forbidden structure theorem for bi-arc graphs is quite complex, and the existence of a conservative majority function is proved without giving an explicit description of it. In this note we focus on bi-arc graphs that are trees (with loops allowed). We describe the structure of bi-arc trees, and give a simple forbidden subtree characterization. Based on this structure theorem, we are able to explicitly describe the conservative majority functions. © 2006 Elsevier B.V. All rights reserved. Keywords: Homomorphism; List homomorphism; Bi-arc graph; Bi-arc tree; Circular arc graph; Majority function; Forbidden subgraph characterization 1. Introduction We consider graphs with loops allowed (cf. [8]). A graph in which every vertex has a loop is called reflexive; a graph in which no vertex has a loop is called irreflexive. A bipartite graph is, by definition, irreflexive. A tree is a connected graph without cycles of length greater than one. (Thus, trees may contain loops.) A homomorphism f of a graph G to a graph H is a mapping f : V (G) → V (H ) such that uv ∈ E(G) implies f (u)f (v) ∈ E(H ). Note the role of vertices with loops: firstly, if a vertex u has a loop in G, then f (u) must also have a loop in H. Secondly, if u and v are adjacent in G and f (u) = f (v), then the vertex f (u) of G must have a loop. Homomorphisms to graphs with loops are allowed are of interest in statistical physics, cf. [2,3,8]. Given graphs G, H , and lists L(v) ⊆ V (H ), v ∈ V (G), a list homomorphism of G to H with respect to the lists L is a homomorphism f of G to H, such that f (v) ∈ L(v) for all v ∈ V (G). For a fixed graph H, the list homomorphism problem LIST-HOMH asks whether or not an input graph G with lists L admits a list homomorphism to H with respect to L. E-mail addresses: tomas@Stanford.edu (T. Feder), pavol@cs.sfu.ca (P. Hell), jing@math.uvic.ca (J. Huang). 1 268 Waverley Street, Palo Alto, CA 94301, USA. 0012-365X/$ - see front matter © 2006 Elsevier B.V. All rights reserved. doi:10.1016/j.disc.2005.09.031 394 T. Feder et al. / Discrete Mathematics 307 (2007) 393 – 401 In [6], we have given the following complete classification of the complexity of list homomorphism problems LIST-HOMH. Theorem 1.1 (Feder et al. [6]). The list homomorphism problem LIST-HOMH is polynomial time solvable if H is a bi-arc graph, and is NP-complete otherwise. Bi-arc graphs are defined as follows. Let C be a circle with two specified points p and q on C. A bi-arc is an ordered pair of arcs (N, S) on C such that N contains p but not q, and S contains q but not p. A graph H is a bi-arc graph if there is a family of bi-arcs {(Nx , Sx ): x ∈ V (H )} such that, for any x, y ∈ V (H ), not necessarily distinct, the following hold: • if x and y are adjacent, then neither Nx intersects Sy nor Ny intersects Sx ; • if x and y are not adjacent, then both Nx intersects Sy and Ny intersects Sx . The family of bi-arcs {(Nx , Sx ): x ∈ V (H )} is called a bi-arc representation of H. Note that a bi-arc representation cannot contain bi-arcs (N, S), (N ′ , S ′ ) such that N intersects S ′ but S does not intersect N ′ or vice versa. Bi-arc graphs unite two well-known families of graphs: the interval graphs, and the circular arc graphs of clique covering number two (or, more precisely, their complements). We say that a reflexive graph H is an interval graph if each vertex x of H can be associated with a real interval Ix , so that two vertices x and y are adjacent in H if and only if Ix and Iy intersect. The family of intervals {Ix : x ∈ V (H )} is called an interval representation of H. It turns out that every interval graph is a bi-arc graph, and every reflexive bi-arc graph is an interval graph [6]. We say that an irreflexive graph H is a circular arc graph if each vertex x of H can be associated with an arc on a circle, so that two vertices are adjacent if and only if the associated arcs intersect. Again, the family of associated arcs is called a circular arc representation of H. We have also shown that every bipartite (hence irreflexive) graph whose complement is a circular arc graph is a bi-arc graph, and that every irreflexive bi-arc graph is a bipartite graph whose complement is a circular arc graph [6]. (We note that we are only taking complements of irreflexive graphs in this paper, and these complements are by definition also irreflexive; in other words, loops never need to be complemented.) In particular, when H is a reflexive graph, the problem LIST-HOMH is polynomial time solvable if H is an interval graph, and is NP-complete otherwise, cf. [4]. When H is an irreflexive graph, the problem LIST-HOMH is polynomial time solvable if H is a bipartite graph whose complement is a circular arc graph, and is NP-complete otherwise, cf. [5]. For a graph H, the associated bipartite graph H ∗ is defined as follows. The vertex set of H ∗ consists of sets AH = {x ′ ; x ∈ V (H )} and BH = {x ′′ ; x ∈ V (H )}, forming a bipartition of H ∗ . The edge set of H ∗ consists of all edges x ′ y ′′ such that xy is an edge of H. Note that there are two kinds of edges in H ∗ , namely edges x ′ x ′′ where x has a loop in H, and edges x ′ y ′′ where x = y and xy ∈ E(H ), which go in pairs, i.e., both x ′ y ′′ and x ′′ y ′ are present in H ∗ . A simple yet useful observation is that a bi-arc representation of H corresponds precisely to a circular arc representation of the complement of H ∗ . Thus, we obtain the following fact. Proposition 1.2. H is a bi-arc graph if and only if the complement of H ∗ is a circular arc graph. This fact will aid us in describing a forbidden structure characterization of bi-arc graphs. It is possible to describe the forbidden structures in terms of the graph H, but we obtain a neater description if we state it in terms of the associated bipartite graph H ∗ . In particular, the characterization using H ∗ becomes reminiscent of the celebrated characterization of interval graphs by Lekkerkerker and Boland [9]. An edge-asteroid in a bipartite graph, with the bipartition (X, Y ), is a set of 2k + 1 edges u0 v0 , u1 v1 , . . . , u2k v2k (k 1 and each ui ∈ X and vi ∈ Y ), and 2k + 1 paths, P0,1 , P1,2 , . . . , P2k,0 , where each Pi,i+1 joins ui to ui+1 , such that for each i = 0, 1, . . . , 2k there is no edge between {ui , vi } and {vi+k , vi+k+1 } ∪ V (Pi+k,i+k+1 ). (Subscripts are modulo 2k + 1.) We refer to the (odd) integer 2k + 1 as the order of the edge-asteroid. We have the following forbidden substructure characterization of bi-arc graphs. Theorem 1.3 (Feder et al. [5]). H is a bi-arc graph if and only if H ∗ contains no edge-asteroid, and no induced cycle of length greater than four. T. Feder et al. / Discrete Mathematics 307 (2007) 393 – 401 395 Finally, we relate bi-arc graphs to a certain class of functions, useful in analyzing the complexity of list homomorphism problems. Let H be an arbitrary graph. A function g: V (H )×V (H )×V (H ) → V (H ) is called a conservative majority function (also called a majority choice function [6]) if it satisfies the following properties: 1. g(x, y, z) ∈ {x, y, z}; 2. g(x, w, w) = g(w, y, w) = g(w, w, z) = w; 3. g(x, y, z)g(x ′ , y ′ , z′ ) ∈ E(H ) whenever xx ′ , yy ′ , zz′ ∈ E(H ). Feder and Vardi [7] proved that if H admits a conservative majority function, then LIST-HOMH is polynomial time solvable, cf. [8]. The algorithm itself does not use the conservative majority function; its existence is, however, needed to establish the correctness of the algorithm. In [6] we used this algorithm to solve (in polynomial time) the problem LIST-HOMH for a bi-arc graph H. We were able to prove [6] that a bi-arc graph H always admits conservative majority function. However, we were not able to explicitly describe the function in terms of the graph H. (On the other hand, there is a polynomial time algorithm to find it for any concrete graph H, [7].) In fact, it turns out that bi-arc graphs are precisely the graphs which admit conservative majority functions. This further underscores the importance of this natural class of graphs. Theorem 1.4 (Brewster et al. [1]). H is a bi-arc graph if and only if it admits a conservative majority function. In this paper we focus on bi-arc graphs that are trees. We prove a structure theorem giving a complete description (including a characterization in terms of forbidden induced subgraphs) of all bi-arc trees. Using this structure theorem we are then able to explicitly describe conservative majority functions for all bi-arc trees H. 2. The structure theorem For a graph H, we use H 0 to denote the subgraph of H induced by vertices with loops. We say that H 0 is convex, if every induced path P of H joining two vertices of H 0 satisfies V (P ) ⊆ V (H 0 ). Lemma 2.1. If H is a bi-arc graph, then H 0 is convex. Proof. Suppose that H 0 is not convex. Then there is an induced path x1 x2 . . . xk (k 3), such that xi ∈ V (H 0 ) if and only if i = 1 or k. Thus in H ∗ the vertices x1′ , x1′′ , x2′ , x2′′ , . . . , xk′ , xk′′ form an induced cycle of length greater than four. By Theorem 1.3, the complement of H ∗ is not a circular arc graph and hence H is not a bi-arc graph.  Lemma 2.2. Let H be a graph. Suppose that there exists a representation of H by a family of intervals {Iv : v ∈ V (H )} such that • for u = v, Iu and Iv intersect if and only if u and v adjacent; • for each u ∈ V (H ) and v ∈ V (H ) − V (H 0 ), either Iu contains Iv , or Iu and Iv do not intersect. Then H is a bi-arc graph. Proof. We first describe how to transform the given interval representation {Iv : v ∈ V (H )} to a bi-arc representation of the reflexive graph obtained from H by adding all missing loops. (This is similar to the technique explained in [6], where it is described in more detail and with illustrations.) Let C be a circle with two specified diametrically opposed points p and q. We first represent each vertex by an arc on the open segment extending from p to q clockwise. That is, each vertex v corresponds to an arc Iv from a point av to a point bv clockwise in such a way that two distinct vertices v and v ′ are adjacent in H if and only if Iv intersects Iv ′ . We obtain a second set of arcs Jv by rotating the first one by 180◦ . In the second set of arcs, each vertex v corresponds to an arc Jv from a point cv to a point dv clockwise in the open segment from q to p. Now our bi-arc representation of H will consist of pairs (Nv , Sv ), with Nv being the arc from dv to av , and Sv being the arc from bv to cv . Clearly, each Nv contains p but not q and each Sv contains q but not p. 396 T. Feder et al. / Discrete Mathematics 307 (2007) 393 – 401 (A) (B) (C) Fig. 1. It is easy to verify that this is indeed a bi-arc representation of H. Observe that for each v ∈ V (H ) − V (H 0 ), the bi-arc (Nv , Sv ) contains the endpoints of every other arc. In other words, no other arc has its endpoints contained in the two ‘gaps’ created by Nv and Sv . Thus it is possible to extend Nv and Sv so that they intersect each other. Doing this for all vertices inV (H ) − V (H 0 ), we obtain a bi-arc representation of the given graph H.  Let H be an irreflexive bipartite graph, with a bipartition (A, B). Suppose that there is a representation of H by a family {Jv : v ∈ V (H )} of arcs on a circle with two specified diametrically opposite points p and q, such that each Ja with a ∈ A contains p but not q, and each Jb with b ∈ B contains q but not p. Suppose that two vertices a and b are adjacent in H if and only if Ja and Jb do not intersect. Let S be a subset of A, such that for each s ∈ S, the clockwise endpoint of the arc Js is not contained in any Jb , with b ∈ B. If |S| 2, we further assume that there is at most one vertex w ∈ B such that for each b ∈ B − {w} and each s ∈ S, the arc Jb contains the counterclockwise endpoint of Js . Then we say that {Js : s ∈ S} is in a good position in the circular arc representation. (A similar definition can be given when S is a subset of B.) In the case when S = {s} consists of a single vertex, we also say that Js is in a good position (in the representation). Let H 1 be the graph obtained from H by deleting all loops in H. Lemma 2.3. Let H 1 be a bipartite graph and (A, B) be a bipartition of H 1 . Suppose that H 0 is a star. Suppose that there is a circular arc representation {Jv : v ∈ V (H 1 )} of H 1 such that both {Ja : a ∈ V (H 0 ) ∩ A} and {Jb : b ∈ V (H 0 ) ∩ B} are in good positions. Then H is a bi-arc graph. Proof. We first obtain a bi-arc representation of H 1 as follows. (This is again similar to the technique from [6].) Let F1 be the above family of arcs Jv , v ∈ V (H ). It is easy to see that we may assume that there are two other diametrically opposite points r and s on the circle, with the clockwise order p, r, q, s (we think of p at 12, r at 3, q at 6, and s at 9), where each Ja , a ∈ A contains both p and r, but neither q nor s, and each Jb , b ∈ B contains both q and s, but neither p nor r. Let F2 be a second family of arcs, obtained from F1 by reflecting all arcs of F1 with respect to the line passing through r and s. Thus, in F2 , each arc Ja with a ∈ A contains q and s, but neither p nor r, and each arc Jb with b ∈ B contains p and r, but neither q nor s. Further, two vertices a ∈ A and b ∈ B are adjacent in H 1 if and only if Ja and Jb do not intersect. Then these two families F1 and F2 together form a bi-arc representation of H 1 . A bi-arc representation of the given graph H can now be obtained by ‘shortening’ the two arcs of each bi-arc with v ∈ V (H 0 ), to make sure that they are no longer overlapping. This is possible, as both {Jv : v ∈ V (H 0 ) ∩ A} and {Jv : v ∈ V (H 0 ) ∩ B} are in good position.  Lemma 2.4. If H contains any graph from Fig. 1 or from Fig. 2 as an induced subgraph, then H is not a bi-arc graph. Proof. It suffices to show that if H is one of graphs in Fig. 1 or 2, then H ∗ contains an edge-asteroid. This is indeed the case, as can be seen in Figs. 3 and 4, which contain the associated bipartite graphs of the graphs in Figs. 1 and 2. An edge-asteroid can be found in each, by taking the bold edges together with suitable paths. (All the asteroids are of order three, except the one in Fig. 4(I ∗ ), which is of order five.)  When H is a reflexive tree, H is an interval graph if and only if it does not contain the graph in Fig. 2(E), [9]. Such T. Feder et al. / Discrete Mathematics 307 (2007) 393 – 401 (A) (B) (C) (D) (E) (F) (G) (H) (I) 397 Fig. 2. (A*) (B*) (C*) Fig. 3. a tree is also known as a reflexive caterpillar. Thus it follows that in the case when H is reflexive, LIST-HOMH is polynomial time solvable if H is a caterpillar, and is NP-complete otherwise. We shall refer to a reflexive caterpillar also as a reflexive polynomial tree. When H is an irreflexive tree, it follows from Theorem 1.3 that the complement of H is a circular arc graph if and only if H does not contain the graph in Fig. 2(A) (since H does not contain any cycle and if it contains an edge-asteroid then it must contain the graph in Fig. 2(A)). Hence, when H is irreflexive, LIST-HOMH is polynomial time solvable if H does not contain the graph in Fig. 2(A), and is NP-complete otherwise. We shall refer to an irreflexive tree which does not contain the graph in Fig. 2(A) as an irreflexive polynomial tree. We define a vertex v in a tree to be a good vertex if there does not exist a path P of length six, with the middle vertex u, such that v is joined to u by a path (possibly of length zero) which is internally vertex-disjoint from P. For instance, every vertex of the graph in Fig. 1(A) is a good vertex, and so is every vertex of the graph in Fig. 1(B). All vertices except the center vertex of the graph in Fig. 1(C) are good vertices. The graph in Fig. 2(A) has no good vertices. Our main result is the following structural description of bi-arc trees: Theorem 2.5. Let H be a tree such that H 0 is a subtree of H. Then the following three statements are equivalent. (i) H is a bi-arc graph. (ii) H does not contain as an induced subgraph any graph from Fig. 1 or from Fig. 2. (iii) H is obtained either from a reflexive polynomial tree by deleting the loops at a subset (possibly empty) of leaves, or from an irreflexive polynomial tree by performing one of the following three operations: 398 T. Feder et al. / Discrete Mathematics 307 (2007) 393 – 401 (A*) (B*) (C*) (D*) (E*) (F*) (G*) (H*) (I*) Fig. 4. v1 S1 v2 vl S2 Sl Fig. 5. u1= v u2 ur−2 ur−1 ur Tr−1 (a) T1 Tr−2 T2 u1= v ur−2 u2 ur−1 Tr−1 (b) T1 Tr−2 T2 Fig. 6. ur T. Feder et al. / Discrete Mathematics 307 (2007) 393 – 401 399 • adding no loops, or adding a loop on a good vertex v, • adding a loop on a good vertex v and on a neighbour w of v, such that each neighbour of w other than v is a leaf, • adding a loop on a good vertex v, and loops on any number of neighbours of v which are leaves. The cases are illustrated in Figs. 5 and 6. Proof. (i) ⇒ (ii): This follows from Lemma 2.4. (ii) ⇒ (iii): Suppose that H does not contain as an induced subgraph any graph from Fig. 1 or from Fig. 2. Consider first the case when H 0 contains a path, say Q, of length at least three. In this case, each vertex of H − V (H 0 ) must be a leaf of H. If not, then H − V (H 0 ) contains two adjacent vertices x, y. Following the unique path from {x, y} to Q, we see that H contains the graph in Fig. 1(A), contradicting the assumption. Since H does not contain any graph in Fig. 2(E) and (H) as an induced subgraph, H 1 is a caterpillar. Hence H is obtained from a reflexive polynomial tree by deleting the loops at some leaves. Thus, we may now assume that H 0 contains no path of length at least three. This implies that either H is irreflexive or H 0 is a star. When H is irreflexive, H is an irreflexive polynomial tree because it does not contain the graph in Fig. 2(A) as an induced subgraph. So we assume that H 0 is a star. Since H does not contain as an induced subgraph any graph in Fig. 1(A)–(C) or Fig. 2(A)–(D), H 1 is an irreflexive polynomial tree. We claim that every vertex of H 0 is a good vertex of H. Suppose that some y ∈ V (H 0 ) is not a good vertex of H. Then there exists a path P = x1 x2 x3 x4 x5 x6 x7 and a path R = y . . . x4 (possibly of length zero) which is internally disjoint from P. If x4 ∈ / V (H 0 ), then H must contain one of the graphs in Fig. 2(A)–(D), a contradiction. If both x4 and x6 are 0 in V (H ), then x5 ∈ V (H 0 )and {x1 , x2 , . . . , x6 } induces a copy of the graph in Fig. 1(A), a contradiction; similarly, if both x4 and x2 are in V (H 0 ), then {x2 , x3 , . . . , x6 } induces a copy of the graph in Fig. 1(A), a contradiction. So x4 is in V (H 0 ) but neither x2 nor x6 is in V (H 0 ). It is now easy to see that the subgraph induced by {x1 , x2 , . . . , x7 } contains one of the graphs in Fig. 1(A)–(C), which is again a contradiction. Therefore, we have shown that every vertex of H 0 is indeed a good vertex of H. If H 0 has exactly one vertex, then H is obtained from an irreflexive polynomial tree by adding a loop on a good vertex. Suppose that H 0 has exactly two vertices, say u and v. If each of u and v has a neighbour which is not in {u, v} and which is not a leaf, then it is easy to see that H contains the graph in Fig. 1(B), a contradiction. Hence H is obtained from an irreflexive polynomial tree by performing the second operation. Suppose that H 0 has at least three vertices. Let V (H 0 ) = {v, v1 , . . . , vk } with k 2, where v is the center of the star H 0 . If vi is a leaf of H for each i = 1, 2, . . . , k, then H is obtained from an irreflexive polynomial tree by performing the third operation. So assume that at least one vj is not a leaf. Using the fact that H does not contain any of the two graphs in Fig. 1(A) and Fig. 2(H)(I), we see that each vertex of H − V (H 0 ) must be a leaf of H. Hence H is obtained from a reflexive polynomial tree by deleting loops at some leaves. (iii) ⇒ (i): Suppose that H is obtained from a reflexive polynomial tree by deleting the loops at some leaves. Then H 1 is an interval graph and each vertex of H − V (H 0 ) is a leaf of H. Thus, there is a representation of H by a family of intervals satisfying the properties of Lemma 2.2, and hence H is a bi-arc graph. So suppose next that H is obtained from an irreflexive polynomial tree by performing one of the three operations listed in the theorem. Let (A, B) be a bipartition of H. We may assume that V (H 0 ) = ∅. It is easy to see that every vertex of V (H 0 ) is a good vertex. We will show by induction on |V (H )| that there is a representation of H by a family of circular arcs, such that the two arc sets corresponding to V (H 0 ) ∩ A and V (H 0 ) ∩ B are both in good positions. We first consider the case when V (H 0 ) = {v}. This means that H is obtained from an irreflexive polynomial tree by adding a loop on a good vertex v. Without loss of generality, assume that v ∈ A. Suppose that v is a leaf and is adjacent to x in H. Then x is a good vertex of H − v, and hence there is a circular arc representation of H − v such that the arc corresponding to x is in a good position. Add to the family a new arc which contains all the clockwise endpoints of the arcs corresponding to the vertices of B − {x}, and which does not contain the counterclockwise endpoint of any arc corresponding to a vertex of B. This is possible since in the existing family the arc corresponding to x is in a good position. The resulting family is a circular arc representation of H, in which the added arc corresponding to v is in a good position. Suppose that v is adjacent to a leaf z. Represent H − z by a family of circular arcs in such a way that the arc corresponding to v is in a good position. It is possible to add an arc corresponding to z, to obtain a circular arc representation of H in which the arc corresponding to v is still in a good position. So we may assume that no vertex 400 T. Feder et al. / Discrete Mathematics 307 (2007) 393 – 401 in N(v) ∪ {v} is a leaf. Denote N (v) = {u0 , u1 , . . . , uk }. Then k 1 and N (ui ) − {v} = ∅ for each i = 0, 1, . . . , k. Since v is a good vertex, we may assume without loss generality that all vertices in N (ui ) − {v} are leaves, for each  i = 1, 2, . . . , k. Represent H − ki=1 (N(ui ) ∪ {ui } − {v}) by a family of circular arcs so that the arc corresponding to  v is in a good position. It is now possible to add new arcs corresponding to the vertices of ki=1 (N(ui ) ∪ {ui } − {v}) to obtain a circular arc representation of H in which the arc corresponding to v is still in a good position. Suppose next that V (H 0 )={v, w}. Assume that all neighbours of w other than v are leaves. According to the analysis above, it is possible to represent H − (N(w) ∪ {w} − {v}) by a family of circular arcs so that the arc corresponding to v is in a good position. Now a circular arc representation can be obtained as follows: add an arc corresponding to w so that it is in a good position and then add arcs corresponding to the vertices of N (w) − {v}. It is again easy to see that this can be done. Finally, suppose that V (H 0 ) = {v, w1 , . . . , wp } induces a star with center v, where each wi is a leaf in H. In this case, first represent H − {w1 , . . . , wp } by a family of circular arcs so that the arc corresponding to v is in a good position. Then add arcs corresponding to w1 , . . . , wp , so that the arc corresponding to v is in a good position and also the arc set corresponding to {w1 , . . . , wp } is in a good position. We have shown that there is a representation of H by a family of circular arcs so that the two arc sets corresponding to V (H 0 ) ∩ A and V (H 0 ) ∩ B are both in a good position. By Lemma 2.3, H is a bi-arc graph.  3. The conservative majority functions Recall that we have no explicit construction of the conservative majority function for an arbitrary bi-arc graph (even though [6] guarantees that one exists). Our structure theorem allows us to explicitly construct these conservative majority functions for bi-arc trees, according to the two classes described in (iii), Theorem 2.5. Suppose first that H is a bi-arc tree obtained from a reflexive polynomial tree by deleting the loops at a subset of leaves. We may assume that V (H 0 ) = ∅. Let P : v1 v2 . . . vl be a longest path in H 0 . Since H is a caterpillar, so is H 0 . Each vertex of H 0 − V (P ) and hence of H − V (P ) is a leaf of H. Let Si be the set of vertices of H − V (P ) adjacent to vi ∈ V (P ) for each i = 1, 2, . . . , l. Thus for each x ∈ V (H ) there exists a unique (x) such that x ∈ S(x) ∪ {v(x) }. For each i, i = 1, 2, . . . , l, we let Oi be an ordering of the vertices of Si ∪ {vi }, in which vi is the first vertex. We define a function f : V (H ) × V (H ) × V (H ) → V (H ) as follows: let x, y, z be three vertices of H. If any two of x, y, z are the same vertex, say w, then f (x, y, z) = w; otherwise let m be the median of (x), (y), (z) and set f (x, y, z) to be the first vertex of {x, y, z} in the ordering Om . Proposition 3.1. The function f is a conservative majority function. Suppose next that H is obtained from an irreflexive polynomial tree by performing one of the three operations listed in Theorem 2.5. We may again assume that H contains at least one loop. Let Q: u1 u2 . . . ur be a longest path in H such that u1 is the vertex v in V 0 (H ) described in Theorem 2.5, and it is the only vertex in Q that has a loop. Note that the vertices of H − V (Q) can again be partitioned into sets T1 , T2 , . . . , Tr such that Ti ∪ {ui } induces a subtree for each i = 1, 2, . . . , r. (Note that the maximality of Q assures that Tr = ∅.) Thus, for each x ∈ V (H ) there is again a unique (x) such that x ∈ T(x) ∪ {u(x) }. Note that (x) = 1 for all x ∈ V (H 0 ). Since v is a good vertex and Q is a longest path, the distance between ui and any other vertex in Ti ∪ {ui } is either one or two. We order the vertices of H as follows: first for each i = 1, 2, . . . , r we obtain an ordering Oi of the vertices of Ti ∪ {ui }, using the depth-first search starting at ui . When i = 1, the search is in favour of vertices of H 0 (note that V (H 0 ) ⊆ T1 ∪ {u1 }). Then we combine these orderings into a vertex ordering O of H by concatenating them in the order O1 , O2 , . . . , Or . Suppose that O is the ordering v1 , v2 , . . . , vn . Next, we colour the vertices of H with two colours so that two distinct adjacent vertices receive different colours (a proper two-colouring of H 1 ). Call each of the two sets of vertices of the same colour a colour class. We now define a function g: V (H ) × V (H ) × V (H ) → V (H ) as follows: let x, y, z be three vertices of H. (a) If any two of x, y, z are the same vertex, say w, then g(x, y, z) = w. (b) Suppose that x, y, z are distinct and in the same colour class. Let m be the median of (x), (y), (z). We define T. Feder et al. / Discrete Mathematics 307 (2007) 393 – 401 401 g(x, y, z) to be the first vertex among x, y, z in the ordering Om , except in the following four exceptional situations: • All three vertices x, y, z lie in Tm with m2. • All three vertices x, y, z lie in T1 and at most one of them has a loop. • Exactly two of x, y, z lie in T1 and exactly one of them has a loop. • Exactly two of x, y, z lie in T1 , neither has a loop, exactly one of them is adjacent to the unique neighbour of u1 with a loop, and the third vertex of x, y, z is not u1 . (This last case only applies in the situation in Fig. 6(a).) In these situations, we define g(x, y, z) be the second vertex among x, y, z in the ordering Om . (c) Suppose that x, y, z are distinct but not all in the same colour class. We define g(x, y, z) to be the first vertex in O of the two vertices in the same colour class, except when {x, y, z} contains u1 and at least one of its leaf neighbours with a loop, in which case we define g(x, y, z) = u1 . (This exceptional case only applies in the situation in Fig. 6(b).) Proposition 3.2. The function g is a conservative majority function. References [1] [2] [3] [4] [5] [6] [7] R.C. Brewster, T. Feder, P. Hell, J. Huang, G. McGillivray, Near unanimity functions and varieties of graphs, manuscript. G.R. Brightwell, P. Winkler, Graph homomorphisms and phase transitions, J. Combin. Theory B 77 (1999) 221–262. G.R. Brightwell, P. Winkler, Gibbs measures and dismantlable graphs, J. Combin. Theory B 78 (2000) 141–166. T. Feder, P. Hell, List homomorphisms to reflexive graphs, J. Combin. Theory B 72 (1998) 236–250. T. Feder, P. Hell, J. Huang, List homomorphisms and circular arc graphs, Combinatorica 19 (1999) 487–505. T. Feder, P. Hell, J. Huang, Bi-arc graphs and the complexity of list homomorphisms, J. Graph Theory 42 (2003) 61–80. T. Feder, M.Y. Vardi, The computational structure of monotone monadic SNP and constraint satisfaction: a study through datalog and group theory, SIAM J. Comput. 28 (1998) 57–104. [8] P. Hell, J. Nešetřil, Graphs and Homomorphisms, Oxford University Press, Oxford, 2004. [9] C.G. Lekkerkerker, J.Ch. Boland, Representation of a finite graph by a set of intervals on the real line, Fund. Math. 51 (1962) 45–64.