Stallings theorem about ends of groups

In the mathematical subject of group theory, the Stallings theorem about ends of groups states that a finitely generated group "G" has more than one end if and only if the group "G" admits a nontrivial decomposition as an amalgamated free product or an HNN extension over a finite subgroup. In the modern language of Bass–Serre theory the theorem says that a finitely generated group "G" has more than one end if and only if "G" admits a nontrivial (that is, without a global fixed point) action on a simplicial tree with finite edge-stabilizers and without edge-inversions.
The theorem was proved by John R. Stallings, first in the torsion-free case (1968) and then in the general case (1971).
Ends of graphs.
Let Γ be a connected graph where the degree of every vertex is finite. One can view Γ as a topological space by giving it the natural structure of a one-dimensional cell complex. Then the ends of Γ are the ends of this topological space. A more explicit definition of the number of ends of a graph is presented below for completeness.
Let "n" ≥ 0 be a non-negative integer. The graph Γ is said to satisfy "e"(Γ) ≤ "n" if for every finite collection "F" of edges of Γ the graph Γ − "F" has at most "n" infinite connected components. By definition, "e"(Γ) = "m" if "e"(Γ) ≤ "m" and if for every 0 ≤ "n" < "m" the statement "e"(Γ) ≤ "n" is false. Thus "e"(Γ) = "m" if "m" is the smallest nonnegative integer "n" such that "e"(Γ) ≤ "n". If there does not exist an integer "n" ≥ 0 such that "e"(Γ) ≤ "n", put "e"(Γ) = ∞. The number "e"(Γ) is called "the number of ends of" Γ.
Informally, "e"(Γ) is the number of "connected components at infinity" of Γ. If "e"(Γ) = "m" < ∞, then for any finite set "F" of edges of Γ there exists a finite set "K" of edges of Γ with "F" ⊆ "K" such that Γ − "F" has exactly "m" infinite connected components. If "e"(Γ) = ∞, then for any finite set "F" of edges of Γ and for any integer "n" ≥ 0 there exists a finite set "K" of edges of Γ with "F" ⊆ "K" such that Γ − "K" has at least "n" infinite connected components.
Ends of groups.
Let "G" be a finitely generated group. Let "S" ⊆ "G" be a finite generating set of "G" and let Γ("G", "S") be the Cayley graph of "G" with respect to "S". The "number of ends of" "G" is defined as "e"("G") = e(Γ("G", "S")). A basic fact in the theory of ends of groups says that e(Γ("G", "S")) does not depend on the choice of a finite generating set "S" of "G", so that "e"("G") is well-defined.
Freudenthal-Hopf theorems.
Hans Freudenthal and independently Heinz Hopf established in the 1940s the following two facts: 
Charles T. C. Wall proved in 1967 the following complementary fact:
Cuts and almost invariant sets.
Let "G" be a finitely generated group, "S" ⊆ "G" be a finite generating set of "G" and let Γ = Γ("G", "S") be the Cayley graph of "G" with respect to "S". For a subset "A" ⊆ "G" denote by "A"∗ the complement "G" − "A" of "A" in "G".
For a subset "A" ⊆ "G", the "edge boundary" or the "co-boundary" "δA" of "A" consists of all (topological) edges of Γ connecting a vertex from A with a vertex from "A"∗. 
Note that by definition "δA" = "δA"∗.
An ordered pair ("A", "A"∗) is called a "cut" in Γ if "δA" is finite. A cut ("A","A"∗) is called "essential" if both the sets "A" and "A"∗ are infinite.
A subset "A" ⊆ "G" is called "almost invariant" if for every "g"∈"G" the symmetric difference between "A" and "Ag" is finite. It is easy to see that ("A", "A"∗) is a cut if and only if the sets "A" and "A"∗ are almost invariant (equivalently, if and only if the set "A" is almost invariant).
Cuts and ends.
A simple but important observation states:
Cuts and splittings over finite groups.
If "G" = "H"∗"K" where "H" and "K" are nontrivial finitely generated groups then the Cayley graph of "G" has at least one essential cut and hence "e"("G") > 1. Indeed, let "X" and "Y" be finite generating sets for "H" and "K" accordingly so that "S" = "X" ∪ "Y" is a finite generating set for "G" and let Γ=Γ("G","S") be the Cayley graph of "G" with respect to "S". Let "A" consist of the trivial element and all the elements of "G" whose normal form expressions for "G" = "H"∗"K" starts with a nontrivial element of "H". Thus "A"∗ consists of all elements of "G" whose normal form expressions for "G" = "H"∗"K" starts with a nontrivial element of "K". It is not hard to see that ("A","A"∗) is an essential cut in Γ so that "e"("G") > 1.
A more precise version of this argument shows that for a finitely generated group "G": 
Stallings' theorem shows that the converse is also true.
Formal statement of Stallings' theorem.
Let "G" be a finitely generated group.
Then "e"("G") > 1 if and only if one of the following holds:
In the language of Bass–Serre theory this result can be restated as follows:
For a finitely generated group "G" we have "e"("G") > 1 if and only if "G" admits a nontrivial (that is, without a global fixed vertex) action on a simplicial tree with finite edge-stabilizers and without edge-inversions.
For the case where "G" is a torsion-free finitely generated group, Stallings' theorem implies that "e"("G") = ∞ if and only if "G" admits a proper free product decomposition "G" = "A"∗"B" with both "A" and "B" nontrivial.