Discrete Math Tutor

Graphs / Rooted Trees

Least You Need to Know: Rooted Trees

A rooted tree picks one vertex as the root, which gives every other vertex a parent-child relationship and a level.

The least you need to know

Key notation

root distinguished top vertex
parent(v) the vertex directly above v
depth distance from the root

Tiny worked example

  • In a rooted tree with root r and edges `r-a, r-b, a-c`, the parent of c is a.
  • The leaves are b and c.
  • The depth of c is 2 because it is two edges from r.

Common mistakes

How to recognize this kind of problem

Start practice