betaFeedback

WorksComputer Science

A Better-than-2 Approximation for k-Median Part I: The Power of General Bids

Abstract

The Greedy algorithm of Jain, Mahdian, Markakis, Saberi, and Vazirani was the best Lagrangian-multiplier-preserving (LMP) approximation algorithm for facility location, and thus the engine behind the best kk-median guarantees, for over two decades. Its 22-LMP guarantee was only recently broken by a small amount ((2−η)(2-η)-LMP where η≈2.25⋅10−7η\approx 2.25 \cdot 10^{-7}) through local-search post-processing. That analysis relies on the structure of worst-case instances, and it appears difficult to obtain substantial further improvements along those lines. We take a different approach and change the algorithm itself: we introduce general bidding functions, replacing the classical linear bid with a richer family of rules and prove a polynomial-time 1.951.95-LMP approximation, a large improvement over the long-standing factor of~22. We further show that these generalized bidding rules can be made smooth (log-adaptive), building on the recent framework developed for the classical Greedy algorithm by Cohen-Addad, Grandoni, Lee, Schwiegelshohn, and Svensson. This yields a polynomial-time 1.951.95-approximation that opens k+Oε(log⁡n)k+O_\varepsilon(\log n) centers. Combined with a (1.89+ε)(1.89+\varepsilon)-approximation algorithm for stable instances in our companion work \cite{stableinstances}, we achieve a better-than-2 approximation for the kk-median problem in polynomial-time.

Part I: The Power of General Bids

Introduction

The metric kk-median problem is the following classical clustering problem: Given a set DD of nn clients, a set F\mathrm{F} of facilities, metric distances d(⋅,⋅)d(\cdot,\cdot) on D∪FD \cup\mathrm{F}, and an integer parameter k≥1k \ge1, the goal is to choose a set S⊆FS \subseteq\mathrm{F} of kk open facilities minimizing

cost⁡(S):=∑j∈Dd(j,S)=∑j∈Dmin⁡i∈Sd(i,j),\operatorname{cost}(S) := \sum_{j \in D} d(j,S) = \sum_{j \in D} \min_{i \in S} d(i,j),

where we use d(j,S)d(j,S) as a shorthand for min⁡i∈Sd(i,j)\min_{i \in S} d(i,j). We further denote by opt⁡\operatorname{opt} the cost of an optimal solution. Metric kk-median is well-known to be hard to approximate within a factor better than 1+2/e1 + 2/e [17, 22, 21], and achieving matching algorithmic guarantees has been the subject of intense study over the last two decades.

Most work has focused on two algorithmic paradigms. On the one hand, the basic local-search algorithm of Arya, Garg, Khandekar, Meyerson, Munagala, and Pandit (swap O(1)O(1) centers while improving the solution) gives a (3+ε)(3+\varepsilon)-approximation, and for a long time this was the best known polynomial-time guarantee [2]. On the other hand, the influential primal-dual/Lagrangian framework initiated by Jain and Vazirani [23] and sharpened by Jain, Mahdian, Markakis, Saberi and Vazirani [22, 21] reduces kk-median to the task of devising Lagrangian-multiplier-preserving (LMP) approximation algorithms for uncapacitated facility location.

Here, one first considers facility location with a uniform opening cost ff, where a solution S⊆FS \subseteq\mathrm{F} pays cost⁡(S)+f∣S∣\operatorname{cost}(S)+f|S|. Since a higher opening cost ff leads to fewer open facilities and a lower cost leads to more, one can binary search on ff to find two consecutive solutions, one opening fewer than kk facilities and one opening more, whose convex combination opens exactly kk facilities in a fractional sense. If the facility location algorithm used is an αLMP\alpha_{\mathrm{LMP}}-LMP approximation, this already gives a solution of cost at most αLMP⋅opt⁡\alpha_{\mathrm{LMP}} \cdot\operatorname{opt} that opens kk centers in expectation. A second step, bi-point rounding, is then needed to obtain a feasible kk-median solution with at most kk open centers, and this incurs an additional multiplicative factor of 2, as shown by [23]. The overall approximation factor is therefore 2αLMP2\alpha_{\mathrm{LMP}}. In this language, the original Jain, Vazirani framework yields a factor 6 algorithm, while the Greedy algorithm of [22, 21] improves the LMP stage to 2 and hence gives a factor 4 algorithm [23, 22, 21].

Li and Svensson [25] improved the bi-point rounding step by allowing the algorithm to open k+O(1)k+O(1) centers. They also showed that any α\alpha-approximation opening k+ck+c centers can be transformed into an (α+ε)(\alpha+\varepsilon)-approximation opening exactly kk centers in time nO(c/ε)n^{O(c/\varepsilon)}. This sparked a sequence of refinements of bi-point rounding algorithms opening k+O(1)k+O(1) centers [7, 19]; combined with the small but important improvement to a (2−η)(2-\eta)-LMP approximation, where η=2.25⋅10−7\eta=2.25 \cdot10^{-7} by Cohen-Addad, Grandoni, Lee, and Schwiegelshohn [13], this line eventually led to a 2.613-approximation [13, 19].

Recently, Cohen-Addad, Grandoni, Lee, Schwiegelshohn, and Svensson [12] achieved a significantly improved (2+ε)(2+\varepsilon)-approximation for metric kk-median (for every ε>0\varepsilon>0). Their result has two ingredients. First, they give a “smooth” (so called log-adaptive) implementation of the Greedy algorithm that opens at most k+O(log⁡η/ε2)k+O(\log\eta/\varepsilon^2) centers while keeping the approximation ratio at (2+ε)(2+\varepsilon). Second, they complement this with a polynomial-time (2+ε)(2+\varepsilon)-approximation for so-called (ζ/log⁡η)(\zeta/\log\eta)-stable instances, for every ε,ζ>0\varepsilon,\zeta>0, which is exactly the ingredient needed to turn the quasi-polynomial algorithm into a polynomial-time one. In a separate development, Byrka, Guo, Hu, Li, Wan and Wang [6] came up with a novel approach based on an iterative rounding procedure for the standard LP relaxation to reproduce the (2+ε)(2+\varepsilon)-approximation ratio. Thus, by now the gap between what we know how to achieve with kk centers in expectation and with at most kk centers is essentially closed at factor 2. This raises the question whether the factor 2 is a natural barrier or if it is possible to close the gap between 2 and 1+2/e1+2/e? We answer the first part of the question and show that there is a 1.95-approximation algorithm for kk-median.

Our Contribution

Our main contribution is an improved approximation algorithm for kk-median with an approximation ratio below 2:

Theorem 1.1. There is a randomized polynomial-time 1.95-approximation algorithm for kk-median.

To explain how we obtain this result, we first outline the two-pronged framework from [12] giving the (2+ϵ)(2+\epsilon)-approximation; this framework was first used by [25]. Given a metric space (D∪F,d)(D \cup F,d), define opt⁡ℓ\operatorname{opt}_{\ell} to be the optimal cost of ℓ\ell-median on this instance. Naturally, fewer centers result in a larger cost, and hence opt⁡k≤opt⁡k−c\operatorname{opt}_{k} \le\operatorname{opt}_{k-c} for any c≥0c \ge0. The framework is the following:

  1. Use a greedy algorithm (or some other approach) to give a (2+ϵ)(2+\epsilon)-pseudo-approximation for kk-median: i.e., instead of returning a solution SS with kk centers having cost (2+ϵ)⋅opt⁡k(2+\epsilon)\cdot\operatorname{opt}_{k}, return a pseudo-solution—a set S1S_{1} with kk centers, which has a cost at most (2+ϵ)⋅opt⁡k−c(2+\epsilon)\cdot\operatorname{opt}_{k-c}, where c=O((log⁡n)/poly⁡(ϵ))c = O((\log n)/\operatorname{poly}(\epsilon)). Equivalently, we are interested in an approximation algorithm that finds a solution S2S_{2} with k+ck+c centers and cost at most (2+ϵ)opt⁡k(2+\epsilon)\operatorname{opt}_{k}. Indeed, invoking such an algorithm with k′=k−ck' = k-c will return a pseudo-approximation.

  1. Next, observe that if opt⁡k−c≤(1+ϵ)opt⁡k\operatorname{opt}_{k-c} \le(1+\epsilon)\operatorname{opt}_{k}, then the solution S1S_{1} has cost (2+O(ϵ))opt⁡k(2+O(\epsilon))\operatorname{opt}_{k}, and we have the desired approximation. If not, then reducing the number of centers from kk to k−ck-c causes the optimal value to increase by at least a factor of (1+ϵ)(1+\epsilon). In other words, there exists k′∈[k−c,k]k' \in[k-c,k] such that (a) opt⁡k′≤(1+ϵ)opt⁡k\operatorname{opt}_{k'} \le(1+\epsilon)\operatorname{opt}_{k}, and moreover, (b) opt⁡k′−1≥(1+Ω(ϵ/c))opt⁡k′\operatorname{opt}_{k'-1} \ge(1+\Omega(\epsilon/c))\operatorname{opt}_{k'}. I.e., the optimal cost increases by at least a (1+β)(1+\beta)-factor when one reduces the number of available centers by 11—from k′k' to k′−1k'-1. (Here β=Ω(ϵ/c)\beta= \Omega(\epsilon/c).) Such an instance of k′k'-median is called a β\beta-stable instance, and stable instances can allow for better-than-worst-case approximations given their structural properties [1, 16].

  1. The final ingredient is a (2+ϵ)(2+\epsilon)-approximation algorithm for β\beta-stable instances running in time exp⁡((β⋅poly⁡(ϵ))−1)poly⁡(n)\exp((\beta\cdot\operatorname{poly}(\epsilon))^{-1})\operatorname{poly}(n). Using this, one gets a k′k'-median solution S2S_{2} (which for k′≤kk' \le k is also a kk-median solution) with cost (2+ϵ)opt⁡k′≤(2+O(ϵ))opt⁡k(2+\epsilon)\operatorname{opt}_{k'} \le(2+O(\epsilon))\operatorname{opt}_{k} in time npoly⁡(1/ϵ)n^{\operatorname{poly}(1/\epsilon)}.

Note that step (ii) is completely generic; however, both the other steps (i) and (iii) lose a factor of (2+ϵ)(2+\epsilon). To do better, we need to improve both these steps. In this paper we improve upon step (i) and show that we can find a (1.9499+ϵ)(1.9499+\epsilon)-approximation that opens k+ck+c centers.

Theorem 1.2 (See Theorem 5.16 for full version). For any ϵ>0\epsilon> 0, there exists a polynomial-time algorithm for kk-median that outputs a solution with at most k+O(log⁡n/ϵ2)k+O(\log n/\epsilon^{2}) centers and cost at most (1.9499+ϵ)⋅opt⁡(1.9499+\epsilon)\cdot\operatorname{opt}.

In a companion paper [5] we address (iii) and prove the following theorem for β\beta-stable instances.

Theorem 1.3 (Stable Instances [5]). Let (D∪F,d)(D \cup F,d) be a β\beta-stable instance of kk-median and ϵ∈(0,1/200)\epsilon\in(0,1/200). There exists an algorithm running in exp⁡{O(β−1poly⁡(1/ϵ))}npoly⁡(1/ϵ)\exp\{O(\beta^{-1}\operatorname{poly}(1/\epsilon))\}n^{\operatorname{poly}(1/\epsilon)} time which with probability 1−ϵ1-\epsilon outputs S⊆FS \subseteq F with ∣S∣=k|S|=k such that

cost⁡(S)≤(1.89+O(ϵ))opt⁡k.\operatorname{cost}(S) \le(1.89+O(\epsilon))\operatorname{opt}_{k}.

Similar to previous work, we use the LMP-framework by [23]. First, we give an improved LMP approximation algorithm for the uncapacitated facility location problem. Here, we take a different route than [13] who augment the Greedy algorithm with local-search post-processing to arrive at their (2−η)(2-\eta)-LMP approximation. Instead, we revisit the greedy algorithm itself and modify the bidding rule. In our unified notation, the classical choice is the linear bid β(α,d)=[α−d]+\beta(\alpha,d)=[\alpha-d]^{+}. We generalize this to broader bidding functions β(α,d)\beta(\alpha,d) and in particular, bidding functions of the form β(α,d)=[α−γd]+\beta(\alpha,d)=[\alpha-\gamma d]^{+}, parametrized by γ>1\gamma>1. A similar approach has been applied to improve the approximation ratio for the kk-means problem that asks to minimize the sum of the squared distances (as opposed to the sum of distances) [8, 9]. They employ a dual fitting analysis while we, on the other hand, study how the choice of β(α,d)\beta(\alpha,d) changes the factor-revealing program. Indeed, their kind of dual fitting analysis doesn’t work for kk-median; there exists an example (Figure 3) where bounding the algorithm’s cost by the sum of dual variables ∑j∈Cαj\sum_{j\in C}\alpha_j results in an LMP ratio approaching 22 (both for our variant and their variant of the greedy algorithm).

A line diagram showing n−1 clients, the n-th client, and two facilities

Figure 3. A 2 lower bound when replacing cost⁡j\operatorname{cost}_j with αj\alpha_j for bidding functions: [α−γd]+[\alpha-\gamma d]^+.

Intuitively, our bids allow clients to discount distant facilities more aggressively, which already breaks the tight examples behind the classical factor-2 analysis. This added flexibility comes, however, at a price: the classical Greedy analysis is governed by a single factor-revealing LP, whereas general bids lead to genuinely non-linear programs, and even piecewise-linear bids lead to a family of LPs rather than one LP. This viewpoint appears surprisingly powerful even for very simple families of bids. We show that Algorithm 1 with bidding function β(α,d)=[α−1.224d]+\beta(\alpha,d)=[\alpha-1.224d]^{+} is a 1.9499-LMP approximation algorithm.

Theorem 1.4 (See Theorem 4.3 for full version). There exists a polynomial-time 1.9499-LMP approximation algorithm for uncapacitated facility location.

Remark 1.5. Building on the results described above, GPT-6 Astra managed to improve the LMP approximation ratio to 1.844. The bidding function used to achieve this ratio is

β(α,d)=1108∑s=113Ws[α−γsd]+,(1)\beta(\alpha,d)=\frac{1}{10^{8}}\sum_{s=1}^{13}W_s[\alpha-\gamma_s d]^+, \tag*{(1)}

where the multipliers γs\gamma_s and weights WsW_s are specified in Table 1. Furthermore, GPT-6 Astra managed to prove that for any admissible bidding function, as in Definition 3.1, the supremum of the factor revealing program used in our analysis over all n≥1n \ge1 has value at least 1.8. Therefore, our approach cannot immediately yield an approximation ratio below 1.8. Lean proofs for these claims can be found at https://github.com/epfl-thl2/project-k-median.

ssγs\gamma_sWsW_sssγs\gamma_sWsW_s
1137/125137/12566,678,85689/59/5659,515
229/2029/20616,823937/2037/202,091,320
33/23/212,834,6121019/1019/102,245,119
429/1829/184,845,6921139/2039/202,936,362
533/2033/201,922,894122766,770
617/1017/1070,6951341/2041/202,724,139
77/47/41,607,203

Table 1. The bidding function. Each coefficient of [x−γsy]+[x-\gamma_s y]^+ is Ws/108W_s/10^8.

Our second contribution is to make these generalized bids smooth (more specifically, low in terms of adaptivity). We adapt and generalize the recent log-adaptive framework of [12] to our broader class of bidding functions. A key conceptual point is that we do not redo the (in our case, complex) approximation analysis of the log-adaptive algorithm from scratch. Instead, we prove a black-box transfer statement: if the factor-revealing mathematical program with a bidding function β=[a−γd]+\beta=[a-\gamma d]^+ has value at most ρ\rho, then the corresponding smooth version opens at most k+O(log⁡n/ε2)k+O(\log n/\varepsilon^2) centers while losing only an additive ε\varepsilon in the approximation guarantee. In other words, the smooth analysis inherits the bound from the original factor-revealing program almost for free. Combined with Theorem 1.4, this yields Theorem 1.2.

Further Related Work

Facility location and dual fitting. The connection between kk-median and facility location dates back to the primal-dual schema of Jain and Vazirani [23] and the dual-fitting framework of Jain, Mahdian, Markakis, Saberi, and Vazirani [22, 21]. These ideas have been highly influential for facility location itself, leading to improved approximation algorithms culminating in the 1.488-approximation of Li [24]; see also [14, 15, 4]. The factor-revealing LP technique introduced in [21] is a key tool underlying both the classical Greedy analysis and our generalization to broader bidding functions.

References

  1. [1][ABS10] Pranjal Awasthi, Avrim Blum, and Or Sheffet. Stability yields a PTAS for k-median and k-means clustering. In 51th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2010, October 23-26, 2010, Las Vegas, Nevada, USA, pages 309–318, 2010.DOI
  2. [2][AGK+04] Vijay Arya, Naveen Garg, Rohit Khandekar, Adam Meyerson, Kamesh Munagala, and Vinayaka Pandit. Local search heuristics for k-median and facility location problems. SIAM J. Comput., 33(3):544–562, 2004.DOI
  3. [3][ANSW20] Sara Ahmadian, Ashkan Norouzi-Fard, Ola Svensson, and Justin Ward. Better guarantees for k-means and Euclidean k-median by primal-dual algorithms. SIAM J. Comput., 49(4), 2020.
  4. [4][BA10] Jaroslaw Byrka and Karen Aardal. An optimal bifactor approximation algorithm for the metric uncapacitated facility location problem. SIAM J. Comput., 39(6):2212–2231, 2010.
  5. [5][BCF+26] Rares-Darius Buhai, Vincent Cohen-Addad, Henry Fleischmann, Anupam Gupta, Antoni Jubés Monforte, Madhusudhan Reddy Pittu, Miltiadis Stouras, Ola Svensson, and Lukas VogI. A Better-than-2 Approximation for k-Median Part II: Stable Instances. CoRR, 2026.arxiv.org/abs/2610.17172
  6. [6][BGH+26] Jaroslaw Byrka, Yuhao Guo, Yang Hu, Shi Li, Chengzhang Wan, and Zaixuan Wang. k-clustering via iterative randomized rounding, 2026.arxiv.org/abs/2604.06046
  7. [7][BPR+17] Jaroslaw Byrka, Thomas W. Pensyl, Bartosz Rybicki, Aravind Srinivasan, and Khoa Trinh. An improved approximation for k-median and positive correlation in budgeted optimization. ACM Trans. Algorithms, 13(2):23:1–23:31, 2017.
  8. [8][CCG+25] 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.
  9. [9][CCG+26] Moses Charikar, Vincent Cohen-Addad, Ruiquan Gao, Fabrizio Grandoni, Euiwoong Lee, and Ernest van Wijland. A (4 + ε)-approximation for euclidean k-means via non-monotone dual-fitting. In STOC’26—Proceedings of the 58th Annual ACM Symposium on Theory of Computing. ACM, New York, 2026.DOI
  10. [10][CEMN22] Vincent Cohen-Addad, Hossein Esfandiari, Vahab S. Mirrokni, and Shyam Narayanan. Improved approximations for Euclidean k-means and k-median, via nested quasi-independent sets. In Stefano Leonardi and Anupam Gupta, editors, STOC ’22: 54th Annual ACM SIGACT Symposium on Theory of Computing, Rome, Italy, June 20 - 24, 2022, pages 1621–1628. ACM, 2022.
  11. [11]Vincent Cohen-Addad, Anupam Gupta, Lunjia Hu, Hoon Oh, and David Saulpic. An improved local search algorithm for k-median. 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 1556–1612. SIAM, 2022.
  12. [12]Vincent Cohen-Addad, Fabrizio Grandoni, Euiwoong Lee, Chris Schwiegelshohn, and Ola Svensson. A (2+ε)-approximation algorithm for metric k-median. In STOC’25—Proceedings of the 57th Annual ACM Symposium on Theory of Computing, pages 615–624. ACM, New York, [2025] ©2025.
  13. [13]Vincent Cohen-Addad, Fabrizio Grandoni, Euiwoong Lee, and Chris Schwiegelshohn. Breaching the 2 LMP approximation barrier for facility location with applications to k-median. In Nikhil Bansal and Viswanath Nagarajan, editors, Proceedings of the 2023 ACM-SIAM Symposium on Discrete Algorithms, SODA 2023, Florence, Italy, January 22-25, 2023, pages 940–986. SIAM, 2023.
  14. [14]Moses Charikar, Sudipto Guha, Éva Tardos, and David B. Shmoys. A constant-factor approximation algorithm for the k-median problem (extended abstract). In Jeffrey Scott Vitter, Lawrence L. Larmore, and Frank Thomson Leighton, editors, Proceedings of the Thirty-First Annual ACM Symposium on Theory of Computing, May 1-4, 1999, Atlanta, Georgia, USA, pages 1–10. ACM, 1999.
  15. [15]Fabián A. Chudak and David B. Shmoys. Improved approximation algorithms for the uncapacitated facility location problem. SIAM J. Comput., 33(1):1–25, 2003.
  16. [16]Vincent Cohen-Addad and Chris Schwiegelshohn. On the local structure of stable clustering instances. In Chris Umans, editor, 58th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2017, Berkeley, CA, USA, October 15-17, 2017, pages 49–60. IEEE Computer Society, 2017.
  17. [17]Sudipto Guha and Samir Khuller. Greedy strikes back: Improved facility location algorithms. J. Algorithms, 31(1):228–248, 1999.
  18. [18]Fabrizio Grandoni, Rafail Ostrovsky, Yuval Rabani, Leonard J. Schulman, and Rakesh Venkat. A refined approximation for euclidean k-means. Inf. Process. Lett., 176:106251, 2022.arxiv.org/abs/2107.07358
  19. [19]Kishen N. Gowda, Thomas W. Pensyl, Aravind Srinivasan, and Khoa Trinh. Improved bi-point rounding algorithms and a golden barrier for k-median. In Nikhil Bansal and Viswanath Nagarajan, editors, Proceedings of the 2023 ACM-SIAM Symposium on Discrete Algorithms, SODA 2023, Florence, Italy, January 22-25, 2023, pages 987–1011. SIAM, 2023.
  20. [21]Kamal Jain, Mohammad Mahdian, Evangelos Markakis, Amin Saberi, and Vijay V. Vazirani. Greedy facility location algorithms analyzed using dual fitting with factor-revealing LP. J. ACM, 50(6):795–824, 2003.DOI
  21. [22]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.
  22. [23]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
  23. [24]Shi Li. A 1.488 approximation algorithm for the uncapacitated facility location problem. Inf. Comput., 222:45–58, 2013.
  24. [25]Shi Li and Ola Svensson. Approximating k-median via pseudo-approximation. SIAM J. Comput., 45(2):530–547, 2016.
  25. [26]OpenAI. The approximation threshold for metric k-median. OpenAI Math Release preprint OAI:The-Approximation-Threshold-for-Metric-k-Median-September-24-2026, 2026.DOI
  26. [27]OpenAI. Single-exponential recovery and bounded-price strictness for metric k-median. OpenAI Math Release preprint OAI:Single-Exponential-Recovery-and-Bounded-Price-Strictness-for-Metric-k-Median-September-24-2026, 2026.DOI

Paper details

vlnc:W_zj6qjtzg
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Not recorded for this paper

View statement
Looking for related papers…
Contents