Finding optimum point that minimizes maximum distance
you can use Floyd Warshall algorithm to find distance of every pair and then just use a simple for to find the sum of distance of any of vertices  and print the minimum of them