arXiv:2611.01553cs.DSNov 2026

Manuscript Offprint

arXiv:2611.01553

A Deterministic O(log m)-Competitive Algorithm for Online Minimum Cost Bipartite Matching with Delays

Tung-Wei Kuo

Abstract

In the online Minimum cost Bipartite Perfect Matching with Delays (MBPMD) problem, mm requests and mm servers arrive over time in a metric space. An online algorithm has to match each request to a server and can postpone a matching decision by paying the delay cost. The objective is to minimize the total distance and delay cost. Azar, Chiplunkar, and Kaplan gave a randomized O(log⁡n)O(\log n)-competitive algorithm for metric spaces with nn points that are known in advance. For deterministic algorithms, however, the best known competitive ratio in general metric spaces was O(m0.59)O(m^{0.59}), due to Azar and Jacob-Fanani. On the line, Kuo proposed the Virtual Robust Matching (VRM) algorithm and showed that it is O(mlog⁡2m)O(\sqrt{m} \log^2 m)-competitive.

We prove that VRM is O(log⁡m)O(\log m)-competitive for the MBPMD problem in any metric space. VRM is deterministic and does not need to know the metric space or mm in advance. It is the first deterministic polylogarithmic-competitive algorithm for the MBPMD problem in general metric spaces. Unlike the previous analysis of VRM, our analysis does not rely on a geometric decomposition of the metric space. Instead, it charges the waiting time of requests over time to the edges of a fixed optimal matching.

We also extend VRM to the non-bipartite version and prove that the resulting deterministic algorithm is O(log⁡m)O(\log m)-competitive. This improves the O(log⁡5m)O(\log^5 m) bound of Dufay and Wattenhofer and matches a concurrent result of Ahmadian, Chawla, Kumar, Purohit, and Zhang.

The proof that VRM is O(log⁡m)O(\log m)-competitive and its non-bipartite extension were found by GPT-6 Astra (OpenAI) with almost no human input. We used Claude Opus 5.5 (Anthropic) to simplify and present the results. See the AI Usage and Methodology section for details. We take full responsibility for this paper.

1 Introduction

Consider a platform that matches passengers to drivers. When a passenger arrives, the platform can assign an available driver immediately or wait for a driver who is closer to the passenger. Waiting may reduce the distance traveled, but it also increases the waiting time of passengers and drivers. Thus, a natural objective is to minimize the sum of the distance and waiting time.

The above tradeoff is captured by the Minimum cost Bipartite Perfect Matching with Delays (MBPMD) problem [ACK16, AAC+^{+}17]. In this problem, mm requests and mm servers arrive over time in a metric space. An online algorithm has to match each request to a server, and can postpone a matching by paying the delay cost. Once a request and a server are matched, this decision cannot be changed. The objective is to minimize the total distance and delay cost. The MBPMD problem is the bipartite variant of the Minimum cost Perfect Matching with Delays (MPMD) problem [EKW16], in which any two requests can be matched together.

We analyze algorithms using the standard notion of competitive ratio. Specifically, an online algorithm is cc-competitive if, for any input, its cost is at most cc times the cost of the optimal offline algorithm.

For the MBPMD problem, Azar, Chiplunkar, and Kaplan proposed a randomized O(log⁡n)O(\log n)-competitive algorithm, where nn is the number of points in the metric space, and proved that any randomized algorithm has competitive ratio Ω(log⁡1/3n)\Omega(\log^{1/3} n) [ACK16]. This lower bound was improved to Ω(log⁡n/log⁡log⁡n)\Omega(\sqrt{\log n}/\log \log n) [AAC+17]. Both lower-bound constructions place Θ(n)\Theta(n) requests on a line, so the lower bound Ω(log⁡m/log⁡log⁡m)\Omega(\sqrt{\log m}/\log \log m) holds even on a line whose points are known in advance.

For the MPMD problem, Emek, Kutten, and Wattenhofer proposed a randomized algorithm with competitive ratio O(log⁡2n+log⁡Δ)O(\log^2 n + \log \Delta), where Δ\Delta is the aspect ratio of the metric space [EKW16]. Azar, Chiplunkar, and Kaplan improved this ratio to O(log⁡n)O(\log n) and proved an Ω(log⁡n)\Omega(\sqrt{\log n}) lower bound for randomized algorithms [ACK17]. The same paper that improved the MBPMD lower bound also improved this one to Ω(log⁡n/log⁡log⁡n)\Omega(\log n/\log \log n) [AAC+17].

The known randomized algorithms first embed the metric space into a distribution over Hierarchically Separated Trees (HSTs) [FRT04], so they need to know the metric space in advance. Recently, Coester and Huang proposed probabilistic online monotone embeddings into HSTs, which do not require prior knowledge of the metric space, but no competitive ratio for the MPMD or MBPMD problem has been derived from them, and deterministic online monotone embeddings have linear distortion [CH26].

In contrast, several deterministic algorithms do not require prior knowledge of the metric space. For the MPMD problem, Bienkowski, Kraska, and Schmidt proposed an O(m2.46)O(m^{2.46})-competitive algorithm [BKS18]. Bienkowski, Kraska, Liu, and Schmidt improved this ratio to O(m)O(m) [BKLS18], and Azar and Jacob-Fanani obtained O(ϵ−1mlog⁡2(3/2+ϵ))O(\epsilon^{-1}m^{\log_2(3/2+\epsilon)}) for any fixed ϵ>0\epsilon > 0, which is O(m0.59)O(m^{0.59}) for small enough ϵ\epsilon [AJF20]. Both groups adapted their algorithms to the MBPMD problem with the same competitive ratios, and the analyses are tight already on metric spaces with two points and one point, respectively.

Kuo proposed the Virtual Robust Matching (VRM) algorithm for the MBPMD problem and proved an O(mlog⁡2m)O(\sqrt{m} \log^2 m) competitive ratio on a line [Kuo25]. Very recently, Dufay and Wattenhofer improved the deterministic ratio for the MPMD problem from polynomial to polylogarithmic in mm. Their O(log⁡5m)O(\log^5 m)-competitive algorithm does not need to know the metric space or mm in advance [DW26]. However, they noted that several key parts of their approach, specifically the greedy algorithm and the component decomposition, do not naturally extend to the bipartite case [DW26].

Concurrently with and independently of our work, Ahmadian, Chawla, Kumar, Purohit, and Zhang obtained a deterministic O(log⁡m)O(\log m)-competitive algorithm for the MPMD problem that also does not need to know the metric space or mm in advance. They noted that their approach does not extend directly to the bipartite case and left a logarithmic competitive ratio for this case as an open question [ACK+26]. Thus, prior to our work, no polylogarithmic competitive ratio was known for the MBPMD problem without prior knowledge of the metric space.

References (49)