Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

NOTES FOR MATH 481

LECTURE 26

VIVEK DHAND

1. Bipartite Graphs

A graph G = (V, E) is bipartite if we can split up the vertices into two sets X and Y so
that every edge has one endpoint in X and the other endpoint in Y . In other words,
no two vertices in X are adjacent, and no two vertices in Y are adjacent. We will refer
to the sets X and Y as the partite sets of the bipartite graph.

Theorem. Let G be a graph. G is bipartite if and only if it contains no odd cy-


cles.

Proof. Let G be a bipartite graph. Suppose (v0 , . . . , vk ) is a cycle in G. Since vi and


vi+1 are adjacent, they must lie in different partite sets. So v1 , v3 , v5 , . . . must lie in
one partite set and v0 , v2 , v4 , . . . must lie in the other. Since vk−1 and v0 are adjacent,
we see that k − 1 must be odd, so k must be even. This proves that bipartite graphs
cannot contain odd cycles.
Now suppose G is a graph which does not contain any odd cycles. Note that G = K1
is clearly bipartite and does not contain any odd cycles (a cycle must have at least
3 vertices). Therefore, we may assume that G has at least two vertices. Also, G is
bipartite if and only if each connected component of G is bipartite, so we may assume
that G is connected. Pick a vertex v and define
X = {x ∈ V | the shortest path from x to v has even length }
Y = {y ∈ V | the shortest path from y to v has odd length }
We claim that these sets X and Y make G into a bipartite graph. Let x1 and x2
be vertices of X and suppose they are adjacent. Note that v is not adjacent to x1 ,
(otherwise the shortest path between them would be length one), so v 6= x2 . Similarly,
v is not adjacent to x2 , so v 6= x1 . Let P1 = (v, v1 , . . . , v2k ) be a shortest path from v
to v2k = x1 and let P2 = (v, w1 , . . . , w2l ) be a shortest path from v to w2l = x2 . Note
that P1 and P2 have even length.
If P1 and P2 have no vertices in common except v, then we have found an odd cycle:
(v, v1 , . . . , x1 , x2 , . . . w1 , v).
If P1 and P2 do have common vertices in addition to v, then let v 0 be the last such
vertex. Note that taking P1 from x1 to v 0 is the shortest path from x1 to v 0 (if there
was a shorter path, we could just take that path and then follow the rest of P1 for a
2 VIVEK DHAND

shorter path to v). The same goes for P2 : it is the shortest path from x2 to v 0 . Now,
the length of the routes that P1 and P2 take from v to v 0 must be the same. If one was
shorter than the other, we would be able to shorten either P1 or P2 . Therefore, we may
assume that v 0 = vi = wi for some i. This implies that (v 0 , vi+1 , . . . , x1 , x2 , . . . , wi+1 , v 0 )
is an odd cycle.
The same proof works for adjacent vertices y1 , y2 ∈ Y , except that P1 and P2 will have
odd length.
We have shown that each connected component of G is bipartite, so G is bipartite.


Example. Kn,m is the complete bipartite graph. It is the bipartite graph of maximal
size with |X| = n and |Y | = m.

You might also like