A tree is such that and is connected.
A tree is a connected acyclic graph. Meaning that between any two vertices, there is a unique path.
The diameter of a tree is the length of the longest path between any two leaves of the tree. It is the longest path in the tree itself.
Theorem: where are unique and are leaves such that is the diametric path.
proof: if is a diametric path, a is not a leaf, and is a longer leaf to leaf path. if is a diametric path then is a longer path, both cases are contradictions.
def: Centre of a tree. The centre of a tree is any vertex such that the maximum of all path lengths from to any other node is minimum. denote path length as .
Theorem, Any Centre of a tree lies on the diametric path.
The picture above shows the centre not on the diametric path, but is connected to some on the diametric path. let denote the larger of the two distances or .
and the maximum of all path lengths from to vertices not on the diametric path. since , it has to be that . Therefore, the longest path from is of length but given , the longest path length from to any vertex is .
Hence is not a centre, giving the desired contradiction.
Moreover, the centre lies in the middle of the diametric path.
That is if is odd, there are two centres, both have a depth (max path length to any other node) of .
if is even, then there is centre at .