Odd-cycle characterization of bipartite graphs Created 2026-10-03 Updated 2026-10-05
A graph is bipartite if and only if it contains no odd cycle. One direction follows because every cycle alternates between the two vertex classes. For the converse, in each connected component of a graph choose a root and partition the vertices according to the parity of their graph distance from it. An edge joining equal parities would close an odd cycle, so every edge crosses the partition.
A graph Ramsey number is the least such that every red-blue edge colouring of the complete graph has a red or a blue . At a vertex in , either at least neighbours have red incident edges or at least have blue incident edges. In the first case find a red and adjoin the vertex, or a blue ; the second case is symmetric. Thus
Starting with and , induction gives the binomial upper bound for a Ramsey number
For the lower construction, partition vertices into two classes of size , colour inside-class edges red and between-class edges blue. Red cliques have at most vertices, and the blue graph is bipartite, so has no odd cycle.
Conversely, a graph without an odd cycle is bipartite: in each connected component colour vertices by the parity of the length of a path from a root; differing path parities would give an odd closed walk, hence an odd cycle. On vertices one of the two blue bipartition classes has at least vertices. Every edge within it is red, giving a red . Thus is the exact threshold for this alternative.
Suppose first that is bipartite. As one traverses any cycle in a graph, its vertices alternate between the two vertex classes. Returning to the initial class therefore requires an even number of edges, so contains no odd cycle.
Conversely, suppose that has no odd cycle. Work separately in each connected component of a graph, choose a root , and put
where is the graph distance. If adjacent vertices were in the same class, then and parity would force . Choose a breadth-first spanning tree. The two tree paths from to and diverge at some last common vertex; their remaining segments have equal length, and adjoining the edge gives an odd cycle. This contradiction shows that every edge joins to , proving the odd-cycle characterization of bipartite graphs.