Keywords

1 Introduction

Given a graph \(G=(V,E)\), the orientation of an edge \(e=\{u,v\} \in E\) is one of the two possible ordered pairs uv or vu called arcs. If \(uv \in E\) we say that u dominates v. An oriented graph \(\overrightarrow{G}\) is obtained from G by orienting each edge of E, \(\overrightarrow{G}\) is called an orientation of G, and G is called the underlying graph of \(\overrightarrow{G}\). Note that an oriented graph is a digraph without opposite arcs or loops. Given an arc \(uv \in E(\overrightarrow{G})\), v is called the successor of u and u is called the predecessor of v. A vertex without predecessors is called source and a vertex without successors is called sink. Let G and H be a pair of graphs. If H is a subgraph of G we say that G contains H as a subgraph, otherwise we say that G is H-free. Two graphs are disjoint if they have no vertex in common. If G and H are disjoint, their disjoint union graph denoted by \(G\cup H\), has \(V(G\cup H)=V(G)\cup V(H)\) and \(E(G\cup H)=E(G)\cup E(H)\).

A directed path is the orientation of a path, a directed cycle is the orientation of a cycle. If for each pair uv of consecutive vertices in a directed cycle we have the arc uv, then this orientation called cyclic, otherwise is called acyclic. A tournament \(\overrightarrow{K}_n\) with n vertices is an orientation of a complete graph \(K_n\). A tournament is called transitive if and only if whenever uv and vw are arcs, uw is also an arc. The complete bipartite graph \(G=K_{1,n}\) is a star. A wheel graph \(W_n\) has \(V(W_n)=\{v_1,v_2,\ldots , v_n, c\}\) and \(E(W_n)=\big \{v_iv_{i+1}:i\in \{1,2,\ldots , n-1\}\big \}\cup \{v_nv_1\} \cup \big \{v_ic: i\in \{1,2,\ldots , n\}\big \}\). We say that \(\overrightarrow{G}\) is an oriented star (the same for a tree, forest, cycle, and wheel).

Let \(\overrightarrow{G}\) be an oriented graph, \(xy, zt \in E(\overrightarrow{G})\) and \(C=\{1,2, \ldots , k\}\) be a set of colors. An oriented k-coloring of \(\overrightarrow{G}\) is a function \(c:V(\overrightarrow{G}) \rightarrow C\), such that \(c(x) \ne c(y)\), and if \(c(x) = c(t)\), then \(c(y) \ne c(z)\). The oriented chromatic number of \(\overrightarrow{G}\) denoted by \(\chi _o({\overrightarrow{G}})\) is the smallest k such that \({\overrightarrow{G}}\) admits an oriented k-coloring. An oriented absolute clique or o-clique [7] is an oriented graph \(\overrightarrow{G}\) for which \(\chi _o(\overrightarrow{G}) = |V(\overrightarrow{G})|\).

Let \(\overrightarrow{G}\) and \(\overrightarrow{H}\) be oriented graphs, a homomorphism of \(\overrightarrow{G}\) into \(\overrightarrow{H}\) is a mapping \(f:V(\overrightarrow{G})\rightarrow V(\overrightarrow{H})\) such that \(f(u)f(v) \in E(\overrightarrow{H})\) for all \(uv \in E(\overrightarrow{G})\). When \(\overrightarrow{H}\) is an oriented graph on k vertices, a homomorphism from \(\overrightarrow{G}\) into \(\overrightarrow{H}\) is an oriented k-coloring of \(\overrightarrow{G}\).

We can extend the definition of oriented chromatic number to graphs. The oriented chromatic number of a graph G denoted by \(\chi _o(G)\), is the maximum \(\chi _o(\overrightarrow{G})\) for all orientations \(\overrightarrow{G}\) of G. Given a positive integer k, we denote by \(\mathcal {C}\mathcal {N}_k\) the class of graphs G such that \(\chi _o(G) \le k\).

Oriented coloring has been studied by many authors. A survey on oriented coloring can be seen in [13]. Subsequently, many other papers have been published on oriented coloring. See for instance [3] and [7] on complexity aspects and approximation algorithms, and [8,9,10] for bounds on oriented coloring.

It is NP-complete [3, 6, 7] to decide whether a graph belongs to \(\mathcal {C}\mathcal {N}_k\) for all \(k\ge 4\). In [2] it was shown that \(\mathcal {C}\mathcal {N}_k\) for all \(k\ge 4\) is NP-complete even for acyclic oriented graph such that the underlying graph has maximum degree 3 and it is at the same time connected, planar and bipartite. Already, it can be decided in polynomial time [7] whether a graph belongs to \(\mathcal {C}\mathcal {N}_k\). So, in the Sect. 2 we characterize the class of connected and disconnected graphs that belong to the \(\mathcal {C}\mathcal {N}_3\) class.

The works of [1, 4, 5, 12] presents various bounds for oriented chromatic number on the product of graphs. In spite of the vast amount of literature dedicated to the product of graphs, we don’t have many results on the disjoint union.

Assume the 3-oriented coloring for \(\overrightarrow{K}_3\) in Fig. 1 (a), where colors 1, 2 and 3 are assigned respectively, to vertices a, b and c. Notice that, by definition of oriented coloring, if the \(P_4\) in Fig. 1 (b) is colored with the three colors 1, 2 and 3, then necessarily to vertices d, e, f are assigned, respectively, colors 1, 2 and 3. Hence, it is required a fourth color to assign to vertex g.

Fig. 1.
figure 1

Graph \(\overrightarrow{K}_3 \cup \overrightarrow{P}_4\).

From the coloring given to the graph of Fig. 1 we can notice that, different from the usual coloring, the oriented coloring given to a connected component interferes in the coloring of another connected component in graphs formed by the disjoint union of two other graphs. Motivated by this fact, in Sect. 4 we determine the oriented chromatic number of the disjoint union between complete graphs and others graphs, such as stars, trees, forests, cycles and an upper bound for the union of one complete and one wheel. In Sect. 3 we show the oriented chromatic number of wheel graphs, for the first time as far as we know.

2 The Chromatic Number of the Class \(\mathcal {C} \mathcal {N}_3\)

In this section, we characterize the class of graphs \(\mathcal {C}\mathcal {N}_3=\{ G ; \chi _o(G) \le 3\}\). First, we consider the case when the graph G is connected.

Lemma 1

Let \(G=(V,E)\) be a connected graph, \(|V| \ge 4\). If G contains a \(K_3\) as a subgraph, then \(\chi _o(G) \ge 4\).

Proof

Let \(G=(V,E)\) be a connected graph with \(|V|\ge 4\) and uvw be the vertices of a \(K_3\) subgraph of G. As G is connect there is a vertex \(t \notin \{u, v, w\}\) in V such that t is adjacent to a vertex in \(\{u, v, w\}\). Assume \(\{t,u\}\in E\). Consider an orientation \(\overrightarrow{G}=(V,\overrightarrow{E})\) of G where \(uv, vw, uw, tu \in \overrightarrow{E}\). We need 3 different colors to vertices uvw since uvw belong to \(K_3\). As there is a path of size at most 2 from t to each vertex in \(\{ u, v, w \}\) by the oriented k-coloring definition, an additional fourth color is necessary to t. Hence, \(\chi _o(G)\ge 4\).   \(\square \)

From Lemma 1, we know that the connected not \(K_3\)-free graphs on 4 vertices or more do not belong to the class \(\mathcal {C}\mathcal {N}_3\). Sopena [11] proved that for oriented graphs with maximum degree 2, the oriented chromatic number is at most 5. He also proved that the cycle on 5 vertices has oriented chromatic number 5, this result is presented in Lemma 2. We use these results to propose Lemma 3.

Lemma 2

([11]). If \(C_5\) is the cycle on 5 vertices, then \(\chi _o(C_5) = 5\).

Lemma 3

If a connected graph G contains \(C_k\) as a subgraph, with \(k \ge 4\), then \(\chi _o(G) \ge 4\). In particular, if G contains \(C_5\) as a subgraph, then \(\chi _o(G) \ge 5\).

Now we can describe the class of connected graphs that belongs to \(\mathcal {C}\mathcal {N}_3\).

Theorem 1

The connected graph \(G \in \mathcal {C}\mathcal {N}_3\) if and only if, G is either a \(K_3\) or a tree.

Proof

Let \(G \in \mathcal {C}\mathcal {N}_3\) be a connected graph. If G is acyclic, then G is a tree. If G is not acyclic, then from Lemmas 1 and 3, it follows that \(G=K_3\). We conclude that G is either a \(K_3\) or a tree. Suppose that G is a \(K_3\) or a tree. If G is a \(K_3\) then \(\chi _o(G)=3\). If G is a tree, then \(\chi _o(G) = 3\) by [3]. Therefore \(G \in \mathcal {C}\mathcal {N}_3\).   \(\square \)

Now will consider the case when G is a disconnected graph.

Lemma 4

Let G be a graph with q connected components \(X_1, X_2, \ldots , X_q\), \(q \ge 2\), such that \(X_i\) contains \(K_3\) as a subgraph, for some \(i \in \{1,2, \ldots , q\}\). If there is a component \(X_j\), \(i \ne j\), containing \(K_3\) or \(P_4\) as a subgraph, then \(\chi _o(G) \ge 4\).

Proof

Consider a graph G with q connected components \(X_1, X_2, \ldots , X_q\), \(q \ge 2\). Suppose there are two connected components \(X_i\) and \(X_j\), \(i \ne j\), such that both contains \(K_3\) as a subgraph.

We can obtain an oriented graph \(\overrightarrow{G}\) from G with \(\chi _o(\overrightarrow{G}) \ge 4\), by defining the orientation of the subgraph \(K_3\) of component \(X_i\) as a directed cycle and the subgraph \(K_3\) of the component \(X_j\) as a transitive tournament. Let c be an oriented coloring for the subgraph \(K_3\) of the component \(X_i\), c has 3 colors, suppose \(\{1,2,3\}\) and the property that no color dominates the two others. Let \(c_1\) be an oriented coloring of \(K_3\) of the component \(X_j\). In c one color dominates the two others, thus one fourth color is required in the component \(X_j\) and therefore \(\chi _o(G) \ge 4\).

Now suppose that the component \(X_j\) contains \(P_4\) as a subgraph. In the oriented graph \(\overrightarrow{G}\) obtained from G, we choose the transitive orientation \(\overrightarrow{K}_3\) for the subgraph \(K_3\) of the component \(X_i\) and the directed path \(\overrightarrow{P}_4\) for the subgraph \(P_4\) of the component \(X_j\). We know that \(\chi _o(\overrightarrow{K}_3)= 3\), we use colors 1, 2 and 3 in the oriented coloring of \(\overrightarrow{K}_3\) of the component \(X_i\). We choose the oriented coloring of \(\overrightarrow{K}_3\) such as the vertex with color 1 is the source and the vertex with color 2 is the sink. We will show that, using the constraints obtained in the oriented coloring of the subgraph \(\overrightarrow{K}_3\) in the component \(X_i\), we cannot color the subgraph \(\overrightarrow{P}_4\) of the component \(X_j\) only with colors 1, 2 and 3.

We consider three cases:

Case 1: (Assign color 1 to the source of \(\overrightarrow{P}_4\)) Since the vertex with color 1 is a predecessor of the vertex with color 2 in the oriented coloring of \(\overrightarrow{K}_3\), we can assign color 2 to the successor of the source in \(\overrightarrow{P}_4\). The vertex with color 2 in \(\overrightarrow{K}_3\) is the sink, so we cannot assign any of the colors 1, 2 or 3 to the successor of the vertex with color 2 in \(\overrightarrow{P}_4\). A fourth color is needed in component \(X_j\).

Another sub-case is to assign color 3 to the successor of the source in \(\overrightarrow{P}_4\), because the vertex with the color 1 also precedes a vertex with color 3 in an oriented coloring of \(\overrightarrow{K}_3\). We can assign color 2 to the successor of the vertex with color 3 in \(\overrightarrow{P}_4\), but again the color 2 is assigned to a vertex that is not sink in \(\overrightarrow{P}_4\) and a fourth color is needed in component \(X_j\).

Case 2: (Assign color 2 to the source of \(\overrightarrow{P}_4\)) The vertex with color 2 in the oriented coloring of \(\overrightarrow{K}_3\) is a sink, so none of the colors 1, 2 or 3 can be assigned to the successor of the source in \(\overrightarrow{P}_4\). A fourth color is required in component \(X_j\).

Case 3: (Assign color 3 to the source of \(\overrightarrow{P}_4\)) Respecting the constraints on the coloring of \(\overrightarrow{K}_3\), we can assign color 2 to the successor of the source in \(\overrightarrow{P}_4\). Again, the successor of the vertex with color 2 in \(\overrightarrow{P}_4\) cannot be colored with any color used in \(\overrightarrow{K}_3\). A fourth color is required in component \(X_j\).

We conclude that \(\chi _o(G) \ge 4\).   \(\square \)

It follows from Lemma 4 that the graph \(G = K_3 \cup P_4 \notin \mathcal {C} \mathcal {N}_3\). In Fig. 1 we have an orientation of graph G such that \(\chi _o(G) = 4\). If we consider the graph G to be a forest, we have the following results.

Lemma 5

Let F be a forest with a collection \(\{ T_1, T_2, \ldots , T_q \}\) of q disjoint trees, then \(\chi _o(F) = \max \{\chi _o(T_i); i = 1,2,\ldots ,q\}\).

From Lemma 5 we can show that every oriented forest has a homomorphism to a directed cycle, as we show on Corollary 1.

Corollary 1

Every oriented forest \(\overrightarrow{F}\) has a homomorphism into a directed cycle \(\overrightarrow{C_3}\).

Finally in Theorem 2 we can characterize the class \(\mathcal {C}\mathcal {N}_3\).

Theorem 2

Let G be a graph. \(G \in \mathcal {C}\mathcal {N}_3\) if and only if, G is either a forest or a \(K_3 \cup S\), where S is a forest of stars.

Proof

Suppose that \(G \in \mathcal {C}\mathcal {N}_3\). If G has a cycle, then by Lemmas 1, 3 and 4 there is at most one connected component \(G_i\) of G which has a cycle as a subgraph, and in this case \(G_i=K_3\). Still by Lemma 4 the remaining components have a diameter that is less than 3, and hence G is a disjoint union of \(K_3\) and a forest of stars.

If G is acyclic, then G is a forest and by Lemma 5 and [3] we have \(\chi _o(\overrightarrow{G}) \le 3\). Conversely, first suppose that G is a forest. For every tree \(T_i\) of G we know that \(\chi _o(G_i) \le 3\), by [3]. By Lemma 5 we conclude that \(\chi _o(G) \le 3\).

Now suppose that \(G = {K_3 \cup S}\). The connected component \(K_3\) can be oriented in two different ways, with circular orientation or transitive orientation. If the component \(K_3\) have a circular orientation \(\overrightarrow{K}_3\), we know by Corollary 1 that there is a homomorphism from \(\overrightarrow{S}\) into \(\overrightarrow{K}_3\) and \(\chi _o(G) \le 3\). Now consider the component \(K_3\) with a transitive orientation \(\overrightarrow{K}'_3\). We choose the oriented coloring of \(\overrightarrow{K}'_3\) with the colors 1, 2 and 3, so that the vertices with color 1 are predecessors of vertices with color 2 and the vertices with color 2 are predecessors of vertices with color 3.

We define a homomorphism from \(\overrightarrow{S}\) into \(\overrightarrow{K}'_3\) where all sources in \(\overrightarrow{S}\) are mapped into the vertex with color 1 in \(\overrightarrow{K}'_3\), and all sinks in \(\overrightarrow{S}\) are mapped into the vertex with color 3 in \(\overrightarrow{K}'_3\), if the vertex is neither a source nor a sink in \(\overrightarrow{S}\), then it is mapped into a vertex with color 2 in \(\overrightarrow{K}'_3\). This homomorphism is easily verified, since only one vertex that has more than one neighbor in \(\overrightarrow{S}\) can be mapped into the vertex with color 2 in \(\overrightarrow{K}'_3\).   \(\square \)

3 The Oriented Chromatic Number of Wheel Graphs

In this section we establish that the family of wheel graphs \(W_q\) with \(q \ge 8\) has its oriented chromatic number 8. We use this value, in Sect. 4, in order to establish an upper bound for the disjoint union of a wheel with a complete graph.

Theorem 3

Let \(q\ge 8\), be a positive integer. Then \(\chi _o(W_q) = 8.\)

Proof

We consider \(q \mod 3\), i.e., \(q=3k+1, 3k+2, k \ge 2\) and \(q=3k, k\ge 3\). We prove first that 8 colors are sufficient to color every orientation \(\omega \) of \(W_q\). Consider an orientation \(\omega \) for \(W_q\). We construct an 8–oriented color for this orientation. Let \(V(W_q)=\{v_1,v_2,\ldots , v_q, c\}\) and \(E(W_q)=\big \{v_iv_{i+1}, v_ic : i\in \{1,2,3,\ldots , q-1\}\big \}\cup \big \{v_qv_1, v_qc\big \}\).

In order to yield an 8–oriented coloring for \(\omega \) we consider a key property of an orientation \(\omega \) that is when there is a 4-oriented coloring for the corresponding \(C_q\), such that there is one color, say color 4, that occurs just in one vertex \(v\in V(C_q)\).

From this 4–oriented coloring of \(C_q\), we give the following recipe to color \(C_q\) in \(W_q\), with at most 7 colors, and hence \(W_q\) with 8 colors. For each \(x\in \{1,2,3\}\) of the 3 colors that can be repeated, consider the oriented bipartite graph \(B_x\) induced of \(W_q\) by the vertices with color x and vertex c. If there are sinks and sources in \(B_x\setminus \{c\}\), then If \(v\in V(B_x)\setminus \{c\}\) and v is a sink, set to \(x+4\) the color of v. If the orientation \(\omega \) in \(C_q\) is acyclic, then there is a sink vertex \(v_i\), hence we color the path \(v_{i+1},\ldots , v_n,v_1,\ldots , v_{i-1}\) with 6 colors in \(\{1,2,3,5,6,7\}\), color \(v_i\) with color 4, and c with color 8. Hence, when \(\omega \) is acyclic, there is an 8–oriented coloring for \(W_q\).

The remaining case is when the orientation \(\omega \) is cyclic in \(C_q\). Next we consider \(q = 3k, k\ge 3\) and \(q = 3k + 1, k \ge 2\), and prove that there is a 4–oriented coloring for the corresponding \(C_q\) where there is a color class with at most one vertex \(v\in C_q\), say color 4.

  1. 1.

    If \(q = 3k, k \ge 3,\) in this case we color \(v_1, v_2, \ldots , v_n\), respectively, with colors \(1,2,3,\ldots , 1,2,3\).

  2. 2.

    If \(q = 3k + 1, k \ge 2,\) in this case we color \(v_1, v_2,\ldots , v_{n-1}\), respectively, with colors \(1,2,3,\ldots , 1,2,3\), and color \(v_n\) with color 4.

Hence, when \(\omega \) is cyclic in \(C_q\), \(q = 3k, k \ge 3\) or \(q = 3k + 1, k \ge 2\), there is an 8–oriented coloring for \(W_q\).

We prove that if the orientation is cyclic, and \(q = 3k + 2, k \ge 3\), then there is a 5–oriented coloring such that exactly 2 colors appear once. For that we color \(v_1, v_2, \ldots , v_{n-2}\), respectively, with colors \(1,2,3,\ldots , 1,2,3\), color \(v_{n-1}\) with color 4, and \(v_{n}\) with color 5. From this 5–oriented coloring of \(C_q\), we give the following recipe to color \(C_q\) in \(W_q\), with at most 7 colors, and hence \(W_q\) with 8 colors.

We consider 2 cases:

  1. 1.

    Vertex c is a sink or a source of \(W_q\). In this case we can color \(W_q\) with 6 colors.

  2. 2.

    Vertex c is neither a sink nor a source of \(W_q\). In this case we assume that \(cv_n,v_1c\in \omega \). We can assume that because the orientation of \(C_q\) is cyclic. First, for each \(x\in \{1,2,3\}\) of the 3 colors that can be repeated in \(C_q\), consider the oriented bipartite graph \(B_x\) induced by the vertices with color x and vertex c. If there are sinks and sources in \(B_x\setminus \{c\}\), then If \(v\in V(B_x)\setminus \{c\}\) and v is a sink, set to \(x+5\) the color of v. Hence, we have an 8-oriented coloring of \(C_q\) in \(W_q\), which is an 9-oriented coloring of \(W_q\), that we will reduce to a 8-oriented coloring of \(W_q\).

    Hence, we set to 6 the color of vertex \(v_n\). This can be done, since \(v_1\) has color 1, and every other vertex in \(C_q\) with color 6, has a distance to \(v_n\) of at least 3. And thus, we have a coloring of \(C_q\) with colors 1, 2, 3, 4, 6, 7, 8, and we can give the color 5 to vertex c.

Now we prove that 8 colors are necessary. For that we show an example of \(W_8\) that requires 8 colors. For the convenience of the reader we exhibit this example in Fig. 2 and ask the reader to follow the Figure with the next items. Let \(\phi \) be an 8-coloring of \(W_8\). The set of vertices \(\{v_1, v_2, v_4, v_5, v_6, v_8, c\}\) is an o-clique, thus the colors of this vertices are different, respectively \(\{0, 1, 2, 3, 4, 5, 6\}\). Hence, we know from the orientation of \(W_8\) that \(\phi (v_3) \not \in \{0, 1, 2, 3, 5, 6\}\) because all of the vertices with these colors are adjacent or have a path of size two to \(v_3\). We can color \(v_3\) with the color 4. Again from the orientation of \(W_8\) we have that \(\phi (v_7) \not \in \{0, 2, 3, 4, 5, 6\}\) because all of the vertices with these colors are adjacent or have a path of size two to \(v_7\). We also can not color \(v_7\) with the color 1 because we have \(v_3v_2 \in E(\overrightarrow{W_8})\) and \(\phi (v_3) = 4\), so we need an eighth color for \(v_7\).   \(\square \)

Fig. 2.
figure 2

An orientation of \(W_8\) that has \(\chi _o(\overrightarrow{W_8}) = 8\).

4 On the Oriented Chromatic Number of the Union of Graphs

The study of the class \(\mathcal {C} \mathcal {N}_3\) motivated us to study the oriented chromatic number of disconnected graphs. We show an example in Fig. 1, where the oriented chromatic number of a graph \(G=K_3 \cup P_4\) is greater than the oriented chromatic number of each of its connected components separately.

In Fig. 3, where \(G=K_4 \cup P_5\), consider the orientation \(\overrightarrow{G}\) of G in which \(\overrightarrow{K}_4\) is the transitive tournament and \(\overrightarrow{P}_5\) is the directed path.

So we have another example in which \(\chi _o(G) > \max \{K_4; P_5 \}\), where \(K_4\) and \(P_5\) are components of G. Since \(\chi _o(\overrightarrow{K}_4)=4\), we assign a 4-oriented coloring of \(\overrightarrow{K}_4\). Using the constraints of 4-oriented coloring of \(\overrightarrow{K}_4\) in the component \(\overrightarrow{P}_5\), we prove that \(\overrightarrow{P}_5\) cannot be colored only with four colors and one fifth color is required, so the graph \(G = K_4 \cup P_5 \notin \mathcal {C} \mathcal {N}_4\).

Fig. 3.
figure 3

Graph \(\overrightarrow{K}_4 \cup \overrightarrow{P}_5\).

Now, we will obtain the oriented chromatic number of the disjoint union between the complete graph and others graphs, such as graphs that can be colored by the path \(\overrightarrow{P_3}\) or the cycle \(\overrightarrow{C_3}\), stars, trees, forests and cycles. First we analyse the case of graphs that have a homomorphism to the path \(\overrightarrow{P_3}\) or the cycle \(\overrightarrow{C_3}\)

Theorem 4

Let G be a graph with two connected components \(G_1\) and \(G_2\), where \(G_1\) is a complete graph \(K_p\), \(p \ge 3\), and \(G_2\) is a graph such that all oriented graphs \(\overrightarrow{G}_2\) have a homomorphism f into a directed path \(\overrightarrow{P}_3\), then \(\chi _o(G) = p\).

Proof

Since \(\chi _o(\overrightarrow{P}_3)=3\) (by definition of oriented coloring), considering an oriented coloring c of \(\overrightarrow{P}_3\), in which we assign color 1 to the source, color 3 to the sink, and color 2 to the remaining vertex (successor of color 1 and predecessor of color 3). By hypothesis, all oriented graphs \(\overrightarrow{G}_2\) have a homomorphism f into a directed path \(\overrightarrow{P}_3\). Thus, we can assign an oriented coloring for \(\overrightarrow{G}_2\) using \(c \circ f:V(\overrightarrow{G}_2)\rightarrow \{1, 2, 3\}\).

We will assign an oriented coloring with p colors to any oriented graph \(\overrightarrow{G}_1\) from \(G_1\) respecting the constraints used in \(\overrightarrow{G}_2\). As \(G_1=K_p\), \(p \ge 3\), \(\chi _o(G_1)=p\) and all oriented graphs \(\overrightarrow{G}_1\) from \(G_1\) contains either a transitive or a circular \(\overrightarrow{K}_3\). In both cases, there exists a directed path \(P_3\) as a subgraph. This directed path can be colored with the same constraints used in \(G_1\). There are no restrictions for the remaining \(p-3\) colors and therefore we can assign these colors to the other vertices not yet colored without conflict.   \(\square \)

Theorem 5

Let G be a graph with two connected components \(G_1\) and \(G_2\), where \(G_1\) is a complete graph \(K_p\), \(p \ge 3\), and \(G_2\) is a graph such that all oriented graphs \(\overrightarrow{G}_2\) have a homomorphism into a directed cycle \(\overrightarrow{C}_3\) and diameter greater than p. Then \(\chi _o(G) = p+1\).

Proof

By hypothesis, \(\overrightarrow{G}_2\) requires three colors 1, 2, 3 to an oriented coloring, with the property that no color dominates the two others. We can obtain an oriented graph \(\overrightarrow{G}\) from G with \(\chi _o(\overrightarrow{G}) \ge p + 1\), in the following way: orient \(\overrightarrow{G}_1\) as a transitive tournament. It follows that all subgraphs \(\overrightarrow{K}_3\) of \(\overrightarrow{G}_1\) are transitive. As in an oriented coloring of \(\overrightarrow{G}_1\), for all \(\overrightarrow{K}_3\) of \(\overrightarrow{G}_1\) one color dominates the two others, at least one different color from 1, 2, 3 is required in some component \(\overrightarrow{K}_3\). Then \(\chi _o(G) \ge p+1\).

Conversely, we show that \(\chi _o(G) \le p+1\). Let \(\overrightarrow{K}_p\) be any orientation for \(G_1\). As \(\chi _o(\overrightarrow{K}_p)=p\), without loss of generality, we admit a coloring of \(\overrightarrow{K}_p\) using the colors from 1 to p. We add a vertex v to the graph \(\overrightarrow{K}_p\), and if there is source f or sink s in \(\overrightarrow{K}_p\) we add the arcs vf and sv, we call the resulting graph of \(\overrightarrow{K}'_{p+1}\), the remaining edges assume any orientation so that v is neither source nor sink in the new graph. We assign the color \(p+1\) to the vertex v. Note that \(\overrightarrow{K}'_{p+1}\) has neither sources nor sinks. On the other hand, considers the directed cycle \(\overrightarrow{C}_3\). We assign an oriented coloring of \(\overrightarrow{C}_3\) respecting the constraint on the coloring of \(\overrightarrow{K}'_{p+1}\).

We start by assigning a color \(p+1\) to any vertex \(v_1\) of \(\overrightarrow{C}_3\). By the construction of \(\overrightarrow{K}'_{p+1}\) the vertex v with color \(p+1\) is neither source nor sink, so we divide the neighbors of v into two disjoint sets, a set of successors of v denoted by Suc(v) and a set of predecessors of v denoted by Pred(v). We will assign the same color as the successor \(v_2\) of \(v_1\) in \(\overrightarrow{C}_3\) of a vertex \(r \in Suc(v)\) who has a successor in \(t \in Pred(v)\), the same color for predecessor \(v_3\) of \(v_1\) in \(\overrightarrow{C}_3\) of the vertex of \(t \in Pred(v)\).

By construction, there exists at least one vertex in \(r \in Suc(v)\) such that rt is an arc in \(\overrightarrow{K}'_{p+1}\), where \(t \in Pred(v)\). So we can assign colors to \(\overrightarrow{C}_3\) with the \(p+1\) colors of \(\overrightarrow{K}'_{p+1}\) and as \(\overrightarrow{K}_p\) is a subgraph of \(\overrightarrow{K}'_{p+1}\) then \(\chi _o(G) \le \chi _o(\overrightarrow{K}'_{p+1} \cup \overrightarrow{C}_3) = p+1\).    \(\square \)

Corollary 2 follows directly from Theorem 5 and Corollary 1. We also show an upper bound for the disjoint union of complete graphs and stars on Corollary 3.

Corollary 2

Given \(G=K_p \cup P_q\) or \(G=K_p \cup T_q\) or \(G=K_p \cup F_q\), then \(\chi _o(G) = p+1\). Where \(p \ge 3\) and \(P_q\), \(T_q\), \(F_q\) be respectively a path, a tree and a forest on q vertices and diameter greater than 2.

Corollary 3

Given \(G=K_p \cup S_q\), then \(\chi _o(G) = p\), where \(p \ge 3\) and \(S_q\) is a star on q vertices.

Now we define a special tournament on 5 vertices that we will use to describe the union of cycles and a few other graph classes. Let \(T_5^U\) be the tournament where \(V(T_5^U)=\{v_1,v_2,v_3,v_4,v_5\}\), and \(E(T_5^U) = \{v_1v_2,v_2v_3,v_2v_5,v_3v_1,v_3v_4,\) \(v_3v_5,\) \(v_4v_2,\) \(v_4v_5,v_1v_4,v_5v_1\}\). Also for this purpose we show that every tournament in 4 vertices has a sub-tournament which has a homomorphism to the acyclic tournament in 3 vertices.

Lemma 6

Every tournament with 4 vertices has a homomorphism into \(T^U_5\).

Proof

We can verify by exhaustion that every 4-vertex tournament has a homomorphism into \(T^U_5\) .

Corollary 4

Every tournament in 4 vertices has a sub-tournament which has a homomorphism to the acyclic tournament in 3 vertices.

Now we define the chromatic number of the disjoint union of graphs that belongs to the class \(\mathcal {C} \mathcal {N}_4\) and cycles.

Theorem 6

Let \(G \in \mathcal {CN}_4\) be a graph and C be a cycle. Then \(\chi _o(G \cup C)=5\).

Proof

Let \(\overrightarrow{C}^d_5\) be a directed cycle with 5 vertices, then \(\chi _o(C_5) = 5\), see Lemma 2. By Lemma 3 and because any other orientation of \(C_5\) has a 4-oriented coloring, the class \(C\backslash \overrightarrow{C}^d_5 \in \mathcal {C} \mathcal {N}_4\). By Lemma 6 every \(G \in \mathcal {C} \mathcal {N}_4\) has a homomorphism into \(T^U_5\). The cycle \(\overrightarrow{C}^d_5\) also has homomorphism in \(T^U_5\), see that \(T^U_5\) has a directed cycle 1, 2, 3, 4, 5, 1. Therefore, \(\chi _o(G \cup C)=5\) with \(T^U_5\) as a color graph.   \(\square \)

Corollary 5

Let \(G=C \cup C\) or \(G=C \cup P\) or \(G=C \cup T\) or \(G=C \cup K4\), then \(\chi _o(G) = 5\), where \(C, P, T, K_4\) be respectively a cycle, a path, a tree and the complete graph with 4 vertices.

We also define the chromatic number of the disjoint union of complete graphs and cycles.

Theorem 7

Let p and q be a pair of integers with \(p \ge 2\) and \(q \ge 3\), then

$$ \chi _o(K_p \cup C_q) = \left\{ \begin{array}{rcll} 3,&{\text{ if } } p=2&{ \text{ and } }&\begin{array}{c} \chi _o(C_q)=3 \end{array} \\ 4, &{} \left\{ \begin{array}{c} {\text{ if } } p=2 \\ {\text{ if } } p=3 \end{array} \right. &{} \begin{array}{c} { \text{ and } } \\ { \text{ and } } \\ \end{array} &{} \begin{array}{l} \chi _o(C_q)=4\\ \left( \chi _o(C_q)=3 { \text{ or } } \chi _o(C_q)=4 \right) \end{array} \\ 5, &{} \left\{ \begin{array}{c} {\text{ if } } p=2 \\ {\text{ if } } p=3 \end{array} \right. &{} \begin{array}{c} { \text{ and } } \\ { \text{ and } } \\ \end{array} &{} \begin{array}{l} \chi _o(C_q)=5\\ \chi _o(C_q)=5 \end{array} \\ p+1, &{} {\text{ if } } p\ge 4 &{} &{}\\ \end{array} \right. $$

Finally we will analyse the chromatic number of the disjoint union of two complete graphs.

Lemma 7

Let c be an oriented coloring of \(\overrightarrow{K}_p \cup \overrightarrow{K}_q\). Given \(\overrightarrow{G}_1\) and \(\overrightarrow{G}_2\) subgraphs induced of \(\overrightarrow{K}_p\) and \(\overrightarrow{K}_q\) respectively, such that \(\exists \; u \in V(\overrightarrow{G}_1)\) if and only if \(\exists \; a \in V(\overrightarrow{G}_2)\) with \(c(u)=c(a)\). Then \(\overrightarrow{G}_1\) and \(\overrightarrow{G}_2\) are isomorphic.

Proof

As \(\overrightarrow{G}_1\) and \(\overrightarrow{G}_2\) are induced subgraphs by vertices of tournaments, then \(\overrightarrow{G}_1\) and \(\overrightarrow{G}_2\) are also tournaments. Thus, in an oriented coloring c of \(\overrightarrow{K}_p \cup \overrightarrow{K}_q\) there are no identical colors between the vertices of \(\overrightarrow{G}_1\), as well as between the vertices of \(\overrightarrow{G}_2\), then by hypothesis we know that \(|V(\overrightarrow{G}_1)|=|V(\overrightarrow{G}_2)|\).

Case \(|V(\overrightarrow{G}_1)|=|V(\overrightarrow{G}_2)|\le 2\) then \(\overrightarrow{G}_1\) and \(\overrightarrow{G}_2\) are isomorphic.

Suppose that \(|V(\overrightarrow{G}_1)|=|V(\overrightarrow{G}_2)|\ge 2\). Let \(u,v \in V(\overrightarrow{G}_1)\) and \(a,b \in V(\overrightarrow{G}_2)\) such that \(c(u)=c(a)\) and \(c(v)=c(b)\). We define \(f:V(\overrightarrow{G}_1)\rightarrow V(\overrightarrow{G}_2)\) such that \(f(u)\mapsto a\) and \(f(v)\mapsto b\).

Let \(f(u)=f(v)\). As \(\overrightarrow{G}_2\) is a tournament then \(c(f(u))=c(f(v))\). By function f we have that \(c(f(u)) = c(u)\) we get by replacing \(c(u)=c(v)\). Like \(\overrightarrow{G}_2\) also is a tournament, then \(u=v\). We conclude that the function f is injective. As \(|V(\overrightarrow{G}_1)|=|V(\overrightarrow{G}_2)|\) and \(\overrightarrow{G}_1\), \(\overrightarrow{G}_2\) are tournaments, then the function f is sobrejective.   \(\square \)

Theorem 8

Let \(K_p\) and \(K_q\) be complete graphs, and \(\overrightarrow{K}\) be the collection of all tournaments. Consider the sets P and Q consisting of all orientations of \(K_p\) and \(K_q\) respectively. Define the set \(L=\{\overrightarrow{K}^l \in K; |V(\overrightarrow{K}^l)|=\max \{ |V(\overrightarrow{K}^j)|; \overrightarrow{K}^j \subseteq \overrightarrow{K}'_p, \overrightarrow{K}^j \subseteq \overrightarrow{K}'_q \}, \forall \overrightarrow{K}'_p \in P \text{ and } \overrightarrow{K}'_q \in Q\}\). Let \(r=\min \{|V(\overrightarrow{K}^l)|; \forall \overrightarrow{K}^l \in L\}\). Then \(\chi _o(K_p \cup K_q) = p + q - r\).

Proof

Let \(\overrightarrow{K}_r\) a tournament on r vertices, where \(r=\min \{|V(\overrightarrow{K}^l)|; \forall \overrightarrow{K}^l \in L\}\). We denote by \(\overrightarrow{K}_r^p\) a subgraph \(\overrightarrow{K}_r\) of \(\overrightarrow{K}_p\) and \(\overrightarrow{K}_r^q\) a subgraph \(\overrightarrow{K}_r\) of \(\overrightarrow{K}_q\). Since \(\overrightarrow{K}_r^p\) and \(\overrightarrow{K}_r^q\) are isomorphic, we can assign identical r colors to the vertices of both graphs. As \(r \le q \le p\) remain \(p + q - r\) vertices to be colored. Then \(\chi _o(K_p \cup K_q) \le p+q-r\).

By Lemma 7, the maximum number of colors used in both \(\overrightarrow{K}_p\) and \(\overrightarrow{K}_q\) is r, otherwise we contradict the cardinality of \(\overrightarrow{K}_r\). Hence \(\chi _o(K_p \cup K_q) = p+q-r\).    \(\square \)

We also analyse some specific disjoint unions of \(K_5\) with another \(K_5\) and with complete graphs.

Theorem 9

Given the union \(K_5 \cup K_5\), set \(L=\{\overrightarrow{K}^l \in K; |V(\overrightarrow{K}^l)|=\max \{ |V(\overrightarrow{K}^j)|; \overrightarrow{K}^j \subseteq \overrightarrow{K}'_5, \overrightarrow{K}^j \subseteq \overrightarrow{K}'_5 \}, \forall \overrightarrow{K}'_p \in P \text{ and } \overrightarrow{K}'_q \in Q\}\), then \(r=\min \{|V(\overrightarrow{K}^l)|; \forall \overrightarrow{K}^l \in L\}=3\).

Corollary 6

Given the union \(K_p \cup K_5, p\ge 5\), set \(L=\{\overrightarrow{K}^l \in K; |V(\overrightarrow{K}^l)|=\max \{ |V(\overrightarrow{K}^j)|; \overrightarrow{K}^j \subseteq \overrightarrow{K}'_5, \overrightarrow{K}^j \subseteq \overrightarrow{K}'_5 \}, \forall \overrightarrow{K}'_p \in P \text{ and } \overrightarrow{K}'_q \in Q\}\), then \(r=\min \{|V(\overrightarrow{K}^l)|; \forall \overrightarrow{K}^l \in L\} = 3\).

We have done some computational experiments, that drove us to Conjecture 1.

Conjecture 1

Let \(K_{p}\), \(K_{q}\) be 2 complete graphs with \(p, q \ge 4\). Then \(\chi _o(K_{p} \cup K_{q})= p+q-3\).

Lastly we show an upper bound for the disjoint union of wheel graphs and complete graphs.

Theorem 10

Let pq, \(p \ge 4 ,q \ge 3\) be positive integers. Then \(\chi _o(K_p + W_q) \le p + 5.\)

Proof

Let \(\overrightarrow{K_3}\) be the transitive orientation of the tournament with 3 vertices. We consider 2 cases:

  1. 1.

    \(\overrightarrow{K_3}\) is not a subgraph of \(W_q\). In this case we can color \(W_q\) with 3 colors. Hence, 2 colors of the graph \(K_p\) can be used with color \(p + 1\) to color \(W_q\).

  2. 2.

    \(\overrightarrow{K_3}\) is a subgraph of \(W_q\). In this case according to Theorem 3 we can color \(W_q\) with 8 colors. From Corollary 4 we know that we can use 3 colors of the graph \(K_p\) plus additional 5 colors to color \(W_q\).   \(\square \)

5 Conclusions

In this paper, we prove that if \(q \ge 8\) then \(\chi _o(W_q) = 8\) and for every forest F, \(\chi _o(F)\) is determined by the connected component of F with the largest oriented chromatic number of its connected components, what is an exception to the general case of disconnected graphs.

We characterized the class \(\mathcal {C} \mathcal {N}_3\) of the graphs with \(\chi _o(G) \le 3\). This characterization motivated us to study the oriented chromatic number of disconnected graphs. We have established \(\chi _o(K_p\cup P_q)\), \(\chi _o(K_p\cup F)\), \(\chi _o(K_p \cup C_q)\), and an upper bound for \(\chi _o(K_p \cup W_q)\).

We establish the oriented chromatic number of the union of two complete graphs \(K_{p}\), \(K_{q}\) as \(\chi _o(K_{p} \cup K_{q})= p + q -r\), where r is the size of the maximum tournament contained in all orientations of \(K_{p}\) and \(K_{q}\). We have conjectured that \(r=3\) for every pair \(4\le p,q\).

Table 1. Oriented chromatic number of the union \(\chi _o(G \cup H)\).

Table 1 presents the results obtained in this paper regarding to the union of complete graphs with other graph classes. For future works we intend to expand our Table of results where most of the important classes be added in the firsts column and row of the Table, besides considering the cases when we have more than 2 components.