arXiv:2611.04275cs.DSNov 2026

Manuscript Offprint

arXiv:2611.04275

Online Metric Matching with Unknown i.i.d. Arrivals

Tsubasa Harada

Abstract

We study online metric matching with nn servers and nn requests drawn independently from an unknown distribution. Each request must be matched immediately and irrevocably to an unused server, and the algorithm receives no samples before the process starts. We give a randomized algorithm that is O((log⁡log⁡log⁡n)2)O((\log \log \log n)^2)-competitive on arbitrary metric spaces and O(1)O(1)-competitive on tree metrics. These guarantees match the corresponding bounds for known i.i.d. request distributions in [GGPW19] up to constant factors. More generally, our competitive ratio is O(α(n))O(\alpha(n)) whenever the FAIR-BIAS algorithm introduced in that work has competitive ratio α(n)\alpha(n) for known i.i.d. arrivals on the same class of metrics. Consequently, proving that FAIR-BIAS is constant-competitive on general metrics would also yield a constant-competitive algorithm for unknown i.i.d. arrivals.

1 Introduction

In online metric matching, nn servers are available in a metric space before the process begins, and nn requests arrive sequentially. Each request must be assigned to an unused server as soon as it arrives. Assignments cannot be changed later, and the objective is to minimize the total distance between requests and their assigned servers. The performance of an algorithm is measured by its competitive ratio, which compares its cost with the minimum cost of a perfect matching between all requests and all servers. Informally, an algorithm is α\alpha-competitive if its cost is at most α\alpha times the cost of a minimum-cost perfect matching.

Under adversarial arrivals, the optimal deterministic competitive ratio for general metrics is 2n−12n-1 [KP93, KMV94], while randomized algorithms achieve O(log⁡2n)O(\log^2 n) [BBGN14].

When requests arrive at random, there are three natural models to consider. In the known-i.i.d. model, requests are drawn independently from a common distribution that is given to the algorithm before any requests arrive. In the unknown-i.i.d. model, requests are generated in the same way, but the distribution is not given to the algorithm. In the random-order model, an adversary fixes the request locations in advance without revealing them to the algorithm. The requests then arrive in a uniformly random order, and each location is revealed only upon arrival.

The known-i.i.d. model is no harder than the unknown-i.i.d. model, since an algorithm can ignore the supplied distribution. The unknown-i.i.d. model is in turn no harder than the random-order model: conditional on the multiset of i.i.d. requests, their order is uniformly random. Thus, any algorithm that is α\alpha-competitive in the random-order model is also α\alpha-competitive in the unknown-i.i.d. model.

For the known i.i.d. model, [GGPW19] obtain an O((log⁡log⁡log⁡n)2)O((\log \log \log n)^2) competitive ratio for general metrics and O(1)O(1) for tree metrics, whereas the optimal ratio in the random-order model is Θ(log⁡n)\Theta(\log n) [Rag16]. This gap raises a question also posed in [GGPW19, Section 5]: in terms of achievable competitive ratios, is the intermediate unknown-i.i.d. model closer to the known-i.i.d.

model or the random-order model? For line metrics, [VMF25] report an O(1)O(1)-competitive algorithm in the unknown-i.i.d. model.¹ Their bound matches the known-i.i.d. bound on the line, providing a partial answer to this question.