Trees

Basic tree anatomy

  1. Family relationships – parents, children, etc..
  2. Geometric relationships – top, bottom, left, right, etc.
  3. Biological names – roots, leaves, etc.

Definition: A tree is a connected undirected graph with no simple circuits

Once a root is specified we can assign directions to each edge. Since there is a unique path from the root to each node of the graph, we direct each node away from the root. Thus a tree together with its root produces a graph called a rooted tree.

Ancestors and parents

Leaves

Leaves are the nodes that have no children.

Internal Node

Levels

 

In a tree there is exactly one path from the root R to each descendant of R. More than one path is not a tree. This follows from the definition of tree given at the beginning.

Truths:

 

Balanced trees

A rooted m-ary tree of height h is called balanced if all leaves are at levels h or h-1.

 

Some problems that can be studied using trees: