Introduction to graph theory/Proof of Theorem 2
From Wikiversity
[edit] Statement
A graph is a forest if and only if for every pair of distinct vertices u,v, there is at most one u,v-path.
[edit] Proof
Suppose you have a graph G which is not a forest. Since a forest is defined to be a graph containing no cycles, it is clear that G must have a cycle C. All cycles have at least three vertices. Let
(with
) be the vertices on C in order. Then there are two distinct v1,v2-paths, namely v1v2 and
.
Now suppose that G is not a forest, but has two distinct u,v-paths, namely
and
. We would like to say that these create a cycle
. However, a cycle can only include each vertex once, and it is possible that one of the bi is equal to one of the aj. To that end, write a0 = b0 = u and an + 1 = bm + 1 = v. Let i be the largest value of i < = n such that ai = bj for some j. Then we find a cycle, namely
. By our choice of i, clearly no vertex appears more than once.