The center of a finite unweighted tree is the set of vertices minimizing graph eccentricityIt consists of either one vertex or two adjacent vertices. If a longest path has edges, its middle vertex or middle pair is the center, and the minimum eccentricity is .
The lower bound follows from the path endpoints : , so one endpoint is at least away from . A middle vertex attains the bound; a branch extending farther from it would produce a path longer than the chosen diameter path.
A practical construction repeatedly deletes all leaves simultaneously until only one or two vertices remain. Each pruning removes the outermost distance layer without changing the eventual middle. For a star the center is its hub; for a four-vertex path it is the two internal vertices. Weighted or infinite trees require their own metric and existence conventions.
New to topics? Read the docs here!