Abstract
We consider the problem of finding k centers for n weighted points on a real line. This (weighted) k-center problem was solved in O(n log n) time previously by using Cole's parametric search and other complicated approaches. In this paper, we present an easier O(n log n) time algorithm that avoids the parametric search, and in certain special cases our algorithm solves the problem in O(n) time. In addition, our techniques involve developing interesting data structures for processing queries that find a lowest point in the common intersection of a certain subset of half-planes. This subproblem is interesting in its own right and our solution for it may find other applications as well.
Introduction
The $k$-center problem is a fundamental challenge in facility location: given $n$ "demand points" (such as houses), where should $k$ "centers" (such as fire stations) be placed to minimize the maximum distance any house has to travel to its nearest station? In the weighted version, each point has a weight representing its priority or risk, and the objective is to minimize the maximum weighted distance.
While the general problem is NP-hard in higher dimensions, it is solvable in polynomial time in one dimension (points on a line). However, previous optimal $O(n \log n)$ solutions relied on Cole’s parametric search. While mathematically elegant, parametric search is notoriously difficult to implement and carries massive hidden constants. This paper presents a "cleaner," more direct geometric approach that achieves optimal time complexity while being significantly more practical.
Methodology and Problem Transformation
The authors solve the problem by transforming it through several layers of abstraction. First, they demonstrate that the 1D $k$-center problem is equivalent to approximating a set of weighted points in a 2D plane using a $k$-step function (a piecewise constant function with $k$ segments).
The core of the algorithm involves solving a sub-problem: given a subset of half-planes, find the lowest point in their common intersection. This is a 2D Linear Programming (LP) problem. To speed this up, the authors use geometric duality to turn lines into points. Finding the intersection of half-planes in the "primary" plane becomes equivalent to finding the convex hull of points in the "dual" plane.
Because the points on the line have a natural order, their dual representations form a "simple path" that does not intersect itself. The authors leverage a specialized data structure called a compact interval tree to represent these convex hulls, allowing them to answer LP queries in $O(\log n)$ time.
Key Results and Insights
- Optimal General Complexity: The algorithm runs in $O(n \log n)$ time, matching the best known theoretical bounds without the complexity of parametric search.
- Linear Time for Small $k$: If the input points and their weights are already sorted, the algorithm can solve the problem in $O(n)$ time for many practical values of $k$ (specifically when $k = O(n^{1/2-\epsilon})$).
- Improved Query Bounds: The authors developed a new data structure for "2-D sublist LP queries" that can be built in $O(n \log n)$ and queried in $O(\log n)$ time, improving upon previous $O(\log^2 n)$ query times for this class of geometric problems.
Limitations and Future Work
While more practical than previous methods, the algorithm still has constraints. The "ultra-fast" $O(n)$ version requires pre-sorted positions and weights; otherwise, the initial sorting step maintains the $O(n \log n)$ bound. Additionally, these techniques are strictly limited to one-dimensional data. Extending these "parametric-search-free" methods to 2D or to $k$-center problems on tree networks remains an open challenge for future research.
Summary updated