I'm trying to come up with an algorithm that allows me to find two vertices in an undirected, weighted graph that minimizes the distance to the farthest point.
Distance of the farthest point is basically the distance between two vertices (u, v) in the graph such that distance(u,v) >= distance(x,y) for any two other vertices in the same graph.
I know how to do this problem for 1 center (meaning one vertex that minimizes the distance to the farthest point). I also read up on the K-center algorithm that allows me to find multiple centers. But I read that the K-center algorithm does not work when k=2. So can anyone tell me what exactly I should do to find 2 centers?
Any help would be greatly appreciated. Thank you!