Trees
A tree is an acyclic, connected graph.
A forest is an acyclic graph.
A spanning tree of a graph
is a spanning subgraph of
which is a tree.
A spanning forest of a graph
is a spanning subgraph of
which is a forest.
A pendant vertex in a tree or graph is a vertex of degree 1.
A cut-edge in a graph is an edge so that, if you remove this edge, the graph becomes disconnnected.
Every tree
has at least 2 pendant vertices.
Proof sketch: Consider a longest path in
. The endpoints of this
path can have no neighbours outside the path, because the path is longest.
They can have only one neighbour on the path, otherwise there would be
a cycle. So they have degree 1.
Every tree
with
vertices has
edges.
Sketch of proof by induction on
:
Basic step:
.
Inductive step: Pick
. Assume that any tree with
vertices
has
edges.
Let
be a tree with
vertices. Remove a pendant vertex from
. The
remaining graph is a tree with
vertices, and we can apply induction.
Every connected graph has a spanning tree.
Every graph with a spanning tree is connected.
Every connected graph with
vertices has at least
edges.
A tree is a minimally connected graph.
If we remove any edge from a tree, then the remaining graph is disconnected.
A connected graph is a tree if and only if every edge is a cut-edge.
Rooted Trees
A directed tree is a directed graph for which the underlying undirected
graph is a tree.
A directed tree is called a rooted tree if there is a unique vertex
,
called the root so that
has in-degree 1, and all other vertices
has in-degree 1.
A leaf in a rooted tree is a vertex with outdegree zero.
A branch node is a vertex which is not a leaf.
Level
of a rooted tree is the level containing all vertices at distance
from the root.
If there is an edge
in a rooted tree, then
is a child of
,
and
is the parent of
.
An ancestor of a vertex
is a vertex on the path from
to
.
Vertex
is a descendant of
if
is an ancestor of
.
Two vertices with a common parent are called siblings.
The subtree at vertex
is the subgraph induced by the root
and
all of its descendants.
A binary rooted tree is such that every vertex has at most two
children. It is a complete binary tree if every branch node has
exactly two children.