arXiv:2611.04920cs.DSNov 2026

Manuscript Offprint

arXiv:2611.04920

Metric Facility Location under Batched Random Order

Fabrizio Grandoni, Stefano Leonardi, Matteo Russo

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

We study online metric facility location in the batched random-order model. An adversary partitions nn clients into BB nonempty batches, which arrive in uniformly random order. Each batch is revealed in full, and its clients must be connected to open facilities before the next batch arrives. Openings and assignments are irrevocable, and the objective is to minimize the total opening and connection cost. For both uniform and nonuniform opening costs, we prove that the tight competitive ratio is

Θ(min⁡{log⁡(B+1),log⁡(n−B+2)}).\Theta\left(\min\left\{\log(B+1),\sqrt{\log(n-B+2)}\right\}\right).

Thus, the ratio is constant both when there is a single batch and when every batch is a singleton, but intermediate numbers of batches can require a Θ(log⁡n)\Theta(\sqrt{\log n}) ratio. Our algorithms build on Meyerson's algorithm (2001) and do not need to know nn nor BB. A key algorithmic novelty is that we process the clients in a batch one by one in uniform random order (hence neglecting the global properties of the batch). We present a novel analysis of this algorithm that hinges on the random order of the batches, as well as of the clients within each batch. We also provide a matching competitive ratio lower bound already for uniform costs, and even when the entire metric is known in advance.

1 Introduction

Online metric facility location, introduced by Meyerson [Mey01], is a cornerstone of online algorithms and has attracted sustained interest [Fot08, KNR23, JLL+22, HJ26]. Clients v1,…,vnv_1, \ldots, v_n from an underlying metric space (X,d)(X, d) arrive one by one, and each must be irrevocably assigned to an open facility upon arrival. Opening a facility at a permitted location yy costs f(y)f(y), and assigning a client to it costs their distance. The objective is to minimize the total opening and connection cost. Every client location is a permitted facility location. Opening costs are uniform if f(y)=ff(y) = f everywhere, and nonuniform otherwise. In the uniform case, our algorithm opens facilities only at arriving clients. In the nonuniform case, the permitted locations, their metric, and their opening costs are known in advance.

The arrival order strongly affects the achievable guarantees. A uniformly random permutation of the clients permits constant competitive ratios for both opening-cost models [Mey01], whereas adversarial order already requires Θ(log⁡n/log⁡log⁡n)\Theta(\log n / \log \log n) for uniform costs [Fot08]. These assumptions describe two extremes:

†IDSIA, USI-SUPSI, Switzerland, fabrizio.grandoni@idsia.ch. Work supported in part by the SNSF grant 200021-236706.

‡Sapienza University of Rome, Italy, leonardi@diag.uniroma1.it.

‡EPFL, Switzerland, matteo.russo@epfl.ch.

Figure

Figure 1: The adversary fixes the clients and their batches, which are then uniformly permuted. Each batch is revealed in full, but our algorithms additionally shuffle its clients, as illustrated for batch b3b_3.

adversarial analysis protects against every possible arrival sequence, while random order assumes that all client permutations are equally likely. Neither directly captures requests that arrive together because they share a source or arise from the same event.

We study the batched random-order model, introduced for set cover by Gupta et al. [GKL22]. An oblivious adversary fixes the nn clients and partitions them into BB nonempty batches, which arrive in uniformly random order. We remark that different batches might have different sizes. Each batch is revealed in full, and all its clients must be served before the next batch arrives.

This captures requests that arrive together because they share a source or arise from the same event, while retaining randomness in the order of these groups. For example, clients from one region may arrive together, so an early batch need not represent the full instance. Even after seeing that entire batch, the algorithm must serve it without knowing the demand in other regions.

Two immediate upper bounds do not use the random batch order. Solving each batch independently to within a constant factor gives an O(B)O(B)-competitive algorithm, since the optimum for any one batch costs at most the optimum for the full instance. Alternatively, ignoring batch boundaries gives Meyerson's O(log⁡n)O(\log n) guarantee [Mey01], and, as mentioned, Fotakis [Fot08] sharpened the latter to the optimal Θ(log⁡n/log⁡log⁡n)\Theta(\log n / \log \log n) ratio for adversarial arrival order. Moreover, revealing whole batches does not by itself permit a sublinear dependence on BB: the lower bound construction of [Fot08] forces an Ω(B)\Omega(B) lower bound when the BB phases are revealed as batches of colocated clients. Our question is how much the random order of the batches helps: we improve the dependence on BB from linear to logarithmic, and the bound in terms of nn from O(log⁡n/log⁡log⁡n)O(\log n / \log \log n) to O(log⁡n)O(\sqrt{\log n}).