Oriented diameter and rainbow connection number of a graph

The oriented diameter of a bridgeless graph $G$ is $\min\{diam(H)\ | H\ is\ an orientation\ of\ G\}$. A path in an edge-colored graph $G$, where adjacent edges may have the same color, is called rainbow if no two edges of the path are colored the same. The rainbow connection number $rc(G)$ of $G$ is the smallest integer $k$ for which there exists a $k$-edge-coloring of $G$ such that every two distinct vertices of $G$ are connected by a rainbow path. In this paper, we obtain upper bounds for the oriented diameter and the rainbow connection number of a graph in terms of $rad(G)$ and $\eta(G)$, where $rad(G)$ is the radius of $G$ and $\eta(G)$ is the smallest integer number such that every edge of $G$ is contained in a cycle of length at most $\eta(G)$. We also obtain constant bounds of the oriented diameter and the rainbow connection number for a (bipartite) graph $G$ in terms of the minimum degree of $G$.


Introduction
All graphs in this paper are undirected, finite and simple. We refer to book [2] for notation and terminology not described here. A path u = u 1 , u 2 , . . . , u k = v is called a P u,v path. Denote by u i P u j the subpath u i , u i+1 , . . . , u j for i ≤ j. The length ℓ(P ) of a path P is the number of edges in P . The distance between two vertices x and y in G, denoted by d G (x, y), is the length of a shortest path between them. The eccentricity of a vertex x in G is ecc G (x) = max y∈V (G) d(x, y). The radius and diameter of G are rad(G) = min x∈V (G) ecc(x) and diam(G) = max x∈V (G) ecc(x), respectively. A vertex u is a center of a graph G if ecc(u) = rad(G). The oriented diameter of a bridgeless graph G is min{ diam(H) | H is an orientation of G}, and the oriented radius of a bridgeless graph G is min{ rad(H) | H is an orientation of G}. For any graph G with edge-connectivity λ(G) = 0, 1, G has oriented radius (resp. diameter) ∞.
In 1939, Robbins solved the One-Way Street Problem and proved that a graph G admits a strongly connected orientation if and only if G is bridgeless, that is, G does not have any cut-edge. Naturally, one hopes that the oriented diameter of a bridgeless graph is as small as possible. Bondy and Murty suggested to study the quantitative variations on Robbins' theorem. In particular, they conjectured that there exists a function f such that every bridgeless graph with diameter d admits an orientation of diameter at most f (d).

Moreover, the above bounds are optimal.
There exists a minor error when they constructed the graph G d which arrives at the upper bound when d is odd. Kwok, Liu and West gave a slight correction in [11].
They also showed that determining whether an arbitrary graph can be oriented so that its diameter is at most 2 is NP-complete. Bounds for the oriented diameter of graphs have also been studied in terms of other parameters, for example, radius, dominating number [5,6,11,18], etc. Some classes of graphs have also been studied in [6,7,8,9,14].
Let η(G) be the smallest integer such that every edge of G belongs to a cycle of length at most η(G). In this paper, we show the following result.
Theorem 2. For every bridgeless graph G, there exists an orientation H of G such that . So our result implies Chvátal and Thomassen's Theorem 1.
A path in an edge-colored graph G, where adjacent edges may have the same color, is called rainbow if no two edges of the path are colored the same. An edgecoloring of a graph G is a rainbow edge-coloring if every two distinct vertices of graph G are connected by a rainbow path. The rainbow connection number rc(G) of G is the minimum integer k for which there exists a rainbow k-edge-coloring of G. It is easy to see that diam(G) ≤ rc(G) for any connected graph G. The rainbow connection number was introduced by Chartrand et al. in [4]. It is of great use in transferring information of high security in multicomputer networks. We refer the readers to [3] for details.
Chakraborty et al. [3] investigated the hardness and algorithms for the rainbow connection number, and showed that given a graph G, deciding if rc(G) = 2 is NP -complete. Bounds for the rainbow connection number of a graph have also been studies in terms of other graph parameters, for example, radius, dominating number, minimum degree, connectivity, etc. [1,4,10]. Cayley graphs and line graphs were studied in [12] and [13], respectively.
A subgraph H of a graph G is called isometric if the distance between any two distinct vertices in H is the same as their distance in G. The size of a largest isometric cycle in G is denoted by ζ(G). Clearly, every isometric cycle is an induced cycle and thus ζ(G) is not larger than the chordality, where chordality is the length of a largest induced cycle in G. In [1], Basavaraju, Chandran, Rajendraprasad and Ramaswamy got the the following sharp upper bound for the rainbow connection number of a bridgeless graph G in terms of rad(G) and ζ(G).
Theorem 3 (Basavaraju et al. [1]). For every bridgeless graph G, In this paper, we show the following result.
From Lemma 2 of Section 2, we will see that η(G) ≤ ζ(G). Thus our result implies Theorem 3. This paper is organized as follows: in Section 2, we introduce some new definitions and show several lemmas. In Section 3, we prove Theorem 2 and study upper for the oriented radius (resp. diameter) of plane graphs, edge-transitive graphs and general (bipartite) graphs. In Section 4, we prove Theorem 4 and study upper for the rainbow connection number of plane graphs, edge-transitive graphs and general (bipartite) graphs.

Preliminaries
In this section, we introduce some definitions and show several lemmas. Definition 2. Let G be a graph and H be a subset of V (G) (or a subgraph of G). The edges between H and G \ H are called legs of H. An H-ear is a path P = (u 0 , u 1 , . . . , u k ) in G such that V (H) ∩ V (P ) = {u 0 , u k }. The vertices u 0 , u k are called the f oot of P in H and u 0 u 1 , u k−1 u k are called the legs of P . The length of an H-ear is the length of the corresponding path. If u 0 = u k , then P is called a closed H-ear. For any leg e of H, denote by ℓ(e) the smallest number such that there exists an H-ear of length ℓ(e) containing e, and such an H-ear is called an optimal (H, e)-ear.
Note that for any optimal (H, e)-ear P and every pair (x, y) = (u 0 , u k ) of distinct vertices of P , x and y are adjacent on P if and only if x and y are adjacent in G.
Definition 3. For any two paths P and Q, the joint of P and Q are the common vertex and edge of P and Q. Paths P and Q have k continuous common segments if the common vertex and edge are k disjoint paths.
Definition 4. Let P and Q be two paths in G. Call P and Q independent if they has no common internal vertex. Lemma 1. Let n ≥ 1 be an integer, and let G be a graph, H be a subgraph of G and e i = u i v i be a leg of H and P i = P u i w i be an optimal (G, e i )-ear, where 1 ≤ i ≤ n and u i , w i are the foot of P i . Then for any leg e j = u j v j = e i , 1 ≤ i ≤ n, either there exists an optimal (H, e j )-ear P j = P u j w j such that either P i and P j are independent for any P i , 1 ≤ i ≤ n, or P i and P j have only one continuous common segment containing w j for some P i .
Proof. Let P j be an optimal (H, e j )-ear. If P i and P j are independent for any i, then we are done. Suppose that P i and P j have m continuous common segments for some i, where m ≥ 1. When m ≥ 2, we first construct an optimal (H, e j )ear P * j such that P i and P * j has only one continuous common segment. Let P i 1 , P i 2 , . . . , P im be the m continuous common segments of P i and P j and they appear in P i in that order. See Figure 1 for details. Furthermore, suppose that x i k and y i k are the two ends of the path P i k and they appear in P i successively. We say that the following claim holds. Figure 1. Two H-ears P i and P j .
If not, that is, there exists an integer k such that ℓ(y k P i x k+1 ) = ℓ(y k P j x k+1 ). Without loss of generality, we assume ℓ(y k P i x k+1 ) < ℓ(y k P j x k+1 ). Then we shall get a more shorter path H-ear containing e j by replacing y k P j x k+1 with y k P i x k+1 , a contradiction. Thus ℓ(y k P i x k+1 ) = ℓ(y k P j x k+1 ) for any k.
Let P * j be the path obtained from P j by replacing y k P j x k+1 with y k P i x k+1 , and let P j = P * j . If the continuous common segment of P i and P j does not contain w j . Suppose x and y are the two ends of the common segment such that x and y appeared on P starting from u i to w i successively. Similar to Claim 1, ℓ(yP i w i ) = ℓ(yP j w j ). Let P * j be the path obtained from P j by replacing yP j w j with yP i w i . Clearly, P * j is our desired optimal (H, u j v j )-ear.
Proof. Suppose that there exists an edge e such that the length ℓ(C) of the smallest cycle C containing e is larger than ζ(G). Then, C is not an isometric cycle since the length of a largest isometric cycle is ζ(G). Thus there exist two vertices u and v on C such that d G (u, v) < d C (u, v). Let P be a shortest path between u and v in G. Then a closed trial C ′ containing e is obtained from the segment of C containing e between u and v by adding P . Clearly, the length ℓ(C ′ ) is less than ℓ(C). We can get a cycle C ′′ containing e from C ′ . Thus there exists a cycle C ′′ containing e with length less than ℓ(C), a contradiction. Therefore η(G) ≤ ζ(G).

Oriented diameter
At first, we have the following observation.
Observation 1. Let G be a graph and H be a bridgeless spanning subgraph of G. Then the oriented radius (resp. diameter) of G is not larger than the oriented radius (resp. diameter) of H.

Proof of Theorem 2:
We only need to show that G has an orientation H such . Let u be a center of G and let H 0 be the trivial graph with vertex set {u}. We assert that there Basic step: When i = 1, we omit it since the proof of this step is similar to that of the following induction step.
Induction step: Assume that the above assertion holds for i−1. Next we show that the above assertion also holds for i.
. Pick x 1 ∈ X, let y 1 be a neighbor of x 1 in H i−1 and let P 1 = P y 1 z 1 be an optimal (H i−1 , x 1 y 1 )-ear. We orient P such that P 1 is a directed path. Pick x 2 ∈ X satisfying that all incident edges of x 2 are not oriented. Let y 2 be a neighbor of x 2 in H i−1 . If there exists an optimal (H i−1 , x 2 y 2 )-ear P 2 such that P 1 and P 2 are independent, then we can orient P 2 such that P 2 is a directed path. Otherwise, by Lemma 1 there exists an optimal (H i−1 , x 2 y 2 )-ear P 2 = P y 2 z 2 such that P 1 and P 2 has only one continuous common segment containing z 2 . Clearly, we can orient the edges in E(P 2 )\E(P 1 ) such that P 2 is a directed path. We can pick the vertices of X and oriented optimal H-ears similar to the above method until that for any x ∈ X, at least two incident edges of x are oriented. Let H i be the graph obtained from H i−1 by adding vertices in V (G) \ V (H i−1 ), which has at least two new oriented incident edges, and adding new oriented edges. Clearly, , then the assertion holds by inductive hypothesis. If x ∈ V (H i−1 ). Let P be a directed optimal (H i , e)-ear containing x, where e is some leg of H i−1 (such a leg and such an ear exists by the definition of H i . By Lemma 3,ℓ Remark 1. The above theorem is optimal since it implies Chvátal and Thomassen's optimal Theorem 1. Readers can see [5,11] for optimal examples.
The following example shows that our result is better than that of Theorem 1.

Example 1.
Let H 3 be a triangle with one of its vertices designated as root. In order to construct H r , take two copies of H r−1 . Let H r be the graph obtained from the triangle u 0 , u 1 , u 2 by identifying the root of first (resp. second) copy of H r−1 with u 1 (resp. u 2 ), and u 0 be the root of H r . Let G r be the graph obtained by taking two copies of H r and identifying their roots. See Figure 2 for details. It is easy to check that G r has radius r and every edge belongs to a cycle of length η(G) = 3. By Theorem 1, G r has an orientation H r such that rad(H r ) ≤ r 2 + r and diam(H r ) ≤ 2r 2 + 2r. But, by Theorem 2, G r has an orientation H r such that rad(G) ≤ 2r and diam(G) ≤ 4r. On the other hand, it is easy to check that all the strong orientations of G r has radius 2r and diameter 4r.
We have the following result for plane graphs. is at most k, then G has an oriented H such that rad(H) ≤ rad(G)(k − 1) and diam(H) ≤ 2rad(G)(k − 1).
Since every edge of a maximal plane (resp. outerplane) graph belongs to a cycle with length 3, the following corollary holds.

Corollary 1. Let G be a maximal plane (resp. outerplane) graph. Then there exists an orientation H of G such that rad(H) ≤ 2rad(G) and rad(H) ≤ 4rad(G).
A graph G is edge-transitive if for any e 1 , e 2 ∈ E(G), there exists an automorphism g such that g(e 1 ) = e 2 . We have the following result for edge-transitive graphs.
Theorem 6. Let G be a bridgeless edge-transitive graph. Then G has an orientation H such that rad(H) ≤ rad(G)(g(G)−1) and diam(H) ≤ 2rad(G)(g(G)−1), where g(G) is the girth of G, that is, the length of a smallest induced cycle.
For general bipartite graphs, the following theorem holds.
First, we show that rad(G) ≤ 3. Fix a vertex x in G, and let y be any vertex different from x in G. If x and y belong to the same part, without loss of generality, say x, y ∈ V 1 . Let X and Y be neighborhoods of x and y in V 2 , respectively. If X ∩ Y = ∅, then |V 2 | ≥ |X| + |Y | ≥ 2k > m, a contradiction. Thus X ∩ Y = ∅, that is, there exists a path between x and y of length two. If x and y belong to different parts, without loss of generality, say x ∈ V 1 , y ∈ V 2 . Suppose x and y are nonadjacent, otherwise there is nothing to do. Let X and Y be neighborhoods of x and y in G, and let X ′ be the set of neighbors except for x of X in G. If X ′ ∩ Y = ∅, then |V 1 | ≥ 1 + |Y | + |X ′ | ≥ 1 + r + (r − 1) = 2r > n, a contradiction (Note that |X ′ | ≥ r − 1). Thus X ′ ∩ Y = ∅, that is, there exists a path between x and y of length three in G.
Next we show that η(G) ≤ 4. Let xy be any edge in G. Let X be the set of neighbors of x except for y in G, let Y be the set of neighbors of y except for x in G, let X ′ be the set of neighbors except for x of X in G. If X ′ ∩ Y = ∅, then |V 1 | ≥ 1 + |Y | + |X ′ | ≥ 1 + (r − 1) + (r − 1) = 2r − 1 > n, a contradiction (Note that |X ′ | ≥ r − 1). Thus X ′ ∩ Y = ∅, that is, there exists a cycle containing xy of length four in G.
For equal bipartition k-regular graph, the following corollary holds. Corollary 2. Let G = (V 1 ∪V 2 , E) be a k-regular bipartite graph with |V 1 | = |V 2 | = n. If k > n/2, then there exists an orientation H of G such that rad(H) ≤ 9.
The following theorem holds for general graphs. (ii) If δ(G) > n/2, then G has an orientation H such that rad(H) ≤ 4 and diam(H) ≤ 8.
Proof. Since methods of proofs of (i) and (ii) are similar, we only prove (i). For (i), it suffices to show that rad(G) ≤ 2k and η(G) ≤ 2k + 1 by Theorem 2.
Next we show η(G) ≤ 2k + 1. Let e = uv be any edge in G.
, and let P (resp. Q) be a path between u and w (resp. between v and w). Then e belongs a close trial uP wQvu of length 2k + 1. Therefore, e belongs a cycle of length at most 2k + 1.

Remark 3.
The above condition is almost optimal since K n/2 ∪ K n/2 is disconnected for even n.
For any vertex u of G, let 1 ≤ i < k be any integer and x, y ∈ N i (u). If x and y have a common neighbor z in N i+1 (u), then G has a cycle of length at most 2i < 2k ≤ g(G)/2, a contradiction. Thus x and y has no common neighbor in N i+1 (u). Therefore, |N k (u)| ≥ δ(G)(δ(G) − 1) k−1 > n/2 − 1. By Theorem 2, G has an orientation H such that rad(H) ≤ 4k 2 .

Upper bound for rainbow connection number
At first, we have the following observation.

Observation 2. Let G be a graph and H be a spanning subgraph of G. Then rc(H) ≤ rc(G).
Proof of Theorem 4: Let u be a center of G and let H 0 be the trivial graph with vertex set {u}. We assert that there exists a subgraph H i of G such that N i [u] ⊆ V (H i ) and rc(H i ) ≤ Σ i j=1 min{2(rad(G) − j) + 1, η(G)}. Basic step: When i = 1, we omit it since the proof of this step is similar to that of the following induction step.
Induction step: Assume that the above assertion holds for i − 1 and c is a rc(H i−1 )-rainbow coloring of H i−1 . Next we show that the above assertion holds , then let H i = H i−1 and we are done. Thus, we suppose N i (u) ⊆ V (H i−1 ) in the following.
Let H i be the graph obtained from H i−1 by adding vertices in V (G)\V (H i−1 ), which has at least two new colored incident edges, and adding new colored edges.
It is suffices to show that H i is rainbow connected. Let x and y be two distinct vertices in H i . If x, y ∈ V (H i−1 ), then there exists a rainbow path between x and y by inductive hypothesis. If exactly one of x and y belongs to V (H i−1 ), say x. Let P be a symmetrical colored H i−1 -ear containing y and y ′ be a foot of P . There exists a rainbow path Q between x and y ′ in H i−1 by inductive hypothesis. Thus, xQy ′ P y is a rainbow path between x and y in H i .
Suppose none of x and y belongs to H i−1 . Let P and Q be symmetrical colored H i−1 -ear containing x and y, respectively. Furthermore, let x ′ , x ′′ be the foot of P and y ′ , y ′′ be the foot of Q. Without loss of generality, assume that P is colored from x ′ to x ′′ by α 1 , α 2 , · · · , α ⌈ℓ(P )/2⌉ , β ⌊ℓ(P )/2⌋ , . . . , β 2 , β 1 in that order, and Q is colored from y ′ to y ′′ by α 1 , α 2 , · · · , α ⌈ℓ(Q)/2⌉ , β ⌊ℓ(Q)/2⌋ , . . . , β 2 , β 1 in that order. If ℓ(x ′ P x) ≤ ℓ(y ′ Qy). Let R be a rainbow path between x ′ and y ′′ in H i−1 . Then xP x ′ Ry ′′ Qy is a rainbow path between x and y in H i . Otherwise, ℓ(x ′ P x) > ℓ(y ′ Qy). Let R be a rainbow path between y ′ and x ′′ in H i−1 . Then yP y ′ Rx ′′ Qx is a rainbow path between x and y in H i . Thus, there exists a rainbow path between any two distinct vertices in H i , that is, The following optimal example is from [1]. Figure 3. Graph H r,η(G) . Every P i is a path between x i and x i−1 of length ℓ(P i ) = min{2i, η(G) − 1}.
Example 2. For any r ≥ 1 and 3 ≤ η(G) ≤ 2r + 1, we first construct the graph H r,η(G) as in Figure 3. Clearly, H r,η(G) is a bridgeless graph with radius rad(G) = ecc(u) = r and every edge of H r,η(G) is contained in a cycle of length at most η(G).
Let m = r i=1 min{2i+1, η(G)} and let H j be a copy of H r,η(G) , where 1 ≤ j ≤ m r + 1, and V (H j ) = {x j : x ∈ V (H r,η(G) ) and E(H j ) = {x j y j | xy ∈ E(H r,η(G) )}. Identify the vertex u j as a new vertex u. The resulting graph is denoted by G. It is easy to check that G is a bridgeless graph with radius rad(G) = ecc(u) = r and every edge of H r,η(G) is contained in a cycle of length at most η(G). Thus, rc(G) ≤ Σ r i=1 min{2i + 1, η(G)} by Theorem 4. On the other hand, for any k < m and any k-edge coloring of G, every r-length P uv j path can be colored in at most k r different ways. By the Pigeonhole Principle, there exist p = q, 1 ≤ p < q ≤ m r +1 such that c(x p i−1 x p i ) = c(x q i−1 x q i ) for 1 ≤ i ≤ r. Consider any rainbow path P from v p to v q . For every 1 ≤ i ≤ r, x p i−1 x p i belongs to P if and only if x q i−1 x q i does not belong to P . Thus, ℓ(P ) ≥ Σ r i=1 min{2i + 1, η(G)} = m, and there does not exist any rainbow path between v p and v q . Hence, rc(G) = r i=1 min{2i + 1, η(G)}.
The following example shows that our result is better than that of Theorem 3.
The remaining results are similar to those in Section 3.
Theorem 9. Let G be a plane graph. If the length of the boundary of every face is at most k, then rc(G) ≤ k rad(G). Theorem 11. Let G = (V 1 ∪ V 2 , E) be a bipartite graph with |V 1 | = n and |V 2 | = m. If d(x) ≥ k > ⌈m/2⌉ for any x ∈ V 1 , d(y) ≥ r > ⌈n/2⌉ for any y ∈ V 2 , then rc(G) ≤ 12.
The following theorem holds for general graphs.
Theorem 12. Let G be a graph.