Discrete Math Notes:
Chapter 6: Graphs and Trees
6.7 Introduction to trees
Tree, an undirected graph that is connected and has no cycles.
free tree, no particular organization of the vertices and edges.
rooted tree, the vertex at the top of the drawing is designated as the root of the tree
Level, a vertex is its distance from the root
Height, a tree is the highest level of any vertex.
Parent, the parent of vertex v is the first vertex after v encountered along the path from v to the root.
Ancestor, every vertex along the path from v to the root (except for the vertex v itself)
Child, v is the parent of vertex u, then u is a child of vertex v.
Descendant, if u is an ancestor of v, then v is a descendant of u
Leaf, a vertex which has no children.
Siblings, if they have the same parent.
Subtree, at vertex v is the tree consisting of v and all v's descendants.
Overview:
Example of a Free and Rooted Tree
Free Tree
Ronted Tree
level 4 vertices
Maximum level is 4 The tree has height 4
Captions
1. In a free tree, the vertices are not ordered. To make a free tree into a rooted tree, select a vertex to be the root and place the root at the top. 2. The root is the only level 0 vertex. 3. The level of each of the remaining vertices is its distance from the root. In the given example, the maximum level is 4, so the tree has height 4
The tree on the left is known as a free tree since the vertices and edges are not organized in any specific way. The right-hand tree is known as a rooted tree. The tree's root is indicated by the vertex at the top of the drawing. The remaining vertices are arranged in order of their proximity to the root. The number of edges in the shortest path between two vertices in an undirected graph equals the distance between them. The distance between a vertex and the root determines its level. The highest level of any vertex is the height of a tree. The tree on the right is three feet ta