Past exam of the mathematics course of the University of Cambridge 2019 ii Paper 3 17G b Solution Created 2026-09-24 Updated 2026-10-03
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 putwhere 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.