Mathwords logoMathwords

König's Lemma — Definition & Example

König's Lemma is a graph theory result about infinite graphs. If a connected graph has infinitely many vertices but each vertex has only finitely many neighbors, then you can walk along it forever without repeating a vertex.

Let GG be an infinite, connected, locally finite graph, meaning deg⁡(v)<∞\deg(v) < \infty for every vertex vv. Then GG contains a ray: an infinite sequence of distinct vertices v0,v1,v2,…v_0, v_1, v_2, \ldots with viv_i adjacent to vi+1v_{i+1} for every i≥0i \ge 0. In the tree form of the lemma, every infinite rooted tree in which each vertex has finitely many children has an infinite branch starting at the root. The result is due to Dénes Kőnig (1927).

How It Works

The standard proof builds the ray one vertex at a time. Start at any vertex v0v_0. Removing v0v_0 splits the rest of the graph into finitely many pieces, because v0v_0 has finitely many neighbors and every piece contains one of them. Since the graph is infinite, at least one piece is infinite. Step to a neighbor v1v_1 in an infinite piece, then repeat inside that piece. At each stage an infinite piece still lies ahead, so the process never gets stuck.

Worked Example

Problem: Build a graph from a central vertex rr. For each positive integer kk, attach a leg at rr: a path of kk edges with kk new vertices. Show that this infinite, connected graph has no ray, and explain why König's Lemma is not violated.
Step 1: A simple path never repeats a vertex, so it passes through rr at most once. Every route from one leg to another goes through rr. So any simple path lies inside at most two legs, together with rr.
Step 2: Legs of lengths mm and nn contain m+nm + n vertices other than rr. So a simple path using only those two legs has at most m+n+1m + n + 1 vertices. For legs of lengths 3 and 5, the longest such path runs from the tip of one leg through rr to the tip of the other.
at most 3+5+1=9 vertices\text{at most } 3 + 5 + 1 = 9 \text{ vertices}
Step 3: Every simple path is therefore finite, so the graph has no ray. Still, it has finite paths of every length, because the legs grow without bound. The hypothesis that fails is local finiteness, since rr has infinitely many neighbors.
deg⁡(r)=∞\deg(r) = \infty
Answer: The graph has no infinite simple path, even though it is infinite, connected, and has arbitrarily long finite paths. It does not contradict König's Lemma, because the vertex rr has infinite degree.

Why It Matters

König's Lemma is a basic compactness tool. It turns facts about all finite pieces into a fact about the infinite whole. It is used to prove the de Bruijn–Erdős theorem for countable graphs: an infinite graph is kk-colorable whenever every finite subgraph is. It also shows that if every finite square region of the plane can be covered by a set of Wang tiles, then the entire plane can. In mathematical logic, a weakened version (Weak König's Lemma) is a central axiom in reverse mathematics.

Common Mistakes

Mistake: Assuming that a graph with arbitrarily long finite paths must contain an infinite path.
Correction: Long finite paths are not enough. The graph with legs of lengths 1, 2, 3, ... has paths of every finite length but no ray. You need local finiteness, which guarantees that one infinite piece survives at every step of the construction.

Related Terms

  • Lemma — Explains why this named result is called a lemma
  • Acyclic Graph — Trees, the setting of the lemma's branch form
  • Spanning Tree — Spanning trees reduce the graph version to trees
  • k-Coloring — De Bruijn–Erdős coloring theorem is proved using this lemma
  • Cayley Graph — Cayley graphs of infinite, finitely generated groups always contain a ray
  • Connected Graph — Hypothesis requiring the graph to be connected
  • Rooted Tree — Lemma often stated for infinite rooted trees