Trees
Trees
Definition 3.1
- acyclic: if there are no cycles or circuits in the graph.
- tree: acyclic and connected.
- forest: acyclic graph.
- leaf: vertex with degree 1.
Spanning Trees
Definition 3.2
A spanning tree is a spanning subgraph that is also a tree.
Definition 3.3
- Given a weighted graph , is a minimum spanning tree, or MST, of
Kruskal’s Algorithm
- Just sort all weighted edges and pick the one with least weight until the graph connected and without any cycle.
Prim’s Algorithm
- Randomly pick a root. Add the least weight edge that incident to root. Then find the least weight edge among all edge that incident to the endpoint of until cotain all vertex and connected.
Tree Properties
Theorem 3.4
Every tree with at least two vertices has a leaf.
Theorem 3.6
A tree with vertices has edges .
Theorem 3.11
Let be a graph with vertices.
is acyclic and contain edges.
is connected and contain edges.
There is a unique path between every pair of distinct vertice in .
is acyclic and for any edge from , contains exactly one cycle.
Tree Enumeration
Definition 3.13
Given a tree on vertices(labeld 1,2,…,n), the Prufer sequence of is a sequence of length defined as follows:
- Let be the leaf of with the smallest label.
- Define to be .
- For each , define , where is the leaf with the smallest label of .
- Define to be the neighbor of .
Comments