Rooted Tree

2 min read Last updated Mon May 25 2026 17:06:29 GMT+0000 (Coordinated Universal Time)

A tree with a root vertex.

Height

Length of the longest path from the root.

Level

For a given vertex vv, length of the simple path from the root to vv.

Parent

For a given vertex vv, its parent vertex is the unique vertex uu where level(u)=level(v)1\text{level}(u) = \text{level}(v) - 1 and there is an edge between uu and vv.

Child

For a given vertex vv, uu is a child of vv iff vv is the parent of uu.

Siblings

Vertices with the same parent.

Ancestors

For a given vertex vv, all vertices in the path from the root to vv, excluding vv and including the root.

Descendants

For a given vertex vv, all vertices that have vv as their ancestor.

Leaf

A vertex without any children.

Internal vertices

Vertices that have children. Non-leaf vertices.

Sub-rooted tree

Suppose aa is a vertex in a tree. Then the sub-tree with aa as its root is the sub-graph of the tree consisting of aa and its descendants and all edges incident to these descendants.

Ordered Rooted Tree

Rooted tree with a specified left-to-right ordering among siblings.

Labeling scheme (recursive):

  1. Root \to label 00. Its kk children at level 1 \to labels 1,2,,k1, 2, \ldots, k (left to right).
  2. Vertex at level nn with label AA, having kvk_v children \to children labeled A.1,A.2,,A.kvA.1, A.2, \ldots, A.k_v.

Decision tree

Vertices represent the decision points or events, where a decision could be made. Edges represent the possible decisions/outcomes of different choices.

Was this helpful?