Tree

4 min read Last updated Sun May 31 2026 19:40:41 GMT+0000 (Coordinated Universal Time)

A connected and acyclic graph. In this module, only undirected trees are discussed.

Any tree TT satisfies: E(T)=V(T)1|E(T)| = |V(T)| - 1.

Forest

A graph where all of its connected components are trees. All acyclic graphs are forests. All subgraphs of a forest is also a forest.

If a forest has mm number of trees, it satisfies: E(T)=V(T)m|E(T)| = |V(T)| - m.

Subtree

A subgraph of a tree which is also a tree. Any connected subgraph of a tree is a subtree (as acyclicity is inherited).

Theorem

All 4 below statements are equivalent:

  1. TT is a tree
  2. Any two vertices of TT are joined by a unique path
  3. TT is connected and E(T)=V(T)1|E(T)|= |V(T)|-1
  4. TT is acyclic and E(T)=V(T)1|E(T)|= |V(T)|-1

Leaf

A vertex with degree 1, in a tree.

Any tree with 2 or more vertices, contains at least 2 leaves.

Was this helpful?