arXiv:2610.22824cs.DSOct 2026

Manuscript Offprint

arXiv:2610.22824

Competitive Online Clustering with Movement Cost

Christian Coester, Yichen Huang, Michael Mitzenmacher

Abstract

We study the problem of online clustering with movement cost, which generalizes the fundamental k-server problem. At each time step, the algorithm is given a set of points in a metric space and must choose k cluster centers. The cost incurred is the sum of the clustering cost at each time step and the total distance that the centers move over time. Prior work established competitive algorithms for the case k∈{1,2}k \in \{1, 2\} on the line metric with the k-median clustering objective; under the k-median objective, this problem is also known as facility reallocation. We substantially generalize these results to arbitrary k, general metric spaces, and a broad class of clustering objectives.

Specifically, we consider clustering costs defined as a norm of the distance vector from points to their nearest center, which subsumes the k-median, k-center, and (square root of) k-means objectives, and provide an asymptotically optimal O(k)O(k)-competitive randomized algorithm against adaptive online adversaries. The algorithm is based on a reduction to the k-server problem, establishing a tight connection between the problems. In this reduction, k-server requests are generated by Poisson processes, whose arrival rates evolve in continuous time and are driven by a dual representation of the clustering costs. Our method of using Poissonization in this context may also be of independent interest. We demonstrate another use of the idea by deriving similar reductions for batched set chasing problems.

We also consider a different family of clustering objectives defined as a norm of the vector of cluster radii, which subsumes the sum-k-radii and the k-center objectives, and give a tight O(k)O(k)-competitive deterministic algorithm on the line.

*Funded by the European Union (ERC, CCOO, 101165139). Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council. Neither the European Union nor the granting authority can be held responsible for them. Email: christian.coester@cs.ox.ac.uk.

†^{\dagger}Supported in part by NSF grant CNS-2107078. Email: yichenhuang@g.harvard.edu.

‡^{\ddagger}Supported in part by NSF grant CNS-2107078. Email: michaelm@eecs.harvard.edu.

1 Introduction

Clustering is a fundamental question in algorithms and machine learning, with broad applications in data summarization, facility location, resource allocation, and beyond [CG99; LV92; AGK+01; CGTS99; You00; JV01; KSS10; Kum12; CL12; LS16; AS17]. In a clustering problem, the algorithm is given a set of points (“requests”) and must select k centers so that the requests are well served by the centers according to some objective (e.g., minimizing the total distance from requests to their nearest center).

In many modern settings, however, requests are not static: they arrive and depart over time, and their locations may evolve [EMS14; FKZ21; TBK07; ANS17]. Thus, an algorithm might choose to update the locations of the centers, leading to extra costs proportional to the distance moved [FKK+21; CSC23; BLY25; LHG+24; FS25]. For example, mobile disease-testing units may relocate as new outbreak hotspots emerge, food trucks may change locations to adapt to expected demands (e.g. events, lunch hours, nightlife), and edge-computing resources may be repositioned and migrated as user demand shifts across regions [KBF23; LZ23]. This forces a trade-off between the quality of the clustering at each time and the stability of the chosen centers over time, and more challengingly, the algorithm must seek the balance without knowing the future requests.

Reasoning about movement without knowledge of future requests is a central theme in online algorithms. A prominent relevant example is the k-server problem [MMS88]: k servers are located at points in a metric space (X,d)(X, d). At each time tt, a request appears at a point xt∈Xx_t \in X, and the algorithm must move a server to xtx_t. The cost is the total distance traveled by the servers. The performance of an online algorithm is measured by its competitive ratio, defined as the worst-case ratio between the cost of the algorithm and that of an omniscient optimum who knows the sequence in advance. The k-server problem has long been one of the most important problems in online algorithms and has led to many deep insights [CKPV91; KP95; BCL+18; BCR23; CKZ26].

In this paper, we study the following simultaneous generalization of the clustering problem and the k-server problem. We give the most general definition here, and later specify the assumptions on the cost functions used in our results.

Definition 1.1 (Online Clustering with Movement Cost (CMC)). Let (X,d)(X, d) be a metric space with kk centers initially located at a set C0C_0. At each round tt, the algorithm observes a request multiset Rt⊆XR_t \subseteq X and chooses a set Ct⊆XC_t \subseteq X of kk centers. The cost incurred in round tt is

ct=Clustert(Rt,Ct)⏟clustering+Match(Ct−1,Ct)⏟movement,c_{t}=\underbrace{\mathrm{Cluster}_{t}(R_{t},C_{t})}_{clustering}+\underbrace{\mathrm{Match}(C_{t-1},C_{t})}_{movement},

where Match(Ct−1,Ct)\text{Match}(C_{t-1}, C_t) denotes the minimum matching distance between the configurations Ct−1C_{t-1} and CtC_t under the metric dd. The clustering cost Clustert\text{Cluster}_t is flexible so as to capture different objectives.

The CMC framework captures k-server as a special case, since a k-server request at xtx_t can be simulated by repeated requests to the singleton set {xt}\{x_t\}, thereby forcing any competitive algorithm to move a center 1^1 to xtx_t. Conversely, [BRS21] showed that CMC with the k-median objective and singleton request sets can be reduced to k-server as well. They further highlighted that the problem can be viewed in the line of chasing (well-behaved) convex functions, but in a multi-server rather than the usual single-server setting.

When request sets are not singletons, the situation becomes more complex. The centers must minimize the distance to multiple requests simultaneously, possibly more than the number of centers when ∣Rt∣>k|R_t| > k. For this more general setting, prior work established competitive online algorithms

1^{1}A server in the k-server instance corresponds to a center in a CMC instance.

only for the case k≤2k \leq 2 when the metric space is the line and the clustering cost is the k-median objective [FKK+21; KW22], referred to as facility reallocation on the line. We substantially generalize these results with respect to k, the metric space, and the clustering objective. Specifically, we consider the following two fairly broad families of clustering costs.

Norm-of-distances. Perhaps the most natural clustering cost is a norm of the vector of distances from each request to its nearest center. This subsumes the k-median objective (sum of distances) via the ℓ1\ell_1-norm, the k-center objective (maximum distance) via the ℓ∞\ell_\infty-norm, and the square root of the k-means objective via the ℓ2\ell_2-norm. In the clustering context, the norm should naturally be monotone, i.e., if 0≤ui≤vi0 \leq u_i \leq v_i for all coordinates ii, then ∥u∥≤∥v∥\|u\| \leq \|v\|, and we will henceforth assume monotonicity. We also show in Theorem A.1 that no competitive algorithm exists without the monotonicity assumption, even when k=1k = 1.

Norm-of-radii. An alternative notion is that the costs are associated with the clusters as a whole instead of individual requests, and we consider the clustering cost to be a norm of the vector of cluster radii. This subsumes the sum-k-radii objective [FK12; CP01] via the ℓ1\ell_1-norm and the k-center objective via the ℓ∞\ell_\infty-norm. 2^2 For this objective, in addition to monotonicity, we require the norm to be symmetric, i.e., invariant under permutation of centers.

Note that in the norm-of-radii model, the cost is determined not only by the center locations but also by the association of requests to centers. Our results for this model are specific to the line metric, and we show in Appendix D that on the line it is optimal up to a constant factor to associate each request with the closest center, so we may assume this association at the cost of a constant factor loss. For other metrics, one could alternatively study a model where the association is chosen by the algorithm; we discuss this matter (and how nearest association can be suboptimal in general metrics) in Appendix D.

Adversary Models. The performance of an online algorithm is measured by the competitive ratio against an adversary who generates the requests and also serves them. We consider both oblivious and adaptive online adversaries [BBK+94]. An oblivious adversary fixes the entire request sequence σ\sigma in advance, before seeing the algorithm's randomness. An adaptive online adversary may choose each request based on the algorithm's past actions, and has to serve it immediately (and thus may not be optimal in hindsight). For deterministic algorithms, the two types of adversaries are equivalent.

References (96)