The p-center problem is to locate p facilities on a network so as to minimize the largest distance from a demand point to its nearest facility. The p-median problem is to locate p facilities on a network so as to minimize the average distance from one of the n demand points to one of the p facilities. We provide, given the interval model of an n vertex interval graph, an O(n) time algorithm for the 1-median problem on the interval graph. We also show how to solve the p-median problem, for arbitrary p, on an interval graph in O(pn log n) time and on an circulararc graph in O(pn2 log n) time. Other than for trees, no polynomial time algorithm for p-median problem has been reported for any large class of graphs. We introduce a spring model of computation and show how to solve the p-center problem on an circular-arc graph in O(pn) time, assuming that the arc endpoints are sorted.
Sergei Bespamyatnikh, Binay K. Bhattacharya, J. Ma