LOGBOOK

HELP

Quiz Entry - updated: 2026.11.27

What is a free tree, and how does it differ from the rooted trees of tree data structures?

A free tree is an undirected graph that is connected and has no cycles. Unlike a rooted tree it has no root and no direction from parent to child; picking any vertex as the root turns it into a rooted tree.

A free tree on six vertices, and a forest of three trees including a single vertex

* A tree on n vertices has n − 1 edges; a forest with k trees has n − k. *

Being connected and having no cycles pins a lot down. Every tree on $n$ vertices has exactly $n - 1$ edges. Between any two of its vertices there is exactly one simple path. Removing any edge disconnects it, and adding any edge creates exactly one cycle. Each of these statements can serve as an alternative definition.

Why $n - 1$ edges: a tree with at least two vertices always has a leaf, a vertex of degree 1 (follow a path as far as it goes; with no cycles it must end at one). Remove the leaf and its edge, and what is left is still a tree, with one vertex and one edge fewer. Repeat until a single vertex with no edges remains.

Go deeper:

From Quiz: ADS / Graphs: Basics, Representations and Spanning Trees | Updated: Nov 27, 2026