1: \documentclass[11pt]{article}
2: \usepackage{amssymb}
3: \usepackage{geometry}
4: \usepackage{amsmath}
5: \usepackage{amsfonts}
6: \usepackage{graphicx}
7:
8: %\setlength{\textwidth}{150mm} \setlength{\textheight}{20cm}
9: %\setlength{\parskip}{2mm} \setlength{\headheight}{0cm}
10: %\setlength{\topmargin}{-0.5cm} \setlength{\oddsidemargin}{0.5cm}
11: %\setlength{\evensidemargin}{0.0cm}
12:
13: \begin{document}
14: \newcommand{\2}{\vspace{0.2 cm}}
15: \newcommand{\dist}{{\rm dist}}
16: \newcommand{\diam}{{\rm diam}}
17: \newcommand{\rad}{{\rm rad}}
18: \newcommand{\dom}{\mbox{$\rightarrow$}}
19: \newcommand{\ndom}{\mbox{$\not\rightarrow$}}
20: \newcommand{\sdom}{\mbox{$\Rightarrow$}}
21: \newcommand{\nsdom}{\mbox{$\not\Rightarrow$}}
22: \newcommand{\qed}{\hfill$\diamond$}
23: \newcommand{\pf}{{\bf Proof: }}
24: \newtheorem{theorem}{Theorem}[section]
25: \newcommand{\ra}{\rangle}
26: \newcommand{\la}{\langle}
27: \newtheorem{lemma}[theorem]{Lemma}
28: \newtheorem{corollary}[theorem]{Corollary}
29: \newtheorem{proposition}[theorem]{Proposition}
30: \newtheorem{conjecture}[theorem]{Conjecture}
31: \newtheorem{problem}[theorem]{Problem}
32: \newtheorem{remark}[theorem]{Remark}
33: \newtheorem{example}[theorem]{Example}
34: \newcommand{\beq}{\begin{equation}}
35: \newcommand{\eeq}{\end{equation}}
36: \newcommand{\argmax}{{\rm argmax}}
37: \newcommand{\MiP}{MinHOMP($H$) }
38: \newcommand{\MaP}{MaxHOMP($H$) }
39: \newcommand{\vecc}[1]{\stackrel{\leftrightarrow}{#1}}
40:
41:
42: \title{Minimum Cost and List Homomorphisms to Semicomplete Digraphs}
43: \author{G. Gutin, A. Rafiey and A. Yeo\\
44: Department of Computer Science\\
45: Royal Holloway University of London\\
46: Egham, Surrey TW20 OEX, UK\\
47: {\tt gutin(arash,anders)@cs.rhul.ac.uk}}
48:
49: \date{}
50:
51: \maketitle
52:
53:
54:
55:
56: \begin{abstract}
57: For digraphs $D$ and $H$, a mapping $f:\ V(D)\dom V(H)$ is a {\em
58: homomorphism of $D$ to $H$} if $uv\in A(D)$ implies $f(u)f(v)\in
59: A(H).$ Let $H$ be a fixed directed or undirected graph. The
60: homomorphism problem for $H$ asks whether a directed or undirected
61: graph input digraph $D$ admits a homomorphism to $H.$ The list
62: homomorphism problem for $H$ is a generalization of the
63: homomorphism problem for $H$, where every vertex $x\in V(D)$ is
64: assigned a set $L_x$ of possible colors (vertices of $H$).
65:
66: The following optimization version of these decision problems was
67: introduced in \cite{gutinDAM}, where it was motivated by a
68: real-world problem in defence logistics. Suppose we are given a
69: pair of digraphs $D,H$ and a positive cost $c_i(u)$ for each $u\in
70: V(D)$ and $i\in V(H)$. The cost of a homomorphism $f$ of $D$ to
71: $H$ is $\sum_{u\in V(D)}c_{f(u)}(u)$. For a fixed digraph $H$, the
72: minimum cost homomorphism problem for $H$, MinHOMP($H$), is stated
73: as follows: For an input digraph $D$ and costs $c_i(u)$ for each
74: $u\in V(D)$ and $i\in V(H)$, verify whether there is a
75: homomorphism of $D$ to $H$ and, if it exists, find such a
76: homomorphism of minimum cost.
77:
78: We obtain dichotomy classifications of the computational
79: complexity of the list homomorphism problem and MinHOMP($H$), when
80: $H$ is a semicomplete digraph (a digraph in which every two
81: vertices have at least one arc between them). Our dichotomy for
82: the list homomorphism problem coincides with the one obtained by
83: Bang-Jensen, Hell and MacGillivray in 1988 for the homomorphism
84: problem when $H$ is a semicomplete digraph: both problems are
85: polynomial solvable if $H$ has at most one cycle; otherwise, both
86: problems are NP-complete. The dichotomy for \MiP is different: the
87: problem is polynomial time solvable if $H$ is acyclic or $H$ is a
88: cycle of length 2 or 3; otherwise, the problem is NP-hard.
89: \end{abstract}
90:
91: \section{Introduction}
92:
93: For excellent introductions to homomorphisms in directed and
94: undirected graphs, see \cite{hell2003,hell2004}. In this paper,
95: directed (undirected) graphs have no parallel arcs (edges) or
96: loops. The vertex (arc) set of a digraph $G$ is denoted by $V(G)$
97: ($A(G)$). The vertex (edge) set of an undirected graph $G$ is
98: denoted by $V(G)$ ($E(G)$). For a digraph $G$, if $xy\in A(G)$, we
99: say that $x$ {\em dominates} $y$ and $y$ is {\em dominated} by
100: $x$. A $k$-{\em cycle}, denoted by $\vec{C}_k$, is a directed
101: simple cycle with $k$ vertices. A digraph is {\em acyclic} if it
102: has no cycle. A digraph $D$ is {\em semicomplete} if, for each
103: pair $x,y$ of distinct vertices either $x$ dominates $y$ or $y$
104: dominates $x$ or both. A {\em tournament} is a semicomplete
105: digraph with no 2-cycle. Semicomplete digraphs and, in particular,
106: tournaments are well-studied in graph theory and algorithms
107: \cite{bang2000}. A digraph $G'$ is the {\em dual} of a digraph $G$
108: if $G'$ is obtained from $G$ by changing orientations of all arcs.
109:
110: For digraphs $D$ and $H$, a mapping $f:\ V(D)\dom V(H)$ is a {\em
111: homomorphism of $D$ to $H$} if $uv\in A(D)$ implies $f(u)f(v)\in
112: A(H).$ A homomorphism $f$ of $D$ to $H$ is also called an {\em
113: $H$-coloring} of $G$, and $f(x)$ is called {\em color} of $x$ for
114: every $x\in V(D).$ We denote the set of all homomorphisms from $D$
115: to $H$ by $HOM(D,H)$. Let $H$ be a fixed digraph. The {\em
116: homomorphism problem for} $H$, ${\rm HOMP}(H)$, asks whether there
117: is a homomorphism of an input digraph $D$ to $H$ (i.e., whether
118: $HOM(D,H)\neq \emptyset$). In the {\em list homomorphism problem
119: for} $H$, ${\rm LHOMP}(H)$, we given an input digraph $D$ and a
120: set (called a {\em list}) $L_v\subseteq V(H)$ for each $v\in
121: V(D)$. Our aim is to check whether there is a homomorphism $f\in
122: HOM(D,H)$ such that $f(v)\in L_v$ for each $v\in V(D).$
123:
124: The problems ${\rm HOMP}(H)$ and ${\rm LHOMP}(H)$ have been
125: studied for several families of directed and undirected graphs
126: $H$, see, e.g., \cite{hell2003,hell2004}. A well-known result of
127: Hell and Ne\v{s}et\v{r}il \cite{hellJCT48} asserts that ${\rm
128: HOMP}(H)$ for undirected graphs is polynomial time solvable if $H$
129: is bipartite and it is NP-complete, otherwise. Feder, Hell and
130: Huang \cite{federC19} proved that ${\rm LHOMP}(H)$ for undirected
131: graphs is polynomial time solvable if $H$ is a bipartite graph
132: whose complement is a circular arc graph (a graph isomorphic to
133: the intersection graph of arcs on a circle), and ${\rm LHOMP}(H)$
134: is NP-complete, otherwise. Such a dichotomy classification for all
135: digraphs is unknown and only partial classifications have been
136: obtained; see \cite{hell2004}. For example, Bang-Jensen, Hell and
137: MacGillivray \cite{bangSIAMJDM1} showed that ${\rm HOMP}(H)$ for
138: semicomplete digraphs $H$ is polynomial time solvable if $H$ has
139: at most one cycle and ${\rm HOMP}(H)$ is NP-complete, otherwise.
140: Nevertheless, Bulatov \cite{bulatovACMTCL} managed to prove that
141: for each directed graph $H$, ${\rm LHOMP}(H)$ is either polynomial
142: time solvable or NP-complete. The same result for ${\rm HOMP}(H)$
143: is conjectured, see, e.g., \cite{hell2003,hell2004}. If this
144: conjecture holds, it will imply that the well-known Constraint
145: Satisfaction Problem Dichotomy Conjecture of Feder and Vardi also
146: holds \cite{federSIAMJC28}.
147:
148: The authors of \cite{gutinDAM} introduced an optimization problem
149: on $H$-colorings for undirected graphs $H$, MinHOMP($H$). The
150: problem is motivated by a problem in defence logistics. Suppose we
151: are given a pair of digraphs $D,H$ and a positive cost $c_i(u)$
152: for each $u\in V(D)$ and $i\in V(H)$. The {\em cost} of a
153: homomorphism $f$ of $D$ to $H$ is $\sum_{u\in V(D)}c_{f(u)}(u)$.
154: For a fixed digraph $H$, the {\em minimum cost homomorphism
155: problem} \MiP is stated as follows: For an input digraph $D$ and
156: costs $c_i(u)$ for each $u\in V(D)$ and $i\in V(H)$, verify
157: whether $HOM(D,H)\neq \emptyset$ and, if $HOM(D,H)\neq \emptyset$,
158: find a homomorphism in $HOM(D,H)$ of minimum cost. The problem
159: \MiP generalizes ${\rm LHOMP}(H)$ (and, thus, HOMP($H$)): assign
160: $c_i(u)=1$ if $i\in L_u$ and $c_i(u)=2,$ otherwise.
161:
162: In this paper, we obtain dichotomy classifications for ${\rm
163: LHOMP}(H)$ and \MiP when $H$ is a semicomplete digraph. Our
164: classification for ${\rm LHOMP}(H)$ coincides with that for ${\rm
165: HOMP}(H)$ \cite{bangSIAMJDM1} described earlier. However, for \MiP
166: the classification is different: the problem is polynomial time
167: solvable when $H$ is either an acyclic tournament or a 2-cycle or
168: a 3-cycle. Otherwise, \MiP is NP-hard. This implies that even when
169: $H$ is a unicyclic semicomplete digraph on at least four vertices,
170: \MiP is NP-hard (unlike HOMP($H$) and LHOMP($H$)).
171:
172: The {\em maximum cost homomorphism problem} \MaP is the same
173: problem as MinHOMP($H$), but instead of minimization we consider
174: maximization. Let $M$ be a constant larger than any cost $c_i(u)$,
175: $u\in V(D),\ i\in V(H)$. Then the cost $c'_i(u)=M-c_i(u)$ is
176: positive for each $u\in V(D),\ i\in V(H)$. Due to this
177: transformation, the problems \MiP and \MaP are equivalent. Notice
178: that allowing negative or zero costs would not make \MiP and \MaP
179: more difficult: we can easily transform this more general case to
180: the positive costs one by adding a large constant $M'$ to each
181: cost. This transformation does not change optimal solutions.
182:
183:
184:
185: The rest of the paper is organized as follows. In Section
186: \ref{homsec}, we introduce the homomorphic product of digraphs and
187: relate it to a maximum cost homomorphism. We prove that LHOMP($H$)
188: and \MiP are polynomial time solvable when $H$ is an acyclic
189: tournament. The dichotomy classifications LHOMP($H$) and \MiP when
190: $H$ is a semicomplete digraph are proved in Sections \ref{lhclass}
191: and \ref{semsec}, respectively. We conclude the paper by posing
192: some open problems.
193:
194: \section{Products and Homomorphisms of Digraphs}\label{homsec}
195:
196: In this section, we describe an approach for proving that \MaP is
197: polynomial time solvable for certain digraphs $H$. Using our
198: approach, we prove that \MaP is polynomial time solvable for
199: acyclic tournaments. To the best of our knowledge this approach,
200: which is of interest also for ${\rm HOM}(H)$ and ${\rm LHOM}(H)$,
201: has not been studied earlier.
202:
203: For $H$ belonging to a special family $\cal H$ of digraphs, we can
204: transform \MaP into the problem of finding a maximum cost
205: independent set in a special family ${\cal F}({\cal H})$ of
206: undirected graphs. If the last problem is polynomial time solvable
207: (when, for example, ${\cal F}({\cal H})$ consists of perfect
208: graphs, $2P_2$-free graphs, claw-free graphs or graphs of other
209: special classes, see
210: \cite{alekseev1991,alekseevDAM145,balasN19,bertolazziDAM76,grotschelADM21,nakamuraJORSJ44}),
211: then our approach is useful.
212:
213: The {\em homomorphic product} of digraphs $D$ and $H$ is an
214: undirected graph $D\otimes H$ defined as follows: $V(D\otimes
215: H)=\{u_i:\ u\in V(D),\ i\in V(H)\}$, $E(D\otimes H)=\{u_iv_j:\
216: uv\in A(D),\ ij\notin A(H)\}\cup \{u_iu_j: u\in V(D), i\neq j\in
217: V(H)\}.$ Let $\mu=\max\{c_j(v):\ v\in V(D),\ j\in V(H)\}.$ We
218: define the cost of $u_i$, $c(u_i)=c_i(u)+\mu |V(D)|.$ For a set
219: $X\subseteq V(D\otimes H)$, we define $c(X)=\sum_{x\in X}c(x).$
220:
221:
222: \begin{theorem}\label{maint}
223: Let $D$ and $H$ be digraphs. Then there is a homomorphism of $D$
224: to $H$ if and only if the number of vertices in a largest
225: independent set of $D\otimes H$ equals $|V(D)|$. If $HOM(D,H)\neq
226: \emptyset$, then $h\in HOM(D,H)$ is of maximum cost if and only if
227: $I=\{x_{h(x)}:\ x\in V(D)\}$ is an independent set of maximum
228: cost.
229: \end{theorem}
230: \pf Let $h:\ D \dom H$ be a homomorphism. Consider $I=\{x_{h(x)}:\
231: x\in V(D)\}$. Suppose that $x_{h(x)}y_{h(y)}$ is an edge in
232: $D\otimes H$. Then either $xy\in A(D)$ and $h(x)h(y)\notin A(H)$
233: or $yx\in A(D)$ and $h(y)h(x)\notin A(H)$. Either case contradicts
234: the fact that $h$ is a homomorphism. Thus, $I$ is an independent
235: set in $D\otimes H.$
236:
237: Observe that each independent set in $D\otimes H$ contains at most
238: one vertex in each set $S_x=\{x_i:\ i\in V(H)\},$ $x\in V(D)$. Let
239: $I=\{x_{f(x)}:\ x\in V(D)\}$ be an independent set in $D\otimes H$
240: with $|V(D)|$ vertices. Consider the mapping $f:\ x\mapsto f(x).$
241: Assume $xy\in A(D).$ Since $I$ is independent, $f(x)f(y)\in A(H)$.
242: Thus, $f\in HOM(D,H).$
243:
244: Let $HOM(D,H)\neq \emptyset$ and let $n=|V(D)|.$ Let $X$ and $Y$
245: be subsets of $V(D\otimes H)$ and $|X|=|Y|+1\le n.$ Then
246: $$ c(X)-c(Y)\ge |X|n\mu -(|X|-1)(n+1)\mu\ge \mu
247: >0.$$
248: Thus, in particular, every maximum cost independent set of
249: $D\otimes H$ is a largest independent set. Observe that the cost
250: of the homomorphism $f$ defined above equals the cost of vertices
251: in the independent set $I$ minus $n^2\mu,$ which is a constant.
252: Thus, every maximum cost independent set of $D\otimes H$
253: corresponds to a maximum cost homomorphism of $D$ to $H$ and vise
254: versa.\qed
255:
256: \begin{remark}
257: Observe that Theorem \ref{maint} holds when $H$ has loops.
258: \end{remark}
259:
260:
261: \begin{remark}
262: In applications of Theorem \ref{maint}, we may need to replace a
263: pair $D,H$ by another pair $D',H'$ such that $HOM(D,H)=HOM(D',H')$
264: and the costs of the homomorphisms remain the same.
265: \end{remark}
266:
267:
268:
269: Consider the following corollary of Theorem \ref{maint}. A digraph
270: $D$ is {\em transitive} if $xy,yz\in A(D)$ implies $xz\in A(D)$
271: for all pairs $xy,yz$ of arcs in $D.$ A graph is a {\em
272: comparability graph} if it has an orientation, which is
273: transitive. Bang-Jensen, Hell and MacGillivray \cite{bangSIAMJDM1}
274: proved that if $H$ is an acyclic tournament, then ${\rm HOMP}(H)$
275: is polynomial time solvable. We extend this result to \MiP and
276: MaxHOMP($H$).
277:
278: \begin{theorem}\label{acyclicth}
279: If $H$ is an acyclic tournament, then \MaP and \MiP are polynomial
280: time solvable.
281: \end{theorem}
282: \pf Let $H$ be an acyclic tournament with $V(H)=\{1,2,\ldots,p\}$
283: and $A(H)=\{ij: 1\le i<j\le p\}.$
284:
285: Observe that $H$ is transitive. Also observe that $HOM(D,H)=
286: \emptyset$ unless $D$ is acyclic. Since we can verify that $D$ is
287: acyclic in polynomial time (for example, by deleting vertices of
288: indegree 0), we may assume that $D$ is acyclic. Since $H$ is
289: transitive, we have $HOM(D,H)=HOM(D^+,H)$, where $D^+$ is the
290: transitive closure of $D$, i.e., if there is a path from $x$ to
291: $y$ in $D$, then $xy\in D^+.$ One can find the transitive closure
292: of a digraph in polynomial time using DFS or BFS \cite{bang2000},
293: so we may assume that $D$ is transitive.
294:
295: Let $G=D\otimes H$. Let $G'$ be an orientation of $G$ such that
296: $$A(G')=\{x_iy_j:\ j\leq i, xy\in A(D)\}\cup \{x_ix_j:\ x\in
297: V(D),\ j<i\}.$$ We will prove that $G'$ is a transitive digraph.
298: Let $x_iy_j,y_jz_k\in A(G')$. Observe that $i\ge j\ge k$ and
299: consider three cases covering all possibilities.
300:
301: \2
302:
303: {\bf Case 1:} $x=y=z$. Then $x_ix_j,x_jx_k\in A(G')$ and, thus,
304: $i>j>k$ and $x_iz_k=x_ix_k \in A(G').$
305:
306: \2
307:
308: {\bf Case 2:} $x=y=z$ does not hold, but not all vertices $x,y,z$
309: are distinct. Without loss of generality, assume that $x=y\neq z.$
310: Then $x_ix_j,x_jz_k\in A(G')$ and, thus, $i>k$ and $x_iz_k\in
311: A(G').$
312:
313: \2
314:
315: {\bf Case 3:} $x,y,z$ are all distinct. Then $xy,yz\in A(D^+)$
316: and, thus, $xz\in A(D^+)$. Since $i\ge k$, we conclude that
317: $x_iz_k\in A(G').$
318:
319: \2
320:
321: So, we have proved that $G$ is a comparability graph and, thus, it
322: is perfect. Therefore, a maximum cost independent set in $D\otimes
323: H$ can be found in polynomial time \cite{grotschelADM21}. It
324: remains to apply Theorem \ref{maint}. If $D\otimes H$ has an
325: independent set with $|V(D)|$ vertices, $HOM(D,H)\neq \emptyset$
326: and a maximum cost independent set corresponds to a maximum cost
327: $H$-coloring.\qed
328:
329: \begin{corollary}
330: If $H$ is an acyclic tournament, then LHOMP($H$) is polynomial
331: time solvable.
332: \end{corollary}
333:
334:
335:
336: \section{Dichotomy for LHOMP($H$)}\label{lhclass}
337:
338: Recall that $\vec{C}_k$ denotes a directed cycle on $k$ vertices,
339: $k\ge 2$; let $V(\vec{C}_k)=\{1,2,\ldots,k\}.$ One can check
340: whether $HOM(D,\vec{C}_k)\neq \emptyset$ using the following
341: algorithm $\cal A$ from Section 1.4 of \cite{hell2004}. First, we
342: may assume that $D$ is connected (i.e., its underlying undirected
343: graph is connected) as otherwise $\cal A$ can be applied to each
344: component of $D$ separately. Choose a vertex $x$ of $D$ and assign
345: it color 1. Assign every out-neighbor of $x$ color 2 and each
346: in-neighbor of $x$ color $k$. For every vertex $y$ with color $i$,
347: we assign every out-neighbor of $y$ color $i+1$ modulo $k$ and
348: every in-neighbor of $y$ color $i-1$ modulo $k$. We have
349: $HOM(D,\vec{C}_k)\neq \emptyset$ if and only if no vertex is
350: assigned different colors.
351:
352:
353:
354: M. Green \cite{green} was the first to prove Theorem \ref{P3}, but
355: his proof uses polymorphisms (for the definition and results on
356: polymorphisms, see, e.g., \cite{bulatovACMTCL}). Our proof below
357: is elementary and does not require polymorphisms.
358:
359: \begin{theorem}\label{P3}
360: Let $H$ be a semicomplete digraph with a unique cycle, then ${\rm
361: LHOMP}(H)$ is polynomial time solvable.
362: \end{theorem}
363: \pf It is well-known \cite{bang2000} that a semicomplete digraph
364: with a unique cycle contains a cycle with two or three vertices.
365: Assume that $H$ has a cycle with three vertices (the case of
366: 2-cycle can be treated similarly). Let the vertex set of $H$ be
367: $\{1,2,\ldots,p\}$ and $A(H)=\{ij:\ i<j, (i,j)\neq (a,b)\}\cup
368: \{ba\}$, where $b=a+2.$
369:
370: We use the following recursive procedure. If $V(D)= \{v\}$ and
371: $L_v \neq \emptyset $, then the solution is trivial. Now suppose
372: that $|V(D)| \ge 2$ and consider the following two properties of a
373: vertex $x$ in $D$:
374:
375: \begin{itemize}
376: \item[(a)] $x$ has in-degree zero, and $L_x$ has an element
377: smaller than $a$. \item[(b)] $x$ has out-degree zero, and $L_x$
378: has an element greater than
379: $a+2$.
380: \end{itemize}
381:
382:
383: If there is a vertex $x$ with property $(a)$, then define
384: $f(x)=i$, where $i$ is the minimum number in $L_x$, and delete all
385: $j \le i$ from the lists of all out-neighbors of $x$. Run the
386: procedure for $D-x$ with changed lists. If there is a vertex $x$
387: with property $(b)$, then define $f(x)=i$, where $i$ is the
388: maximum number in $L_x$, and delete all $j \ge i$ from the lists
389: of all in-neighbors of $x$. Run the procedure for $D-x$ with
390: changed lists.
391:
392: If no vertex with either property exists, then run the algorithm
393: $\cal A$ described in the beginning of this section to find all
394: homomorphisms from $HOM(D,\vec{C}_3),$ where $\vec{C}_3$ has
395: vertices $a,a+1,a+2$. If $HOM(D,\vec{C}_3)\neq \emptyset$, there
396: there are three homomorphism, and it suffices to verify that at
397: least one of them is compatible with the lists.
398:
399: Clearly, if our procedure succeeds, then we have found a required
400: homomorphism. It remains to see that if the procedure fails, then
401: no required homomorphism exists. This is equivalent to proving
402: that, after all vertices satisfying (a) or (b) have been deleted,
403: every remaining vertex $y$ must have color $a,a+1$ or $a+2.$
404:
405: Let $D'$ be obtained from $D$ by deleting all vertices satisfying
406: (a) or (b) and let $y\in V(D').$ We prove that $y$ must be colored
407: $a,a+1$ or $a+2.$ Assume that $y$ is in a directed cycle $C$ of
408: $D'$. Observe that any homomorphism of $D$ to $H$ maps $C$ into a
409: directed walk. Thus, $y$ can be colored $a,a+1$ or $a+2$ only.
410: Assume that $y$ is isolated in $D'$. Since $y$ does not satisfy
411: (a) or (b), its list contains only $a$, $a+1$ or $a+2.$ Now
412: consider the case when $y$ is not isolated and it is not in any
413: cycle of $D'.$ Let $P$ be a path in $D'$ containing $y$ such that
414: the initial vertex of $P$ is either in a cycle of $D'$ or its
415: in-degree in $D'$ is zero, and the terminal vertex of $P$ is
416: either in a cycle of $D'$ or its out-degree in $D'$ is zero.
417: Observe that, by the arguments above, the initial vertex of $P$
418: must have color $a$ or larger and the terminal vertex of $P$ must
419: have color $a+2$ or smaller. This implies that every vertex of $P$
420: must have color $a$, $a+1$ or $a+2.$ \qed
421:
422: \2
423:
424: Recall that HOMP($H$) is NP-complete when $H$ is a semicomplete
425: digraph with at least two cycles. This result and Theorems
426: \ref{acyclicth} and \ref{P3} imply the following:
427:
428: \begin{theorem}
429: Let $H$ be a semicomplete digraph. Then LHOMP($H$) is polynomial
430: time solvable if $H$ has at most one cycle, and LHOMP($H$) is
431: NP-complete, otherwise.
432: \end{theorem}
433:
434: \section{Classification for \MiP and \MaP}\label{semsec}
435:
436: To solve \MiP for $H=\vec{C}_k$, choose an initial vertex $x$ in
437: each component $D'$ of $D$ (a component of its underlying
438: undirected graph). Using the algorithm $\cal A$ from the previous
439: section, we can check whether each $D'$ admits an
440: $\vec{C}_k$-coloring. If the coloring of $D'$ exists, we compute
441: the cost of this coloring and compute the costs of the other $k-1$
442: $\vec{C}_k$-colorings when $x$ is colored $2,3,\ldots,k,$
443: respectively. Thus, we can find a minimum cost homomorphism in
444: $HOM(D',\vec{C}_k).$ Thus, in polynomial time, we can obtain a
445: $\vec{C}_k$-coloring of the whole digraph $D$ of minimum cost. In
446: other words, we have the following:
447:
448: \begin{lemma}\label{cycle}
449: For $H=\vec{C}_k$, \MiP and \MaP are polynomial time solvable.
450: \end{lemma}
451:
452:
453:
454: Addition of an extra vertex to a cycle may well change the
455: complexity of \MaP and MinHOMP($H$).
456:
457: \begin{lemma}\label{cycle+}
458: Let $H'$ be a digraph obtained from $\vec{C}_k$, $k\ge 2$, by
459: adding an extra vertex dominated by the vertices of the cycle, and
460: let $H$ be $H'$ or its dual. Then \MiP and \MaP are NP-hard.
461: \end{lemma}
462: \pf Without loss of generality we may assume that $H=H'$ and that
463: $V(H)=\{1,2,3,\ldots , k, k+1\}$, $123 \ldots k1$ is a $k$-cycle,
464: and the vertex $k+1$ is dominated by the vertices of the cycle.
465:
466: We will reduce the maximum independent set problem to
467: MinHOMP($H$). Let $G$ be a graph. Construct a digraph $D$ as
468: follows:
469:
470:
471: $$V(D)=V(G) \cup \{v_i^e :\ e\in E(G) \ i\in V(H) \},\
472: A(D)=A_1\cup A_2, \mbox{ where}$$
473: $$A_1=\{v_1^e v_2^e, v_2^ev_3^e, \ldots v_{k-1}^ev_k^e,v_k^ev_1^e :\ e\in
474: E(G)\}$$ and
475: $$A_2=\{v_1^{uv}u, v_{k+1}^{uv}u, v_2^{uv}v, v_{k+1}^{uv}v :\ uv\in E(G)\}.$$
476:
477:
478: Let all costs $c_i(t)=1$ for $t\in V(D)$ apart from $c_{k+1}(p)=2$
479: for all $p\in V(G).$
480:
481:
482: Consider a minimum cost homomorphism $f\in HOM(D,H)$. By the
483: choice of the costs, $f$ assigns the maximum possible number of
484: vertices of $G$ (in $D$) a color different from $k+1$. However, if
485: $pq$ is an edge in $G$, by the definition of $D$, $f$ cannot
486: assign colors different from $k+1$ to both $p$ and $q$. Indeed, if
487: both $p$ and $q$ are assigned colors different from $k+1$, then
488: the existence of $v_{k+1}^{pq}$ implies that they are assigned the
489: same color, which however is impossible by the existence of
490: $\{v_i^{pq} :\ i\in \{1,2,\ldots ,k\} \}$. Observe that $f$ may
491: assign exactly one of the vertices $p,q$ color $k+1$ and the other
492: a color different from $k+1$. Also $f$ may assign both of them
493: color $k+1$. Thus, a minimum cost $H$-coloring of $D$ corresponds
494: to a maximum independent set in $G$ and vise versa (the vertices
495: of a maximum independent set are assigned color $2$ and all other
496: vertices in $V(G)$ are assigned color $k+1$). \qed \2
497:
498: Interestingly, the problem ${\rm HOMP}(H')$ for $H'$ (especially,
499: with $k=3$) defined in Lemma \ref{cycle+} is well known to be
500: polynomial time solvable (see, e.g.,
501: \cite{bangSIAMJDM1,gutjahr1991,hell2004}). The following lemma
502: allows us to prove that \MaP and \MiP are NP-hard when
503: MaxHOMP($H'$) and MinHOMP($H'$) are NP-hard for an induced
504: subdigraph $H'$ of $H.$
505:
506: \begin{lemma}\label{reductionl}
507: Let $H'$ be an induced subdigraph of a digraph $H$. If
508: MaxHOMP($H'$) is NP-hard, then \MaP is also NP-hard.
509: \end{lemma}
510: \pf Let $D$ be an input digraph with $n$ vertices and let $c_i(u)$
511: be the costs, $u\in V(D)$, $i\in V(H')$. Let all costs $c_i(u)$ be
512: bounded from above by $\beta(n)$. For each $i\in V(H)-V(H')$ and
513: each $u\in V(D)$, set costs $c_i(u):=n\beta(n)+1.$ Observe that
514: there is an $H$-coloring of $D$ of cost at most $n\beta(n)$ if and
515: only if $HOM(D,H')\neq \emptyset$ and if $HOM(D,H')\neq
516: \emptyset$, then the cost of minimum cost $H$-coloring equals to
517: that of minimum cost $H'$-coloring.\qed
518:
519:
520: \2
521:
522: As a corollary of Theorem \ref{acyclicth} and Lemmas \ref{cycle},
523: \ref{cycle+} and \ref{reductionl}, we obtain the following
524: theorem.
525:
526: \begin{theorem}\label{classmd}
527: For a semicomplete digraph $H$, \MiP and \MaP are polynomial time
528: solvable if $H$ is acyclic or $H=\vec{C}_k$ for $k=2$ or 3, and
529: NP-hard, otherwise.
530: \end{theorem}
531: \pf By Theorem \ref{acyclicth} and since ${\rm HOMP}(H)$ is
532: NP-complete when a semicomplete digraph $H$ has at least two
533: cycles \cite{bangSIAMJDM1}, we may restrict ourselves to the case
534: when $H$ has a unique cycle. Observe that this cycle has two or
535: three vertices. If no other vertices are in $H$, \MaP and \MiP are
536: polynomial time solvable by Lemma \ref{cycle}. Assume that $H$ has
537: a vertex $i$ not in the cycle. Observe that $i$ is dominated by or
538: dominates all vertices of the cycle, i.e., $H$ contains, as an
539: induced subdigraph one of the digraphs of Lemma \ref{cycle+}. So,
540: we are done by Lemmas \ref{cycle+} and \ref{reductionl}.\qed
541:
542: \section{Discussions}
543:
544: In this paper we have obtained dichotomy classifications for the
545: list and minimum cost $H$-coloring problems when $H$ is a
546: semicomplete digraph.
547:
548: It would be interesting to find out whether there exists a
549: dichotomy classification for the minimum cost $H$-coloring problem
550: (for an arbitrary digraph $H$) and if it does exist, to obtain
551: such a classification. Since these problems seem to be far from
552: trivial, one could concentrate on establishing dichotomy
553: classifications for special classes of digraphs such as
554: semicomplete multipartite digraphs (digraphs obtained from
555: complete multipartite graphs by replacing every edge with an arc
556: or the pair of mutually opposite arcs) and oriented paths (it was
557: proved in \cite{gutjahrDAM35} that the homomorphism problem for
558: oriented paths is polynomial time solvable).
559:
560: We have obtained some partial results on MinHOMP($H$) for
561: semicomplete multipartite digraphs $H$. To find a complete
562: dichotomy for the case of semicomplete bipartite digraphs, one
563: would need, among other things, to solve an open problem from
564: \cite{gutinDAM}: establish a dichotomy classification for the
565: complexity of \MiP when $H$ is a bipartite (undirected) graph.
566: Indeed, let $B$ be a semicomplete bipartite digraph with partite
567: sets $U,V$ and arc set $A(B)=A_1\cup A_2$, where $A_1=U\times V$
568: and $A_2\subseteq V\times U$. Let $B'$ be a bipartite graph with
569: partite sets $U,V$ and edge set $E(B')=\{uv:\ vu\in A_2\}.$
570: Observe that MinHOMP($B$) is equivalent to MinHOMP($B'$).
571:
572: It was proved in \cite{gutinDAM} that \MiP is polynomial time
573: solvable when $H$ is a bipartite graph whose complement is an
574: interval graph. It follows from the main result of \cite{federC19}
575: that \MiP is NP-hard when $H$ is a bipartite graph whose
576: complement is not a circular arc graph. This leaves the obvious
577: gap in the classification for \MiP when $H$ is a bipartite graph.
578:
579: \2
580:
581: \2
582:
583:
584: {\bf Acknowledgement} We are thankful to Dave Cohen, Mike Green,
585: Michael Krivelevich, Alek Vainshtein and others for useful
586: discussions on the topic of the paper.
587:
588: {\small
589:
590: \begin{thebibliography}{99}
591: %%%%%%%%%%%%%%%%%%%%%%%%%%
592:
593: \bibitem{alekseev1991} V.E. Alekseev, On the number of maximal
594: independent sets in graphs from hereditary classes. In: {\em
595: Combinatorial-algebraic methods in discrete optimization}, Univ.
596: of Nizhny Novgorod (1991) 5-8 [in Russian].
597:
598: \bibitem{alekseevDAM145} V.E. Alekseev and V.V.
599: Lozin, Augmenting graphs for independent sets. {\em Discrete Appl.
600: Math.} 145 (2004) 3-10.
601:
602: \bibitem{balasN19} E. Balas and Ch.Y. Yu, On graphs with
603: polynomially solvable maximum-weight clique problem. {\em
604: Networks} 19 (1989) 247-253.
605:
606: \bibitem{bang2000} J. Bang-Jensen and G. Gutin, {\em Digraphs: Theory,
607: Algorithms and Applications}, Springer-Verlag, London, 2000.
608:
609: \bibitem{bangSIAMJDM1} J. Bang-Jensen, P. Hell and G. MacGillivray,
610: The complexity of colouring by semicomplete digraphs. {\em SIAM J.
611: Discrete Math.} 1 (1988) 281-298.
612:
613: \bibitem{bertolazziDAM76} P. Bertolazzi, C. De Simone and A.
614: Galuccio, A nice class for vertex packing problem. {\em Discrete
615: Appl. Math.} 76 (1997) 3-19.
616:
617: \bibitem{bulatovACMTCL} A.A. Bulatov, Tractable conservative
618: constraint satisfaction problems. To appear in {\em ACM Trans.
619: Comput. Logic}.
620:
621: \bibitem{federC19} T. Feder, P. Hell and J. Huang. List homomorphisms
622: and circular arc graphs. {\em Combinatorica} 19 (1999) 487-505.
623:
624: \bibitem{federSIAMJC28} T. Feder and M.Y. Vardi, The computational
625: structure of monotone monadic SNP and constraint satisfaction: a
626: study through Datalog and group theory. {\em SIAM J. Comput.} 28
627: (1998) 57-104.
628:
629: \bibitem{green} Mike Green, Private communication, June, 2005.
630: %\bibitem{chudnovsky} M. Chudnovsky, N. Robertson, P. Seymour and R.
631: %Thomas, The Strong Perfect Graph Theorem. Submitted, see {\tt
632: %http://arxiv.org/abs/math/0212070}.
633:
634: \bibitem{grotschelADM21} M. Gr\"otschel, L. Lov\'asz, and A. Schrijver,
635: Polynomial algorithms for perfect graphs. {\em Ann. Discrete
636: Math.} 21 (1984), 325--356.
637:
638: \bibitem{gutinDAM} G. Gutin, A. Rafiey, A. Yeo and M. Tso, Level of repair
639: analysis and minimum cost homomorphisms of graphs. To appear in
640: {\em Discrete Appl. Math.}
641:
642: \bibitem{gutjahr1991} W. Gutjahr, Graph colourings, PhD Thesis, Free
643: University Berlin, 1991.
644:
645: \bibitem{gutjahrDAM35} W. Gutjahr, E. Welzl and G. Woeginger,
646: Polynomial graph-colorings. {\em Discrete Appl. Math.} 35 (1992)
647: 29-45.
648:
649: \bibitem{hell2003} P. Hell,
650: Algorithmic aspects of graph homomorphisms, in `Survey in
651: Combinatorics 2003', London Math. Soc. Lecture Note Series 307,
652: Cambridge University Press, 2003, 239 - 276.
653:
654:
655: \bibitem{hellJCT48} P. Hell and J. Ne\v{s}et\v{r}il, On the complexity of
656: $H$-colouring. {\em J. Combin. Theory B} 48 (1990) 92-110.
657:
658: \bibitem{hell2004} P. Hell and J. Ne\v{s}et\v{r}il, {\em Graphs and
659: Homomorphisms.} Oxford University Press, Oxford, 2004.
660:
661: \bibitem{nakamuraJORSJ44} D. Nakamura and A. Tamura, A revision of
662: Minty's algorithm for finding a maximum weight stable set of a
663: claw-free graph. {\em J. Oper. Res. Soc. Japan} 44 (2001) 194-204.
664:
665: %\bibitem{imrich2000} W. Imrich and S. Klavzar. {\em Product Graphs:
666: %Structure and Recognition.} Wiley,
667: %2000.
668:
669: %\bibitem{west1996} D. West, {\em Introduction to Graph Theory}, Prentice
670: %Hall, Upper Saddle River, N.J., 1996.
671:
672: \end{thebibliography}
673: }
674:
675: \end{document}
676: