Papers
Topics
Authors
Recent
Search
2000 character limit reached

Faster Randomized and Deterministic k-Clustering on Graphs

Published 8 Jul 2026 in cs.DS | (2607.07615v1)

Abstract: In this paper, we study the (k,z)(k,z)-clustering and kk-center problems on graphs, where (k,z)(k,z)-clustering generalizes the kk-median (z=1z=1) and kk-means (z=2z=2) problems. We obtain the following main results. Our first contribution is the first deterministic algorithm for kk-center on graphs that achieves a (2+ε)(2+\varepsilon)-approximation in O~(m)\tilde{O}(m) time. This affirmatively resolves an open problem raised by Abboud, Cohen-Addad, Lee, and Manurangsi [SOSA 2023]. Our techniques also extend to the kk-center with outliers problem, where up to tt points may be discarded. Our second contribution is a randomized algorithm for (k,z)(k,z)-clustering on graphs that achieves an O(1)O(1)-approximation in O~(m)\tilde{O}(m) time, which in particular covers kk-median (z=1z=1) and kk-means (z=2z=2). Prior to this work, an O~(m)\tilde{O}(m)-time randomized algorithm was known for kk-median by Thorup [SIAM J. Comput. 2005], and a recent work of Jiang, Jin, Lou, and Lu [2026] achieves m<sup>1+o(1)m<sup>{1+o(1)} time for general zz via local search. Finally, we design a deterministic algorithm for (k,z)(k,z)-clustering on graphs that achieves an O(poly(c))O(\mathrm{poly}(c))-approximation in O~(m<sup>1+1/c)\tilde{O}(m<sup>{1+1/c}) time, for a positive parameter cc. To obtain this result, we use techniques from the Thorup-Zwick distance oracle [JACM 2005]; this technical connection may be of independent interest, considering the wide application of distance oracles in various computational settings. Most of our algorithms are incremental, in the sense that for any given parameter kk, they return a sequence of centers such that every prefix of length ℓ≤k\ell \leq k yields a constant-factor approximate solution to the ℓ\ell-clustering problem.

Summary

  • The paper presents a deterministic (2+ε)-approximation algorithm for k-center using an incremental framework with near-linear running time.
  • It introduces a randomized O(1)-approximation method for (k,z)-clustering that leverages efficient ball-size estimation and truncated Dijkstra techniques.
  • A deterministic O(poly(c))-approximation algorithm based on Thorup–Zwick oracles addresses long-standing NP-hardness issues while supporting incremental outputs.

Faster Randomized and Deterministic kk-Clustering on Graphs

Problem Statement and Context

This paper addresses algorithmic and complexity-theoretic aspects of the (k,z)(k, z)-clustering and kk-center problems on weighted, undirected graphs. The (k,z)(k, z)-clustering framework generalizes both kk-median (z=1z=1) and kk-means (z=2z=2), subsuming classical clustering objectives. Given the inherent NP-hardness of these problems, focus shifts to polynomial-time constant-factor approximation algorithms, with further emphasis on achieving as close as possible to linear running time in the number of edges mm—a key requirement for large-scale graph analytics.

While prior work for general metrics or graphs has shown progressively tighter constant-factor approximations, most fast algorithms have been randomized and have primarily targeted the kk-median case. Deterministic nearly-linear time approximations for (k,z)(k, z)0-center and deterministic fast algorithms for (k,z)(k, z)1-clustering have remained elusive. This work resolves several critical open problems in this direction.

Main Contributions

1. Deterministic (k,z)(k, z)2-Approximation for (k,z)(k, z)3-Center in Near-Linear Time

The paper presents the first deterministic algorithm for the incremental (k,z)(k, z)4-center problem on graphs with a (k,z)(k, z)5-approximation guarantee and running time (k,z)(k, z)6. This settles an open question posed by Abboud et al. (Musolino et al., 2023). Prior deterministic algorithms either required (k,z)(k, z)7 time (Gonzalez [Gon85]; Hochbaum-Shmoys [HS85]) or precomputed approximate all-pairs shortest paths in (k,z)(k, z)8 time. The approach leverages a deterministic source-insertion SSSP data structure [gorkiewicz2025incremental], iteratively selecting farthest-from-center vertices using updated shortest-paths, integrated into the canonical Gonzalez framework. The algorithm also extends to (k,z)(k, z)9-center with outliers in the constant-kk0 regime, delivering kk1-approximation under the kk2-outlier relaxation.

2. Randomized Near-Linear Time kk3-Approximation for Incremental kk4-Clustering

The authors design a fast randomized algorithm for kk5-clustering achieving kk6-approximation in kk7 time for any fixed kk8. This generalizes prior work providing near-linear randomized algorithms only for kk9-median [thorup2001quick] and improves over almost-linear time results for general (k,z)(k, z)0 [jiang2026local]. The method is built upon the recursive greedy (incremental) clustering paradigm [latourSaulpicKz], instantiated with efficient randomized ball-size estimation [cohen1997size] and truncated Dijkstra primitives efficiently amortized via dynamic shortest-paths.

3. Deterministic Close-to-Linear Time (k,z)(k, z)1-Approximation for (k,z)(k, z)2-Clustering

Addressing the absence of deterministic fast algorithms for general (k,z)(k, z)3 on graphs, the paper introduces the first deterministic, incremental (k,z)(k, z)4-approximation algorithm with running time (k,z)(k, z)5 (for parameter (k,z)(k, z)6). This leverages the Thorup–Zwick distance oracle [thorup2005approximate], using bunches and clusters to derive approximate ball sizes and neighborhoods deterministically, replacing Cohen's sketch-based estimates. For moderate (k,z)(k, z)7, this scheme is close to linear and parameterizes the tradeoff between runtime and approximation quality.

Additional Innovations

  • All algorithms support incremental output: for any (k,z)(k, z)8, the prefix of length (k,z)(k, z)9 gives an kk0-clustering with the same approximation guarantee.
  • For the kk1-center with kk2 outliers, efficient bicriteria approximations with near-linear runtime are introduced and analyzed.

Technical Innovations

Source-Insertion Dynamic SSSP

The deterministic SSSP structure [gorkiewicz2025incremental] efficiently handles a sequence of edge insertions from a single source. The framework enables rapid recomputation of farthest-from-center vertices in the Gonzalez algorithm in kk3 amortized time over all kk4 iterations. This data structure circumvents the combinatorial blowup of naively rerunning Dijkstra from scratch on each augmentation of the center set.

Efficient Ball-Size Estimation and Neighborhood Computation

For randomized kk5-clustering, Cohen's sketches [cohen1997size] yield fast approximations of kk6 for all candidate balls. Refined use of truncated Dijkstra and the Source-Insertion SSSP ensures that total running time over all iterations and radii remains within kk7, where kk8 is the aspect ratio.

For the deterministic variant, a hierarchical clustering schema based on Thorup–Zwick oracles precomputes for each node a collection of "bunches" and clusters, enabling union-based overcounted approximation of ball sizes and neighborhoods. The induced error is controlled and tied to the oracle's "stretch" parameter.

Greedy Incremental Framework

All algorithms instantiate an incremental greedy framework in which, in each iteration, the candidate ball or center maximizing an appropriate value function is chosen, followed by a "forbidding" step that removes all balls too close to the new center. The value function is parameterized by ball-size estimations and ensures that both randomized and deterministic variants maintain constant-factor or kk9-factor approximations.

Strong Results and Claims

  • Deterministic, Incremental z=1z=10-approximation for z=1z=11-center in z=1z=12 time: This is proven to be optimal for incremental algorithms, as shown by Kozma (Kozma, 7 Jun 2026).
  • Randomized, Incremental z=1z=13-approximation for z=1z=14-clustering in z=1z=15 time: Matching or improving on the state-of-the-art for various z=1z=16 (z=1z=17-median/z=1z=18-means).
  • First deterministic near-linear time z=1z=19-approximation for kk0-clustering: Subsumes previous quadratic-time deterministic baselines.

Implications and Future Directions

Practically, these methods close major complexity gaps for clustering in sparse graphs and deliver deployable routines with strong worst-case guarantees—key for scalable, high-reliability graph analytics in dense or dynamic settings (social graphs, infrastructural networks, massive similarity graphs, etc.). The deterministic constructions are especially important where algorithmic reliability and reproducibility are non-negotiable. The techniques introduced for deterministic ball-size estimation, efficient dynamic SSSP, and scalable incremental frameworks have potential for adaptation in other sublinear or dynamic algorithmic graph tasks, such as facility location, robust (outlier-aware) clustering, and beyond.

Theoretically, a number of questions remain open: can the constants in the deterministic kk1-clustering scheme be improved, or can an kk2-approximation be realized for kk3-median or kk4-means in exactly linear time deterministically? Extensions to fully dynamic settings and to general metrics beyond graph-induced remain compelling directions. Further, the reduction to Euclidean spanners suggests that improved Euclidean clustering may follow from such graph developments [jiang2026local].

Conclusion

This paper provides decisive progress in the computation of near-optimal clusterings on massive graphs, combining sophisticated algorithmic primitives (dynamic SSSP, Thorup–Zwick oracles, probabilistic sketches) with efficient incremental frameworks to yield both randomized and deterministic fast approximation schemes. Both theoretical optimality (for incremental kk5-center) and strong practical efficiency are achieved. These results substantially advance the understanding of clustering complexity on graphs and lay groundwork for subsequent algorithmic and applied research in scalable unsupervised graph mining.


References

  • (2607.07615) Faster Randomized and Deterministic kk6-Clustering on Graphs
  • [gorkiewicz2025incremental] A. Górkiewicz, A. Karczmarz, "On Incremental Approximate Shortest Paths in Directed Graphs"
  • [thorup2005approximate] M. Thorup, U. Zwick, "Approximate distance oracles"
  • [thorup2001quick] M. Thorup, "Quick k-median, k-center, and facility location for sparse graphs"
  • [latourSaulpicKz] M. Dupré la Tour, D. Saulpic, "Faster and Simpler Greedy Algorithm for kk7-Median and kk8-Means" (Tour et al., 2024)
  • [jiang2026local] S. H.-C. Jiang et al., "Local Search for Clustering in Almost-linear Time"
  • [cohen1997size] E. Cohen, "Size-Estimation Framework with Applications to Transitive Closure and Reachability"
  • (Kozma, 7 Jun 2026) L. Kozma, "The price of incrementality in k-center clustering"
  • [abboud2023fine] A. Abboud et al., "On the fine-grained complexity of approximating k-center in sparse graphs"

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Tweets

Sign up for free to view the 1 tweet with 2 likes about this paper.