Rooted tree

Dependencies:

  1. Path in Graph

A directed graph $G$ is a rooted tree iff there is a vertex $r$, called the root, such that there is a unique simple path from $r$ to every vertex in $G$.

The root has in-degree 0. Every other vertex has in-degree 1, otherwise there would be multiple paths to it from the root. Therefore, we can also represent a rooted tree as a function $\operatorname{parent}: V \mapsto V \cup \{\textrm{null}\}$ where $\operatorname{parent}(r) = \textrm{null}$ and $\operatorname{parent}(v) = u$ iff $(u, v) \in T$.

Terminology

Let $T$ be a rooted tree.

Dependency for:

  1. Acyclic predecessor graph is union of rooted trees
  2. The undirected version of a rooted tree is a free tree
  3. Properties of DFS
  4. Edge relaxations: Predecessor subgraph is a rooted tree
  5. Shortest-path tree

Info:

Transitive dependencies:

  1. /sets-and-relations/equivalence-classes
  2. /sets-and-relations/relation-composition-is-associative
  3. /sets-and-relations/equivalence-relation
  4. Graph
  5. Path in Graph