minimum cost homomorphisms to reflexive digraphs

13
Minimum Cost Homomorphisms to Reflexive Digraphs Arvind Gupta Pavol Hell Mehdi Karimi Arash Rafiey School of Computing Science Simon Fraser University Burnaby, B.C., Canada, V5A 1S6 * Abstract For digraphs G and H, a homomorphism of G to H is a mapping f : V (G)V (H) such that uv A(G) implies f (u)f (v) A(H). If moreover each vertex u V (G) is associated with costs c i (u),i V (H), then the cost of a homomorphism f is uV (G) c f (u) (u). For each fixed digraph H, the minimum cost homomorphism prob- lem for H, denoted MinHOM(H), is the following problem. Given an input digraph G, together with costs c i (u), u V (G), i V (H), and an integer k, decide if G admits a homomorphism to H of cost not exceeding k. Minimum cost homomorphism prob- lems encompass (or are related to) many well studied optimization problems such as chromatic partition optimization and applied problems in repair analysis. For undi- rected graphs the complexity of the problem, as a function of the parameter H, is well understood; for digraphs, the situation appears to be more complex, and only partial results are known. We focus on the minimum cost homomorphism problem for reflexive digraphs H (every vertex of H has a loop). It is known that the problem MinHOM(H) is polynomial time solvable if the digraph H has a Min-Max ordering, i.e., if its vertices can be linearly ordered by < so that i < j, s < r and ir, js A(H) imply that is A(H) and jr A(H). We give a forbidden induced subgraph charac- terization of reflexive digraphs with a Min-Max ordering; our characterization implies a polynomial time test for the existence of a Min-Max ordering. Using this charac- terization, we show that for a reflexive digraph H which does not admit a Min-Max ordering, the minimum cost homomorphism problem is NP-complete, as conjectured by Gutin and Kim. Thus we obtain a full dichotomy classification of the complexity of minimum cost homomorphism problems for reflexive digraphs. 1 Introduction and Terminology For digraphs G and H , a mapping f : V (G)V (H ) is a homomorphism of G to H if uv is an arc of G implies f (u)f (v) is an arc of H . Let H be a fixed digraph: the homomorphism * [email protected] , [email protected] , [email protected] , [email protected] 1

Upload: independent

Post on 18-Nov-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

Minimum Cost Homomorphisms to Reflexive Digraphs

Arvind Gupta Pavol Hell Mehdi Karimi Arash Rafiey

School of Computing ScienceSimon Fraser University

Burnaby, B.C., Canada, V5A 1S6 ∗

Abstract

For digraphs G and H, a homomorphism of G to H is a mapping f : V (G)→V (H)such that uv ∈ A(G) implies f(u)f(v) ∈ A(H). If moreover each vertex u ∈ V (G)is associated with costs ci(u), i ∈ V (H), then the cost of a homomorphism f is∑

u∈V (G) cf(u)(u). For each fixed digraph H, the minimum cost homomorphism prob-lem for H, denoted MinHOM(H), is the following problem. Given an input digraphG, together with costs ci(u), u ∈ V (G), i ∈ V (H), and an integer k, decide if G admitsa homomorphism to H of cost not exceeding k. Minimum cost homomorphism prob-lems encompass (or are related to) many well studied optimization problems such aschromatic partition optimization and applied problems in repair analysis. For undi-rected graphs the complexity of the problem, as a function of the parameter H, iswell understood; for digraphs, the situation appears to be more complex, and onlypartial results are known. We focus on the minimum cost homomorphism problemfor reflexive digraphs H (every vertex of H has a loop). It is known that the problemMinHOM(H) is polynomial time solvable if the digraph H has a Min-Max ordering,i.e., if its vertices can be linearly ordered by < so that i < j, s < r and ir, js ∈ A(H)imply that is ∈ A(H) and jr ∈ A(H). We give a forbidden induced subgraph charac-terization of reflexive digraphs with a Min-Max ordering; our characterization impliesa polynomial time test for the existence of a Min-Max ordering. Using this charac-terization, we show that for a reflexive digraph H which does not admit a Min-Maxordering, the minimum cost homomorphism problem is NP-complete, as conjecturedby Gutin and Kim. Thus we obtain a full dichotomy classification of the complexityof minimum cost homomorphism problems for reflexive digraphs.

1 Introduction and Terminology

For digraphs G and H, a mapping f : V (G)→V (H) is a homomorphism of G to H if uv isan arc of G implies f(u)f(v) is an arc of H. Let H be a fixed digraph: the homomorphism

[email protected] , [email protected] , [email protected] , [email protected]

1

problem for H, denoted HOM(H), asks whether or not an input digraph G admits ahomomorphism to H. The list homomorphism problem for H, denoted ListHOM(H),asks whether or not an input digraph G, with lists Lu ⊆ V (H), u ∈ V (G), admits ahomomorphism f to H in which all f(u) ∈ Lu, u ∈ V (G).

Suppose G and H are digraphs, and ci(u), u ∈ V (G), i ∈ V (H), are real costs. Thecost of a homomorphism f of G to H is

∑u∈V (G) cf(u)(u). If H is fixed, the minimum cost

homomorphism problem for H, denoted MinHOM(H), is the following problem. Given aninput digraph G, together with costs ci(u), u ∈ V (G), i ∈ V (H), and an integer k, decideif G admits a homomorphism to H of cost not exceeding k.

If the graph H is symmetric (each uv ∈ A(H) implies vu ∈ A(H)), we may view Has an undirected graph. In this way, we may view the problem MinHOM(H) as applyingalso to undirected graphs.

The minimum cost homomorphism problem was introduced, in the context of undi-rected graphs, in [16]. There, it was motivated by a real-world problem in defense logistics;in general, the problem seems to offer a natural and practical way to model many opti-mization problems. Special cases include for instance the list homomorphism problem[19, 21] and the optimum cost chromatic partition problem [18, 24, 25] (which itself has anumber of well-studied special cases and applications [27, 29]).

Our interest is in proving dichotomies: given a class of problems such as HOM(H), wewould like to prove that for each digraph H the problem is polynomial-time solvable, orNP-complete. This is, for instance, the case for HOM(H) with undirected graphs H [20];in that case it is known that HOM(H) is polynomial time solvable when H is bipartite orhas a loop, and NP-complete otherwise [20]. This is a dichotomy classification, since wespecifically classify the complexity of the problems HOM(H), depending on H.

For undirected graphs H, a dichotomy classification for the problem MinHOM(H)has been provided in [17]. (For ListHOM(H), consult [6].) Thus, the minimum costhomomorphism problem for graphs has been handled, and interest shifted to directedgraphs. The first studies [13, 14, 15] focused on irreflexive digraphs (no vertex has a loop),where dichotomies has been obtained for digraphs H such that U(H) is a complete orcomplete multipartite graph. More recently, [11] promoted the study of digraphs withloops allowed; and, in particular, of reflexive digraphs. Dichotomy has been proved forreflexive digraphs H such that U(H) is a complete graph, or a complete multipartitegraph without digons [10, 12]. In this paper, we give a full dichotomy classification of thecomplexity of MinHOM(H) for reflexive digraphs; this is the first dichotomy result fora general class of digraphs - our only restriction is that the digraphs are reflexive. Thedichotomy classification we prove verifies a conjecture of Gutin and Kim [10]. (Partialresults on ListHOM(H) for digraphs can be found in [3, 5, 7, 8, 9, 23, 32].

Let H be any digraph. An arc xy ∈ A(H) is symmetric if yx ∈ A(H); the digraph His symmetric if each arc of H is symmetric. Otherwise, we denote by S(H) the symmetric

2

c) Tent

����

����

������

������

����

����

����

������

������

����

����

����

����

����

����

����

����

����

������������������

������������������

������������������

������������������

��������������������������������������������

��������������������������������������������

��������������������������������������������

��������������������������������������������

������������

������������

��������������������������������������������

��������������������������������������������

����������������������������

������������

��������������������������������������������

��������������������������������������������

a) Claw b) Net

Figure 1: The claw, the net, and the tent.

subgraph of H, i.e., the undirected graph with V (S(H)) = V (H) and E(S(H)) = {uv :uv ∈ A(H) and vu ∈ A(H)}. We also denote by U(H) the underlying graph of H,i.e., the undirected graph with V (U(H)) = V (H) and E(U(H)) = {uv : uv ∈ A(H) orvu ∈ A(H)}. If H is a reflexive digraph, then both S(H) and U(H) are reflexive graphs.Finally, we denote by B(H) the bipartite graph obtained from H as follows. Each vertexv of H gives rise to two vertices of B(H) - a white vertex v′ and a black vertex v′′; eacharc vw of H gives rise to an edge v′w′′ of B(H). Note that if H is a reflexive digraph,then all edges v′v′′ are present in B(H). The converse of G is the digraph obtained fromG by reversing the directions of all arcs.

We say that an undirected graph H is a proper interval graph if there is an inclusion-free family of intervals Iv, v ∈ V (H), such that vw ∈ E(H) if and only if Iv intersects Iw.Note that by this definition proper interval graphs are reflexive. Wegner proved [30] thata reflexive graph H is a proper interval graph if and only if it does not contain an inducedcycle Ck, with k ≥ 4, or an induced claw, net, or tent, as given in Figure 1.

We say that a bipartite graph H (with a fixed bipartition into white and black vertices)is a proper interval bigraph if there are two inclusion-free families of intervals Iv, for allwhite vertices v, and Jw for all black vertices w, such that vw ∈ E(H) if and only if Iv

intersects Jw. By this definition proper interval bigraphs are irreflexive and bipartite. AWegner-like characterization (in terms of forbidden induced subgraphs) of proper intervalbigraphs is given in [22]: H is a proper interval bigraph if and only if it does not containan induced cycle C2k, with k ≥ 3, or an induced biclaw, binet, or bitent, as given in Figure2.

A linear ordering < of V (H) is a Min-Max ordering if i < j, s < r and ir, js ∈ A(H)imply that is ∈ A(H) and jr ∈ A(H). For a reflexive digraph H, it is easy to see that< is a Min-Max ordering if and only if for any j between i and k, we have ik ∈ A(H)imply ij, jk ∈ A(H). For a bipartite graph H (with a fixed bipartition into white andblack vertices), it is easy to see that < is a Min-Max ordering if and only if < restricted tothe white vertices, and < restricted to the black vertices satisfy the condition of Min-Max

3

c) Bitent

����

����

����

����

����

����

����

����

����

����

����

����

����

����

����

����

����

����

����

��������

��������������������������������������������

������������������������������������������������

������������������������������������������������������������

������������������������������������������������������������

������

������

�������

�������

�������������������� �����������������������������������������

�������������������

���������������������������������������������

���������������������������������������������

x 1

1

x

xx

y

4

yy 3 2

3 2

x1

x

x

x

x 1

1

x

xx

3

2 4

1

y

y y2 3

4y

y 2

y 3

3 2

a) Biclaw b) Binet

����

Figure 2: The biclaw, the binet, and the bitent.

orderings, i.e., i < j for white vertices, and s < r for black vertices, and ir, js ∈ A(H),imply that is ∈ A(H) and jr ∈ A(H)). A bipartite Min-Max ordering is an ordering <specified just for white and for black vertices.

It is known that if H admits a Min-Max ordering, then the problem MinHOM(H) ispolynomial time solvable [13], see also [4, 26]; however, there are digraphs with polynomialMinHOM(H) which do not have Min-Max ordering [14]. For undirected graphs, all Hwithout a Min-Max ordering yield an NP-complete MinHOM(H) [17]; moreoever, havinga Min-Max ordering can be characterized by simple forbidden induced subgraphs, andrecognized in polynomial time [17]. In particular, a reflexive graph admits a Min-Maxordering if and only if it is a proper interval graph, and a bipartite graph admits a Min-Max ordering if and only if it is a proper interval bigraph [17].

We shall give a combinatorial description of reflexive digraphs with Min-Max ordering,in terms of forbidden induced subgraphs. Our characterization yields a polynomial timealgorithm for the existence of a Min-Max ordering in a reflexive digraph. It also allowsus to complete a dichotomy classification of MinHOM(H) for reflexive digraphs H, byshowing that all problems MinHOM(H) where H does not admit a Min-Max ordering areNP-complete. This verifies a conjecture of Gutin and Kim in [10].

2 Structure and Forbidden Subgraphs

Since both reflexive and bipartite graphs admit a characterization of existence of Min-Maxorderings by forbidden induced subgraphs, our goal will be accomplished by proving thefollowing theorem. It also implies a polynomial time algorithm to test if a reflexive digraphhas a Min-Max ordering.

Theorem 2.1 A reflexive digraph H has a Min-Max ordering if and only if

4

6

����

��������

����

��������

����

����

����

��������

����

����

����

����

��������

����

����

x 1x 1

x 1

��������

��������

����

����

��������

��������

����

����

x

xx

x x

xx

x 1 x

xx

2 1 2

34

2

34

x 1

xx

x

x

x x

x

x

23

4 4

2

3

2

3

3 4

H H

H H H

H 1 2 3

4 5

Figure 3: The obstructions Hi with i = 1, 2, 3, 4, 5, 6.

• S(H) is a proper interval graph, and

• B(H) is a proper interval bigraph, and

• H does not contain an induced subgraph isomorphic to Hi with i = 1, 2, 3, 4, 5, 6.

The digraphs Hi are depicted in Figure 3. The resulting forbidden subgraph char-acterization is summarized in the following corollary. Note that forbidden subgraphs inS(H) directly describe forbidden subgraphs in H, and it is easy to see that each forbiddeninduced subgraph in B(H) can also be translated to a small family of forbidden inducedsubgraphs in H.

Corollary 2.2 A reflexive digraph H has a Min-Max ordering if and only if S(H) doesnot contain an induced Ck, k ≥ 4, or claw, net, or tent, B(H) does not contain an inducedC2k, k ≥ 3, or biclaw, binet, or bitent, and H does not contain an induced Hi with i =1, 2, 3, 4, 5, 6.

We proceed to prove the Theorem.

Proof: Suppose first that < is a Min-Max ordering < of H. It is easily seen that <is also a Min-Max ordering of S(H), and that < applied separately to the correspondingwhite and black vertices of B(H) is a bipartite Min-Max ordering of B(H). To completethe proof of necessity, we now claim that none of the digraphs Hi, i = 1, 2, 3, 4, 5, 6 admitsa Min-Max ordering. We only show this for H3, the proofs of the other cases being similar.

5

Suppose that < is a Min-Max ordering of H3. For the triple x1, x2, x3, we note that x2

must be between x1 and x3 in the ordering <, as otherwise we would have x1x3 ∈ E(S(H)). Without loss of generality assume that x1 < x2 < x3. Since x1 and x4 are independentand x1x2 ∈ E(S(H)), we must have x4 > x1. A similar argument yields x4 < x3; however,x1 < x4 < x3 is impossible, as x1x3 ∈ A(H) but x1x4 6∈ A(H).

To prove the sufficiency of the three conditions, we shall prove the following claim.

Lemma 2.3 If S(H) has a Min-Max ordering and B(H) has a bipartite Min-Max order-ing, then either H has a Min-Max ordering, or H contains an induced Hi (or its converse)for some i = 1, 2, 3, 4, 5, 6.

Proof: Suppose < is a bipartite Min-Max ordering of B(H). A pair u, v of vertices ofH is proper for < if u′ < v′ if and only if u′′ < v′′ in B(H). We say a bipartite Min-Maxordering < is proper if all pairs u, v of H are proper for <. If < is a proper bipartiteMin-Max ordering, then we can define a corresponding ordering ≺ on the vertices of H,where u ≺ v if and only if u′ < v′ (which happens if and only if u′′ < v′′). It is easy tocheck that ≺ is now a Min-Max ordering of H.

Suppose, on the other hand, that the bipartite Min-Max ordering < on B(H) is notproper. Thus there are vertices v′, u′ such that v′ < u′ and u′′ < v′′. Suppose there is novertex s′ such that s′v′′ ∈ E(B(H)), s′u′′ 6∈ E(B(H)): then we can exchange the positionof v′′ and u′′ in < and still have a bipartite Min-Max ordering. Furthermore, this exchangestrictly increases the number of proper pairs in H: any w with u′′ < w′′ < v′′ and u′ < w′

creates a new improper pair u, w but also creates a new proper pair v, w (and the pair u, vis also a new proper pair). Analogously, if there is no vertex t′′ such that u′t′′ ∈ E(B(H)),v′t′′ 6∈ E(B(H)), we can exchange u′, v′ and increase the number of proper pairs in H.Suppose we have performed all exchanges until we reached a bipartite Min-Max ordering< which admits no more exchanges. Then there are two possibilities: either < is nowproper, and H admits a Min-Max ordering as above, or < is still not proper, and one ofthe following two cases must occur (up to symmetry):

Case 1: s′v′′, v′t′′ ∈ E(B(H)) and s′u′′, u′t′′ 6∈ E(B(H)).

It is easy to see that since < is a bipartite Min-Max ordering, we must have u′ < s′

and t′′ < u′′. (Note that means that s′′ 6= t′′.) Since u′u′′, v′v′′ ∈ E(B(H)), by the sameargument we must have u′v′′, v′u′′ ∈ E(B(H)); and similarly we obtain s′t′′ 6∈ E(B(H)).If both v′s′′ and t′v′′ are edges of B(H) then u, v, s, t induce a claw in S(H): indeed inB(H), we have the edges v′t′′, t′v′′, v′u′′, u′v′′, v′s′′, s′v′′ and the non-edges u′t′′, s′u′′, s′t′′.This is a contradiction, as S(H) is assumed to have a Min-Max ordering, i.e., be a properinterval graph.

If neither v′s′′ nor t′v′′ is an edge of B(H), then if u′s′′ is an edge of B(H), thens, v, u induce a copy of H1 in H, and if , t′u′′ is an edge of B(H), then t, v, u induce a

6

copy of H1. Thus consider the case when u′s′′, t′u′′ 6∈ E(B(H)). If t′s′′ ∈ E(B(H)),then s′, s′′, t′, t′′, v′, v′′ would induce a copy of C6 in B(H), contrary to our assumptionthat B(H) has a bipartite Min-Max ordering, i.e., is a proper interval bigraph. Thust′s′′ 6∈ E(B(H)) and t, s, v, u induce a copy of H2 in H.

If only one of v′s′′ or t′v′′ is an edge of B(H), assume first that v′s′′ ∈ E(B(H)) andt′v′′ 6∈ E(B(H)). If t′u′′ is an edge of B(H), then t, v, u induce a copy of H1 in H, andif t′s′′ is an edge of B(H), then t, v, s similarly induce a copy of H1; thus asume thatt′u′′, t′s′′ 6∈ E(B(H)). Note that u′s′′ ∈ E(B(H)), else the vertices u′, u′′, v′, t′′, t′, s′′, s′

would induce a biclaw in B(H), contrary to B(H) being a proper interval bigraph. It nowfollows that s, t, u, v induce a copy of H3 in H. If v′s′′ 6∈ E(B(H)) and t′v′′ ∈ E(B(H)),the proof is similar, except we obtain copies of H1 and the converse of H3.

Case 2: s′v′′, u′t′′ ∈ E(B(H)) and s′u′′, v′t′′ 6∈ E(B(H)).

We again easily observe that we must have u′ < s′′, v′′ < t′′, and u′v′′, v′u′′ ∈ E(B(H)).If s′′ = t′′ we obtain a copy of H1 induced by u, v, s in H; hence we assume that s′′ 6=t′′. Suppose first that u′s′′, t′v′′ 6∈ E(B(H)). We have s′ < t′ and t′′ < s′′, and sot′s′′, s′t′′ ∈ A(H), implying that u, v, s, t induce a copy of H4 in H. Suppose next thatboth t′v′′, u′s′′ ∈ E(B(H)). If v′s′′ is not an edge of B(H), vertices u, v, s induce a copyof H1 in H, and if t′u′′ is not an edge of B(H), vertices u, v, t induce a copy of H1 inH. Thus we have v′s′′, t′u′′ ∈ E(B(H)). Now we have t′ < s′ and s′′ < t′′, and hencet′s′′, s′t′′ ∈ E(B(H)). This is impossible, since u, v, s, t would induce a copy of C4 inS(H). Finally,, if only one of t′v′′, u′s′′ as an edge of B(H), say u′s′′ ∈ E(B(H)) andt′v′′ 6∈ E(B(H)) (the other case is symmetric), then with the same argument as above,v′s′′ ∈ E(B(H)), s′t′′ ∈ E(B(H)), and s, t, u, v induce (depending on which of the pairst′u′′, t′s′′ are edges of B(H)) one of H1,H5 (or its converse), or H6 (or its converse). �

3 Complexity

If H has a Min-Max ordering, then MinHOM(H) is polynomial time solvable [13] seealso [4, 26]. Now using our forbidden induced subgraph characterization we can provethat reflexive digraphs H without a Min-Max ordering yield NP-complete MinHOM(H)problems. Note that we already know that MinHOM(S(H)) is NP-complete if S(H)is not a proper interval graph, and MinHOM(B(H)) is NP-complete if B(H) is not aproper interval bigraph [13]. We begin with a few simple observations. They first one iseasily proved by setting up a natural polynomial time reduction from MinHOM(B(H)) toMinHOM(H) [11].

Proposition 3.1 [11] If MinHOM(B(H)) is NP-complete, then MinHOM(H) is alsoNP-complete. �

7

The next two observations are folklore, and proved by obvious reductions, cf. [10].

Proposition 3.2 If MinHOM(S(H)) is NP-complete, then MinHOM(H) is also NP-complete. �

Proposition 3.3 Let H ′ be an induced subgraph of the digraph H. If MinHOM(H ′) isNP-complete then MinHOM(H) is NP-complete. �

We now continue to prove that MinHOM(H) is NP-complete for digraphs H = H1, . . . ,H6.Let I denote the following decision problem: given a graph X and an integer k, decidewhether or not X contains an independent set of k vertices. This problem has been usefulfor proving NP-completeness of minimum cost homomorphism problems for undirectedgraphs [17], and we use it again for digraphs.

Proposition 3.4 [17] The problem I is NP-complete, even when restricted to three-colourable graphs (with a given three-colouring). �

We denote by I3 the restriction of I to graphs with a given three-colouring. In thefollowing Lemmas, we give a polynomial time reductions from I3. Note that all problemsMinHOM(H) are in NP. The NP-completeness of MinHOM(H1) follows from [10], Lemma2-4.

Lemma 3.5 The problem MinHOM(H2) is NP-complete.

Proof: We now construct a polynomial time reduction from I3 to MinHOM(H2). LetX be a graph whose vertices are partitioned into independent sets U, V, W , and let k bea given integer. We construct an instance of MinHOM(H2) as follows: the digraph Gis obtained from X by replacing each edge uv of X with u ∈ U, v ∈ V by an arc uv,replacing each edge uw of X with u ∈ U,w ∈ W by an arc uw, and replacing each edgevw of X with v ∈ V,w ∈ W by an arc wv. The costs are defined by (writing for simplicityci(y) for cxi(y)) c1(u) = 0, c2(u) = 1 for u ∈ U , c4(v) = 0, c2(v) = 1 for v ∈ V , andc3(w) = 0, c2(w) = 1, for w ∈ W . All other ci(y) = |V (X)|.

We now claim that X has an independent set of size k if and only if G admits ahomomorphism to H2 of cost |V (X)| − k. Let I be an independent set in G. We candefine a mapping f : V (G) → V (H2) as follows:

• f(u) = x1 for u ∈ U ∩ I and f(u) = x2 for u ∈ U − I

• f(v) = x4 for v ∈ V ∩ I and f(v) = x2 for v ∈ V − I

8

• f(w) = x3 for w ∈ W ∩ I and f(w) = x2 for w ∈ W − I

This is a homomorphism of G to H2 of cost |V (X)| − k.

Let f be a homomorphism of G to H2 of cost |V (X)|−k. If k ≤ 0 then we are triviallydone so assume that k > 0, which implies that all individual costs are either zero or one.Let I = {y ∈ V (X) | cf(y)(y) = 0} and note that |I| ≥ k. It can be seen that I is anindependent set in G, as if uv ∈ E(G), where u ∈ I ∩U and v ∈ I ∩V then f(u) = x1 andf(v) = x4, contrary to f being a homomorphism. �

Lemma 3.6 MinHOM(H3) is NP-complete.

Proof: The reduction from the proof of Lemma 3.5 also applies here. �

Lemma 3.7 MinHOM(H4) is NP-complete.

Proof: We now construct a polynomial time reduction from I3 to MinHOM(H4).Let X be a graph whose vertices are partitioned into independent sets U, V, W , and let kbe a given integer. An instance of MinHOM(H4) is formed as follows: the digraph G isobtained from X by replacing each edge uv of X with u ∈ U, v ∈ V by an arc vu, replacingeach edge uw of X with u ∈ U,w ∈ W by a directed path umuww, and replacing eachedge vw of X with v ∈ V,w ∈ W by a directed path vmvww. The costs are defined byc1(u) = 1, c3(u) = 0 for u ∈ U ; c2(v) = 0, c3(v) = 1 for v ∈ V ; c4(w) = 0, c1(w) = 1for w ∈ W ; c3(muw) = c4(muw) = |V (X)| for each edge uw of X with u ∈ U,w ∈ W ;c2(mvw) = c4(mvw) = |V (X)| for each edge vw of X with v ∈ V,w ∈ W ; and ci(m) = 0 forany other vertex m ∈ V (G)− V (X), and ci(y) = |V (X)| for any other vertex y ∈ V (X).

We now claim that X has an independent set of size k if and only if G admits ahomomorphism to H4 of cost |V (X)| − k. Let I be an independent set in G. We candefine a mapping f : V (G) → V (H2) as follows:

• f(u) = x3 for u ∈ U ∩ I and f(u) = x1 for u ∈ U − I

• f(v) = x2 for v ∈ V ∩ I and f(v) = x3 for v ∈ V − I

• f(w) = x4 for w ∈ W ∩ I and f(w) = x1 for w ∈ W − I

• f(muw) = x2 when f(u) = x1, and f(muw) = x1 when f(u) = x3 for each edge uwof X with u ∈ U,w ∈ W

• f(mvw) = x3 when f(w) = x4 and f(mvw) = x1 when f(w) = x1 for each edge vwof X with v ∈ V,w ∈ W

9

This is a homomorphism of G to H4 of cost |V (X)| − k.

Let f be a homomorphism of G to H4 of cost |V (X)| − k. We may again assume thatall individual costs are either zero or one. Let I = {y ∈ V (X) | cf(y)(y) = 0} and notethat |I| ≥ k. It can be again seen that I is an independent set in G, as if uw ∈ E(G),where u ∈ I ∩ U and w ∈ I ∩ V then f(u) = x3 and f(w) = x4, thus, f(muw) = x3 orf(muw) = x4. However, the cost of homomorphism is greater than |V (X)|, a contradiction.The other cases can also be treated similarly. �

Lemma 3.8 MinHOM(H5) is NP-complete.

Proof: We similarly construct a polynomial time reduction from I3 to MinHOM(H5):this time the digraph G is obtained from X by replacing each edge uv of X with u ∈ U, v ∈V by an arc uv; replacing each edge uw of X with u ∈ U,w ∈ W by arcs umuw, wmuw;and replacing each edge wv of X with w ∈ W, v ∈ V by a directed path wmwvv. The costsare c1(u) = 1, c2(u) = 0 for u ∈ U ; c2(v) = 1, c4(v) = 0 for v ∈ V ; c3(w) = 1, c1(w) = 0for w ∈ W ; c1(muw) = c2(muw) = |V (X)| for each edge uw of X with u ∈ U,w ∈ W ;c1(mwv) = c4(mwv) = |V (X)| for each edge wv of X with w ∈ W, v ∈ V ; ci(m) = 0 forany other vertex m ∈ V (G)− V (X), and ci(y) = |V (X)| for any other vertex y ∈ V (X).

We again claim that X has an independent set of size k if and only if G admits ahomomorphism to H5 of cost |V (X)| − k. Let I be an independent set in G. We candefine a mapping f : V (G) → V (H2) by f(u) = x2 for u ∈ U ∩ I and f(u) = x1 foru ∈ U − I; f(v) = x4 for v ∈ V ∩ I and f(v) = x2 for v ∈ V − I; f(w) = x1 for w ∈ W ∩ Iand f(w) = x3 for w ∈ W − I; f(muw) = x3 when f(u) = x2, and f(muw) = x4 whenf(u) = x1, for each edge uw of X with u ∈ U,w ∈ W ; f(mwv) = x3 when f(w) = x3

and f(mwv) = x2 when f(w) = x1, for each edge wv of X with w ∈ W, v ∈ V . This is ahomomorphism of G to H5 of cost |V (X)| − k.

Let f be a homomorphism of G to H5 of cost |V (X)| − k. Assuming again that allindividual costs are either zero or one, let I = {y ∈ V (X) | cf(y)(y) = 0} and note that|I| ≥ k. It can be seen that I is an independent set in G, as if uw ∈ E(G), where u ∈ I∩Uand w ∈ I ∩ V then f(u) = x2 and f(w) = x1, thus, f(muw) = x1 or f(muw) = x2.However, the cost of homomorphism is greater than |V (X)|, a contradiction. The othercases can also be treated similarly. �

Lemma 3.9 MinHOM(H6) is NP-complete.

Proof: The proof is again similar, letting the digraph G be obtained from X byreplacing each edge uv of X with u ∈ U, v ∈ V by an arc uv; replacing each edge uw ofX with u ∈ U,w ∈ W by a directed path umuww; and replacing each edge vw of X withv ∈ V,w ∈ W by an arc wv. The costs are defined by c1(u) = 0, c2(u) = 1 for u ∈ U ;c3(v) = 0, c1(v) = 1 for v ∈ V ; c4(w) = 0, c3(w) = 1; c1(muw) = c4(muw) = |V (X)|

10

for each edge uw of X with u ∈ U,w ∈ W ; and letting ci(m) = 0 for any other vertexm ∈ V (G)− V (X), and ci(y) = |V (X)| for any other vertex y ∈ V (X).

It can again be seen that X has an independent set of size k if and only if G admits ahomomorphism to H6 of cost |V (X)| − k: lettin I be an independent set in G, we definea mapping f : V (G) → V (H2) by f(u) = x1 for u ∈ U ∩ I and f(u) = x2 for u ∈ U − I;f(v) = x3 for v ∈ V ∩ I and f(v) = x1 for v ∈ V − I; f(w) = x4 for w ∈ W ∩ I andf(w) = x3 for w ∈ W −I; f(muw) = x3 when f(u) = x2 and f(muw) = x2 when f(u) = x1

for each edge uw, u ∈ U,w ∈ W . This is a homomorphism of G to H6 of cost |V (X)| − k.

Let f be a homomorphism of G to H6 of cost |V (X)| − k and assume again that allindividual costs are either zero or one. Let I = {y ∈ V (X) | cf(y)(y) = 0} and note that|I| ≥ k. It can again be seen that I is an independent set in G. �

We have proved the following result, conjectured in [10].

Theorem 3.10 Let H be a reflexive digraph. If H has a Min-Max ordering, then MinHOM(H)is polynomial time solvable; otherwise, it is NP-complete.

References

[1] V.E. Alekseev and V.V. Lozin, Independent sets of maximum weight in (p, q)-colorable graphs,Discrete Mathematics 265 (2003), 351–356.

[2] J. Bang-Jensen and G. Gutin, Digraphs: Theory, Algorithms and Applications, Springer-Verlag, London, 2000.

[3] R. C. Brewster, P. Hell, Homomorphisms to powers of digraphs. Discrete Mathematics. 244(2002), 31–41.

[4] D. Cohen, M. Cooper, P. Jeavons, and A. Krokhin, A maximal tractable class of soft con-straints. J. Artif. Intell. Res. 22 (2004), 1–22.

[5] T. Feder, Homomorphisms to oriented cycles and k-partite satisfiability. SIAM J. DiscreteMath 14 (2001) 471-480.

[6] T. Feder, P. Hell, and J. Huang, Bi-arc graphs and the complexity of list homomorphisms, J.Graph Theory 42 (2003) 61 - 80.

[7] T. Feder, P. Hell and K. Tucker-Nally, Digraph matrix partitions and trigraph homomor-phisms. Discrete Applied Mathematics. 154 (2006), 2458–2469.

[8] T. Feder, P. Hell, J. Huang, List homomorphisms to reflexive digraphs, manuscript 2005.

[9] T. Feder, Classification of Homomorphisms to Oriented Cycles and k-Partite Satisfiability.SIAM Journal on Discrete Mathematics. 14 (2001), 471–480.

[10] G. Gutin and E.J. Kim, Complexity of the minimum cost homomorphism problem for semi-complete digraphs with possible loops, submitted.

11

[11] G. Gutin and E.J. Kim, Introduction to the minimum cost homomorphism problem for di-rected and undirected graphs, to appear in Lecture Notes of the Ramanujan Math. Society.

[12] G. Gutin and E.J. Kim, On the complexity of the minimum cost homomorphism problem forreflexive multipartite tournaments, submitted.

[13] G. Gutin, A. Rafiey and A. Yeo, Minimum Cost and List Homomorphisms to SemicompleteDigraphs. Discrete Appl. Math. 154 (2006), 890–897.

[14] G. Gutin, A. Rafiey and A. Yeo, Minimum Cost Homomorphisms to Semicomplete Multipar-tite Digraphs. Submitted to Discrete Applied Math.

[15] G. Gutin, A. Rafiey and A. Yeo, Minimum Cost Homomorphisms to Semicomplete BipartiteDigraphs. Submitted.

[16] G. Gutin, A. Rafiey, A. Yeo and M. Tso, Level of repair analysis and minimum cost homo-morphisms of graphs. Discrete Appl. Math. 154 (2006), 881–889.

[17] G. Gutin, P. Hell, A. Rafiey and A. Yeo, A dichotomy for minimum cost graph homomor-phisms, to appear in European J. Combin.

[18] M. M. Halldorsson, G. Kortsarz, and H. Shachnai, Minimizing average completion of dedicatedtasks and interval graphs. Approximation, Randomization, and Combinatorial Optimization(Berkeley, Calif, 2001), Lecture Notes in Computer Science, vol. 2129, Springer, Berlin, 2001,pp. 114–126.

[19] P. Hell, Algorithmic aspects of graph homomorphisms, in ‘Survey in Combinatorics 2003’,London Math. Soc. Lecture Note Series 307, Cambridge University Press, 2003, 239 – 276.

[20] P. Hell and J. Nesetril, On the complexity of H-colouring. J. Combin. Theory B 48 (1990),92–110.

[21] P. Hell and J. Nesetril, Graphs and Homomorphisms. Oxford University Press, Oxford, 2004.

[22] P. Hell and J. Huang, Interval bigraphs and circular arc graphs. J. Graph Theory 46 (2004),313–327.

[23] P. Hell, J. Nesetril, X. Zhu, Complexity of Tree Homomorphisms. Discrete Applied Mathe-matics. 70 (1996), 23-36.

[24] K. Jansen, Approximation results for the optimum cost chromatic partition problem. J. Al-gorithms 34 (2000), 54–89.

[25] T. Jiang and D. B. West, Coloring of trees with minimum sum of colors. J. Graph Theory 32(1999), 354–358.

[26] S. Khanna, M. Sudan, L. Trevisan, D. Williamson, The approximability of constraint satis-faction problems, SIAM Journal on Computing 30 (2000) 18631920.

[27] L.G. Kroon, A. Sen, H. Deng, and A. Roy, The optimal cost chromatic partition problemfor trees and interval graphs, Graph-Theoretic Concepts in Computer Science (Cadenabbia,1996), Lecture Notes in Computer Science, vol. 1197, Springer, Berlin, 1997, pp. 279–292.

[28] L. Lovasz, Three short proofs in graph theory, J. Combin. Theory, Ser. B 19 (1975), 269–271.

[29] K. Supowit, Finding a maximum planar subset of a set of nets in a channel. IEEE Trans.Computer-Aided Design 6 (1987), 93–94.

12

[30] G. Wegner, Eigenschaften der nerven homologische-einfactor familien in Rn, Ph.D. Thesis,Universitat Gottigen, Gottigen, Germany (1967).

[31] D. West, Introduction to Graph Theory, Prentice Hall, Upper Saddle River, 1996.

[32] H. Zhou, Characterization of the homomorphic preimages of certain oriented cycles. SIAMJournal on Discrete Mathematics. 6 (1993), 87–99.

13