Manuscript Offprint
arXiv:2610.21285A General Framework for Matching with Delays
Abstract
We present a simple deterministic -competitive algorithm for the online minimum-cost perfect matching with delays (MPMD) problem on arbitrary, unknown metric spaces, where n is the (unknown) number of requests. This improves upon the recent -competitive algorithm of Dufay and Wattenhofer (SODA 2026) and nearly matches the randomized lower bound of Ashlagi et al. (APPROX 2017). Our algorithmic framework rests on two ingredients: an online moat-growing process that grows active dual variables at a deliberately slowed constant rate to control temporal asymmetry, and a delayed eligibility rule that matches requests in the same dual component only after their waiting time is proportional to their time-expanded distance. The framework extends naturally to arbitrary concave delay functions, maintaining an competitive ratio, and to k-way matching with delays, yielding an -competitive deterministic algorithm.
1 Introduction
In this paper we study the problem of min-cost perfect matching with delays (MPMD), introduced by Emek, Kutten, and Wattenhofer (2016). In this problem, requests arrive over time in a metric space. The algorithm may irrevocably match any two pending requests at any time, paying the metric distance between their locations together with the time each has waited since its arrival. Every request must eventually be matched, and the objective is to minimize the total connection and delay cost.
Delay in service is an important consideration in many online systems. However, postponing service can sometimes create opportunities to improve its quality or use resources more efficiently. This tradeoff arises naturally in matching problems, where requests are processed in pairs. For example, an online gaming platform seeks to pair players of similar skill to provide a balanced and engaging game. A ride-pooling service combines requests with compatible routes to reduce travel costs and passenger detours. A computational system groups jobs with similar processing requirements into batches to reduce wasted capacity. In each setting, a suitable partner may not be available when a request arrives, and waiting for future arrivals can improve the match. But this flexibility sets up a tradeoff: matching immediately can commit the system to poor choices, while waiting too long can erase the benefit of a better match. The algorithmic challenge is to manage this tradeoff without knowing which requests will arrive next.
Main contributions We study MPMD in the general setting when neither the metric space (which may be infinite) nor the number of requests (n) is known a priori: the algorithm learns only the locations of arriving requests and the distances between them. We develop a new framework that yields simple deterministic algorithms with nearly tight competitive ratios. The framework rests on two novel ideas: an online dual-growing process that grows dual variables at a deliberately reduced rate, and a delayed eligibility rule that allows requests to be matched only once they belong to the same dual component and satisfy a waiting time threshold. Together, these ideas yield a surprisingly simple algorithm: match eligible pairs as soon as possible, breaking ties arbitrarily.
For this unknown-metric setting, Bienkowski, Kraska, and Schmidt (2017) first gave an -competitive algorithm; this was later improved to by Bienkowski, Kraska, Liu, and Schmidt (2018) using the same primal-dual formulation that we use in this paper. Subsequently, Azar and Jacob Fanani (2020) reduced this factor to . In a recent breakthrough, Dufay and Wattenhofer (2026) obtained the first deterministic polylogarithmic competitive ratio of . We show:
Theorem 1.1 (Main result). There is a deterministic -competitive algorithm for min-cost perfect matching with delays on arbitrary metric spaces. The algorithm requires no advance knowledge of the metric space or the number of requests.
Our bound is nearly tight, as Ashlagi et al. (2017) showed that no algorithm, even randomized, can obtain a ratio better than against an oblivious adversary. As we will see, relative to the earlier primal-dual approach, a key difference in our work is that the dual grows at a slow constant rate below 1; this allows the primal–dual gap to be bounded by a constant.
Extensions The same approach extends with only minor changes to two natural variants. First, suppose that a request waiting for t units of time incurs cost , where is a known, increasing, unbounded concave function with . MPMD with concave delays has also been well studied in literature and Deryckere and Umboh (2023) gave an -competitive algorithm. Adjusting the dual growth and matching thresholds to the delay function , we show:
Theorem 1.2 (Concave delays). There is a deterministic -competitive algorithm for min-cost perfect matching with arbitrary concave delays on arbitrary metric spaces.
Our techniques also naturally extend to the k-way matching problem with delays, in which requests must be partitioned into groups of size exactly k. The problem was introduced by Melnyk, Wang, and Wattenhofer (2021) to model multiplayer online games. When the connection cost of a group is equal to the sum of all the pairwise costs inside it, and the delays are linear, we show:
Theorem 1.3 (k-way matching). There is a deterministic -competitive algorithm for min-cost k-way matching with delays on arbitrary metric spaces with sum group costs.
Thus, for every fixed k, the dependence on the number of requests remains logarithmic. Through a reduction to sum costs, we extend our framework to several other metrics on sets of size k, obtaining competitive ratios. These include diameter, MST cost, and the general class of H-metrics introduced by Melnyk, Wang, and Wattenhofer (2021) to model k-way connection costs. See Appendix C for these extensions.
A thought experiment Suppose we could run an offline moat-growing dual construction process of Goemans and Williamson (1995) in a “time-expanded” metric (defined in Section 2), and bound the MST cost of each resulting component by the total dual value accumulated within it. Running greedy matching separately within each final component would therefore yield a logarithmic approximation.
While tempting, there are a few problems with this approach. First, the component-wise MST bound does not hold: the MST of a component can cost much more than the dual value accumulated within it. Second, since the dual is grown online, matching decisions must be made while the dual is still evolving and before the final partition into components is known. It is not clear how to implement an (approximately) greedy matching within each eventual dual component.
The third obstacle is the most fundamental: online dual growth is inherently asymmetric in time. Consider, for example, two requests u and v, with v arriving after u. The dual associated with u begins growing earlier and can therefore pay a disproportionately large share of the cost of the edge . In the extreme case where the two requests occupy the same location in the underlying metric, the dual associated with u may already pay the entire time-expanded cost of when v arrives. This asymmetry can leave the online dual polynomially smaller than the optimal matching cost; we give an example in Appendix D.
Our approach Our central idea is to slow down the online dual growth. This controls temporal asymmetry and, together with a delayed matching rule, supports a direct charging argument that bypasses the problematic MST bound. In particular, it immediately limits the temporal imbalance in the example above. Suppose, for example, that each active dual grows at rate 1/2. By the time v arrives, the dual associated with u can then pay at most half the cost of , leaving room for both duals to grow simultaneously after v arrives. We show that for any fixed growth rate strictly in , the resulting dual value is within a constant factor of the primal optimum (Appendix D).
We combine slow dual growth with a delayed matching rule adapted from Azar and Jacob Fanani (2020); Dufay and Wattenhofer (2026). Two unmatched requests become eligible to be matched once they belong to the same dual component and the time elapsed since the earlier arrival is at least twice their distance in the time-expanded metric. The algorithm matches eligible pairs immediately, breaking ties arbitrarily. This delay gives nearby requests time to arrive and allows further dual growth to bring requests in different components together.
Although our resulting matching is not exactly greedy, it retains a key structural property: sufficiently old requests that remain unmatched within the same dual component must be pairwise separated at a distance proportional to their age. Our main technical step is to exploit this separation property and the slow dual growth to show that enough dual value has accumulated in the recent past to pay for these requests at the corresponding scale. This yields a direct charge of the number of sufficiently old unmatched requests, weighted by their age scale, to recent dual growth, circumventing the need to bound the MST cost of the entire component. This local charging property (Theorem 4.3) is the technical crux of our competitive ratio analysis.
Our eventual algorithm bears some similarity to the -competitive online primal–dual algorithm of Bienkowski, Kraska, Liu, and Schmidt (2018): both use moat growing to construct an online dual solution for the same LP formulation and match unmatched requests within the same dual component. However there are two crucial differences: (i) we slow dual growth to a rate of and (ii) we defer matching until sufficient time has elapsed, rather than matching requests as soon as they enter the same component. Together, these changes yield an exponential improvement in the competitive ratio, from to .
Notably, our approach does not extend directly to bipartite matching with delays, where requests have two types and only opposite types may be paired. We leave obtaining a logarithmic guarantee for online bipartite matching as an open question.
1.2 Related work
In the following, let N be the number of points in the underlying finite metric space.
Matching with linear delays Early work on MPMD focused on the case when the metric space is known to the algorithm. Emek, Kutten, and Wattenhofer (2016) introduced the MPMD problem and gave a randomized -competitive algorithm, where is the aspect ratio of the metric space; Azar, Chiplunkar, and Kaplan (2017) improved this to . Both of these algorithms use probabilistic tree embeddings to embed the metric space into an HST and are thus randomized. Since N can be much larger than n, or even unbounded, these results do not imply any bounds in terms of n. Ashlagi et al. (2017) proved an lower bound for randomized algorithms. Their construction uses requests, yielding the lower bound in terms of n stated above.
Bipartite matching The bipartite version of the problem has also been studied extensively. Ashlagi et al. (2017) first developed a randomized -competitive algorithm on known finite metrics and an randomized lower bound. The deterministic algorithms of Bienkowski, Kraska, Liu, and Schmidt (2018) and Azar and Jacob Fanani (2020) also apply to this variant with their respective guarantees. A competitive ratio polylogarithmic in n remains open.
Nonlinear and set-dependent delays Azar, Ren, and Vainstein (2021) gave randomized -competitive algorithms for concave delays in both the non-bipartite and bipartite settings. Deryckere and Umboh (2023) gave a deterministic -competitive algorithm for a common concave delay function without requiring advance knowledge of the metric; our concave-delay extension improves this dependence to . More general delay models have also been studied: Liu, Pan, Wang, and Wattenhofer (2018) considered convex delays, Deryckere and Umboh (2023) introduced delays depending on the set of pending requests, and Gan, Sun, and Umboh (2026) obtained further bounds for size-based and convex delays.
k-way matching Melnyk, Wang, and Wattenhofer (2021) introduced k-way matching with delays and the class of -metrics , obtaining a randomized bound. Kakimura and Nakayoshi (2025) gave a deterministic primal-dual algorithm with competitive ratio for -metrics, improving to when group costs are diameters on the line. Our extension gives for diameter costs in arbitrary metric spaces and also implies an -competitive algorithm for general -metrics.
Special cases Stronger guarantees are known for the above variants in several special cases. Emek, Shapiro, and Wang (2019) give an optimal deterministic 3-competitive algorithm for two-point metrics, while Azar, Chiplunkar, and Kaplan (2017) obtain a deterministic -competitive algorithm on tree metrics of height h. Liu, Pan, Wang, and Wattenhofer (2018) study the convex delay version over uniform metrics, obtaining an asymptotically optimal deterministic -competitive algorithm; more recently, Gan, Sun, and Umboh (2026) improved this to a constant factor competitive ratio for polynomial convex delays in the same uniform metric special case. For the bipartite variant on the line, Kuo (2025) gave a deterministic -competitive algorithm, where n is the number of requests on each side. Under independent Poisson arrival processes, Mari, Pawlowski, Ren, and Sankowski (2025) obtain constant competitiveness in expectation on arbitrary finite metrics.
1.3 Organization
Section 2 introduces the notation and LP formulation for min-cost matching with linear delays. We present our algorithm in Section 3 and analyze it in Section 4. Appendices B and C extend the algorithm and analysis to concave delay costs and k-way matchings, respectively. Table 1 in the appendix summarizes the notation used throughout the paper.
An H-metric is any symmetric, non-negative function that assigns a cost to k requests and satisfies certain monotonicity and generalized triangle inequality constraints.
2 Background
Let be a metric space. In the Minimum Cost Perfect Matching with (Linear) Delay (MPMD) problem, the input is a finite set of requests, where is even. A request arrives at a finite time and is located at . The algorithm knows neither nor the total number of requests in advance.
The goal of the algorithm is to produce a perfect matching in an online fashion. For any two requests and , an algorithm may irrevocably match them at any time . Given the set of requests matched by algorithm , where is the time when requests and are matched, its cost is defined as:
The competitive ratio of an algorithm is defined to be the worst case ratio (over all inputs) of the cost of the algorithm compared to the cost of an optimal offline algorithm that knows the entire input ahead of time.
Time-expanded pseudometric. We can augment the metric space by also adding time. For the set of requests, consider the space where
It can be easily checked that M is a pseudometric. We shall repeatedly use the properties
The time-expanded view is convenient since the optimal solution to the online metric matching with delays problem is exactly the minimum weight perfect matching with the distance d.
Lemma 2.1 (Lemma 1 of Dufay and Wattenhofer (2026), Bienkowski, Kraska, Liu, and Schmidt (2018), and Azar and Jacob Fanani (2020)). The cost of the optimal solution of MPMD equals the minimum weight of a perfect matching in M.
Linear programming formulation. The time-expanded view also motivates the following linear programming (LP) relaxation. For , let be the set of edges with exactly one endpoint in S. The odd-cut relaxation (P) and its dual (D) are
(P)
(D)
Lemma 2.1 and weak duality then yields:
Lemma 2.2. The optimal value of the dual (D) is a lower bound on OPT, the minimum weight of an offline perfect matching.
3 Algorithm for MPMD
The algorithm has two distinct parts. The first part is a classical ball-growing procedure in the time-expanded metric space that constructs a feasible dual solution online. This procedure naturally partitions the requests into connected components defined by tight edge constraints of the dual. The second part of the algorithm then utilizes this component structure to determine which pairs of requests to match at each time. By Lemma 2.2, the dual solution from the first part provides a lower bound on OPT.
Slow dual growth Let be a fixed constant . At any time, the algorithm maintains a partition of all requests that have arrived until that time into active components. Formally, it maintains a mapping that assigns each arrived request to its active component. An active component is called growing when its cardinality is odd and frozen when its cardinality is even. Each growing active component is associated with a corresponding dual variable . Let denote the value of the dual variable at time .
When a new request arrives at time , the singleton becomes an active growing component and the corresponding dual variable is initialized to zero, i.e., . The dual variables associated with each growing active component increase at a constant rate . The dual variables increase until an edge , with and belonging to different active components, becomes tight, i.e., ; at that time, the two active components are merged. Formally, let and denote the active components containing and just before time . Then we add as a new active component and the old components and now become inactive. If multiple edges become tight at the same time, they are processed in arbitrary order. If the two end points of a tight edge are in the same active component when it is being processed, the edge gets skipped. For convenience, we define to be the active component containing the request at time . Note that is unique except at finitely many merge times.
We note that the dual solution constructed via this process is feasible since once a dual constraint becomes tight for some edge and the two endpoints merge into a single active component, we do not increase the dual variable for any set such that . We further emphasize that the above dual growth procedure is only used to construct a feasible dual solution online and no actual matching decisions have been taken yet.
We formally define the following quantities that are useful for analysis. For uniformity of notation, we define whenever is even or has not been a growing active component by time . For any time ,
Thus, is the total load on edge at time , reach is the total dual value accumulated around , and DUAL is the total dual accumulated up to time . Note that in all three definitions, the sums include dual variables of components that are no longer active; such variables keep their values after their components merge. For convenience, for , we also define , and DUAL . We also use DUAL := DUAL( ) to be the value of the dual at the end of the algorithm.
We note that the above dual growth process depends only on the request arrivals and the growth rate , and is completely independent of the matching decisions. In Section 4, we bound
For simplicity of exposition, we will not attempt to optimize the constants.
Algorithm 1 Slow Dual Growth Process
Fix a growth rate . Initially, there are no active components.
while time advances continuously do
Every growing (i.e., odd) active component increases its dual variable at rate .
Frozen (i.e., even) active components do not grow.
if request arrives then
Create the singleton active component and set to zero.
end if
if requests in distinct active components become tight:
then
Merge the respective active components into a single new active component.
The two old components become inactive and their dual variables remain fixed thereafter.
end if
end while
the matching algorithm’s cost by and use weak duality to establish competitiveness. For such a charging argument to succeed, the online dual objective must itself be comparable to OPT. In Appendix D, we show that slowing down the dual growth is both necessary and sufficient for this property. If odd components grow at rate 1, then we can have , whereas for any , the online dual satisfies .
Delayed best-effort matching For every pair of requests define the maturation time as follows:
We say that the request pair matures at time . We first observe that the maturation time is necessarily after both the requests have arrived. Indeed, suppose without loss of generality that , then .
The algorithm arbitrarily matches pairs of requests that have reached their maturation time and are in the same dual component. Formally, at any time during the course of the algorithm, the algorithm matches requests and whenever , and , and and are both unmatched. Ties are broken arbitrarily in case multiple request pairs become eligible at the same time.
We formalize the slow dual growth process in Algorithm 1 and the delayed best-effort matching construction in Algorithm 2.
Time and event convention We assume throughout the algorithm that time is continuous. The algorithm experiences finitely many events where it potentially needs to take action. There are three kinds of events: (i) the arrival times of the requests, (ii) times when a dual constraint becomes tight for some edge, and (iii) the maturation times of pairs of unmatched requests. During any time between events, the algorithm simply increases the dual of each growing active component at rate . At event times, in case of ties we adopt the convention that newly arriving requests are processed first, followed by processing any tight edges (breaking ties among edges arbitrarily), and finally by matching matured request pairs (again breaking ties among pairs arbitrarily).
Algorithm 2 Delayed Best-Effort Matching
For every pair of requests, define its maturation time by
while time advances continuously do
If and are unmatched at , , and , match to .
If several pairs become eligible at the same time , choose among them arbitrarily and continue matching eligible pairs until none remain.
end while
4 Competitive ratio analysis
We first establish some simple observations that follow directly from the definition of the dual growth process.
4.1 Structural properties
Let be the family of sets that have occurred as active components by time . We call components in historical components. Whenever a tight edge triggers a merge of two active components, we call a merge edge. Let be the graph consisting of all merge edges added by time . For , let denote the subgraph of induced by . Let denote the set of requests that are unmatched at time .
The following proposition lists some observations that follow directly from the definition of the dual growth process and the matching algorithm. We defer the proof to Appendix A for clarity.
Proposition 4.1. Let t be an arbitrary time during the execution of the algorithm and u be an arbitrary request that has arrived before time t. Then we have the following:
-
(Laminarity) The family is laminar, i.e., for any two distinct sets , we have . The members of that contain u form a chain.
-
(Merge Trees) For every historical component , is a tree.
-
(Dual Feasibility) The set of dual variables forms a feasible solution to the dual .
-
(Parity) For every active component A at any time t, we have
- (Termination) The algorithm terminates and always returns a perfect matching.
For any request , let be the time at which gets matched by the algorithm. Let be the total delay cost incurred by the algorithm.
Lemma 4.2. The total cost of the algorithm satisfies .
Proof. Let denote the matches made by the algorithm along with the time. Let be the contribution of to DELAY. Thus we have
and . From (4), we have . So,
Therefore, the total cost incurred by the algorithm for this pair is
The lemma follows by summing over all pairs.
4.2 From local dual charging to a global competitive ratio
We will now identify a local charging property of the algorithm’s delay cost against the accumulating dual that enables a bound on the final competitive ratio.
Recall that is the total value of the dual accumulated by time . For any request and time , let be the amount of time has spent (either matched or unmatched) in the system by time . The local charging theorem claims that at any time and age , the total number of unmatched nodes of age is bounded by the growth in the dual objective in the previous time interval. This is formalized as follows.
Theorem 4.3. For every and , let be the set of nodes that are unmatched at time and have age in . Then
We prove Theorem 4.3 in Section 4.3. Here we will show that it leads to a competitive ratio logarithmic in the number of requests.
Let wait(u) = be the total delay incurred by request u. The following simple corollary of Theorem 4.3 shows that each request incurs only bounded delay.
Corollary 4.4. For any request , wait( . Consequently, for any time , and for any , we have .
Proof. Consider any time when the request is unmatched by the algorithm. Then, applying Theorem 4.3 with yields the following:
The proof follows by considering t that approaches .
Lemma 4.5. For every ,
Proof. Let denote the time when the dual growth procedure terminates and thus after which no dual variable changes. Fix , so that we have . Since for , applying a change of variables and telescoping yields
We now prove our main result: a logarithmic bound on the competitive ratio of Algorithm 2.
Theorem 4.6. The Delayed Best-Effort Matching Algorithm (Algorithm 2) achieves a competitive ratio of .
Proof. Consider an arbitrary request and any time such that is unmatched at time . We observe that this request belongs to the set exactly for , and hence
Integrating (5) over all time t,
Summing over all requests u, then gives us an expression for the total delay.
where the change of the order of integration holds since the integrand is always non-negative. We split the outer integral to deal with very small values of separately; let be a fixed age threshold.
We now bound these two terms in (6) separately. Focusing on the first term, note that . For a fixed vertex and fixed age scale , for at most time, and hence . The first term hence becomes
For the second term in (6), Corollary 4.4 implies for all DUAL, and hence
(by Theorem 4.3)
(by Lemma 4.5)
Setting in (6), (7), and (8) yields . Applying Lemma 4.2 and weak duality, we obtain OPT, completing the proof.
4.3 Local dual charging
We will now prove the local charging argument, Theorem 4.3. This charging forms the technical crux of the competitive analysis. At a high level, we decompose each active component into old versus recent (a.k.a. fresh) arrivals and show that each active component contains enough recent dual to pay for its unmatched requests.
4.3.1 Properties of the slow dual growth process
Fix a time and an age scale ; recall that is the set of unmatched requests at time that have age in . We call a vertex old if , and fresh otherwise. Note that every vertex in is fresh. Our goal is to prove the following per-component charging statement. Theorem 4.3 then follows by summing over all the active components.
Lemma 4.7. For every active component at time , there is a family of historical components such that
Moreover, for every .
The following three simple lemmas are a direct consequence of the slow dual growth process and form the foundations of our proof. Lemma 4.8 upper bounds the total dual growth that sets containing a single request can accumulate. Lemma 4.9 formalizes the intuition that an edge becomes tight only after significant time has passed after the arrival of both its endpoints. Finally, Lemma 4.10 states that if a dual component contains two unmatched requests, then they must be pairwise separated by a factor proportional to their age.
Lemma 4.8. For any request u and time ,
Proof. Request u belongs to a single active component S at any time in the interval . During this time interval, the dual variable grows at rate at most . The proof follows.
Lemma 4.9. Let be a merge edge with , and let be the time at which is added to the merge forest. Then we have
Proof. Before arrives at time , no dual components containing have been created. Therefore, the load on at time is , by Lemma 4.8. After time , there is a remaining load of at least on the edge to be covered. At most one dual component containing and at most one containing grow and load , contributing a total rate of ; hence, . The proof follows.
Lemma 4.10. Let be distinct requests in the same active component at time . Then
Proof. Since and are both unmatched, we must have . The proof then follows from the definition of .

Figure 1: Old and fresh nodes, and the merge tree , of a component at time . Vertices with arrival times in the window that are matched by time are depicted in green; the remaining vertices belong to the set . The thick red edges depict a fresh component and the purple nodes depict the vertex set .
4.3.2 Associating duals with fresh components
We first focus on the case when either the active component contains at least one old vertex, or ; the remaining case of containing only fresh vertices and will be handled separately. Consider an active component at time . From its merge tree , remove every old vertex together with all incident edges. We call each connected component of the remaining forest a fresh component; see Figure 1. For any fresh component , let be the set of unmatched requests in with age in and let be its cardinality, i.e.,
We only consider fresh components A for which ; components with require no charge. Finally, for any tree T whose vertices are requests, define its length as
With a slight abuse of notation, let be the subtree of the merge forest that is induced by component . We first show that there exists a witness tree such that total length of all edges in is at least .
Definition 4.11 (Witness Tree). Root the tree at an arbitrary old vertex if one exists, otherwise root it arbitrarily. For any fresh component , let be the unique vertex in whose parent is old; if there are no such vertices, let be an arbitrary vertex in . We define the witness tree for fresh component to be the minimal subtree of that spans all of .
The key observation here is that Lemma 4.10 enforces the constraint that every pair of requests in is at distance greater than from each other. We prove the following simple lemma that shows that a set of vertices that are pairwise separated from each other forces a spanning tree covering those vertices to have a large total length.
Lemma 4.12. Let and be a set of vertices such that , . Let be any tree containing . Then
Proof. An Euler tour of the multigraph obtained by doubling each edge of traverses each edge exactly twice and so has length . The tour visits the terminal vertices in some cyclic order and hence can be decomposed into consecutive walk segments. Without loss of generality, suppose the Euler tour visits before for . Then, we have
where the summation uses the convention that .
Lemma 4.12 suffices to prove that for any fresh component with , has size , since we know by Lemma 4.10 that each of the unmatched vertices are pairwise distance away from each other. But the lemma cannot be applied directly for fresh components with . To deal effectively with such components, we show in Lemma 4.13 that the vertex chosen in Definition 4.11 must be sufficiently old and hence serve as the second terminal so that Lemma 4.12 may be applied.
Lemma 4.13. Let be a merge edge with , and let be the time at which becomes tight. Then, for every ,
In particular, for , if is old and is fresh, then , and .
Proof. Since , Lemma 4.9 gives
Hence, . Rearranging gives the claim.
We can then combine Lemmas 4.12 and 4.13 to obtain the following lower bound on the length of the witness tree.
Lemma 4.14. Assume that either contains at least one old vertex, or . For any fresh component with , the witness tree satisfies .
Proof. Suppose first that contains at least one old vertex. Then for each fresh component , there exists a request that is adjacent to an old request. By Lemma 4.13, we have and hence for each . Thus we have a set of vertices that are pairwise distance away from each other (Lemma 4.10). Applying Lemma 4.12 then shows that , which is stronger than what we require.
On the other hand, suppose has no old vertex. In this case, contains a single fresh component with . So we apply Lemma 4.12 directly to obtain .
We know that, by definition, any edge in the merge forest is tight, i.e., . So one may hope that simply summing over all edges should yield a total dual value of . However, this argument fails since the same set can cross many different edges of the tree and thus we may end up overcharging the same dual variable.
To salvage this approach, we observe the following. First, if we are merely trying to recover the cost of a path, we can recover half this cost from the duals crossing its edges, because any historical component S can cross the path at most twice. We formalize this in Lemma 4.15 below.
Second, if two paths share a vertex , any historical component crossing both must also contain . Excluding components containing from the charge for one of the paths prevents double counting across the two paths. We therefore decompose the tree into at most edge-disjoint paths; see Figure 2. We formalize this decomposition in Lemma 4.16. We then assign each path a family of historical components so that the families are pairwise disjoint and their total dual value is . Every historical component contributing to this bound contains a fresh vertex and hence satisfies .
Lemma 4.15. Let be an arbitrary time step. Let be a path of the merge forest and . We say a set crosses path if . Then
Proof. An edge is added to the merge forest exactly when its associated dual constraint becomes tight and the dual variables of sets that cross the edge do not change thereafter, i.e., , . Summing over all edges in the path then gives
where denotes the set of edges of that have exactly one endpoint in . Since any historical component with forms a connected subset of , we have and the lemma follows by rearranging.
Lemma 4.16. There exist edge-disjoint paths that cover , with . Further we can associate a set family with each path such that
-
are pairwise disjoint,
-
, we have ,
-
where .
Proof. Consider any fixed fresh component . Since is chosen to be the minimal subtree of that spans all of , all leaves of (except possibly ) are nodes in . We root at and thus the number of non-root leaves is at most .
Let be the (non-root) leaf nodes of . We associate a path with each leaf via the following iterative procedure: Initialize . For each leaf in order, let be the maximal path starting from such that all its interior vertices are of degree two and are not the root vertex.
Let be the other endpoint of ; we call as the anchor of path . Note that either has degree at least three, or is the root. The tree is then modified by deleting all edges from . Note that by construction, we have that the paths are edge-disjoint and together cover the entire tree . Further since each path begins at a unique non-root leaf node. See Figure 2 for an example.
For each , we define a family of sets as follows:
By construction, for any , the path can share at most the single anchor node with . Since each is connected in and none of the sets in contains by definition, we must have that the families and are disjoint. Also, by construction, the node is chosen to be the root and hence cannot be in the interior of any path . Thus for any , either or , and in either case cannot be included in any set in .
Consider any family . We now show that . The lemma then follows by summing over all the families. Since contains all sets that cross path except those that contain , we have:
where the last inequality uses Lemma 4.15. Suppose is the leaf node forming the other endpoint of . To bound the last term, note that Lemma 4.8 gives reach( . If , then and substituting above yields the claim. Suppose otherwise, then
where the last step used the triangle inequality. Substituting into (9) yields the claim.
Combining Lemmas 4.14 and 4.16 suffices to show that the total dual is at least for any fresh component . To complete the proof, we still need to argue that two different fresh components (within the active component ) do not charge to the same dual variable. Once again we use the fact that historical components correspond to connected subtrees of . Our choice of in Definition 4.11 implies that any historical dual component that intersects two different fresh components and must contain either or . We therefore have the following.
Lemma 4.17. For distinct fresh components A and , .
Proof. Suppose for contradiction that there exists a set . Since crosses a path in the witness tree , contains at least one vertex . Similarly, contains at least one vertex . By Proposition 4.1, is connected and hence contains all vertices on the path joining and . However, by construction, such a path must contain at least one of or . In either case, that contradicts Lemma 4.16, part(ii).
We now handle the remaining corner case. Suppose contains no old vertices and . The following baseline bound then immediately gives the desired result. Since contains no old vertices, all sets satisfy since none of these sets could have existed as active components before .

Figure 2: Rooted decomposition of the fresh component A from Figure 1. The solid edges (red, green, and black) form the fresh component, and the dashed edges show its connections to old nodes. The witness tree spanning is depicted with bold edges. This is decomposed into two paths—the red path and the green path .
Lemma 4.18. Let and let be its active component at time . Then
Proof. Let denote the chain of active components containing request since its arrival until time . If all of these components are odd (except possibly at event times that are of zero measure), then since odd active components grow at rate , we have as desired.
Suppose belongs to an even component for a non-trivial interval of time and let be the last time when was in an even component, say . Then by Proposition 4.1, must contain another unmatched request . Applying Lemma 4.10, we have . Consider the path joining requests and in the merge tree . Applying Lemma 4.15 and the triangle inequality, we get
After time , the component containing u is always odd and so the total dual value of components containing u increases by . Adding these two contributions together,
where the second inequality uses .
We now use these to complete the proof of the per-component charging lemma.
Proof of Lemma 4.7. First, let us suppose that contains no old vertices and thus we have a single fresh component . If , then the lemma follows directly from Lemma 4.18. If , then the lemma follows from Lemma 4.16.
Now, suppose contains an old vertex. Since the sets partition , we have . By Lemma 4.17, the families are disjoint, so defining and summing over Lemma 4.16 then gives
Moreover since each contains a fresh vertex, it satisfies .
AI methodology. All core algorithmic and technical ideas in this paper — including the slowed dual growth process, the delayed matching rule, and the local dual charging analysis — were developed entirely by the human authors. We used GPT 5.6 Sol, Claude Opus 5, and Gemini 3.1 Pro to extend the framework to concave delay functions and k-way matchings, as well as to assist with proofreading, exposition and presentation improvements, and independent verification of the technical proofs across the manuscript. The authors have thoroughly verified the correctness and originality of all content, including all mathematical claims and bibliographic references, and take full responsibility for the submission.
References
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 APPROX/RANDOM, 2017.
Yossi Azar and Amit Jacob Fanani. Deterministic min-cost matching with delays. ToCS, 64(4):572–592, 2020.
Yossi Azar, Ashish Chiplunkar, and Haim Kaplan. Polylogarithmic bounds on the competitiveness of min-cost perfect matching with delays. In SODA, pages 1051–1061, 2017.
Yossi Azar, Runtian Ren, and Danny Vainstein. The min-cost matching with concave delays problem. In SODA, pages 301–320, 2021.
Marcin Bienkowski, Artur Kraska, and Paweł Schmidt. A match in time saves nine: Deterministic online matching with delays. In WAOA, pages 132–146, 2017.
Marcin Bienkowski, Artur Kraska, Hsiang-Hsuan Liu, and Paweł Schmidt. A primal-dual online deterministic algorithm for matching with delays. In WAOA, pages 51–68, 2018.
Lindsey Deryckere and Seeun William Umboh. Online matching with set and concave delays. In APPROX/RANDOM, pages 17:1–17:17, 2023.
Marc Dufay and Roger Wattenhofer. A deterministic polylogarithmic competitive algorithm for matching with delays. In SODA, pages 3936–3964, 2026.
Yuval Emek, Shay Kutten, and Roger Wattenhofer. Online matching: haste makes waste! In STOC, pages 333–344, 2016.
Yuval Emek, Yaacov Shapiro, and Yuyi Wang. Minimum cost perfect matching with delays for two sources. Theoretical Computer Science, 754:122–129, 2019.
Junhao Gan, Xiao Sun, and Seeun William Umboh. Online matching with size-based and convex delays. In APPROX/RANDOM, pages 25:1–25:23, 2026.
Michel X. Goemans and David P. Williamson. A general approximation technique for constrained forest problems. SICOMP, 24(2):296–317, 1995.
Naonori Kakimura and Tomohiro Nakayoshi. Deterministic primal-dual algorithms for online k-way matching with delays. TCS, 1026:114988, 2025.
Tung-Wei Kuo. Online deterministic minimum cost bipartite matching with delays on a line. ToCS, 69(3):28, 2025.
Xingwu Liu, Zhida Pan, Yuyi Wang, and Roger Wattenhofer. Impatient online matching. In ISAAC, pages 62:1–62:12, 2018.
Mathieu Mari, Michał Pawlowski, Runtian Ren, and Piotr Sankowski. Online matching with delays and stochastic arrival times. ToCS, 69(1):12, 2025.
Darya Melnyk, Yuyi Wang, and Roger Wattenhofer. Online k-way matching with delays and the H-metric, 2021. arXiv:2109.06640.
Table 1: Table of Notations.
| Notation | Description |
|---|---|
| Problem & Metric Space | |
| Underlying metric space with point set and metric | |
| Set of requests (, is even) | |
| Arrival time of request () | |
| Spatial location of request in | |
| Time-expanded pseudometric space over requests | |
| Time-expanded distance: | |
| OPT | Optimal offline MPMD cost |
| cost() | Total cost of algorithm |
| Dual Growth & Linear Program | |
| Cut of ; edges with exactly one endpoint in | |
| Primal LP variable for edge | |
| Dual variable for odd set (at time ) | |
| Dual growth rate constant () | |
| Load on edge at time : | |
| reach | Dual accumulated around request by time : |
| DUAL | Dual objective at time , and final dual value |
| Algorithm State & Matching | |
| Active component containing request at time | |
| Maturation time of pair | |
| Laminar family of historical active components up to time | |
| Forest of merge edges added by time , and subgraph induced by | |
| Event time when merge edge becomes tight | |
| Set of requests that remain unmatched at time | |
| Time at which request is matched | |
| wait | Delay incurred by request : |
| DELAY | Total delay cost: |
| Local Charging Analysis | |
| age | Age of request at time : |
| Age scale parameter () | |
| Unmatched requests at time with age in | |
| Fresh component of active component | |
| Set and its cardinality | |
| len | Sum of edge lengths in subtree : |
| Fresh boundary vertex of adjacent to an old component | |
| Minimal subtree of spanning | |
| Edge-disjoint path in with anchor and terminal | |
| Family of sets crossing avoiding , and | |
A Proofs from Section 4
Proposition 4.1. Let t be an arbitrary time during the execution of the algorithm and u be an arbitrary request that has arrived before time t. Then we have the following:
-
(Laminarity) The family is laminar, i.e., for any two distinct sets , we have . The members of that contain u form a chain.
-
(Merge Trees) For every historical component , is a tree.
-
(Dual Feasibility) The set of dual variables forms a feasible solution to the dual .
-
(Parity) For every active component A at any time t, we have
- (Termination) The algorithm terminates and always returns a perfect matching.
Proof. We establish the five properties in order.
-
(Laminarity) At any time, the family of currently active components is pairwise disjoint. A new active component is formed either as a singleton when a request arrives, or as the union of two disjoint active components and that immediately become inactive. By induction on the sequence of events up to time , any two sets are either disjoint or one is a subset of the other. Consequently, the members of that contain are pairwise comparable under set inclusion and therefore form a chain.
-
(Merge Trees) We proceed by induction on the creation of historical components. When a request arrives, consists of a single vertex and no edges, which is a tree. When two distinct active components and merge at time via a tight edge with and , the edge joins the two vertex-disjoint trees and , so is a tree. Moreover, because merge edges are only added between vertices in distinct active components, no edge with both endpoints in is ever added after is formed. Thus remains a tree.
-
(Dual Feasibility) By definition, for all and whenever is even. Consider any edge with . For , we have . For , since has not yet arrived, only active components containing can cross . Because belongs to a single active component at any time and its dual variable grows at rate at most , we have
After time , the load increases continuously only while and lie in distinct active components. Once (or earlier if and merge via other tight edges), and belong to the same active component, after which no active component satisfies and remains fixed thereafter. Hence for all .
- (Parity) The congruence holds whenever a singleton component is created upon the arrival of . Merging two active components and preserves the congruence since
and matching a pair of requests in A removes exactly two requests from , which also preserves parity.
- (Termination) After all requests have arrived, any odd active component continues growing its dual variable at rate . Since is even, the number of odd active components is always even, so an odd active component cannot occur alone. Thus, as long as an odd active component exists, a dual constraint between distinct active components eventually becomes tight and triggers a merge. Since at most merges can occur, eventually every active component has even size and dual growth terminates. The parity invariant then implies that any active component containing unmatched requests must contain at least two of them. Since all maturation times are finite, the algorithm continues matching eligible pairs until no unmatched requests remain.
B Metric matching with concave delays
In this section we show that our algorithm and analysis naturally extend to the more general setting where the delay experienced by any request is specified by an arbitrary concave function.
B.1 Background
Let be a continuous, increasing, unbounded, and concave function with that represents the delay incurred. Let be its inverse (which is guaranteed to exist). We also assume for simplicity that the derivative always exists, although this assumption is not strictly necessary. We use the notation and problem set up as in Section 2, except that if requests and are matched at time , the algorithm incurs a cost of .
The time-expanded metric with concave delays is defined as follows. Let where
is a valid (pseudo)metric. Indeed, consider any three requests . Since is concave, we have . Hence it follows that .
Since the optimal offline solution for metric matching with concave delays continues to be the optimal minimum weight perfect matching in the metric , the LP formulation in Section 2 holds (by replacing d with ).
Both the concavity and unboundedness assumptions are necessary to achieve a sublinear competitive ratio. Liu, Pan, Wang, and Wattenhofer (2018) show a linear lower bound on the competitive ratio of every deterministic algorithm for convex delay functions, even when the underlying metric is uniform. For unboundedness, note that if the delay function is bounded by B and the algorithm receives two vertices at distance kB, then the algorithm must eventually match these vertices at some finite point of time, incurring a cost of at least kB. But the adversary can then generate a new request at each location, achieving an optimal cost of at most 2B. Therefore, the competitive ratio of any algorithm is unbounded.
B.2 Algorithm
The algorithm is almost identical to that described in Section 3 for linear delays. We only describe the differences here. The algorithm design continues to have the two distinct parts of slow dual growth and a delayed matching.
Slow dual growth Unlike in the linear delays case, each request in the growing, active component incurs delay at a different rate in the concave delays case. In particular, since the delay function is concave, old requests accrue delay at a slower rate than newer requests.
We maintain the same slowed dual growing procedure as in the linear case and increase the dual variables of active components with an odd number of requests. For any odd component , the dual variable increases at rate times the rate of delay incurred by the oldest request in . Formally, suppose an odd component remains active over the time interval , then its dual increases by where is the arrival time of the oldest request in set .
Delayed best-effort matching We modify the maturation time of a request pair to
The matching rule is otherwise unchanged, so the algorithm matches any pair of requests u, v that both belong to the same dual component and have passed their maturation time.
B.3 Analysis
The analysis for general concave delays closely mirrors that for the linear case. We show that the local dual charging theorem continues to hold with replacing in the bound on . The modified local dual charging then lends itself to a global competitive ratio bound in a similar fashion by scaling the integral with the rate of dual growth. Since a large part of the analysis carries over from the linear case, we primarily highlight just the differences below.
The terms , reach , DUAL are defined exactly as in the linear case. Since the structure of both the dual growth and matching remain similar, Proposition 4.1 continues to hold in the concave case. The following are the analogues of Lemmas 4.8 and 4.10 and are useful to bound the dual contribution of any single request and the distance between any pair of unmatched requests respectively.
Lemma B.1. For any request u and time ,
Proof. At any time , the request belongs to a single active component . If the active component is even, then the does not increase at all. On the other hand, if is odd, grows at rate where is the earliest request in . Integrating, reach.
Lemma B.2. Let be distinct requests in the same active component at time . Then
Proof. Suppose for contradiction that . Rearranging gives . Thus at time , the pair belongs to the same active component and thus is eligible for matching. But this contradicts that are unmatched at time .
For any request , let be the time at which gets matched by the algorithm. Let be the total delay cost incurred by the algorithm.
Lemma B.3. The total cost of the algorithm satisfies .
Proof. Suppose requests , are matched by the algorithm at time and without loss of generality suppose that . Let be the contribution of this pair to . We have . So,
where the second inequality used the concavity of . Therefore, the total cost incurred by the algorithm for this pair is
The proof follows by summing over all pairs.
☐
B.3.1 Local dual charging
We now show that the following analogue of the local dual charging theorem holds even for concave delays. The rest of the section is dedicated to the proof of the following.
Theorem B.4. For every and , let be the set of nodes that are unmatched at time and have age in . Then
Fix a time and an age scale , and an active component at time . Our goal is to show the following analogue of Lemma 4.7: There exists a set of historical components such that . Further for all . Theorem B.4 then follows by summing over all active components. Henceforth, we focus our attention on a single active component .
The slight degradation in the constant factor (32 to 34) arises from a weaker baseline payment. The following handles the corner case when C has no request that is older than 3r and has a single vertex in .
Lemma B.5. Let and be its active component at time . Then
Proof. Let denote the chain of active components containing since its arrival time until time . Let be the last time that was in an even component. Assume that if there is no such time.
After time , since is always in some odd component, the dual of the corresponding component grows. Let denote the oldest request in . Now at any time , the dual variable of the component containing at time grows at rate at least . Thus, overall, the dual increases by at least .
If , then at time , we have another unmatched vertex , with (Lemma B.2), so the path bound (Lemma 4.15) gives a dual of at least .
Combining, we get a total dual of . It remains to upper bound the last term, . We have (Lemma 4.15). Substituting and rearranging gives as desired.
The proof of the local charging theorem for the other cases (when contains at least one old request, or if ) is essentially identical to the linear case. We provide a proof of one lemma that needs a slight modification and a proof sketch for the rest of the argument. The following lemma shows that even with concave delays, for any merge edge , the ages of the two endpoints remain close to each other.
Lemma B.6. If is a merge edge with that is merged at time , for any ,
Proof. At time , we have (Lemma B.1). At any time , the load increases at rate at most . So by time , each endpoint contributes at most load. Since the edge becomes tight at time , we get
But note that since is concave and non-decreasing, for any and , we have . Substituting above, we get . Rearranging gives the claim.
We now prove the per-component local charging bound for general concave delay functions.
Lemma B.7. For every active component at time , there is a family of historical components such that
Moreover, for every .
Proof Sketch. First, let us suppose that contains no old vertices and thus we have a single fresh component . If , then the proof follows directly from Lemma B.5.
In the other cases, Lemma B.6 and Lemma B.2 imply that we can find a witness tree such that the pairwise distance between any pair of terminals is at least , yielding . We can then perform the rooted decomposition as in Lemma 4.16. For each path with endpoints and , Lemma B.1 and concavity yield reach( . Hence,
As in Lemma 4.17, the charge families are disjoint, and every charged dual variable vanishes at time . Summing over the fresh components then completes the proof.
B.3.2 Local to global
Finally, we show that integrating the local dual charging theorem over both the age scales and time give the desired logarithmic bound on the competitive ratio. We note that Lemma 4.5 holds in this setting with no change. Let be the time when request is matched by the algorithm and let be the delay incurred by request . The following gives an upper bound on the age of any request during the course of the algorithm.
Corollary B.8. For any request , . Consequently, for any time , and for any , we have .
Proof. Consider any time when the request is unmatched by the algorithm. Then, applying Theorem B.4 with yields the following:
The proof follows by considering t that approaches .
Theorem B.9. The Delayed Best-Effort Matching Algorithm (Section B.2) achieves a competitive ratio of for min-cost perfect matching with concave delays.
Proof. Consider an arbitrary request and any time such that is unmatched at time and . We observe that this request belongs to the set exactly for , and hence
where the inequality follows from concavity of . Integrating (10) over all time t,
Summing over all requests u then gives us an upper bound on the total delay:
where the change of the order of integration holds since the integrand is non-negative. We split the outer integral to deal with very small values of separately; let be a fixed age threshold.
We now bound these two terms separately. For a fixed request and fixed age scale , for at most time, and hence . The first term therefore satisfies
For the second term, Corollary B.8 implies for all . Thus, applying Theorem B.4 and Lemma 4.5,
(13)
Setting in (11), (12), and (13) yields
Applying Lemma B.3 and weak duality, we obtain
completing the proof.
C k-way matchings
In this section, we consider the k-way matching with delays problem and show that our algorithm and analysis naturally extends to this setting with only minor modifications.
C.1 Background
Motivated by applications to online multiplayer gaming, the k-way matching with delays problem seeks to partition requests into groups of size k while minimizing their total delay and the connection cost of each group.
Defining the cost of a group of requests involves extending the concept of a metric space to give distances to subsets of elements (rather than just pairwise distances). Melnyk, Wang, and Wattenhofer (2021) introduce the notion of -metrics, formally defined in Section C.5.2, and give an -competitive algorithm, where is the number of points in the metric space. Informally, an -metric is defined by a ground set of elements and a function that satisfies a generalization of the triangle inequality. Kakimura and Nakayoshi (2025) give a primal-dual algorithm with competitive ratio , where is the number of requests, without requiring knowledge of the metric space in advance.
We take a slightly different approach and instead study k-way matching with delays when the underlying requests are embedded in a typical pairwise metric space . Fix an integer , known to the algorithm, and assume that the total number of requests is finite and divisible by . As before, neither nor the metric space needs to be known in advance. A request arrives at location at time . The algorithm can irrevocably group any unmatched requests at any time after all requests in the group have arrived. For a group , let
where the sum is over unordered pairs of distinct requests. Forming G at time t incurs cost
For k = 2, this is exactly the MPMD objective from Section 2.
Our main result is an -competitive algorithm for this sum objective. In Section C.5, we extend this result to the diameter, H-metric, and minimum spanning tree objectives. More generally, our algorithm and analysis immediately extend to any group connection cost that is sandwiched by the sum of pairwise distances: if for all groups G of size k, then our algorithm yields an -competitive guarantee. All of these results use linear delay costs and require no advance knowledge of the underlying metric space.
C.2 Linear program
For a group G of k requests, write
This is the minimum delay cost of forming G. Let V be the set of all requests. As in the pairwise relaxation, we impose cut constraints; here, the relevant sets are those whose cardinalities are not divisible by k. Every partition of V into k-element groups contains a group crossing each such set. Hence the following is a relaxation of the offline problem:
Its dual is
By weak duality, every feasible solution to lower bounds the offline optimum.
C.3 Algorithm
The algorithm follows the framework of Section 3. An active component is growing when and frozen otherwise, and each growing component increases its dual variable at rate . For technical reasons, we use instead of here. Matching decisions involve requests rather than two. To account for the sum objective, we use the auxiliary time-expanded distance
in both the dual process and the maturation rule. This is the usual time-expanded distance for the spatial metric ; arrival times and delay costs are unchanged. Importantly, the dual growth continues to be restricted by the pairwise constraints. Specifically, for every , the dual growth process enforces
As we show below, the factor in the auxiliary time-expanded metric ensures that satisfying the pairwise constraints implies the group constraints for sum costs. Whenever a pair in distinct active components becomes tight, we merge those components and add the tight edge to the merge forest. Historical dual variables retain their values after a merge. Matched requests remain in their components; only their unmatched status changes. We set for every set with and every set that has not been a growing active component.
For each group G of k requests, define
The algorithm forms a group whenever all its requests are unmatched, lie in the same active component, and . Notice that , so maturation cannot precede the arrival of any request in .
C.4 Analysis
Once again, the analysis closely mirrors that in Section 4. Let be the unmatched requests at time , denote the dual variables obtained by the above dual growth process, and write
As before, set for . We first show that the dual is feasible for .
Lemma C.1. Every nonnegative vector satisfying (14) is feasible for . Consequently, DUAL OPT for sum costs.
Proof. Fix a group of size . A set with separates exactly pairs in , where . Since , summing the pairwise constraints gives
For each pair, . Each request occurs in unordered pairs, and hence
Dividing by proves the group constraint. Weak duality gives the last assertion.
All merge-edge and path lengths in this section are measured using . The structural arguments from Section 4 apply to the spatial metric . In particular, the laminarity and merge tree properties of Proposition 4.1, as well as Lemmas 4.8, 4.9, 4.13, and 4.15 continue to hold, with . In particular, an arrived request u satisfies
exactly as in Lemma 4.8. Thus, when a new request v arrives, the load on its constraint with any earlier request u is at most .
We now briefly describe how the parity invariant of Proposition 4.1 is replaced by a modulo-k invariant, and justify why the algorithm terminates and satisfies , where DELAY is its total delay cost.
Lemma C.2. For every active component C at time t,
The algorithm terminates and produces a partition into groups of size k. For every group G formed at time t,
In particular, for sum costs, , where .
Proof. The congruence holds initially and is preserved by arrivals, merges, and the removal of exactly k unmatched requests from a component. After the last arrival, a growing component cannot be the only active component, since . If a growing component exists, its dual eventually makes a constraint to another component tight, causing a merge. There are at most merges, so after a finite time all active components are frozen. Each then contains a multiple of k unmatched requests. All group maturation times are finite, so all remaining requests are eventually grouped.
Now let be an oldest request in a group formed at time , and set . By the maturation rule, . Also, for each . Therefore
Since , the connection cost satisfies
Summing over the groups proves .
C.4.1 Local dual charging
For the local dual charging argument, we define fresh components as in Section 4.3. Fix and , and let
As in Section 4.3, a request is old if and fresh otherwise. Deleting the old vertices from the merge tree of an active component gives its fresh components. For each fresh component , write and . We only need to charge components with . One new issue is that requests in need not be pairwise separated. We instead use the following -way analog of Lemma 4.10.
Lemma C.3. If G consists of k unmatched requests in the same active component at time t, then
Proof. Otherwise, . The group would be eligible, contradicting the exhaustion of all eligible groups at time .
Lemma C.3 tells us that the diameter of any k requests in is greater than . We can use this fact to find a large subset of such that every pair of requests in this subset is separated.
Lemma C.4. For every fresh component , there is a set with such that for all distinct .
Proof. Take a maximal subset whose requests are pairwise more than apart. Assign every request of to a member of within distance , which exists by maximality. If requests were assigned to the same member, their pairwise distances would be at most , while their ages are at least , contradicting Lemma C.3. Therefore, each member receives at most requests, proving the bound.
The rest of the local charging arguments are the same as those in Section 4.3 but using this separated set instead of . In particular, we construct the witness tree for set and then apply the path charging argument. For the corner case where the component has a single fresh component with fewer than unmatched vertices, we have the following baseline charging lemma (analogous to Lemma 4.18).
For a fixed active component at time , write for .
Lemma C.5. If belongs to an active component at time , then .
Proof. If the component containing is growing throughout , except possibly at event times, then .
Otherwise, let be the right endpoint of the last positive-length interval on which the component containing is frozen, and let be that component just before . The modulo- invariant implies that has at least unmatched requests, including , on a sufficiently short interval immediately before . Choose a fixed set of such requests containing . Applying Lemma C.3 before and taking a left limit gives . For a pair attaining , the path between and in the merge tree of has length at least . The path-dual bound of Lemma 4.15, whose proof is independent of the growth criterion, therefore gives
After , the component containing u grows at rate except at event times. All these components are subsets of C, so
This argument also applies when .
Finally, putting all these together, we obtain the local dual charging theorem.
Theorem C.6. For every and ,
Proof. Fix an active component with . If has no old vertex and , its only fresh component is . Lemma C.5 gives
Every dual variable supported on a subset of C was zero at time , because all requests of C are fresh. This proves the required recent charge in this case.
In all other cases, choose as in Lemma C.4 for each fresh component with . Root the merge tree of at an old vertex if one exists, and otherwise at any vertex. Let be the vertex of closest to the root. If has an old vertex, the parent of is old. The merge-edge age inequality of Lemma 4.13 is valid for and implies
Every member of has age less than , and hence its distance from is greater than , in particular greater than . If has no old vertex, then and , so .
Let be the minimal subtree of the merge tree spanning . It is contained in . Applying the separated terminal bound of Lemma 4.12 to in the first case and to in the second gives
For completeness, we give the path charging argument with its dependence on . Root at . Successively prune a path from a non-root leaf to the first branching vertex or the root, deleting its edges and retaining its other endpoint. Continue along vertices of degree two in the remaining tree. This decomposes into edge-disjoint paths , with . Each path starts at a non-root leaf of the original witness tree, which is in , and ends at an anchor in the remaining tree. To see that no new non-root leaf is needed, observe that a branching anchor has degree at least three before a path is deleted and hence degree at least two afterwards.
For each path, define
where is the family of historical components and a set crosses a path if it separates the endpoints of one of its edges. Every historical component is connected in the merge tree. Thus a set charged to a pruned path, but not containing its anchor, cannot meet any later path. The families are consequently pairwise disjoint. The same connectivity argument shows that no set in contains .
The path-dual bound of Lemma 4.15 gives
If is the other endpoint of , then . By (16), it follows that
Here we used (18), , , and .
The charge families of distinct fresh components are also disjoint. Indeed, a connected historical component meeting both A and must contain at least one of and , whereas membership in both charge families excludes both vertices. Moreover, every charged set contains a fresh vertex, so its dual variable was zero at time . Charge families belonging to different active components are disjoint as well. Summing all the charges, including the baseline cases, proves the theorem.
C.4.2 Local to global
The preceding bound controls the delay of the algorithm independently of the group connection objective. We record it separately for use with minimum spanning tree costs.
Lemma C.7. The algorithm in Section C.3 satisfies
Proof. Write and . Applying Theorem C.6 with to a request that is still unmatched at time gives . Taking limits before matching shows that every request waits at most . If , there is no positive delay and the claim follows. Assume . We use the same integral identity as in the linear local-to-global argument of Section 4:
For a fixed request, the times at which its age is in form an interval of length at most . Hence . Also by Lemma 4.5 for every ,
Therefore, for , Theorem C.6 yields
Setting proves the lemma.
Theorem C.8 (Sum costs). The Delayed Best-Effort Matching Algorithm of Section C.3 is deterministic and -competitive for k-way matching with delays and all-pairs sum costs . More precisely,
Proof. Combine Lemmas C.1, C.2, and C.7.
C.5 Other group costs
We first give a comparison principle for group costs that can be bounded above and below by sum costs.
Proposition C.9 (Approximate-sum group costs). Suppose a group connection cost satisfies
for every group of size , where may depend on . Running the algorithm of Section C.3 with spatial metric is -competitive for connection cost .
Proof. The sum cost in the scaled metric is . Thus . Delay costs are unchanged, and . Evaluating the output of the scaled algorithm under either objective therefore gives , while . The result follows from Theorem C.8.
In this application, the algorithm's auxiliary distance is . The objective being approximated remains the original group cost .
C.5.1 Diameter costs
Let .
Corollary C.10. There is a deterministic -competitive algorithm for k-way matching with delays and diameter costs.
Proof. Choose attaining the diameter. For each , the triangle inequality gives . Summing these inequalities and the contribution of yields
Equivalently,
Apply Proposition C.9 with and . Their ratio is . The input spatial metric is , so the algorithm uses auxiliary distance .
C.5.2 H-metrics
For a tuple , let be the set of its distinct entries. An -metric is a symmetric, nonnegative function that is zero if and only if all entries are equal, and satisfies
It also satisfies the generalized triangle inequality: for any and ,
For a group G, means H evaluated on its request locations, with repetitions retained.
Corollary C.11. There is a deterministic -competitive algorithm for k-way matching with delays and H-metric costs.
Proof. Use the pairwise metric associated with H by Kakimura and Nakayoshi (2025, Theorem 1):
Let . For each pair of locations in , the support conditions (19) give ; this is also true when the locations coincide. Consequently,
For the opposite bound, fix a request and apply the generalized triangle inequality repeatedly with bridge point . This gives
Sum over all choices of . The two ordered terms associated with each unordered pair add up to , so
The two bounds give a comparison directly with the sum cost in the metric :
Proposition C.9 applies with and and yields the claim.
C.5.3 Minimum spanning tree costs
Let
For this objective, we obtain a stronger bound by using a direct dual certificate. We run the same algorithm with input spatial metric , so that its auxiliary distance is
The local charging and delay analysis apply to this execution as well.
Corollary C.12. The algorithm of Section C.3, run on the input spatial metric , is -competitive for k-way matching with delays and minimum spanning tree costs. Here the MST cost is measured in the original metric . More precisely,
Proof. Let and DUAL denote the dual variables and their total value in this execution. We show that these variables satisfy the group constraints with right-hand side . Fix . Double the edges of a minimum spanning tree and shortcut an Euler tour to obtain a cyclic ordering of its requests, with , such that
For , the cycle traverses the same pair twice. Every set with separates at least two consecutive pairs of the cycle, counted with multiplicity. Moreover,
Summing the pairwise constraints along the cycle gives
Thus is feasible for the group-cut dual with MST costs, and weak duality yields DUAL OPTMST.
Let . Each group formed at time satisfies
by (17), applied to this execution. Hence . Combining this inequality with Lemma C.7 for the same execution and the dual lower bound proves the corollary.
D Necessity of slow dual growth
We first show that an online dual growing at rate 1 can be a polynomial factor smaller than the hindsight optimum. Then in the following subsection we show that reducing the rate to any constant < 1 bounds the primal-dual gap by a constant.
D.1 A lower bound on the primal-dual gap for growth rate 1
We construct an instance of MPMD on a line metric where the online dual that grows active components at rate 1 has a dual objective that is smaller than the cost of the optimal solution.
Let be a fixed even integer. We consider the underlying metric space to be the line metric and requests arrive at integer locations on the line. The time-augmented metric space in this case is thus the two dimensional Euclidean plane with the (i.e., Manhattan) distance metric. We identify a request that arrives at location and time by the two dimensional point . Let .
The instance then contains the following requests . In other words, first requests arrive at locations at time 1. Then at each integer time , requests arrive at the first locations. Finally at time , requests arrive at locations in . See Figure 3 for an illustration.
First, note that the instance has exactly requests and each request is at distance exactly 1 (in the time augmented metric space) from its nearest neighbor. Thus the optimal solution has cost at least .
We now walk through the dual growth process. At time 1, when the requests arrive, they each form a singleton active component and their corresponding dual variables grow at rate 1. At time 3/2, the edges between adjacent requests become tight and all the requests merge into a single active component with nodes (odd). So until time 3/2, the total dual accumulated is

Figure 3: Lower-bound instance of requests on the line metric when duals grow at rate . At , the requests grow singleton duals of (shaded red diamonds in the metric) until , when adjacent horizontal edges (red) become tight and merge them into a single odd active component. Thereafter, this single odd component grows at rate 1, so all subsequent arrivals at are immediately absorbed upon arrival via tight vertical edges (blue arrows) without growing singleton duals.
exactly . Immediately after time 3/2, the single odd active component continues to increase its dual at rate 1. At time 2, when a request appears, the edge between and becomes immediately tight. Thus all the new requests that arrived at time 2 get merged into the single active component and the dual variables of the singleton active components of these requests never get a chance to increase. This process continues until time , i.e., there remains a single odd active component and the newly arriving requests merge into this active component as soon as they arrive. Thus from time 3/2 to time , the total dual only increases at rate 1 for a total increase of at most . From this point onwards, the active component is even and no further dual growth occurs. The total dual objective is therefore only at most .
Since in this instance we have , we get DUAL OPT.
D.2 An upper bound on the primal-dual gap for growth rate
We will prove that if the dual grows at a rate of , we have .
Consider the merge forest of the dual. Note that all of the connected components in this forest have even size. While there exists a connected component in and an edge such that the two connected components in are both even, drop such an edge, and repeat. The resulting set of edges, , forms a forest in which every tree is of even size and every vertex has odd degree. We can therefore decompose each component of into edge disjoint paths such that every vertex is an end point of exactly one path. Short-cutting these paths provides a perfect matching, and therefore we can conclude that .
We will now argue that the dual pays a constant fraction of the cost of . In order to do so, we consider a time , and we want to bound . The problem is that needs to also account for edges that have not arrived at time but are nevertheless loaded by some active S at that time. These are precisely the edges for which one of the end points arrived before t and the other after.
Let denote the number of active odd dual components at time . Let denote the number of vertices that arrive after , but that have at least one neighbor in with an arrival time . We then claim the following lemma.
Lemma D.1. At any time t,
Before we prove the lemma, we will argue that it leads to a bound on the primal cost. We have:
Noting that , we get:
It remains to prove the lemma.
Proof. Let and denote the set of odd active components and even active components at time respectively. Remove from all components with , and contract each component in and into a single meta node. Since each historical dual component is connected in , over the contracted meta nodes, still forms a forest. Since is a subset of , is also a forest over the meta nodes.
Let denote the subforest of containing all edges that have at least one endpoint with arrival time . Note that every edge of with an endpoint in or belongs to . Consider the set of all edges in that have one endpoint with an arrival time before and the other after ; let denote the set of endpoints that have not yet arrived. Then , , and partition the endpoints of all of the edges in .
Observe that the degree of every vertex in is odd by construction, and therefore, the degree of all odd sets in is odd, the degree of all even sets in is even (in particular, at least 2), and the degree of all vertices in is at least 1. Moreover, the average degree of the meta nodes in this forest is at most 2.
Therefore, using , , and to denote the sizes of , , and , respectively, we get,
where we used the fact that for all and for all .