Handshaking Lemma
The handshaking lemma is one of the most fundamental results in graph theory, providing a simple yet powerful relationship between vertex degrees and the number of edges. Despite its elementary nature, it has numerous applications and consequences throughout graph theory.
Let be a graph with edges. Then:
Equivalently, the sum of all vertex degrees equals twice the number of edges.
The proof counts each edge exactly twice: once from each endpoint. This double-counting argument is ubiquitous in combinatorics and graph theory.
Consider summing degrees over all vertices. Each edge contributes exactly 2 to this sum: it contributes 1 to and 1 to . Since there are edges and each contributes 2 to the total, we have:
Every graph has an even number of vertices with odd degree.
Partition vertices into (odd degree) and (even degree). Then:
Since the left side equals (even) and the second sum on the right is even (sum of even numbers), we have:
As this is a sum of odd numbers that must be even, there must be an even number of terms, i.e., is even.
Can we construct a graph with degree sequence ? The sum of degrees would be 15, which is odd. By the handshaking lemma, this is impossible since must be even. Therefore, no such graph exists.
The handshaking lemma generalizes to directed graphs: , where and are the out-degree and in-degree respectively. This states that the total number of outgoing edges equals the total number of incoming edges, both equal to .
The handshaking lemma is often the first tool applied when analyzing degree sequences, counting arguments, and proving the impossibility of certain graph configurations. Its simplicity belies its power and utility throughout graph theory.