Abstract
The (weighted) [Formula: see text]-median, [Formula: see text]-means, and [Formula: see text]-center problems in the plane are known to be NP-hard. In this paper, we study these problems with an additional constraint that requires the sought [Formula: see text] facilities to be on a given line. We present efficient algorithms for various distance measures such as [Formula: see text]. We assume that all [Formula: see text] weighted points are given sorted by their projections on the given line. For [Formula: see text]-median, our algorithms for [Formula: see text] and [Formula: see text] metrics run in [Formula: see text] time and [Formula: see text] time, respectively. For [Formula: see text]-means, which is defined only on the squared [Formula: see text] distance, we give an [Formula: see text] time algorithm. For [Formula: see text]-center, our algorithms run in [Formula: see text] time for all three metrics, and in [Formula: see text] time for the unweighted version under [Formula: see text] and [Formula: see text] metrics. While our results for the [Formula: see text]-center problem are optimal, the results for the [Formula: see text]-median problem almost match the best algorithms for the corresponding one-dimensional problems.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have