König's lemma or König's infinity lemma is a theorem in graph theory due to Dénes Kőnig (1936). It gives a sufficient condition for an infinite graph to have an infinitely long path. The computability aspects of this theorem have been thoroughly investigated by researchers in mathematical logic, especially in computability theory. This theorem also has important roles in constructive mathematics and proof theory. Note that, although Kőnig's name is properly spelled with a double acute accent, the lemma named after him is customarily spelled with an umlaut.
Statement of the lemma
If "G" is a connected graph with infinitely many vertices such that every vertex has finite degree (that is, each vertex is adjacent to only finitely many other vertices) then every vertex of "G" is part of an infinitely long simple path, that is, a path with no repeated vertices.
A common special case of this is that every tree that contains infinitely many vertices, each having finite degree, has at least one infinite simple path.
Note that the vertex degrees must be finite, but need not be bounded: it is possible to have one vertex of degree 10, another of degree 100, a third of degree 1000, and so on.
Proof
For the proof, assume that the graph consists of infinitely many vertices and is connected.
Start with any vertex "v"1. Every one of the infinitely many vertices of "G" can be reached from "v"1 with a simple path, and each such path must start with one of the finitely many vertices adjacent to "v"1. There must be one of those adjacent vertices through which infinitely many vertices can be reached without going through "v"1. If there were not, then the entire graph would be the union of finitely many finite sets, and thus finite, contradicting the assumption that the graph is infinite. We may thus pick one of these vertices and call it "v"2.
Now infinitely many vertices of "G" can be reached from "v"2 with a simple path which doesn't use the vertex "v"1. Each such path must start with one of the finitely many vertices adjacent to "v"2. So an argument similar to the one above shows that there must be one of those adjacent vertices through which infinitely many vertices can be reached; pick one and call it "v"3.
Continuing in this fashion, an infinite simple path can be constructed by mathematical induction. At each step, the induction hypothesis states that there are infinitely many nodes reachable by a simple path from a particular node that does not go through one of a finite set of vertices. The induction argument is that one of the vertices adjacent to satisfies the induction hypothesis, even when is added to the finite set.
The proof just given may not be considered constructive, because at each step it uses a proof by contradiction to establish that there exists an adjacent vertex from which infinitely many other vertices can be reached. Facts about the computational aspects of the lemma suggest that no proof can be given that would be considered constructive by the main schools of constructive mathematics.
Computability aspects
The computability aspects of König's lemma have been thoroughly investigated. The form of König's lemma most convenient for this purpose is the one which states that any infinite finitely branching subtree of