Let T be a tree. Let p=(p0,∗,p1,∗,p2,…,∗,pm) be a longest path of T. (We write asterisks for the edges since we don't need to name them.)
Prove the following:
(a) If m is even, then the only center of T is pm/2.
(b) If m is odd, then the two centers of T are p(m−1)/2 and p(m+1)/2.