Length of the Longest Path and Diameter in Orientations of Graphs

We say that a parameter p of directed graphs has the interval property if for every graph G and orientations of G , p can take every value between its minimum and maximum values. Let λ be the length of the longest directed path. A question asked by C. Lin in [1] is equivalent to the question of whether λ has the interval property. In this note, we answer this question in the affirmative. We also show that the diameter of directed graphs does not have the interval property.


Introduction
Let G be an undirected graph.An orientation of G is a directed graph D obtained by assigning a direction to every edge in G .A classical result of Gallai, Roy and Vitaver states that in any orientation of a graph G , the number of ver- tices in the longest directed path is at least the chromatic number of G .Lin [1] asked whether every graph G can be oriented such that the number of vertices in its longest directed path is k where k is any number between the chro- matic number of G and the number of vertices in the longest undirected path in G .Let p be a parameter of oriented graphs.We define Similarly, ( ) D λ is the length of the longest directed path in a directed graph D .Lin's question can be phrased as whether λ has the interval property.In Section 2, we answer Lin's question in the affirmative by describing a method to construct an orientation D of any given graph G with ( ) where k is an integer between ( ) . In Section 3, we show that the diameter of directed graphs does not have the interval property.We construct an infinite family of graphs and prove that it is not possible to orient these graphs so that their diameters take all the values between the minimum and the maximum diameters.

Longest Path in Oriented Graphs
Theorem 1 (Gallai [2], Roy [3], Vitaver [4], also in the book [5]) If D is an orientation of G , then  .This is a question raised in [1] by C. Lin.In this section we describe a method to construct an orientation for each such integer , k thus giving an affirmative answer to the question of Lin and proving that the parameter λ has the interval property.
, , , t V V V  .We may permute the colors so that 1 t v V ∈ .We define a ( ) In the m -th coloring, the color classes will be la- . What this means is that in the m -th step, we take the vertex m v in the path P and color it with a new color while keeping the colors of all the other vertices unchanged.This is a proper coloring of G .Let m D be the orientation of G induced by this ( ) It is easy to see that ( ) Let Q be a longest directed path in m D .We prove this claim in two cases.
Case 1: Q does not contain the vertex m v .Since all the edges that are not incident with m v are directed the same way in m D as in Since all the edges that are incident to . This completes the proof of the claim.
To prove the main theorem by contradiction, we assume that there is a value k between t and l such that for all i , ( ) .We have ( ) , therefore ) ( ) An efficient algorithm can easily be derived to find the orientation in Theorem 2 when a longest path and a t -coloring of G is given, even though find- ing a longest path is a well known NP-complete problem ( [6], Problem ND29).

Diameter of Oriented Graphs
The distance between two vertices , u v in a graph G , denoted the length of a shortest path between u and v .The diameter of G is the largest distance over all the pairs of vertices in G , denoted Similarly, in a directed graph D ,

( )
dist , u v is the length of a shortest directed path from u to v and Distances and diameters of oriented graphs and their applications have been studied extensively (see e.g.[7]- [13]).A directed graph D has a finite diameter if and only if D is strongly connected.A well known theorem of Robbins [14]  states that a graph G has a strongly connected orientation if and only if G is 2-connected.For this reason, we will only consider 2-connected graphs and their strongly connected orientations in this section.Another result we will use in this section is a theorem of Gutin [12].
Theorem 3 Let G be a 2-connected graph.The largest diameter of all strongly connected orientations of G is ( ) , and the edges be: ( ) , , , , , , 1).
It is easy to see that ( ) ( ) Lemma 5 There is an orientation 3k D of 3k G such that ( ) Proof.Let 3k D be the orientation of 3k G obtained by using the pairs in De- finition 4 as ordered pairs.(See Figure 2).We show that for every vertex u and any other vertex v , there is a directed uv -path of length at most 2 1 k − .By symmetry, we only need to consider two cases that either , there is a uv -path of length at most , there is a uv -path of length at most k : , there is a uv -path of length at most 1 k + : We the four subcases. .
is a uv path of length at most 2 4 k − since this path at at most k − since this path has at at most is a uv path of length at most v , and at most Combining all these cases, we see that ( ) all have degree two.For the orientation to be strongly connected, the path 1 2 + have be directed paths too.There are two possible directions for each of these three paths and two possible directions for each of the edges , , , , and ( ) G such that the diameter of the orientations take all the values be- tween the smallest diameter and the largest diameter.Corollary 8 The diameter of oriented graphs does not have the interval property.

,
We say the parameter p has the interval property if for every graph G and every k such that there is an orientation D of G such that ( ) of the longest path in .G Note that ( ) G λ = (the number of vertices in the longest path in G ) − 1.
holds for some orientation of G .Theorem 1 provides a lower bound of ( ) D λ for all orientations D of , G and ( ) G λ is a trivial upper bound of ( ) D λ .The question of whether the parameter λ has the interval property is the same as the question of whether ( ) D λ can take every value in the interval

Theorem 2
For a graph G with ( ) , there always exists an orientation D of G such that ( ) On the other hand, P is a directed path in l D .Therefore ( ) l D l λ = .The key idea of the proof of the theorem is the following observation: When the orientation changes from i D to 1 i D + , the length of the longest directed path will increase by at most one.Claim: ( ) ( )

=
, such i * exists and is strictly less than l .
orientations have the same diameter.The number of distinct values of the diameters of orientations of 3k G is much less than 64.Using Gutin's theorem ([12]), we find that the largest diameter among all orientations of 3k G is 3 1 k − .By Lemma 5, the smallest diameter is at most 2 1 k − .There are k values in the interval [ ] Let k be an integer greater than 64.It is not possible to orient the graph 3k