Definition:Rooted Tree

A rooted tree is a tree with a particular vertex distinguished from the others and called the root:



Parent
Consider a rooted tree $$T$$ whose root is $$r_T$$.

Let $$t_0$$ be a node of $$T$$.

From Paths in Trees are Unique, there is only one path from $$t$$ to $$r_T$$.

Let $$\pi: T - \left\{{r_T}\right\} \to T$$ be the mapping defined as:
 * $$\pi \left({t}\right) = \text { the node adjacent to } t \text { on the path to } r_T$$

Then $$\pi \left({t}\right)$$ is known as the parent of $$t$$, and $$\pi$$ as the parent function or parent mapping.

The root, by definition, has no parent.

Children
The children of a node $$t$$ in a rooted tree $$T$$ are the elements of the set:
 * $$\left\{{s \in T: \pi \left({s}\right) = t}\right\}$$

That is, the children of $$t$$ are all the nodes of $$T$$ of which $$t$$ is the parent.

Terminal Node
A terminal node of a rooted tree $$T$$ are the nodes of $$T$$ which have no children.