Almost-Optimal Upper and Lower Bounds for Clustering in Low Dimensional Euclidean Spaces
Abstract
The -median and -means clustering objectives are classic objectives for modeling clustering in a metric space. Given a set of points in a metric space, the goal of the -median (resp. -means) problem is to find representative points so as to minimize the sum of the distances (resp. sum of squared distances) from each point to its closest representative. Cohen-Addad, Feldmann, and Saulpic [JACM’21] showed how to obtain a -factor approximation in low-dimensional Euclidean metric for both the -median and -means problems in near-linear time (where is the dimension and is the number of input points).
We improve this running time to , and show an almost matching lower bound: under the Gap Exponential Time Hypothesis for 3-SAT, there is no algorithm achieving a -approximation for -means.
Keywords and phrases:
k-means clustering, k-median clustering, Euclidean space, Fine-Grained ComplexityFunding:
Karthik C. S.: This work was supported by the National Science Foundation under Grants CCF-2313372 and CCF-2443697, a grant from the Simons Foundation, Grant Number 825876, Awardee Thu D. Nguyen, and partially funded by the Ministry of Education and Science of Bulgaria’s support for INSAIT, Sofia University “St. Kliment Ohridski” as part of the Bulgarian National Roadmap for Research Infrastructure.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Facility location and clustering ; Theory of computation Computational geometryEditors:
Hee-Kap Ahn, Michael Hoffmann, and Amir NayyeriSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The -median and -means problems are minimization tasks of classic objectives for modeling clustering in a wide variety of applications arising in data mining and machine learning. Given a set of points and a set of candidate centers in a metric space , the goal of the -median problem111This variant is sometimes referred to as the discrete -median problem. In the continuous -median problem we are allowed to pick the centers from anywhere in . is to find a set of points , called centers, so as to minimize the sum of the distances (given by ) from each point of to its closest center in (in the -means problem, the goal is to instead minimize the sum of the squared distances from each point of to its closest center in ).
The algorithmic study of -median started in the early ’60s in the operations research community [36, 46, 29], while the study of -means was arguably initiated by the seminal work of Lloyd [39], which applied clustering to quantization of analog signals. Since then, both problems have received a tremendous amount of attention. Naturally, the complexity of the problems varies with the underlying metric space hosting the input points. On the negative side, both problems are known to be NP-hard in Euclidean space, even when the points lie in the Euclidean plane (and is large) [44, 40], or when [23, 2] (and the dimension is large). When both and are arbitrary, several groups of researchers have shown hardness of approximation results for both problems [6, 37, 17, 19]. Even stronger hardness results hold if the input lives in an arbitrary metric space (see Guha and Kuller [28] and [18]).
Fine-Grained Complexity.
Despite those hardness results, the importance of Euclidean inputs in statistics and machine learning applications has led researchers to develop methods and algorithms, in particular through the study of the parameterized complexity of the problem, when the input lies in an Euclidean space. Both the dimensionality of the input, , and the target number of clusters, , have been studied as parameters. For exact algorithms, the seminal work of Inaba, Katoh and Imai [31] has shown that one can compute an exact solution to the -median and -means problems in time – as opposed to the naive brute-force enumeration which runs in time. On the negative side, Cohen-Addad, de Mesmay, Rotenberg and Roytman [11] much later showed that there is no exact algorithm for (discrete) -median or -means problem, even when the dimension is four, and thus partially showing the optimality of the algorithm.
To circumvent this hardness, researchers have turned to approximation algorithms. When the dimension and the precision are taken as parameters, a line of work [5, 35, 27, 20, 10, 13] improved the running time of approximation schemes from quasi-polynomial time, , to . The doubly exponential dependency in stands in stark contrast with other similar results, e.g., for the Traveling Salesperson Problem (TSP). For this problem, Kisfaludi-Bak, Nederlof and Wegrzycki [34] recently settled the exact dependency on , by showing an algorithm running essentially in time , and a lower bound of under the Gap-ETH hypothesis [25, 42]. In light of this result, we consider the following question:
Question 1.
Is it possible to obtain a approximation scheme for -median and -means problems in low-dimensional inputs? Would it be possible to get an even faster approximation scheme for both problems?
1.1 Our Results
In this paper, we make substantial progress towards answering Question 1. Our first contribution is the design of an improved algorithm:
Theorem 2.
For every and dimension , the -median and -means problems in can both be approximated to a -factor in time .222The notation hides an exponential dependency in , and polynomial dependency in .
The above algorithm is our main contribution, and improves on the techniques of [13]. It also readily extends to the continuous -median and -means problems (see Remark 4).
On the technical side, this algorithm deepens our understanding of the quadtree decomposition for clustering. A long line of work based on this decomposition [5, 35, 27, 20, 10, 13] improved the running time of approximation schemes (i.e., -factor approximation algorithms for any small enough constant ) for clustering from quasi-polynomial time, , to [13]. The main conceptual insight of these works is to bound the number of portals necessary along the decomposition so that forcing a path to go through portals incurs at most a -factor distortion. The main contribution of [13] is that after processing a tiny fraction of the input, only a constant number of portals are sufficient at each level of the quadtree decomposition. However, this constant remains much larger than that required for other natural problems.
Indeed, carefully analyzing the performances of the quadtree dissection and the number of required portals to achieve a -factor approximation has been a fruitful direction of research to design approximation schemes in Euclidean space. The initial work of Arora [3, 4] showed approximation schemes for the Traveling Salesperson Problem (TSP) and other routing problems, first in quasi-polynomial time (for ) and then with running time . For TSP, the running time was subsequently significantly improved: first by Rao and Smith [45] who achieved , then by Bartal and Gottlieb [7] who brought it down to , linear in , but suboptimal in . Finally, [34] settled the exact dependency on , by showing an algorithm running essentially in time , and a lower bound of under the Gap-ETH hypothesis [25, 42].
In light of this literature, our contribution is therefore an improved analysis of the quadtree dissection for clustering problems, that allows us to (almost) match the number of portals required for the well-studied TSP. This requires an analysis and techniques distinct from those for TSP, in particular because they fail if distances are squared – as what happens in the -means problem. We note that, due to its simplicity, applications of the quadtree extend far beyond approximation algorithms in low-dimensional space. For clustering, quadtrees are used for instance in the streaming scenario, when memory has to be kept low [8], but also to design linear time algorithms in high-dimensional spaces [21] or to construct differentially-private algorithms [12]. Therefore, better understanding the quadtree’s performance, even in the simplest scenario, is likely to have a far-reaching impact.
We complement Theorem 2 with a conditional lower bound, which shows the near-optimality of our algorithm under the Gap-ETH hypothesis:
Theorem 3.
Assuming the Gap-ETH hypothesis, for every integer , there exists a constant such that no approximation scheme can, given an instance of discrete -means (or discrete -median) with points in Euclidean space and a parameter , compute a -factor approximation in time .
This lower bound is obtained by amalgamating the technical ideas of [37, 11, 17] and the framework of de Berg, Bodlaender, Kisfaludi-Bak, Marx and van der Zanden [24]. Ideas to reduce the Vertex Cover problem to clustering problems were elaborated in [37, 11, 17], and [24] built a framework to prove fine-grained lower bounds for a host of geometric problems in low dimensions. We put them together to obtain Theorem 3. The proof is deferred to the full version.
Extensions.
The framework developed in [13] applies to many variants of -means (and -median), namely prize-collecting -means, -means with outliers and Facility location. As our structure theorem is a direct improvement of theirs, we also improve the running time for those problems. We give a sketch of the arguments in the full version. Our analysis also improves the result for doubling metric (a generalization of Euclidean space), however attaining a non-tight complexity . We therefore focused this paper on the Euclidean setting, for which our analysis is almost tight.
1.2 Our Techniques
For the ease of presentation, we detail below our upper bound for the -means problem in the Euclidean plane (i.e., with ). Our input is a set of points , a set of candidate centers , and the goal is to compute a set of centers ( is the -wise partition product of ) that minimizes the sum of squared distances from points of to their closest center in .
Our starting point is the quadtree dissection equipped with portals. We briefly recall in the next few paragraphs its construction and main property.
First, find an axis-aligned rectangle that contains all input points. Then, randomly split the rectangle into 4 axis-aligned rectangles of side length reduced by a factor of approximately 2. Continue this splitting recursively until each rectangle contains a single point: this defines a recursive decomposition of the input. We say that two points are cut at level when the smallest rectangle containing both points is at the level of the decomposition. Assuming that the leaves of the decomposition have diameter 1, the rectangles at the level have diameter roughly .
Now, a set of portals is placed regularly along the boundary of each rectangle. Instead of connecting points to centers via straight lines, we consider only portal-respecting paths, defined as follows. To connect two points and cut at level , a portal-respecting path consists of a sequence of segments connecting , where (resp. ) is a portal of the rectangle at level containing (resp. ). Considering only those paths enforces some detours, but a simple dynamic program can compute the best portal-respecting solution, whose complexity naturally depends (exponentially) on the number of portals. Furthermore, if many portals are placed along each boundary, it can be computed that a portal-respecting path between two points cut at level has length (essentially) . Indeed, since the boundaries of the rectangles are geometrically decreasing, the detour to go through a portal at level dominates all others; and since the rectangles at this level have diameter , by regularly placing many portals, we can ensure that there is a portal at distance at most from the point where the straight line path crosses the boundary. Therefore, the goal of the analysis is to show that, for a small number of portals, a portal-respecting solution with almost optimal cost exists.
The standard argument goes as follows. The main property of the quadtree decomposition is that, for any pair of points , the probability that they are cut at level is . By using portals, the detour to connect and via portals in case they are cut at level is . Therefore, the expected detour at level is . Since there are levels in the decomposition, the expected detour is , and one has to take to get a tiny expected detour.
However, having many portals does not yield an efficient algorithm. More importantly, this analysis does not extend to -means problem: although the expected distance between and is small, the expected squared distance is not! Indeed, the expected squared detour at level is , and the term cannot be easily controlled. To cope with this, [13] introduced a careful preprocessing of the input, to ensure that no point is cut at a level higher than . In that case, taking portals is enough to ensure a small detour – and also small squared detour, as this is not an average-case argument (unlike the previously seen argument). This preprocessing is essentially the following: start from a constant-factor approximate solution (which is a set of centers), and for each point , let be its distance to the closest center of . If the ball is cut by the decomposition at a level higher than , then replace by a copy of its closest center in . They showed that each point is replaced with probability at most , therefore yielding an expected cost increase of . Furthermore, [13] showed that placing many portals ensured that, for any center of , either it can be connected to the optimal solution through portals with a small detour, or one can assume that the center is part of the optimal solution. Therefore, after preprocessing, each client can be connected through portals to the optimal solution, and dynamic programming allows to compute a near-optimal solution.
However, this analysis may be seen as “worst-case”, in the sense that it treats all the clients for which the ball is cut at a level below in the same way. Our contribution is to mix the average-case analysis with the techniques of [13] in order to reduce the number of necessary portals. We carefully define a budget for each point, according to the level where the point is cut from the approximate solution , as in [13], but now also according to the level where it is cut from the optimal solution. We first show that, with constant probability, this budget is very cheap, namely an -fraction of the optimal cost. We then show that this budget is enough to pay for the preprocessing of the input, and for the detour incurred by making a solution portal-respecting. The algorithm is the same as the one of [13]: our contribution lies in a much tighter analysis.
This analysis differs from [13] as the detour they tolerated was independent of the optimal solution: using this additional information allows us to be more precise, and reduce the number of required portals to , instead of . Although the global picture remains similar, finding the right balance between a budget (1) small enough to not blow up the cost, and (2) that is still enough to pay for making the optimal solution portal-respecting is a non-trivial extension of their proof. Indeed, it requires new insights on the way to connect a point that is badly cut, namely cut from its optimal center at a level higher than . For this, we show that our budget allows to connect the point in a portal-respecting way to the center closest to , where is the closest center to in the constant-factor approximate solution .
1.3 Further Related Work
We covered previously the hardness results for -means and -medians; in terms of upper-bound, for general metrics a recent breakthrough from [15] achieves a -approximation for -median, and a -approximation for -means [9]. Those two works improve a long line of works, based on primal-dual techniques and the so-called Lagrangian-multiplier preserving algorithms for Facility Location, see e.g. [33, 32, 38].
To improve those approximation ratio, one can resort to algorithms parameterized by the number of clusters, : one can get FPT algorithm with approximation matching the lower bound of [32], namely for -median and for -means [16].
Other techniques, specific to Euclidean Space, have been developed in the past decades. Dimension reduction [41] and coreset [22] allow to reduce the dimension of the input to and the number of distinct points to , hence leading to simple FPT algorithms based on naive enumeration. Recent papers improved this simple approach, reducing the dependency in (in the exponent) [1].
We covered in the introduction most of the literature related on low-dimensional clustering – which is the study of the problems parameterized by . To compute a -approximation in time polynomial in and , any algorithm must have a running time at least doubly exponential in , as the problem is APX-hard in dimension . The best of these algorithms is from [13], with a near-linear running time of .
Finally, tractability of clustering has also been studied with different parameters, e.g., the cost by Fomin, Golovach and Simonov [26], who showed a exact algorithm for -median, where is the optimal cost.
We present in the full version how to adapt the argument for -median. The main body contains the proof of the structure theorem that allows to reduce the number of portals required by the quadtree. We extend the algorithmic results to other objectives in the full version.
2 Preliminaries
2.1 Definitions
We consider the Euclidean space , with the metric: . For any point and , the ball centered at of radius is . The (discrete) -median and -means problems are defined as follows: we are given a set of clients and of candidate centers . A solution is any subset of with size . The goal is to compute the solution that minimizes , with for -median and for -means. We say a solution is an -approximation if its cost is at most times the minimal cost.
Remark 4.
We consider in this paper the discrete Euclidean clustering. In the continuous version, centers can be placed arbitrarily in the space. A classical result shows how to reduce continuous to discrete, by computing a set of candidate centers that contain a -approximation [43].
For some set of points , and any point , we define be the closest point in to ; and we let be the distance from to its closest point in .
We assume that the minimal distance between two points is , and denote the maximum distance between two points of . We also assume that . Using standard arguments for clustering problems, we can assume [14].
A hierarchical decomposition is a sequence such that for any , is a partition of , and is a refinement of : namely, every part of is fully contained in a part of (note that in this definition, parts are increasing with ).
2.2 The Hierarchical Decomposition and Its Properties
Lemma 5.
For any set of points and any , there is a randomized hierarchical decomposition such that the diameter of a part is at most , , each part is refined in at most parts at level , and:
-
1.
for any , radius , and level , we have
-
2.
for every part of the decomposition, there is a set of at most many portals such that for every points there is a portal close to the line connecting to , i.e., . Furthermore, any portal of level that lies in is also a portal of .
This decomposition can be found in time .
In Euclidean space, this decomposition is precisely the quadtree dissection. The previous statement is an adaptation of Lemma 2.3 in [13] to Euclidean space. The improved Property 1 is shown, e.g., in Lemma 11.3 of [30]. Since , the decomposition can be computed in near-linear time.
We denote , a parameter often used throughout this paper.
A portal-respecting path between two points and cut at level consists of a sequence of segments connecting , where (resp. ) is a portal of the rectangle at level containing (resp. ). By extension, a solution to -means is portal-respecting if all paths connecting clients to center are portal-respecting. Recall that is the distance from to the closest point in a solution . An important definition we will use is that of badly cut, slightly modified from [13]:
Definition 6.
Let , be a hierarchical decomposition of , and .
For any ball , we define the level at which the ball is cut by .
We say a ball is badly cut w.r.t. if . We say a point is badly cut w.r.t. and if is badly cut w.r.t. (namely, ).
In the following, we will consider badly cut points w.r.t. two different sets: will be a constant factor approximation, known to the algorithm, and a slight modification of the optimal solution, unknown to the algorithm, that we will specify later; those two solutions being independent of the decomposition . For input points in , we will examine whether they are badly cut w.r.t. and . For centers of , it will be w.r.t. and . Furthermore, will always be the same, hence we say for simplicity badly cut w.r.t. (or w.r.t. ).
The following lemma bounds the probability of being badly cut, and is a direct consequence of Property 1.
Lemma 7.
Let and a random hierarchical decomposition given by Lemma 5, with . For any point , the probability that is badly cut w.r.t. is at most .
Given a random decomposition, each point is assigned a budget. In the following definition, one can think of as an -approximation known by the algorithm, and as the optimal solution. We show in Lemma 12 that this budget is small, and that one can compute a solution with cost at most the optimal cost plus the budget.
Definition 8.
Let , be a hierarchical decomposition of , , and be two solutions to -means on .
For a ball , its detour with respect to and is .
A point has budget with respect to and , with
3 Structure Theorem and the Approximation Algorithm
3.1 Roadmap
Now that all definitions are in place, we give a more precise high-level overview of the proof of Theorem 2. Our goal is to show that the decomposition of Lemma 5 with is precise enough for a dynamic program to compute a portal-respecting solution that is a -approximation.
To do this, we show that one can find a solution such that: (1) it is a -approximation, and (2) the detour from each point to is at most the budget of the point. To conclude, it is enough to bound the budget, which is a mere application of Lemma 5 and first-moment analysis. To find such a solution , we start from the optimal solution (which respects (1) but not (2)), and transform it such that each client can be connected through the portals.
First, consider the easy case where a client is not badly cut, and is not badly cut. Then, the detour from to can be charged to , as the closest optimal center to lies in the latter ball. When this ball is badly cut, instead of serving by its closest center , we serve it by . We show that this can always be charged to the budget of . Indeed, in the sub-case where itself is not badly cut, we can show that the detour between and is affordable compared to the distance between them; and this distance can be charged to the budget . This sub-case is illustrated in Figure 1. However, in the sub-case where is badly cut as well, we have no choice but to add the center to OPT. This results in a solution with slightly too many centers – in expectation , since each center is badly cut with probability – and we will need to remove some centers of the optimal solution without increasing the cost too much. This step is already presented in [13], and we recall it in Section 3.2.
This essentially concludes the case where is not badly cut. When it is badly cut, the decomposition approximates its distances poorly; however, this happens with tiny probability, and we can afford to move to (charging this movement to ). A case analysis, similar to the previous one, then shows that the detour between to OPT can be charged to and .
In the remainder of this section, we show how to remove some centers from the optimal solution (to then add the badly cut centers of ), then prove the structure theorem that shows the existence of a solution satisfying (1) and (2). We explain in Section 3.4 the dynamic program that relies on this structure theorem and enables the computation of a good approximation, to conclude the proof of Theorem 2.
3.2 Preparing the Instance
We consider the mapping of the centers of OPT to defined as follows: for any , let denote the center of that is the closest to . Recall that for a client , is the center serving in .
For any center of , define to be the set of centers of OPT that are mapped to , namely, . Define to be the set of centers of for which there exists a unique such that , namely . Let , and . Similarly, define and . Note that , since and, w.l.o.g., .
As shown in [13], one can remove some of the centers from to obtain the following result:
Lemma 9 (See Step 1. and Lemma 4.1 in [13]).
There exists a set such that:
-
,
-
for any , the center in closest to is not in ,
-
let : has cost at most .
Furthermore, we transform the input set to give it more structure, as follows. Given a randomized hierarchical decomposition and a solution , we define the set as follows. For every point ,
We note that is a random variable that depends on the randomness of .
3.3 Construction of a Structured Solution
Using Lemma 9, we can now show the existence of a near-optimal portal-respecting solution. Let be a fixed solution, and the solution from Lemma 9 for . Let be a randomized hierarchical decomposition, and be the set of centers of that are badly cut w.r.t. , i.e., when the ball is cut at some level greater than .
Definition 10.
For , we say that has -small distortion if
-
1.
the total budget w.r.t. and is bounded: .
-
2.
there exists a solution that contains with ,
-
3.
for each point , its detour to is at most , namely there is a center cut from at level such that .
As explained in the introduction, we will use those properties as follows: a standard dynamic program will compute the best portal-respecting solution that minimizes . Making the solution portal-respecting incurs an error for two points cut at level : Property 3 therefore bounds this error by . Property 1 of Definition 10 ensures that the total budget is bounded, and Property 2 relates to .
Our main structural theorem for -means in low dimension is the following:
Theorem 11 (Structure Theorem).
For any , has -small-distortion with probability at least .
The rest of the paper is dedicated to the proof of this theorem.
3.3.1 Bounding the Budget
Lemma 12.
Fix two solutions and , and let be the budget of w.r.t. solutions and . With probability (over the randomness of ),
Proof.
We bound the expectation of the budget and then use Markov’s inequality. Recall that any ball is cut at level with probability , and is badly cut with probability . Furthermore, when is cut at level , then .
To simplify the analysis slightly, we first analyze the expectation of the variable
To do so, we distinguish between the cases where is at most , between and , and at least . This gives the following upper bound:
where the last line uses .
Since and , we directly get . Bounding is only slightly more complicated: , where when . Therefore, it is enough to compute .
Properties of the decomposition in Lemma 5 ensure that with probability at most , and therefore .
Therefore, .
Summing these inequalities for , and for all we get . Markov’s inequality concludes the lemma.
3.3.2 Construction of
To construct , we start from the solution obtained from Lemma 9 and apply the two following steps.
For any , define to be its closest center in , breaking ties arbitrarily. We start with obtained from Lemma 9. Note that for every , the second property of Lemma 9 ensures that is a center of . is then transformed as follows:
-
Step 1. For each center (i.e., is badly cut w.r.t. and , and ), replace by in .
-
Step 2. Add all centers of badly cut w.r.t. and to .
The two key properties of that procedure are the following:
Fact 13 (Claim 4.3 and 4.4 in [13]).
With probability , , so is a valid solution, and . Furthermore, for any point , it holds that .
In addition, the construction of ensures the below whose proof is in the full version:
Fact 14.
For any point ,
Furthermore, for any center , it holds that .
We can now use this solution to show has -small distortion.
3.3.3 Bounding the cost of
Lemma 15.
contains , and with probability at least it holds that
Proof.
By construction, does contain . To simplify the equations, we write when is badly cut w.r.t. (in which case ). It holds that
| (1) |
By Fact 13, the first term is at most : thus, we focus only on the second term. For this, we use Fact 14:
Each point is badly cut with probability : therefore, in expectation, it holds that
Using Markov’s inequality, it holds with probability that
Plugging this bound into Equation 1 and using Lemma 9 to bound the cost of , we conclude:
3.3.4 Bounding the detour
We now show that the detour incurred by connecting to through portals of the decomposition is within the budget defined in Definition 8.
Lemma 16.
Let , be a solution for -means on and be a randomized decomposition. Let be the solution from Lemma 15.
Then, for any , there is a center cut from at some level such that .
Proof.
We recall that any point is badly cut w.r.t. and a set when the ball is cut at level higher than . We recall our construction of and : When a point is badly cut w.r.t and , ; when a center is badly cut w.r.t and , .
To show the lemma, we make a case distinction, first according to whether is badly cut or not w.r.t. and . In the case where it is badly cut, it holds that . Then, we have the following cases.
-
1.
If is badly cut w.r.t. and , then : therefore, , and and are not cut, e.g. . Therefore, satisfies the lemma, with .
-
2.
is not badly cut w.r.t. and . Let , and be the level at which and are cut. We write .
By Fact 14, , and so . Combined with the fact that is not badly cut, it therefore holds that . Thus, it is enough to bound . For this, we refine our case distinction, according to whether the ball is badly cut or not, and use the budget from .
-
(a)
If the ball is not badly cut, then we remark that Fact 14 ensures that both and are in , and therefore . Therefore, .
-
(b)
If this ball is badly cut, then we use in addition to as follows: .
Combining these cases, we get that when is not badly cut, .
-
(a)
We now turn to the case where is not badly cut. In that case, : we therefore only need to bound and the details of this are presented in the full version.
3.4 The Algorithm: how to use the Structure Theorem
Suppose that has -small-distortion, for (where the hides dependencies in ), and let be the solution provided by Definition 10. As explained previously, our algorithm will be a standard dynamic program working as follows. The decomposition will be augmented with a set of portals, as defined in Lemma 5, with . The dynamic program (described later in greater detail) computes the best portal-respecting solution, namely, the solution where each path connecting a client to a center crosses boundaries of only at portals. More precisely, it computes the portal-respecting solution with (almost) smallest
Theorem 17.
There exists an algorithm running in time that computes a portal-respecting solution such that .
The preciseness and nestedness of portal sets ensure that, when two points and are cut at level , then the portal-respecting path between and has length . Furthermore, the algorithm from Theorem 17 computes a solution at least as good as : by Property 3 of Definition 10, the portal-respecting of is at most . Property 1 ensures that the total budget is at most , since is an -approximation. Combined with Property 2 of Definition 10, this shows that the portal-respecting of the solution computed by the algorithm is at most .
To wrap up, we note that the portal respecting is an upper bound on cost: going in straight lines instead of going through portals only improves the cost, and for any point , . Therefore, the solution computed by the dynamic program is a -approximation for -means.
The algorithm used to show Theorem 17 is a quite standard dynamic program (DP), described in detail in [13] and is deferred to the full version.
References
- [1] Fateme Abbasi, Sandip Banerjee, Jaroslaw Byrka, Parinya Chalermsook, Ameet Gadekar, Kamyar Khodamoradi, Dániel Marx, Roohani Sharma, and Joachim Spoerhase. Parameterized approximation schemes for clustering with general norm objectives. In 64th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2023, Santa Cruz, CA, USA, November 6-9, 2023, pages 1377–1399. IEEE, 2023. doi:10.1109/FOCS57990.2023.00085.
- [2] Enver Aman, Karthik C. S., and Sharath Punna. On connections between k-coloring and Euclidean k-means. In Timothy M. Chan, Johannes Fischer, John Iacono, and Grzegorz Herman, editors, 32nd Annual European Symposium on Algorithms, ESA 2024, September 2-4, 2024, Royal Holloway, London, United Kingdom, volume 308 of LIPIcs, pages 9:1–9:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.ESA.2024.9.
- [3] Sanjeev Arora. Polynomial time approximation schemes for Euclidean TSP and other geometric problems. In 37th Annual Symposium on Foundations of Computer Science, FOCS ’96, Burlington, Vermont, USA, 14-16 October, 1996, pages 2–11. IEEE Computer Society, 1996. doi:10.1109/SFCS.1996.548458.
- [4] Sanjeev Arora. Polynomial time approximation schemes for Euclidean traveling salesman and other geometric problems. J. ACM, 45(5):753–782, 1998. doi:10.1145/290179.290180.
- [5] Sanjeev Arora, Prabhakar Raghavan, and Satish Rao. Approximation schemes for Euclidean k-medians and related problems. In Jeffrey Scott Vitter, editor, Proceedings of the Thirtieth Annual ACM Symposium on the Theory of Computing, Dallas, Texas, USA, May 23-26, 1998, pages 106–113. ACM, 1998. doi:10.1145/276698.276718.
- [6] Pranjal Awasthi, Moses Charikar, Ravishankar Krishnaswamy, and Ali Kemal Sinop. The hardness of approximation of Euclidean k-means. In Lars Arge and János Pach, editors, 31st International Symposium on Computational Geometry, SoCG 2015, June 22-25, 2015, Eindhoven, The Netherlands, volume 34 of LIPIcs, pages 754–767. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2015. doi:10.4230/LIPIcs.SOCG.2015.754.
- [7] Yair Bartal and Lee-Ad Gottlieb. A linear time approximation scheme for Euclidean TSP. In 54th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2013, 26-29 October, 2013, Berkeley, CA, USA, pages 698–706. IEEE Computer Society, 2013. doi:10.1109/FOCS.2013.80.
- [8] Vladimir Braverman, Gereon Frahling, Harry Lang, Christian Sohler, and Lin F. Yang. Clustering high dimensional dynamic data streams. In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research, pages 576–585. PMLR, 2017. URL: http://proceedings.mlr.press/v70/braverman17a.html.
- [9] Moses Charikar, Vincent Cohen-Addad, Ruiquan Gao, Fabrizio Grandoni, Euiwoong Lee, and Ernest van Wijland. An improved greedy approximation for (metric) k-means. In 66th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2025, Sydney, Australia, December 14-17, 2025, pages 233–240. IEEE, 2025. doi:10.1109/FOCS63196.2025.00016.
- [10] Vincent Cohen-Addad. A fast approximation scheme for low-dimensional k-means. In Artur Czumaj, editor, Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2018, New Orleans, LA, USA, January 7-10, 2018, pages 430–440. SIAM, 2018. doi:10.1137/1.9781611975031.29.
- [11] Vincent Cohen-Addad, Arnaud de Mesmay, Eva Rotenberg, and Alan Roytman. The bane of low-dimensionality clustering. In Proceedings of the 2018 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), 2018. doi:10.1137/1.9781611975031.30.
- [12] Vincent Cohen-Addad, Alessandro Epasto, Silvio Lattanzi, Vahab Mirrokni, Andres Muñoz Medina, David Saulpic, Chris Schwiegelshohn, and Sergei Vassilvitskii. Scalable differentially private clustering via hierarchically separated trees. In Aidong Zhang and Huzefa Rangwala, editors, KDD ’22: The 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, August 14 - 18, 2022, pages 221–230. ACM, 2022. doi:10.1145/3534678.3539409.
- [13] Vincent Cohen-Addad, Andreas Emil Feldmann, and David Saulpic. Near-linear time approximation schemes for clustering in doubling metrics. J. ACM, 68(6):44:1–44:34, 2021. doi:10.1145/3477541.
- [14] Vincent Cohen-Addad, Andreas Emil Feldmann, and David Saulpic. Near-linear time approximation schemes for clustering in doubling metrics. In J. ACM, volume 68, 2021. doi:10.1145/3477541.
- [15] Vincent Cohen-Addad, Fabrizio Grandoni, Euiwoong Lee, Chris Schwiegelshohn, and Ola Svensson. A (2+)-approximation algorithm for metric k-median. In Michal Koucký and Nikhil Bansal, editors, Proceedings of the 57th Annual ACM Symposium on Theory of Computing, STOC 2025, Prague, Czechia, June 23-27, 2025, pages 615–624. ACM, 2025. doi:10.1145/3717823.3718299.
- [16] Vincent Cohen-Addad, Anupam Gupta, Amit Kumar, Euiwoong Lee, and Jason Li. Tight FPT approximations for k-median and k-means. In Christel Baier, Ioannis Chatzigiannakis, Paola Flocchini, and Stefano Leonardi, editors, 46th International Colloquium on Automata, Languages, and Programming, ICALP 2019, July 9-12, 2019, Patras, Greece, volume 132 of LIPIcs, pages 42:1–42:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2019. doi:10.4230/LIPIcs.ICALP.2019.42.
- [17] Vincent Cohen-Addad and Karthik C. S. Inapproximability of clustering in lp metrics. In David Zuckerman, editor, 60th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2019, Baltimore, Maryland, USA, November 9-12, 2019, pages 519–539. IEEE Computer Society, 2019. doi:10.1109/FOCS.2019.00040.
- [18] Vincent Cohen-Addad, Karthik C. S., and Euiwoong Lee. On approximability of clustering problems without candidate centers. In Dániel Marx, editor, Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms, SODA 2021, Virtual Conference, January 10 - 13, 2021, pages 2635–2648. SIAM, 2021. doi:10.1137/1.9781611976465.156.
- [19] Vincent Cohen-Addad, Karthik C. S., and Euiwoong Lee. Johnson coverage hypothesis: Inapproximability of k-means and k-median in -metrics. In Joseph (Seffi) Naor and Niv Buchbinder, editors, Proceedings of the 2022 ACM-SIAM Symposium on Discrete Algorithms, SODA 2022, Virtual Conference / Alexandria, VA, USA, January 9 - 12, 2022, pages 1493–1530. SIAM, 2022. doi:10.1137/1.9781611977073.63.
- [20] Vincent Cohen-Addad, Philip N. Klein, and Claire Mathieu. Local search yields approximation schemes for k-means and k-median in Euclidean and minor-free metrics. SIAM J. Comput., 48(2):644–667, 2019. doi:10.1137/17M112717X.
- [21] Vincent Cohen-Addad, Silvio Lattanzi, Ashkan Norouzi-Fard, Christian Sohler, and Ola Svensson. Fast and accurate $k$-means++ via rejection sampling. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. URL: https://proceedings.neurips.cc/paper/2020/hash/babcff88f8be8c4795bd6f0f8cccca61-Abstract.html.
- [22] Vincent Cohen-Addad, David Saulpic, and Chris Schwiegelshohn. A new coreset framework for clustering. In Samir Khuller and Virginia Vassilevska Williams, editors, STOC ’21: 53rd Annual ACM SIGACT Symposium on Theory of Computing, Virtual Event, Italy, June 21-25, 2021, pages 169–182. ACM, 2021. doi:10.1145/3406325.3451022.
- [23] Sanjoy Dasgupta and Yoav Freund. Random projection trees for vector quantization. IEEE Transactions on Information Theory, 55(7):3229–3242, 2009. doi:10.1109/TIT.2009.2021326.
- [24] Mark de Berg, Hans L. Bodlaender, Sándor Kisfaludi-Bak, Dániel Marx, and Tom C. van der Zanden. A framework for exponential-time-hypothesis-tight algorithms and lower bounds in geometric intersection graphs. SIAM J. Comput., 49(6):1291–1331, 2020. doi:10.1137/20M1320870.
- [25] Irit Dinur. Mildly exponential reduction from gap 3sat to polynomial-gap label-cover. Electron. Colloquium Comput. Complex., TR16-128, 2016. URL: https://eccc.weizmann.ac.il/report/2016/128.
- [26] Fedor V. Fomin, Petr A. Golovach, and Kirill Simonov. Parameterized k-clustering: Tractability island. J. Comput. Syst. Sci., 117:50–74, 2021. doi:10.1016/J.JCSS.2020.10.005.
- [27] Zachary Friggstad, Mohsen Rezapour, and Mohammad R. Salavatipour. Local search yields a PTAS for k-means in doubling metrics. SIAM J. Comput., 48(2):452–480, 2019. doi:10.1137/17M1127181.
- [28] Sudipto Guha and Samir Khuller. Greedy strikes back: Improved facility location algorithms. J. Algorithms, 31(1):228–248, 1999. doi:10.1006/jagm.1998.0993.
- [29] S Louis Hakimi. Optimum distribution of switching centers in a communication network and some related graph theoretic problems. Operations research, 13(3):462–475, 1965.
- [30] Sariel Har-Peled. Geometric approximation algorithms. Number 173 in Mathematical Surveys and Monographs. American Mathematical Soc., 2011.
- [31] Mary Inaba, Naoki Katoh, and Hiroshi Imai. Applications of weighted voronoi diagrams and randomization to variance-based k-clustering (extended abstract). In Proceedings of the Tenth Annual Symposium on Computational Geometry, Stony Brook, New York, USA, June 6-8, 1994, pages 332–339, 1994. doi:10.1145/177424.178042.
- [32] Kamal Jain, Mohammad Mahdian, and Amin Saberi. A new greedy approach for facility location problems. In Proceedings on 34th Annual ACM Symposium on Theory of Computing, May 19-21, 2002, Montréal, Québec, Canada, pages 731–740, 2002. doi:10.1145/509907.510012.
- [33] Kamal Jain and Vijay V. Vazirani. Approximation algorithms for metric facility location and k-median problems using the primal-dual schema and lagrangian relaxation. J. ACM, 48(2):274–296, 2001. doi:10.1145/375827.375845.
- [34] Sándor Kisfaludi-Bak, Jesper Nederlof, and Karol Wegrzycki. A gap-ETH-tight approximation scheme for Euclidean TSP. Journal of the ACM, 72(6):1–48, 2025.
- [35] Stavros G. Kolliopoulos and Satish Rao. A nearly linear-time approximation scheme for the Euclidean k-median problem. SIAM J. Comput., 37(3):757–782, 2007. doi:10.1137/S0097539702404055.
- [36] Alfred A Kuehn and Michael J Hamburger. A heuristic program for locating warehouses. Management science, 9(4):643–666, 1963.
- [37] Euiwoong Lee, Melanie Schmidt, and John Wright. Improved and simplified inapproximability for k-means. Inf. Process. Lett., 120:40–43, 2017. doi:10.1016/j.ipl.2016.11.009.
- [38] Shi Li and Ola Svensson. Approximating k-median via pseudo-approximation. SIAM J. Comput., 45(2):530–547, 2016. doi:10.1137/130938645.
- [39] Stuart Lloyd. Least squares quantization in pcm. IEEE transactions on information theory, 28(2):129–137, 1982. doi:10.1109/TIT.1982.1056489.
- [40] Meena Mahajan, Prajakta Nimbhorkar, and Kasturi R. Varadarajan. The planar k-means problem is np-hard. Theor. Comput. Sci., 442:13–21, 2012. doi:10.1016/J.TCS.2010.05.034.
- [41] Konstantin Makarychev, Yury Makarychev, and Ilya P. Razenshteyn. Performance of johnson-lindenstrauss transform for k-means and k-medians clustering. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, STOC 2019, Phoenix, AZ, USA, June 23-26, 2019, pages 1027–1038, 2019. doi:10.1145/3313276.3316350.
- [42] Pasin Manurangsi and Prasad Raghavendra. A birthday repetition theorem and complexity of approximating dense csps. In Ioannis Chatzigiannakis, Piotr Indyk, Fabian Kuhn, and Anca Muscholl, editors, 44th International Colloquium on Automata, Languages, and Programming, ICALP 2017, July 10-14, 2017, Warsaw, Poland, volume 80 of LIPIcs, pages 78:1–78:15. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2017. doi:10.4230/LIPIcs.ICALP.2017.78.
- [43] Jirí Matousek. On approximate geometric k-clustering. Discret. Comput. Geom., 24(1):61–84, 2000. doi:10.1007/s004540010019.
- [44] Nimrod Megiddo and Kenneth J Supowit. On the complexity of some common geometric location problems. SIAM journal on computing, 13(1):182–196, 1984. doi:10.1137/0213014.
- [45] Satish B Rao and Warren D Smith. Approximating geometrical graphs via “spanners” and “banyans”. In Proceedings of the thirtieth annual ACM symposium on Theory of computing, pages 540–550, 1998.
- [46] John Fred Stollsteimer. The effect of technical change and output expansion on the optimum number, size, and location of pear marketing facilities in a California pear producing region. University of California, Berkeley, 1961.
