Nepedia
Back to Discover
Advanced Reader
🔢

Handshaking lemma

math Maturity 11-13 Next article →

The handshaking lemma is a fundamental principle in graph theory. It describes a necessary relationship between the points in a network and the connections between them. In any finite undirected graph, the number of vertices that have an odd degree must be an even number. This rule is a direct consequence of the degree sum formula. This formula states that the sum of the degrees of all vertices is exactly twice the number of edges in the graph.

6n-graf
6n-graf

To understand how this works, we must define the components of a graph. An undirected graph consists of a system of vertices, which are the points or nodes. It also contains edges, which are the lines connecting pairs of vertices. The degree of a vertex is the number of edges that touch it as an endpoint. If a graph includes a loop, which is an edge connecting a vertex to itself, that loop contributes two units to the degree of that vertex. Because every single edge has exactly two endpoints, every edge adds exactly two to the total sum of degrees. Therefore, the total sum must always be an even number.

This mathematical mechanism creates specific constraints for different types of graphs. In a bipartite graph, the vertices are split into two separate subsets. Every edge must connect a vertex from one subset to a vertex in the other. In such a system, the sum of the degrees in each subset must equal the total number of edges. For biregular graphs, where every vertex in a specific subset has the same degree, these proportions are strictly fixed. The lemma also applies to subgraphs and their connected components. It ensures that within any part of a larger network, the even-parity rule for odd nodes remains intact.

Leonhard Euler first proved this lemma through his study of the Seven Bridges of Königsberg. The city of Königsberg, now known as Kaliningrad, featured seven bridges that people wanted to cross. Euler modeled the city as a graph where landmasses were vertices and bridges were edges. He investigated whether an Euler tour or an Euler path could exist. An Euler tour is a walk that traverses every edge exactly once and returns to the start. An Euler path traverses every edge once but ends at a different vertex. Euler showed that a tour requires zero odd vertices, while a path requires exactly two.

6n-graf
6n-graf

In the specific case of the Seven Bridges of Königsberg, the graph had four vertices with an odd degree. Because four is an even number, the lemma was satisfied, but the specific requirement for a path or tour was not. It was impossible to cross all seven bridges without repeating one. This discovery helped formalize the entire field of graph theory. Today, the lemma's significance is seen in complex algorithms. For example, the Christofides–Serdyukov algorithm uses the geometric properties of the degree sum formula to approximate solutions for the traveling salesperson problem.

Beyond simple paths, the lemma is used to prove complex combinatorial structures. In any cubic graph, there must be an even number of Hamiltonian cycles passing through a fixed edge. A Hamiltonian cycle is a path that visits every vertex exactly once. Mathematicians use "exchange graphs" to prove such properties. By creating a graph where vertices represent different paths, they can apply the handshaking lemma to show that certain configurations must exist in even numbers. This logic helps prove that certain mathematical objects are not just possible, but must exist in specific quantities.

Other fascinating applications include Sperner's lemma and the mountain climbing problem. Sperner's lemma deals with coloring small triangles within a larger subdivided triangle. The lemma proves that at least one small triangle must contain all three colors.

Sperner2d
Sperner2d

Similarly, the mountain climbing problem uses the lemma to show that two people starting at opposite ends of a hill can coordinate their movement to meet in the middle while staying at equal heights.

Mountain climbing problem
Mountain climbing problem

Even the game of Hex relies on this logic. The lemma proves that a game of Hex cannot end in a draw because the graph formed by the board must contain a winning path.

Sperner2d
Sperner2d
691 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (4)
File:6n-graf.svg
6n-graf.svg
File:Sperner2d.svg
Sperner2d.svg
File:Mountain climbing problem.gif
Mountain climbing problem.gif
File:Infinite graph one direction.svg
Infinite graph one direction.svg
More to explore

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.