Exercise 958Combinatorics › Graph theoryL1Added 3 Nov 2026
Bipartite graphs
#bipartite#2-coloring#odd cycle
Statement
Show that a graph is bipartite iff it has no odd cycle.
Hint
: an odd cycle cannot be 2-colored. : BFS/DFS coloring, showing consistency.
Show solutionHide solution
Solution
. In a bipartite graph with parts , any cycle alternates ---, so its length is even.
. Suppose no odd cycles. Color each component as follows: pick a root, color it red; color each neighbor blue; propagate. If a conflict occurs (two adjacent vertices of the same color), we find a path between them of opposite parity, giving an odd cycle.
Conclusion. Bipartite no odd cycle.