Rooted vs Unrooted Trees in Data Structure

In this section we will see what are the differences between rooted and the unrooted trees. At first we will see some examples of Rooted, and Unrooted trees.

Example of Rooted Tree

Example of Unrooted Tree

Basic Differences between rooted and Unrooted trees

In a rooted tree, each node with descendants represents the inferred most recent common ancestors of the descendants. In some trees, the edge lengths may be interpreted as time estimates.

For the unrooted trees, there is no ancestral root. Unrooted trees represent the branching order, but do not indicate the root of the location of the last common ancestor.