Unit content
Trees and forests as graphs
A tree is a connected undirected graph with no cycles.
This definition has several equivalent consequences. For a finite tree with $n$ vertices:
$$|E|=n-1.$$
There is also exactly one simple path between every pair of vertices.
Removing any edge disconnects a tree, while adding any new edge creates exactly one cycle. Trees are therefore minimally connected graphs.
A forest is an undirected graph with no cycles; each connected component of a forest is a tree.
Trees appear whenever a structure branches without reconverging: hierarchies, parse structures, file trees and spanning structures in networks all use the same mathematical object.