I have an undirected, connected, positively-weighted graph G = <V,E>
. I need to find one node v_min
in V
such that the maximum distance between v_min
and the other nodes are minimized. I've learned that this is a special problem of the k-center problem (i.e., with k=1
) which is already known to be NP-Hard. However, since we are restricting k
to be equal to 1, I assume that the problem can still be solved efficiently.
The approach I have now is: compute all-pairs distances among the nodes in V
, e.g., using Floyd-Warshall, or repeated calls of Dijkstra. Then, we go down the list of nodes to find the one that minimizes the maximum distance between the node and the other nodes. If there are more than one nodes that satisfy this, pick any one of them.
- Is this approach correct?
- Is there any better approach (i.e., more efficient)? Note that I am not interested in approximation algorithms, only exact algorithms.