A graph G = (V, E) consists of a set of vertices V and a set of edges E.
A tree is a connected, undirected graph with no cycles. A graph with no cycles is called acyclic.
Let T be a graph with n vertices. The following are equivalent properties of a tree:
A pendant vertex (or leaf) is a vertex with a degree of 1.
The eccentricity e(v) of a vertex v is the length of the longest path from v to any other vertex in the tree.
The radius r(T) of a tree is the minimum eccentricity of all vertices.
The diameter d(T) of a tree is the maximum eccentricity of all vertices (the longest path in the tree).
The centre of a tree T is the set of all vertices with the minimum eccentricity (i.e., all vertices v where e(v) = r(T)).
Finding the Centre: Repeatedly remove all pendant vertices from the tree simultaneously. The vertex or two vertices remaining at the end form the centre. A tree has either one central vertex or two central vertices (which must be adjacent).
A rooted tree is a tree in which one vertex has been designated as the root. This imposes a parent-child hierarchy.
A binary tree is a rooted tree where each internal vertex has at most two children, designated as a left child and a right child. An empty tree is also a binary tree.
A binary tree where every vertex has either 0 or 2 children. The leaves are the 0-child vertices, and the internal nodes are the 2-child vertices.
A binary tree in which every level, except possibly the last, is completely filled, and all vertices on the last level are as far left as possible.