In graph theory, the Gallai–Hasse–Roy–Vitaver theorem is a form of duality between the colorings of the vertices of a given undirected graph and the orientations of its edges. It states that the minimum number of colors needed to properly color any graph
G
G
This theorem implies that every orientation of a graph with contains a simple directed path with this path can be constrained to begin at any vertex that can reach all other vertices of the oriented
A bipartite graph may be oriented from one side of the bipartition to the other. The longest path in this orientation has length one, with only two vertices. Conversely, if a graph is oriented without any three-vertex paths, then every vertex must either be a source (with no incoming edges) or a sink (with no outgoing edges) and the partition of the vertices into sources and sinks shows that it is
In any orientation of a cycle graph of odd length, it is not possible for the edges to alternate in orientation all around the cycle, so some two consecutive edges must form a path with three vertices. Correspondingly, the chromatic number of an odd cycle is three.
To prove that the chromatic number is greater than or equal to the minimum number of vertices in a longest path, suppose that a given graph has a coloring with
k
k
k
To prove that the chromatic number is less than or equal to the minimum number of vertices in a longest path, suppose that a given graph has an orientation with at most
k
k
The proof of this theorem was used as a test case for a formalization of mathematical induction by
The theorem also has a natural interpretation in the category of directed graphs and graph homomorphisms. A homomorphism is a map from the vertices of one graph to the vertices of another that always maps edges to edges. Thus, a of an undirected may be described by a homomorphism from
G
Considering homomorphisms in the other direction, instead of a directed has at most
k
Pk+1
Thus, the Gallai–Hasse–Roy–Vitaver theorem can be equivalently stated as follows:
For every directed there is a homomorphism fromIn the case thatto the transitive tournament if and only if there is no homomorphism from the pathG
G
The Gallai–Hasse–Roy–Vitaver theorem has been repeatedly It is named after separate publications by and Roy credits the statement of the theorem to a conjecture in a 1958 graph theory textbook by It is a generalization of a much older theorem of László Rédei from 1934, that every tournament (an oriented complete graph) contains a directed Hamiltonian path. Rédei's theorem follows immediately from the Gallai–Hasse–Roy–Vitaver theorem applied to an undirected complete graph.
Instead of orienting a graph to minimize the length of its longest path, it is also natural to maximize the length of the shortest path, for a strong orientation (one in which every pair of vertices has a shortest path). Having a strong orientation requires that the given undirected graph be a bridgeless graph. For these graphs, it is always possible to find a strong orientation in which, for some pair of vertices, the shortest path length equals the length of the longest path in the given undirected