Manuscript Offprint
arXiv:2611.01553A Deterministic O(log m)-Competitive Algorithm for Online Minimum Cost Bipartite Matching with Delays
Abstract
In the online Minimum cost Bipartite Perfect Matching with Delays (MBPMD) problem, requests and 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 -competitive algorithm for metric spaces with points that are known in advance. For deterministic algorithms, however, the best known competitive ratio in general metric spaces was , due to Azar and Jacob-Fanani. On the line, Kuo proposed the Virtual Robust Matching (VRM) algorithm and showed that it is -competitive.
We prove that VRM is -competitive for the MBPMD problem in any metric space. VRM is deterministic and does not need to know the metric space or 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 -competitive. This improves the bound of Dufay and Wattenhofer and matches a concurrent result of Ahmadian, Chawla, Kumar, Purohit, and Zhang.
The proof that VRM is -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, AAC17]. In this problem, requests and 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 -competitive if, for any input, its cost is at most times the cost of the optimal offline algorithm.
For the MBPMD problem, Azar, Chiplunkar, and Kaplan proposed a randomized -competitive algorithm, where is the number of points in the metric space, and proved that any randomized algorithm has competitive ratio [ACK16]. This lower bound was improved to [AAC+17]. Both lower-bound constructions place requests on a line, so the lower bound 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 , where is the aspect ratio of the metric space [EKW16]. Azar, Chiplunkar, and Kaplan improved this ratio to and proved an lower bound for randomized algorithms [ACK17]. The same paper that improved the MBPMD lower bound also improved this one to [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 -competitive algorithm [BKS18]. Bienkowski, Kraska, Liu, and Schmidt improved this ratio to [BKLS18], and Azar and Jacob-Fanani obtained for any fixed , which is for small enough [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 competitive ratio on a line [Kuo25]. Very recently, Dufay and Wattenhofer improved the deterministic ratio for the MPMD problem from polynomial to polylogarithmic in . Their -competitive algorithm does not need to know the metric space or 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 -competitive algorithm for the MPMD problem that also does not need to know the metric space or 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.
Theorem 1.1. For every fixed , the VRM algorithm with parameter described in Section 3 is a deterministic online algorithm for the MBPMD problem in any metric space, and on every input, its cost satisfies
In particular, for , the VRM algorithm is -competitive. Moreover, the algorithm does not need to know the metric space or in advance.
Theorem 1.1 gives the first deterministic algorithm with a polylogarithmic competitive ratio for the MBPMD problem in general metric spaces. In particular, it gives a logarithmic competitive ratio for the bipartite problem, which [ACK 26] leaves open.
The RM algorithm. VRM is based on the Robust Matching (RM) algorithm proposed by Raghvendra for the online Minimum cost Bipartite Perfect Matching (MBPM) problem [Rag16]. In the MBPM problem, all servers arrive in the beginning, and a request must be matched immediately after it arrives. The objective is the total distance of the matching.
The RM algorithm maintains an offline matching and an online matching , which is the real output matching. When a request arrives, the algorithm computes an -augmenting path from to a free server that minimizes the -net-cost, which is times the total length of the edges added to minus the total length of the edges removed from . It then adds the pair to and augments by . Nayyar and Raghvendra proved that the competitive ratio of RM is in -dimensional Euclidean space [NR17], and Raghvendra proved that RM is -competitive on a line [Rag18].
The VRM algorithm. The MBPMD problem differs from the MBPM problem in two respects: servers arrive over time, and a request can wait. To handle the arrival times, VRM works in the time-augmented (TA) metric. In the TA metric, the distance between two items (called their TA distance) is their distance in the original metric space plus the difference of their arrival times [BKS18, AJF20, Kuo25].
To decide when to match a request, the original VRM algorithm introduces a Moving Virtual (MV) server for every request. The MV server of a request stays at the location of the request and moves forward in time, so its TA distance to the request is the time elapsed since the request arrived. Consider a request r. An augmenting path of r is real if all servers in the path are real. It is virtual if its last edge is from some request p to p's MV server, and all the other servers in the path are real.
For example, the edge from to 's MV server is a virtual augmenting path of . Its -net-cost is times the waiting time of , so it is zero when arrives and increases over time. Among the real augmenting paths of , let be one with minimum -net-cost. Define similarly for the virtual augmenting paths of . The request is matched when the -net-cost of becomes less than or equal to that of .
Kuo proved that the edge from to 's MV server always has the minimum -net-cost among the virtual augmenting paths of [Kuo25, Lemma 4.1]. Thus, is matched when the -net-cost of becomes less than or equal to times the waiting time of . In Section 3, we present this simplified algorithm, which we take as the definition of VRM in this paper.
In [Rag16], this cost is referred to as the t-net-cost. However, because t denotes time in this paper, we change t-net-cost to -net-cost.
The lemma is stated there for on the line, but its proof needs only and does not use the line structure. Hence, it holds for every in every metric space.
The analysis. Let be the total waiting time of requests under VRM. Our analysis has two steps. The first step bounds the total cost of the algorithm, including the distance cost and the delay cost of both requests and servers, by . The proof of this step is similar to the analysis of VRM [Kuo25].
The second step is a charging argument, in which we charge to the optimal cost. We fix an optimal matching . At any time , the symmetric difference of and contains an alternating path from each free request to a server. We call this path the optimal path of and the server its terminal server. At every moment, we charge the waiting cost of to the edges of on its optimal path. There are two cases, according to whether the terminal server of the path has arrived.
-
If the terminal server has not arrived, we charge the waiting cost of to the last edge of the path, where is the request preceding on the path. The optimal path is an -augmenting path, so is not in and hence is an edge of . Because the optimal paths of distinct free requests share no edge, is charged by at most one request at any time. Moreover, is charged only after arrives and before arrives. Hence, the total charge to is at most the difference of the arrival times of and , and summing over the edges of shows that the total charge in this case is at most OPT.
-
If the terminal server has arrived, then the optimal path is a valid augmenting path that the algorithm could use. Because is waiting, the -net-cost of this path is at least times the waiting time of . Consequently, the waiting time of is at most the total length of the edges of on the path, and every vertex on the path arrived within the last time units. We charge the waiting cost of to the edges of on the path, in proportion to their lengths. Each edge of , of length , receives a total charge of at most in this case.
Summing over the edges of , the total charge in the second case is at most OPT. Thus, OPT, and Theorem 1.1 follows from the first step.
Extension to the MPMD problem. In Section 5, we extend VRM and its analysis to the MPMD problem. We call the resulting algorithm non-bipartite VRM. By Theorem 5.1, it is -competitive for , where is the number of requests. This improves the bound of [DW26] to . Like VRM, it is deterministic and does not need to know the metric space or in advance. In concurrent work, Ahmadian, Chawla, Kumar, Purohit, and Zhang obtained the same asymptotic bound [ACK26].
The extension requires two main changes. First, because there are no servers, both endpoints of an augmenting path are requests, and each of them can initiate an augmentation. Thus, both endpoints of an optimal path can be free requests that charge the edges of on the path at the same time, which at most doubles the charge rate of each such edge. Second, in the bipartite case, VRM computes the minimum augmenting path of each request as a shortest path in a directed graph whose orientation relies on the bipartition. In the non-bipartite case, we instead compute from minimum-weight perfect matchings in general graphs.
1.2 Other Related Work
Special metric spaces. When the metric space is known in advance and forms a tree of height , deterministic -competitive algorithms are known for both the MPMD and the MBPMD problems [ACK17, ACK16, AAC17]. On a line with points, however, this gives only an bound. When , Emek, Shapiro, and Wang proposed a deterministic 3-competitive algorithm for the MPMD problem and proved that 3 is optimal for deterministic algorithms [ESW19]. For randomized algorithms, a 2-competitive algorithm is known for this case, and it is optimal [HLS 24].
Online metric matching without delays. VRM is based on the RM algorithm for the MBPM problem. For this problem, the optimal deterministic competitive ratio in general metric spaces is [KP93, KMV94]. Randomized algorithms achieve in general [BBGN14] and for doubling metrics [GL12]. Nayyar and Raghvendra showed that the RM algorithm is -competitive when the servers span a space of doubling dimension [NR17], and Raghvendra showed that it is -competitive on a line [Rag18]. No randomized algorithm on a line is -competitive [PS23]. In contrast, no algorithm has a bounded competitive ratio for a non-bipartite variant, even on a line under random-order arrivals [ABCG26]. In this variant, all requests arrive online, and each arriving request is either matched to a waiting request or joins a waiting pool at no cost. Online matching has also been studied with recourse [GKS20, MN25], with maximization objectives, and under other arrival models [Meh13, HTW24].
Variants of matching with delays. Some variants change how requests arrive. Under Poisson arrivals, Mari, Pawlowski, Ren, and Sankowski proved that the greedy algorithm that matches two requests as soon as their total waiting time exceeds their distance is -competitive in expectation for the MPMD problem [MPRS25]. Against adversarial arrivals, however, its competitive ratio is , where , because it reduces to the greedy heuristic for minimum-cost perfect matching [RT81] when all requests arrive simultaneously.
Other variants change how many requests are matched together. Melnyk, Wang, and Wattenhofer introduced k-way matching with delays, in which requests are matched in groups of k, and gave a randomized algorithm on a class of metrics called H-metrics [MWW21]. For this problem on H-metrics, Kakimura and Nakayoshi gave a deterministic -competitive primal-dual algorithm, where m is the number of requests [KN25]. Ahmadian, Chawla, Kumar, Purohit, and Zhang gave a deterministic -competitive algorithm when the cost of a group is the sum of the distances between its requests, and a deterministic -competitive algorithm for general H-metrics [ACK 26].
Some variants replace the waiting time with a different delay cost. For convex delay costs with on uniform metric spaces with n points, the deterministic competitive ratio is [LPWW18]. For concave delay costs, Azar, Ren, and Vainstein gave a randomized -competitive algorithm based on HSTs for both the MPMD and the MBPMD problems [ARV21]. Deryckere and Umboh gave a deterministic -competitive primal-dual algorithm for the MPMD problem with concave delays in general metric spaces [DU23]. Ahmadian, Chawla, Kumar, Purohit, and Zhang adapted their own MPMD algorithm to concave delay functions that are known in advance and unbounded, and obtained a deterministic -competitive algorithm [ACK 26].
Deryckere and Umboh also introduced set delays, where the delay cost at each time is a function of the set of unmatched requests [DU23]. For size-based delays, where this cost depends only on the number of unmatched requests, the deterministic competitive ratio is [GSU26].
Other online problems with delays. The study of online problems with delays originates from the TCP acknowledgment problem [DGS01]. For online service with delays and network design with delays, randomized polylogarithmic competitive ratios were first obtained via HSTs [AGGP17, AT19], and deterministic ones were then obtained without tree embeddings [AT20, Tou23]. The MBPMD problem now follows the same pattern: its known randomized algorithms use HSTs, and Theorem 1.1 gives a deterministic -competitive algorithm without tree embeddings. Other problems with delays or deadlines include multi-level aggregation [BBB+16, BFNT17], set cover with delay [ACKT20], caching with time windows [GKP20], and list update with delays [ALV24].
2 Preliminaries
2.1 Problem Definition
Let be a metric space. Let and be the request set and the server set, respectively, where . For each request or server , let and be its location and arrival time, respectively. We call requests and servers items. When arrives, the algorithm learns its type, its location, and its distances to all items that arrive by time . The algorithm does not know future arrivals or their locations, and it does not know the metric space or in advance.
The algorithm must eventually output a perfect matching M between R and S. If it matches r to s at time , then , and this decision cannot be changed. The objective is to minimize the total distance of the matched pairs plus the total waiting time of all items, that is,
2.2 Matchings and Augmenting Paths
A matching between and is a set of vertex-disjoint edges between and . An item is saturated by if it is an endpoint of an edge in . Otherwise, it is free in . An -alternating path alternates between edges in and edges not in . An -alternating path is -augmenting if neither endpoint is saturated by . We identify a path with its edge set, and for two edge sets and , we write for their symmetric difference.
An M-augmenting path P can be used to enlarge M. We view P as a directed path from a free request to a free server, and write for its last vertex. Following P from its free request, we update M as follows:
-
If an edge of P goes from a request to a server, it is added to M.
-
If an edge of P goes from a server to a request, it is removed from M.
The resulting matching is , and its size is .
2.3 The Time-Augmented Distance
We define the time-augmented (TA) distance between items u and v as
For an edge , define , and for any edge set , define . The TA distance was used in [BKS18, AJF20, Kuo25]. The following lemma relates it to the optimal cost.
Lemma 2.1 ([AJF20]). If is a minimum-cost perfect matching between R and S under D, then .
3 The VRM Algorithm
In this section, we describe the VRM algorithm [Kuo25] for any metric space, in the simplified form discussed in Section 1.1. Let be a parameter that remains fixed throughout the execution. We first define the augmenting paths used by the algorithm (Section 3.1) and then state the readiness rule, which decides when a free request is matched along its augmenting path (Section 3.2). Section 3.3 describes the algorithm, and Section 3.4 states the basic properties used in the analysis.
Following the notation of VRM [Kuo25], the algorithm maintains an offline matching and an online matching , which is the real output matching. The offline matching is an auxiliary matching on the items that have arrived. Both matchings are initially empty. The algorithm can change edges in , but cannot change a pair that has been added to .
We will see in Section 3.3 that and always saturate the same items. An item is free at time if it has arrived and is not saturated by (equivalently, by ) at time . Let be the set of free requests at time . The set does not contain requests that have not arrived. For an arrived item , its age at time is . For a free request, the age is its current waiting time.
3.1 Minimum Net-Cost Augmenting Paths
Consider the complete bipartite graph on the requests and servers that have arrived. For each request and server , we assign the direction and weight of their edge as follows:
A directed path from a free request to a free server in is an -augmenting path whose vertices have all arrived.
For a matching and an -augmenting path , define
We call the -net-cost of . Specifically, it is times the total TA distance of the edges added to , minus the total TA distance of the edges removed from . For an -augmenting path from a free request to a free server, is also the total weight of in .
For each free request , let be an -augmenting path that minimizes the -net-cost among all -augmenting paths from to a free server. We call the minimum augmenting path of , and let be the minimum -net-cost of . Because the -net-cost of such a path equals its weight in , is a shortest path from to the set of free servers in , and is its length. If no free server exists, then no such path exists, and we set . We prove the following lemma in Appendix A. Its proof is similar to the corresponding proofs for RM [Rag16] and VRM [Kuo25].
Lemma 3.1. The graph has no negative cycle at any state.
Thus, shortest paths exist and can be chosen simple, and is well defined.
3.2 The Readiness Rule
A free request is ready at time if
that is, if its waiting time is at least its minimum -net-cost divided by . When is ready, the algorithm adds to , where , and augments by . This is the simplified readiness rule of VRM discussed in Section 1.1 [Kuo25, Section 4.1, Implication 1].
Whenever is updated at time , the algorithm checks Eq. (3.2). If is not ready, its ready time is
and if .
3.3 Algorithm Description
Following the event description of VRM [Kuo25, Section 4], the execution of the algorithm is driven by three types of events:
-
Event RA: A request arrives. Compute the minimum augmenting path , the minimum -net-cost , and the ready time of . Because is free, it cannot be an interior vertex of another free request's augmenting path. Thus, the minimum augmenting paths and ready times of the other free requests do not change.
-
Event SA: A server arrives. Update the minimum augmenting paths, the minimum -net-costs, and the ready times of all free requests.
-
Event AU: A free request is ready. Let . Add to with matching time equal to the current time, and augment by , that is, set . Then update the minimum augmenting paths, the minimum -net-costs, and the ready times of all remaining free requests.
By the design of the algorithm, and always saturate the same items, and every output decision is feasible. Every free request has an edge to every free server in , so whenever a free server exists. After the last arrival, there are free requests and free servers, so a free server exists whenever a free request does. Hence, after the last arrival, every free request has a finite ready time, and the algorithm eventually outputs a perfect matching.
Ties among simultaneous events and among minimum augmenting paths are broken by an arbitrary but fixed rule, which makes the algorithm deterministic, and our analysis holds for every such rule.
3.4 Basic Properties
The analysis uses the readiness rule in two ways. First, a request is matched only when it is ready. Thus, if is matched at time along the path with -net-cost , then
Second, while a request waits, it is not ready. To make this precise, we use the following notion.
Definition 3.2. A time is stable if it is not an event time, that is, no item arrives and no augmentation is performed at time .
Consider a stable time , a free request , and an -augmenting path from to a free server. Because is the minimum -net-cost of such paths, we have . Because is stable, Event AU does not occur at time , so no free request is ready at time . In particular, by Eq. (3.2). Therefore, we have the following lemma.
Lemma 3.3. At every stable time , no free request is ready. In particular, every -augmenting path from any free request to any free server satisfies
4 Analysis
In this section, we prove Theorem 1.1. Let be the time when request r is matched by VRM, and let
be the total waiting time of requests. The second equality follows because each free request incurs one unit of waiting cost per unit of time. The proof has two steps. In Section 4.1, we show that . In Sections 4.2–4.4, we charge the waiting cost of every request, at every stable time, to the edges of a fixed optimal matching and bound the charge that each edge receives. Section 4.5 sums these bounds to show that OPT and combines the two steps.
4.1 Bounding the Total Cost by the Total Waiting Time of Requests
The following lemma relates to the total cost of the algorithm, which includes the distance cost and the delay cost of both requests and servers.
Lemma 4.1. VRM satisfies
Proof. The proof is similar to the arguments in [Rag16], [Kuo25, Lemma 3.1], and [Kuo25, Section 4.1, Implication 2]. Let be the path used in the th augmentation and let be the offline matching right before this augmentation. Define , , and .
Because the th augmentation changes the total TA distance of by , the sum is the total TA distance of the final offline matching, so it is nonnegative. Because for every , we have
(4.2)
The last inequality follows from Eq. (3.4), because , where is the starting request of .
If the th augmentation outputs the pair at time , then , and the triangle inequality gives . The distance and delay cost of this pair is
Summing over all m pairs and applying Eq. (4.2), we have
as desired.
4.2 Optimal Paths and the Charging Scheme
To bound , we compare the offline matching with a fixed optimal matching under the TA distance. Let be a minimum-cost perfect matching between and under , so that by Lemma 2.1. Let be the offline matching at time . Consider a free request at time . Because is not saturated by and is perfect, the component of containing is an -augmenting path from to a server. We call this path the optimal path of at time , denote it by , and call its last vertex the terminal server. The terminal server is not saturated by , so it is either free or not yet arrived.
Lemma 4.2. At any time t, the optimal paths of different free requests share no edge, and every interior vertex of an optimal path has arrived.
Proof. The optimal paths of different free requests are different components of , so they share no edge. Next, an optimal path alternates between edges of and edges of , so every interior vertex is incident to an edge of . Because is a matching on the items that have arrived, every interior vertex has arrived.
By Lemma 4.2, the only vertex of that may not have arrived is its terminal server.
The charging scheme. There are at most 2m arrival times and at most m augmentations, so there are only finitely many event times. Thus, the waiting cost incurred at event times is zero, and it suffices to charge the waiting cost at stable times. We consider a stable time t and a free request r. The waiting cost of r increases at rate one, and we charge it as follows.
-
Case 1: the terminal server of has not arrived. We charge the waiting cost of to the last edge of . Because the terminal server is not saturated by , this edge is not in . It lies in , so it is an edge of . By Lemma 4.2, at any time, each edge is charged by at most one request. Let be the total waiting cost charged in this case over all requests and over time. Section 4.3 shows that .
-
Case 2: the terminal server of has arrived. Let be the total TA distance of the edges of on . For each edge , we charge the waiting cost of to at rate
Lemma 4.4 in Section 4.4 gives , and because no item arrives at the stable time . Thus, the rate is well defined. Figure 1(a) illustrates this rule. By Lemma 4.2, at any time, each edge is charged by at most one request. For each edge , let be the charge rate assigned to in this case at a stable time , with at event times.
Every unit of is charged by exactly one of the above rules. Therefore,
It remains to bound and for every . We treat these bounds in Sections 4.3 and 4.4.
4.3 Case 1: The Terminal Server Has Not Arrived
Lemma 4.3. The total waiting cost charged in Case 1 satisfies .
Proof. In Case 1, a free request charges its waiting cost to the last edge of its optimal path. Fix an edge that is charged in Case 1, where and . If a free request charges in Case 1 at time , then is the terminal server of , so has not arrived at time . By Lemma 4.2, has arrived, since it is or an interior vertex of . Thus, , so arrives before , and is charged only during .
By Lemma 4.2, is charged by at most one request at any stable time. Because each free request incurs waiting cost at unit rate, the total charge to in Case 1 is at most . An edge of that is never charged in Case 1 contributes nothing, so summing over all edges of gives .
4.4 Case 2: The Terminal Server Has Arrived
In Case 2, an edge is charged at rate . This rate is large only when is small, so bounding the total charge to amounts to showing that cannot be small. The next lemma gives two lower bounds on .
Lemma 4.4. Fix a stable time and a free request such that the terminal server of has arrived, and let . Then
Proof. Let , so that . By Lemma 4.2 and the assumption, all vertices of have arrived. The terminal server of is not saturated by , so it is free. Thus, is an -augmenting path from the free request to a free server, and its -net-cost is . We prove the two bounds as follows.
-
By Lemma 3.3, we have . Because , this gives the first bound .
-
Rearranging the inequality above gives . Thus, .
-
Let be a vertex of , and let be the subpath of from to . By the definition of and the triangle inequality for , we have . By the bound on above, , and , we have
which is the second bound.
We now fix an edge and bound the total charge that it receives.
Lemma 4.5. For every edge , the total charge received by e in Case 2 satisfies
Proof. Choose one endpoint of . Let be the arrival time of this endpoint. We use the same endpoint throughout the analysis of . Consider a stable time with . By Lemma 4.2, exactly one request, which we denote by , charges at time . Let be its optimal path, and let . By Eq. (4.3), we have . Both and may change as varies.
The waiting cost of increases at rate one and is split among the edges of . Because is the only request that charges e at time t, we have . Moreover, v is a vertex of , and in Case 2 every vertex of has arrived. Thus, v has arrived. Because no item arrives at the stable time t, we have . The second bound of Lemma 4.4, applied to , gives
Next, we bound the time interval during which is charged. Because , Eq. (4.5) gives OPT. Together with , this shows that is charged only during . Combining this with , Eq. (4.5), and , we have
Different requests may charge during different parts of this interval, and need not receive charge throughout the interval. The upper bound in Eq. (4.6) holds at every time, regardless of which request is charging . Figure 1(b) illustrates and this bound.
Integrating Eq. (4.6) bounds the total charge that receives from all requests. We split the integral at OPT/m. We bound the minimum in Eq. (4.6) by 1 before this time and by after it, and obtain
(4.7)
□
4.5 Proof of Theorem 1.1
By Eq. (4.4) and Lemmas 4.3 and 4.5, and because has edges and by Lemma 2.1, the total waiting time of requests satisfies
Combining this bound with Lemma 4.1, we have
For , the coefficient is . Finally, the algorithm does not need to know the metric space or in advance, since , OPT, and are used only in the analysis.
(a) At a stable time : the optimal path of the request

Share of the unit waiting rate of received by each -edge, where .
(b) The charge rate of the edge over time

Figure 1: Charges received by a fixed edge in Case 2. In (a), solid edges belong to , and dashed edges belong to . In (b), the charge rate of each request changes when an augmentation changes its optimal path, and OPT/m is the time where the proof of Lemma 4.5 splits the integral.
5 Extension to Non-Bipartite Matching with Delays
In this section, we extend VRM and its analysis to the MPMD problem, in which any two requests can be matched. Let be the set of requests, which arrive over time in a metric space, and let , so that is the number of pairs in a perfect matching. We use the same notation for their locations , arrival times , and TA distances . The objective is to minimize the total distance of the matched pairs plus the total waiting time of all requests. Lemma 2.1 also holds for the MPMD problem [AJF20]. That is, for every minimum-cost perfect matching on under .
We call our extension non-bipartite VRM. Because there are no servers, both endpoints of an augmenting path are requests, and each of them can initiate an augmentation. The analysis uses the same optimal paths and charging scheme as in Section 4. The main difference is that we now charge the waiting time of both endpoints of an optimal path. Thus, two requests can charge the same edge of at the same time. We obtain the following result.
Theorem 5.1. For every fixed , the non-bipartite VRM algorithm described below is a deterministic online algorithm for the MPMD problem in any metric space. On every input, its cost satisfies
In particular, for , it is -competitive. The algorithm does not need to know the metric space or in advance.
5.1 The Algorithm
As in Section 3, the algorithm maintains an offline matching and an online matching , both initially empty. A request is free at time if it has arrived and is not saturated by (equivalently, by ) at time . Because any two requests can be matched, can contain an edge between any two distinct arrived requests. An -augmenting path is a simple alternating path between two distinct requests that are free in . For a matching and an edge set , define
We call the -net-cost of F. For an M-augmenting path, this agrees with Eq. (3.1).
For each free request , let be an -augmenting path that minimizes the -net-cost among all -augmenting paths from to another free request. We call the minimum augmenting path of , and let be the minimum -net-cost of . If there is no other free request, we set . Otherwise, the edge from to another free request is a candidate, and there are only finitely many simple paths on the arrived requests. Thus, is well defined.
A free request u is ready at time t if
Whenever is updated, the algorithm checks Eq. (5.1). If is not ready, its ready time is , which is if .
The execution of the algorithm is driven by two types of events:
-
Event RA: A request v arrives. Update the minimum augmenting paths, the minimum -net-costs, and the ready times of all free requests, including v. Because v can be the other endpoint of the minimum augmenting paths of the other free requests, these requests must also be updated, unlike in Event RA of Section 3.3.
-
Event AU: A free request is ready. Let be the other endpoint of . Add to with matching time equal to the current time, and set . Then update the minimum augmenting paths, the minimum -net-costs, and the ready times of all remaining free requests.
Ties among simultaneous events and among the choices in Steps 1 and 2 of Section 5.2 are broken by an arbitrary but fixed rule, which makes the algorithm deterministic, and our analysis holds for every such rule. The matchings and always saturate the same requests, so every output decision is feasible, and the algorithm eventually outputs a perfect matching.
As in Definition 3.2, a time is stable if no request arrives and no augmentation is performed at that time. For an arrived request , let be its age at time . Consider a stable time and an -augmenting path between free requests and . Because can be traversed in either direction, it is a candidate for the minimum augmenting paths of both and . Because is stable, Event AU does not occur at time , so no free request is ready at time . Thus, by Eq. (5.1), we have
5.2 Computing Minimum Augmenting Paths
The graph H of Section 3.1 relies on a fixed bipartition. We instead obtain the minimum augmenting paths from minimum-weight perfect matchings in general graphs. Consider a state with offline matching , and let be the set of requests saturated by . For two distinct free requests and , let be the complete graph on with edge weights
For every perfect matching in , the edge set consists of one -augmenting path from to and vertex-disjoint simple -alternating even cycles.
To update the minimum augmenting paths and the minimum -net-costs in Events RA and AU, the algorithm performs the following two steps.
-
For every pair of distinct free requests and , compute a minimum-weight perfect matching in , and let be the -augmenting path from to in .
-
For every free request , choose a free request that minimizes , and set and . If is the only free request, set .
We now show that the two steps compute the minimum augmenting path and the minimum -net-cost of every free request . Because Step 2 minimizes over , it suffices to show that minimizes the -net-cost among all -augmenting paths from to . We first relate the weights in to -net-costs.
Lemma 5.2. Let be the offline matching at some state, and let and be distinct free requests. Every perfect matching in satisfies .
Proof. We have
For every -augmenting path from to , the matching is a perfect matching in , and Lemma 5.2 gives . Thus, to show that minimizes the -net-cost among all -augmenting paths from to , it suffices to show that is a minimum-weight perfect matching in .
The matching is a minimum-weight perfect matching in . It differs from only on the alternating cycles of . Lemma 5.3 shows that if no simple -alternating even cycle has negative -net-cost, these cycles cannot make lighter than , so is also a minimum-weight perfect matching. Lemma 5.5 shows by induction on the events that the offline matching satisfies this condition at every state.
Lemma 5.3. Let be the offline matching at some state, and suppose that every simple -alternating even cycle has nonnegative -net-cost. Then for every pair of distinct free requests and , the matching is a minimum-weight perfect matching in .
Proof. The edge set consists of and simple -alternating even cycles, and each of these cycles has nonnegative -net-cost by assumption. Because is additive over disjoint edge sets, Lemma 5.2 gives
Because is a perfect matching in , it is a minimum-weight perfect matching in .
The induction step of Lemma 5.5 compares -net-costs with respect to the offline matchings before and after an augmentation, and we make this comparison edge by edge. For a matching and an edge , let if and otherwise. Then is the -net-cost of switching with respect to , and is the sum of over .
Lemma 5.4. Let and be matchings, and let .
(a) Every edge satisfies .
(b) Every edge satisfies .
Proof. (a) Because , an edge outside Q belongs to M if and only if it belongs to .
(b) An edge belongs to exactly one of and . Thus, one of and is , and the other is .
Lemma 5.5. At every state of non-bipartite VRM, every simple -alternating even cycle satisfies .
Proof. We use induction on the events. Initially, is empty, so there is no alternating cycle. Every vertex of an alternating cycle is saturated, and a newly arriving request is free. Thus, an arrival preserves the statement.
Consider an augmentation for a free request , and let be the free request chosen for in Step 2, so that the augmentation is along . Let be the offline matching before the augmentation, and let . By the induction hypothesis and Lemma 5.3, is a minimum-weight perfect matching in .
Suppose, for contradiction, that some simple -alternating even cycle satisfies . Because is -alternating, is a matching that saturates the same requests as , so is also a perfect matching in . Because is a minimum-weight perfect matching in , it suffices to show that to reach a contradiction.
We have and . Applying Lemma 5.2 to and to , we obtain
Because Lemma 5.4(a) gives for every , and Lemma 5.4(b) gives for every . Therefore,
where the inequality uses and .
5.3 Bounding the Total Cost by the Total Waiting Time
Let be the time when request r is matched, and let be the set of free requests at time t. The total waiting time of all requests is
where the second equality holds because each free request incurs one unit of waiting cost per unit of time. The following lemma is the counterpart of Lemma 4.1. Its proof counts the waiting times of both endpoints of each output pair.
Lemma 5.6. Non-bipartite VRM satisfies
Proof. As in the proof of Lemma 4.1, let be the path used in the th augmentation, let be the offline matching right before it, and write , , and . Let be the request that initiates this augmentation, let be the other endpoint of , and let be the time of this augmentation. Define
By Eq. (5.1), for every , so . Because the th augmentation changes the total TA distance of by , the sum is the total TA distance of the final offline matching, so it is nonnegative. Because for every , we have
By the triangle inequality and , the cost of output pair is
Summing over the pairs gives
where the second inequality uses and the equality uses .
5.4 Charging the Waiting Time to the Optimal Matching
We now bound by adapting the charging scheme in Sections 4.2–4.4. Fix a minimum-cost perfect matching on under , so that , and write for the offline matching at time . Consider a free request at time . Because is not saturated by and is perfect, the component of containing is an -augmenting path from to another request. We call this path the optimal path of at time , denote it by , and call its last vertex the terminal request. The terminal request is not saturated by , so it is either free or not yet arrived.
Lemma 5.7. Let and be distinct free requests at time . If is the terminal request of , then and have the same edges. Otherwise, and share no edge. Moreover, every interior vertex of an optimal path has arrived.
Proof. The paths and are the components of containing and , respectively. If is the terminal request of , the two components coincide, so the two paths have the same edges. Otherwise, is neither nor the terminal request of . Because is not saturated by , it is not an interior vertex of either. Hence is not on , and the two components are different and share no edge. Next, an optimal path alternates between edges of and edges of , so each of its interior vertices is incident to an edge of . Because is a matching on the requests that have arrived, every interior vertex has arrived.
The following lemma is the counterpart of Lemma 4.4.
Lemma 5.8. Fix a stable time and a free request such that the terminal request of has arrived, and let . Then
Proof. Let , so that . By Lemma 5.7 and the assumption, all vertices of have arrived. The terminal request of is not saturated by , so it is free. Thus, is an -augmenting path between two free requests, and Eq. (5.2) gives . This is the inequality that the proof of Lemma 4.4 obtains from Lemma 3.3. The rest of that proof then applies verbatim, with and in place of and .
Because there are only finitely many event times, the waiting cost incurred at them is zero. Thus, it suffices to charge the waiting cost at stable times. We consider a stable time t and a free request u, and we charge the waiting cost of u as follows.
Case 1: the terminal request of has not arrived. We charge the waiting cost of u to the last edge of , where v is the terminal request. This edge belongs to . By Lemma 5.7, p has arrived, since it is u or an interior vertex of . Because v has not arrived, it is not free. Thus, by Lemma 5.7, no other free request has an optimal path containing e, and e is charged at rate at most one. Let be the total waiting cost charged in this case over all requests and over time.
Fix an edge , where . Whenever is charged in this case at time , we have . Because the charge rate is at most one, the total charge to in this case is at most . Summing over all edges of gives .
Case 2: the terminal request of has arrived. Let be the total TA distance of the edges of on . For each edge , we charge the waiting cost of u to e at rate . Lemma 5.8 gives , and because no request arrives at the stable time t. Thus, the rate is well defined. For each edge , let be the sum of the charge rates assigned to e in this case by all free requests at a stable time t, with at event times.
Fix an edge . Choose one endpoint of , and let . Consider a stable time with . Let be a request charging at time , let be its optimal path, and let . By Lemma 5.7, the terminal request of is the only other request that can charge at time , and its optimal path has the same edges as . Thus, at most two requests charge , and each of them charges at rate . Hence .
The waiting cost of each of these requests increases at rate one and is split among the edges of . Thus, . Moreover, is a vertex of , and in Case 2 every vertex of
has arrived. Thus, has arrived. Because no request arrives at the stable time , we have . The second bound of Lemma 5.8, applied to , gives . Because , this bound gives OPT. As in the proof of Lemma 4.5, we have
Integrating as in Eq. (4.7), we have
5.5 Proof of Theorem 5.1
Adding the charge in Case 1 and the charge to all edges in Case 2, we obtain
The last equality holds because has edges and . Combining this bound with Lemma 5.6 gives
For , the coefficient is . Finally, the algorithm does not need to know the metric space or in advance, since , , and OPT are used only in the analysis.
6 Concluding Remarks
Several ingredients of the analysis are shared with previous analyses of RM and VRM. The bound on the total length of the augmenting paths in Lemma 4.1 is from [Rag16, Kuo25], and the optimal-path construction in Section 4.2 and the path-length comparison in the proof of Lemma 4.4 are from [NR17, Kuo25]. The distinguishing feature of our analysis is that it charges waiting time over time rather than net-cost per augmentation. In particular, it does not use the geometric decomposition of the metric space that underlies the analyses in [NR17, Kuo25], and it does not use the monotonicity of the minimum net-cost under augmentations [Kuo25, Lemma 4.2].
Without delays, no deterministic algorithm is polylogarithmic-competitive in high dimensions. In -dimensional Euclidean space, every deterministic algorithm for the MBPM problem has competitive ratio [Rag18, NR17]. In contrast, VRM, which is built on RM, is -competitive for the MBPMD problem in any metric space. From this perspective, allowing delays makes matching easier for deterministic algorithms, although the two problems are not directly comparable.
AI Usage and Methodology
Background. After our earlier paper on VRM [Kuo25], we did not expect VRM to be polylogarithmic-competitive, because RM, on which it is based, is not polylogarithmic-competitive in high dimensions (see Section 6). We therefore did not plan to analyze VRM further. The deterministic -competitive algorithm of Dufay and Wattenhofer for the MPMD problem [DW26] motivated us to revisit the MBPMD problem. In October 2025, we tried to design a new algorithm for the MBPMD problem with GPT-5 (OpenAI) and substantial human input, but these attempts failed.
How the result was found. In September 2026, we first gave Claude Fable 5.1 (Anthropic) a single prompt that included our paper on VRM [Kuo25]. In this prompt, we asked the model to read that paper and then to consider the same problem, the MBPMD problem on the line, and either to design a deterministic polylogarithmic-competitive online algorithm or to give a lower bound showing that no such algorithm exists. This attempt failed. We then gave the same prompt to GPT-6 Astra (OpenAI) in the same working directory, which still contained the notes and code of that attempt. We expected that, if the model succeeded, it would design a new algorithm.
What GPT-6 Astra contributed. Instead, GPT-6 Astra proved that VRM is -competitive in any metric space, although the problem was posed on the line. There was almost no human input. We repeatedly asked the model to continue until the proof was complete. The core of its proof is the charging argument now in Sections 4.2–4.4. In a separate session, we asked the same model to extend the result to the MPMD problem, again with almost no human input. The extension in Section 5 comes from that session.
We found afterwards that GPT-6 Astra’s notes cite the notes of the Claude Fable 5.1 attempt and that its scripts reuse the code of that attempt. Claude Fable 5.1’s notes already distinguished the two cases of Section 4.2. They contained a charging scheme for Case 1 but none that bounded the waiting cost in Case 2.
Verification and presentation. We verified the proofs found by GPT-6 Astra by rewriting them with Claude Opus 5.5 (Anthropic), which also helped us simplify and present the results and edit the text. Claude Fable 5.1 also checked an early version of Section 5 and revised its notation. We checked every step of the rewritten proofs ourselves. This paper presents the rewritten proofs, which include one slight improvement. The next paragraph describes it.
We first explained to Claude Opus 5.5 our own interpretation of the original proof for the MBPMD problem found by GPT-6 Astra and then discussed how one might arrive at this proof. After this discussion, Claude Opus 5.5 noticed that, in the proof of Lemma 4.5, the charge rate can also be bounded by 1 (see Eq. (4.6)). This observation simplifies both original proofs found by GPT-6 Astra and improves the resulting competitive ratios.
While rewriting the proofs, we found another improvement, which this paper does not use. Using MV servers and [Kuo25, Lemma 4.1], we can show that Case 1 is not needed. For , this improves the ratio in Theorem 1.1 from to . We later discovered that the original proof found by GPT-6 Astra already contains this argument.
However, because the proof with Case 1 does not use MV servers, it is simpler. Moreover, Section 5 adapts it to the MPMD problem, whereas the other improvement relies on [Kuo25, Lemma 4.1], which does not extend to the MPMD problem. For these reasons, we present the proof with Case 1.
References
[AAC 17] Itai Ashlagi, Yossi Azar, Moses Charikar, Ashish Chiplunkar, Ofir Geri, Haim Kaplan, Rahul Makhijani, Yuyi Wang, and Roger Wattenhofer. Min-cost bipartite perfect matching with delays. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2017), volume 81 of LIPIcs, pages 1:1–1:20, Dagstuhl, Germany, 2017. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.APPROX-RANDOM.2017.1.
[ABCG26] Josh Ascher, Eric Balkanski, Jason Chatzitheodorou, and Vasilis Gkatzelis. Online min-cost matching beyond one-sided arrivals. In Proceedings of the ACM Conference on Economics and Computation (EC 2026), 2026. Full version titled “Online min-cost matching with general arrivals”. arXiv:2606.05546.
[ACK16] Yossi Azar, Ashish Chiplunkar, and Haim Kaplan. Polylogarithmic bounds on the competitiveness of min-cost (bipartite) perfect matching with delays, 2016. arXiv:1610.05155.
[ACK17] Yossi Azar, Ashish Chiplunkar, and Haim Kaplan. Polylogarithmic bounds on the competitiveness of min-cost perfect matching with delays. In Proceedings of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2017), pages 1051–1061. SIAM, 2017. doi:10.1137/1.9781611974782.67.
[ACK 26] Sara Ahmadian, Shuchi Chawla, Ravi Kumar, Manish Purohit, and Shirley Zhang. A general framework for matching with delays, 2026. arXiv:2610.21285v1.
[ACKT20] Yossi Azar, Ashish Chiplunkar, Shay Kutten, and Noam Touitou. Set cover with delay – clairvoyance is not required. In 28th Annual European Symposium on Algorithms (ESA 2020), volume 173 of LIPIcs, pages 8:1–8:21, Dagstuhl, Germany, 2020. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ESA.2020.8.
[AGGP17] Yossi Azar, Arun Ganesh, Rong Ge, and Debmalya Panigrahi. Online service with delay. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing (STOC 2017), pages 551–563, New York, NY, USA, 2017. ACM. doi:10.1145/3055399.3055475.
[AJF20] Yossi Azar and Amit Jacob-Fanani. Deterministic min-cost matching with delays. Theory of Computing Systems, 64(4):572–592, 2020. doi:10.1007/s00224-019-09963-7.
[ALV24] Yossi Azar, Shahar Lewkowicz, and Danny Vainstein. List update with delays or time windows. In 51st International Colloquium on Automata, Languages, and Programming (ICALP 2024), volume 297 of LIPIcs, pages 15:1–15:20, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2024.15.
[ARV21] Yossi Azar, Runtian Ren, and Danny Vainstein. The min-cost matching with concave delays problem. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA 2021), pages 301–320. SIAM, 2021. doi:10.1137/1.9781611976465.20.
[AT19] Yossi Azar and Noam Touitou. General framework for metric optimization problems with delay or with deadlines. In 60th IEEE Annual Symposium on Foundations of Computer Science (FOCS 2019), pages 60–71. IEEE, 2019. doi:10.1109/FOCS.2019.00013.
[AT20] Yossi Azar and Noam Touitou. Beyond tree embeddings – a deterministic framework for network design with deadlines or delay. In 61st IEEE Annual Symposium on Foundations of Computer Science (FOCS 2020), pages 1368–1379. IEEE, 2020. doi: 10.1109/FOCS46700.2020.00129.
[BBB+16] Marcin Bienkowski, Martin Böhm, Jaroslaw Byrka, Marek Chrobak, Christoph Dürr, Lukáš Folwarczny, Łukasz Jeż, Jirí Sgall, Nguyen Kim Thang, and Pavel Veselý. Online algorithms for multi-level aggregation. In 24th Annual European Symposium on Algorithms (ESA 2016), volume 57 of LIPIcs, pages 12:1–12:17, Dagstuhl, Germany, 2016. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ESA.2016.12.
[BBGN14] Nikhil Bansal, Niv Buchbinder, Anupam Gupta, and Joseph Naor. A randomized -competitive algorithm for metric bipartite matching. Algorithmica, 68(2):390–403, 2014. doi:10.1007/s00453-012-9676-9.
[BFNT17] Niv Buchbinder, Moran Feldman, Joseph (Seffi) Naor, and Ohad Talmon. -competitive algorithm for online multi-level aggregation. In Proceedings of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2017), pages 1235–1244. SIAM, 2017. doi:10.1137/1.9781611974782.80.
[BKLS18] Marcin Bienkowski, Artur Kraska, Hsiang-Hsuan Liu, and Pawel Schmidt. A primal-dual online deterministic algorithm for matching with delays. In Approximation and Online Algorithms (WAOA 2018), volume 11312 of LNCS, pages 51–68. Springer, 2018. doi:10.1007/978-3-030-04693-4_4.
[BKS18] Marcin Bienkowski, Artur Kraska, and Pawel Schmidt. A match in time saves nine: Deterministic online matching with delays. In Approximation and Online Algorithms (WAOA 2017), volume 10787 of LNCS, pages 132–146. Springer, 2018. doi:10.1007/978-3-319-89441-6_11.
[CH26] Christian Coester and Yichen Huang. Online monotone metric embeddings. In 53rd International Colloquium on Automata, Languages, and Programming (ICALP 2026), volume 374 of LIPIcs, pages 66:1–66:22, Dagstuhl, Germany, 2026. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2026.66.
[DGS01] Daniel R. Dooly, Sally A. Goldman, and Stephen D. Scott. On-line analysis of the TCP acknowledgment delay problem. Journal of the ACM, 48(2):243–273, 2001. doi: 10.1145/375827.375843.
[DU23] Lindsey Deryckere and Seeun William Umboh. Online matching with set and concave delays. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2023), volume 275 of LIPIcs, pages 17:1–17:17, Dagstuhl, Germany, 2023. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi: 10.4230/LIPIcs.APPROX/RANDOM.2023.17.
[DW26] Marc Dufay and Roger Wattenhofer. A deterministic polylogarithmic competitive algorithm for matching with delays. In Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2026), pages 3936–3964. SIAM, 2026. doi:10.1137/1.9781611978971.144.
[EKW16] Yuval Emek, Shay Kutten, and Roger Wattenhofer. Online matching: haste makes waste! In Proceedings of the 48th Annual ACM Symposium on Theory of Computing (STOC 2016), pages 333–344, New York, NY, USA, 2016. ACM. doi:10.1145/2897518.2897557.
[ESW19] Yuval Emek, Yaacov Shapiro, and Yuyi Wang. Minimum cost perfect matching with delays for two sources. Theoretical Computer Science, 754:122–129, 2019. doi: 10.1016/j.tcs.2018.07.004.
[FRT04] Jittat Fakcharoenphol, Satish Rao, and Kunal Talwar. A tight bound on approximating arbitrary metrics by tree metrics. Journal of Computer and System Sciences, 69(3):485–497, 2004. doi:10.1016/j.jcss.2004.04.011.
[GKP20] Anupam Gupta, Amit Kumar, and Debmalya Panigrahi. Caching with time windows. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing (STOC 2020), pages 1125–1138, New York, NY, USA, 2020. ACM. doi:10.1145/3357713.3384277.
[GKS20] Varun Gupta, Ravishankar Krishnaswamy, and Sai Sandeep. Permutation strikes back: The power of recourse in online metric matching. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2020), volume 176 of LIPIcs, pages 40:1–40:20, Dagstuhl, Germany, 2020. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.APPROX/RANDOM.2020.40.
[GL12] Anupam Gupta and Kevin Lewi. The online metric matching problem for doubling metrics. In Automata, Languages, and Programming (ICALP 2012), volume 7391 of LNCS, pages 424–435. Springer, 2012. doi:10.1007/978-3-642-31594-7_36.
[GSU26] Junhao Gan, Xiao Sun, and Seeun William Umboh. Online matching with size-based and convex delays. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2026), volume 392 of LIPIcs, pages 25:1–25:23, Dagstuhl, Germany, 2026. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.APPROX/RANDOM.2026.25.
[HLS+24] Kun He, Sizhe Li, Enze Sun, Yuyi Wang, Roger Wattenhofer, and Weihao Zhu. Randomized algorithm for MPMD on two sources. In Web and Internet Economics (WINE 2023), volume 14413 of LNCS, pages 348–365. Springer, 2024. doi: 10.1007/978-3-031-48974-7_20.
[HTW24] Zhiyi Huang, Zhihao Gavin Tang, and David Wajc. Online matching: A brief survey. ACM SIGecom Exchanges, 22(1):135–158, 2024. doi:10.1145/3699824.3699837.
[KMV94] Samir Khuller, Stephen G. Mitchell, and Vijay V. Vazirani. On-line algorithms for weighted bipartite matching and stable marriages. Theoretical Computer Science, 127(2):255–267, 1994. doi:10.1016/0304-3975(94)90042-6.
[KN25] Naonori Kakimura and Tomohiro Nakayoshi. Deterministic primal-dual algorithms for online k-way matching with delays. Theoretical Computer Science, 1026:114988, 2025. doi:10.1016/j.tcs.2024.114988.
[KP93] Bala Kalyanasundaram and Kirk Pruhs. Online weighted matching. Journal of Algorithms, 14(3):478–488, 1993. doi:10.1006/jagm.1993.1026.
[Kuo25] Tung-Wei Kuo. Online deterministic minimum cost bipartite matching with delays on a line. Theory of Computing Systems, 69(3):28, 2025. doi:10.1007/s00224-025-10230-1.
[LPWW18] Xingwu Liu, Zhida Pan, Yuyi Wang, and Roger Wattenhofer. Impatient online matching. In 29th International Symposium on Algorithms and Computation (ISAAC 2018), volume 123 of LIPIcs, pages 62:1–62:12, Dagstuhl, Germany, 2018. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ISAAC.2018.62.
[Meh13] Aranyak Mehta. Online matching and ad allocation. Foundations and Trends in Theoretical Computer Science, 8(4):265–368, 2013. doi:10.1561/0400000057.
[MN25] Nicole Megow and Lukas Nölke. Online metric matching on the line with recourse. Algorithmica, 87(6):813–841, 2025. Preliminary version in APPROX/RANDOM 2020. doi:10.1007/s00453-025-01299-8.
[MPRS25] Mathieu Mari, Michal Pawlowski, Runtian Ren, and Piotr Sankowski. Online matching with delays and stochastic arrival times. Theory of Computing Systems, 69(1):12, 2025. doi:10.1007/s00224-024-10207-6.
[MWW21] Darya Melnyk, Yuyi Wang, and Roger Wattenhofer. Online k-way matching with delays and the H-metric, 2021. arXiv:2109.06640.
[NR17] Krati Nayyar and Sharath Raghvendra. An input sensitive online algorithm for the metric bipartite matching problem. In 58th IEEE Annual Symposium on Foundations of Computer Science (FOCS 2017), pages 505–515. IEEE, 2017. doi:10.1109/FOCS.2017.53.
[PS23] Enoch Peserico and Michele Scquizzato. Matching on the line admits no -competitive algorithm. ACM Transactions on Algorithms, 19(3):28:1–28:4, 2023. doi:10.1145/3594873.
[Rag16] Sharath Raghvendra. A robust and optimal online algorithm for minimum metric bipartite matching. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques (APPROX/RANDOM 2016), volume 60 of LIPIcs, pages 18:1–18:16, Dagstuhl, Germany, 2016. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.APPROX-RANDOM.2016.18.
[Rag18] Sharath Raghvendra. Optimal analysis of an online algorithm for the bipartite matching problem on a line. In 34th International Symposium on Computational Geometry (SoCG 2018), volume 99 of LIPIcs, pages 67:1–67:14, Dagstuhl, Germany, 2018. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.SoCG.2018.67.
[RT81] Edward M. Reingold and Robert E. Tarjan. On a greedy heuristic for complete matching. SIAM Journal on Computing, 10(4):676–681, 1981. doi:10.1137/0210050.
[Tou23] Noam Touitou. Improved and deterministic online service with deadlines or delay. In Proceedings of the 55th Annual ACM Symposium on Theory of Computing (STOC 2023), pages 761–774, New York, NY, USA, 2023. ACM. doi:10.1145/3564246.3585107.
A Validity of the Algorithm
In this appendix, we prove Lemma 3.1. The proof is similar to the corresponding proofs for RM [Rag16] and VRM [Kuo25]. In particular, it uses the relaxed dual feasibility and matched-edge tightness conditions of [Rag16] and [Kuo25, Section 3.2.1, Invariants (I1) and (I4)].
Proof of Lemma 3.1. We prove by induction that has no negative cycle. Initially, has no cycle. When a request arrives, it is free and has no incoming edge. Similarly, a newly arrived server has no outgoing edge. Thus, newly arrived vertices cannot create a directed cycle.
Next, consider an augmentation and assume that there is no negative cycle before the augmentation. We first work with the state right before the augmentation. Let be the nonempty set of free servers. Every request has a directed edge to a server in , and every matched server has a directed edge to the request matched to it. Thus, every arrived vertex is in or has a directed path to . For each arrived vertex , let be its shortest distance to in . Because there is no negative cycle, this distance is finite and is attained by a simple path. Also, for every .
To show that the augmentation does not create a negative cycle, we assign a real-valued variable to each arrived vertex as follows:
Thus, for every edge rs at this state.
For any unmatched edge rs, the shortest-distance inequality gives
For any matched edge rs, the only outgoing edge of s is the directed edge from s to r, so . Thus,
Hence, Eq. (A.1) holds for every edge.
Let be the minimum augmenting path used in the augmentation. Because is a shortest path from its first vertex to in , every directed edge of from to satisfies , where is the weight of this edge in . A forward edge of is directed from to and has weight . Thus, it satisfies . These forward edges are exactly the edges that become matched in this augmentation.
After the augmentation, each request on is matched by the forward edge of that leaves . We decrease by , and all other variables remain unchanged. Because only request variables decrease, Eq. (A.1) continues to hold for every edge. Each newly matched edge had before this update, so it now has , and Eq. (A.2) holds for it. For an old matched edge that remains in the matching, neither endpoint is on , so Eq. (A.2) also continues to hold.
Consider any cycle in after the augmentation, and let and be the sets of unmatched and matched edges of , respectively. The weight of is . By Eq. (A.1) for the edges in and Eq. (A.2) for the edges in , we have
The last equality holds because unmatched and matched edges alternate along , so every vertex of is incident to exactly one edge in and exactly one edge in . Thus, has nonnegative weight, which completes the induction.