9to5
Science
Topics
Calculators
Search
About
Home
Mathematics
Shortest paths
Tag
Shortest paths
How to Find a Vertex That Minimizes Total Distance in a Graph
Find a graph vertex with the smallest sum of shortest-path distances using repeated breadth-first search, or a linear-time rerooting method for trees.