Manuscript Offprint
arXiv:2611.05769Noncrossing is All You Need: Beyond Identical Delay Functions in Online Matching with Delays on General Metrics
Abstract
Online optimization with delays has emerged as a powerful paradigm with numerous applications, including matching, caching, server management, network design, and set cover. In most of these problems, competitive algorithms are known for arbitrary monotone delay functions, even when different requests are associated with different delay functions. The notable exception is online matching with delays, where all previously known algorithms achieving constant or polylogarithmic competitive ratios require the delay functions to be identical, either linear or concave, and known in advance.
We study the online minimum-cost perfect matching with delays problem on general metrics. We introduce the broad class of noncrossing delay functions, which strictly generalizes the classic setting of identical concave delay functions while naturally modeling scenarios in which different requests may experience different delay costs. We present the first deterministic -competitive algorithm for the single-location online matching problem with noncrossing delay functions in the non-clairvoyant setting as well as a randomized -competitive algorithm of an arbitrary metric space where is the number of points of the metric space and is its aspect ratio. Our result allows each request to have an arbitrary noncrossing delay function, thereby simultaneously removing the assumptions of identical delay functions, concavity, and clairvoyance that were required by all previous constant or polylogarithmic-competitive algorithms.
*School of Computer Science and AI, Tel-Aviv University, Tel-Aviv, Israel. Email: azar@tauex.tau.ac.il. Supported in part by the Israel Science Foundation grant No. 1728/26.
†School of Computing and Information Systems, The University of Melbourne, Australia. Email: junhao.gan@unimelb.edu.au. Supported in part by the Australian Government through the Australian Research Council ARC DP230102908.
‡School of Computer Science and AI, Tel-Aviv University, Tel-Aviv, Israel. Email: shaharlewko22@gmail.com.
§School of Computing and Information Systems, The University of Melbourne, Australia. Email: xiao.sun.1@student.unimelb.edu.au. Supported by the Australian Government through the Australian Research Council DP240101353 and by the University of Melbourne through the Melbourne Research Scholarship.
¶School of Computing and Information Systems, The University of Melbourne, Australia. ARC Training Centre in Optimisation Technologies, Integrated Methodologies, and Applications (OPTIMA), Melbourne, Australia. Email: william.umboh@unimelb.edu.au. Supported by the Australian Government through the Australian Research Council DP240101353.
1 Introduction
Over the last decade, online optimization with delays has emerged as a powerful and widely applicable paradigm. It has been successfully applied to a broad range of problems, including matching, caching, server management, network design, set cover, data structures, and many others (e.g., [13, 23, 7, 4, 11, 22], among many others). In this framework, requests arrive online and may be served at any time after their arrival. Delaying service incurs a request-dependent penalty that increases over time, while postponing decisions may reduce the underlying optimization cost by allowing the algorithm to aggregate requests and serve them in a batch. Consequently, the objective is to decide both which requests to serve and when to serve them so as to minimize the sum of the traditional optimization cost and the accumulated delay penalties. This fundamental trade-off has made the framework both practically relevant and a rich source of algorithmic ideas in the theory of online algorithms.
A remarkable feature shared by nearly all of these problems is that competitive algorithms are known for arbitrary monotone delay functions, even when different requests are associated with different delay functions. The main exception to this phenomenon is the matching problem, first studied by Emek, Kutten, and Wattenhofer [23], which was also the first problem studied in the online-with-delays framework. All previously known algorithms achieving constant or polylogarithmic competitive ratios require the delay functions to be identical and either linear or concave. In this paper, we break this barrier by presenting, for the first time, competitive algorithms for a broad family of non-identical delay functions.
We note that one possible explanation for why matching is fundamentally different from other online optimization problems with delays is the lack of input monotonicity. For virtually all other problems studied in this framework, adding more requests can only increase (or leave unchanged) the value of the optimal solution. In contrast, for matching, the arrival of additional requests may arbitrarily decrease the optimal cost by creating new matching opportunities. This fundamental non-monotonicity appears to be a major obstacle to extending techniques developed for other online optimization problems with delays to the matching problem.
One motivation for the matching with delays comes from commercial platforms for matching clients or players. Examples include gaming platforms such as chess.com and bridgebase.com, where players arrive online with the intention of participating in a game against another player. Since most games involve exactly two participants, the platform must match arriving players into pairs. While players are generally willing to tolerate some waiting time before being matched, excessive delays reduce user satisfaction. This naturally raises the following algorithmic question: how should the platform match players so as to minimize the overall delay cost?
Beyond gaming platforms, this problem captures a wide range of online matching applications, including roommate assignment, carpooling, and other real-time matching services.
Problem Definition: In this paper, we study the online minimum-cost perfect matching with delay problem, introduced by Emek, Kutten, and Wattenhofer [23]. Formally, requests arrive online over time in a metric space . At any point after their arrival, the algorithm may match any pair of unmatched requests or postpone their matching until a later time.
The cost of a matching is determined by how requests are matched into pairs and when they are matched. Each request arrives at location , has an arrival time , and a delay function that starts at 0 at , and is nondecreasing with time. When is matched at time , it incurs a delay cost of . If request r is matched to request , they incur a connection cost of . The total cost of a matching is
where M is the matching and the objective is to minimize this quantity.
Previous delay setting: Previous works obtaining constant or polylogarithmic competitive ratios rely simultaneously on the following three assumptions:
-
all requests share the same delay function (shifted by the arrival time) ;
-
the delay function is linear or concave;
-
the delay function is known upon the request's arrival (i.e., the algorithm is clairvoyant).
The MPMD problem was introduced by Emek, Kutten, and Wattenhofer [23], who studied the case of linear delay functions. Later, the authors in [31] considered convex delay functions and posed the question of whether comparable competitive guarantees could be obtained for concave delay functions. This question was subsequently answered by Azar, Ren, and Vainstein [9], who developed competitive algorithms for the concave setting.
Our delay setting: In contrast, we study a substantially more general setting in which
-
each request may have a different delay function;
-
delay functions are arbitrary noncrossing functions (defined formally in Section 2);
-
the algorithm is non-clairvoyant, namely, for every request that has already arrived, its delay function is revealed only up to the current time, and its future behavior is unknown.
Informally, noncrossing delay functions form a sequence of functions in which, at every point in time, an earlier request always has a delay value at least as large as that of any later request, while its derivative is never larger. Observe that noncrossing delay functions generalize the classic setting of identical concave delay functions studied by Azar, Ren, and Vainstein [9]. Noncrossing delay functions naturally arise in practice. Earlier clients are typically more frustrated than later arrivals, and their frustration may evolve in an arbitrary manner depending on external circumstances, rather than following a pre-defined concave shape. Nevertheless, it is reasonable to assume that, at any point in time, an earlier client is never less frustrated than a later one, while the rate at which this frustration increases is never higher than that of a later client.
Our Contributions: In this paper, we consider both the single location case and an arbitrary metric space. We present the first deterministic -competitive algorithm for the single-location online matching problem with noncrossing delay functions in the nonclairvoyant setting. For general metrics with n points and aspect ratio , we obtain a randomized -competitive algorithm. Our algorithms allow arbitrary request-specific delay functions subject only to the noncrossing condition, thereby simultaneously removing the assumptions of identical delay functions, concavity, and clairvoyance imposed by previous constant or polylogarithmic-competitive algorithms.
More specifically, for any two requests q, r and .
Theorem 1.1. For any metric space with points and aspect ratio , there is a randomized nonclairvoyant -competitive algorithm for the online matching problem with noncrossing delay functions. For the special case of a single location, there is a deterministic nonclairvoyant -competitive algorithm.
We also show that it is impossible for any deterministic clairvoyant algorithm to achieve a bounded competitive ratio without the assumption that an earlier request always has a delay cost at least as large as that of any later request, even for the single point case. See Proposition A.1 in Section A.
Geometric Interpretation for single location: Our problem for the very special case of single location admits the following equivalent geometric interpretation. Points are born over time at the origin and continuously move to the right along the -axis, where the -coordinate of a point represents its accumulated delay. The relative order of the points is preserved over time (by the noncrossing property), and the distance between any two consecutive points—and hence between any pair of points—never increases. At any time, the algorithm may freeze any pair of points, remove them from the system, and incur a cost equal to the sum of their current positions, corresponding to matching the two associated requests. Every point must eventually be frozen. The objective is to minimize the total freezing cost, which is exactly the total delay incurred before all requests are matched.
Despite this simple and intuitive formulation, designing a constant-competitive online algorithm, and proving its competitiveness, turns out to be remarkably challenging. An obvious first approach is to match the requests greedily (i.e., delay only if there is no other request). While this yields an optimal matching when delay functions are identical and linear (or convex), unfortunately, as observed by [9], the simple greedy matching algorithm has unbounded competitive ratio even for identical concave delay functions. To see this, consider an instance in which requests arrive at times and the delay function of each request is given by . The greedy algorithm incurs a total cost of . In contrast, the optimal solution matches the first request with the last and matches all remaining requests greedily, thereby yielding a total cost of . By choosing sufficiently small, the competitive ratio of the greedy algorithm becomes at least , and is therefore unbounded. This example illustrates that achieving a bounded competitive ratio requires sacrificing short-term cost in order to obtain greater future savings.
Arbitrary metric space versus single location. As explained above, even the single-location case, a highly restricted special case of a general metric space—requires a nontrivial algorithm. Surprisingly, our first technique is to “reduce” the general case to single-location problems. We use a hierarchically separated tree (HST) and run a single-location algorithm at each vertex, processing requests promoted from its children according to a carefully designed rule.
This is not a reduction in the usual sense, as it requires a stronger guarantee than competitiveness for the single-location problem. Specifically, at each vertex, we compare the cost of the online algorithm on the requests that reach that vertex, the “virtual instance” (which filters out some of the requests), with the optimal cost for all requests originating in its subtree, the “consolidated instance”. Thus, the online algorithm and the offline optimum operate on different instances. Although this “pseudo-reduction” requires a more powerful single-location result, it significantly simplifies the analysis of the general metric case. The main challenge then lies in designing and analyzing a single-location algorithm that admits this stronger comparison between the virtual instance and consolidated instances, though even the standard single-location problem is not substantially simpler. This “pseudo-reduction” incurs a multiplicative loss proportional to the height of the HST, which is , together with an additional loss in the delay-cost term alone. Embedding the original metric space into HSTs introduces an distortion in the connection-cost term. Since the latter two losses affect separate cost components, they combine additively. Accounting for the initial height-dependent loss, the resulting competitive ratio is .
Our work builds on the technique of matching based on counters that increase over time, which is central to previous works on online matching with delays, and develops new insight on this technique. The main challenge is in designing the matching condition so that the following desiderata are satisfied: (1) the total counter value captures the cost of the algorithm and (2) is also not much larger than the cost of the optimal solution. Intuitively, an equivalent view is that the algorithm matches when the cost of the match can be charged to some set of counters which can then be charged to the optimal solution.
As our problem, even for single location, generalizes the single-location problem of [9], it is useful to contrast our approach with theirs. Our algorithm differs significantly from theirs, which relies heavily on the fact that all delay functions are identical. In particular, that algorithm maintains counters that are shared among all requests. In contrast, in our setting it is natural to associate a separate counter with each request. Whenever a request's counter increases, it does so at the same rate as its delay function.
It is not difficult to see that it suffices to consider algorithms that match only the latest two pending requests (only for the single location case), since later requests always have delay derivatives at least as large as those of earlier requests. To ensure that the matching condition is eventually satisfied for the last two pending requests, our algorithm increases only the counter of the latest pending request.
Unfortunately, as demonstrated by our first two attempts, the counter values alone do not provide sufficient information to determine when a match should be performed. This is in sharp contrast to previous algorithms, where the counters alone were sufficient. To overcome this difficulty, we introduce a carefully designed potential function based on a partition of the requests, as described later.
First attempt. Motivated by the counterexample to the greedy algorithm, a natural first attempt is to wait until the latest request's counter reaches half of the second latest request to make a match. It also has the benefit that all pending requests' counter values form a geometric sequence at every moment, and thus the total delay seems to be bounded by the biggest term, i.e. the counter value of the earliest request. Unfortunately, it does not work under uniform linear delays. Intuitively, it fails because it matches requests too slowly while the previous requests have already accumulated huge cost. In particular, its cost can be much larger than the total counter value. See Section B for a specific counterexample.
Second attempt. The first attempt can be seen in the following way: the second latest request 's counter value is saturated from below when the latest request's counter reaches half of its value. It fails because of the "memorylessness" that saturates too slowly. A natural way around this is to consider not only the latest request at a given moment, but also all previous requests that used to be the next pending request after (we will use "children" of to denote them in Section 4.1) and all their counters contribute to the saturation of 's counter.
Therefore, our second attempt is to match when the sum of counter values of all children of reaches half of the second latest request 's counter value. Under this algorithm, the counter value of each request is within a constant factor of its actual incurred delay, so the issue with the counterexample of the first attempt is addressed. Unfortunately, this algorithm also fails because it might match "too fast" instead, and the total counter value can be much larger than the cost of the optimal solution. We present the counterexample in Section B. In this example, the requests' delays have similar patterns to concave delays: initially increasing fast but stopping at some value; while we note that they are not uniform concave delays and the delay function of a given request may not be concave either.
In summary, both attempts fail to match requests at an appropriate speed under some cases, including linear delays that grow fast and other delays that grow slowly. This also illustrates that our noncrossing delay model comprises a broad range of ways that delays can evolve over time. The first attempt shows that the algorithm cannot be memoryless, and the second attempt shows that such memory cannot be the simple sum of all children's counters of the second latest request.
Partition-based potential. At a high level, our algorithm assigns a potential to each pending request based on the counter values of its current children. The potential is designed so that, at any point in time, only one child can increase the potential of its parent. The algorithm matches a pair of requests once the potential of the earlier request reaches half of its counter value. This perspective also unifies the two previously discussed failed attempts: they correspond to defining the potential as either the counter of a single child or the sum of the counters of all current children. Roughly speaking, the potential measures the amount of delay incurred by the optimal solution that can be safely charged by our algorithm. The potential function and the matching rule are carefully designed so that a request is matched precisely when its accumulated counter value can be fully charged to the optimal solution without causing any overcharging.
The key ingredient in our charging argument is a decomposition of the requests that arrive after a given request according to the intervals used by the optimal solution. We consider the maximal intervals of the optimal solution that overlap the lifetime of the request without completely covering it. These intervals partition the requests that arrive while the request is pending. Unfortunately, since the optimal solution is unknown, the corresponding partition is also unknown. Instead of relying on this partition directly, we define the potential function to represent the value of the minimum-value partition.
Now consider one such interval that contains several consecutive children of the request but not the request itself. Since the interval begins before the first of these children arrives and remains active until after all but the last have been matched, the noncrossing property implies that the delay accumulated by the request during this period is no larger than the delay incurred by that interval in the optimal solution. This observation enables us to charge the delay accumulated over each such period to the corresponding interval of the optimal solution without overcharging.
Handling virtual instances for HSTs. When extending our single-location algorithm to HSTs, we construct a virtual instance at each vertex by filtering out certain requests arriving in its subtree. Counter updates at an internal vertex must also account for the parity of the number of pending requests in its subtree, a quantity also used in earlier counter-based algorithms on trees ([3, 9]). Accordingly, the virtual algorithm at each vertex has an odd state and an even state, determined by this parity, which specifies which counter to increase.
A key difference from the single-location algorithm discussed earlier is that we do not necessarily increase the counter of the latest request. As a result, the property that the algorithm always matches the latest two requests no longer holds, and the laminarity of the solution may fail. To address this issue, we sometimes terminate a request's current interval and counter and create new ones corresponding to the same request. This allows us to partition the pending time of each request into multiple intervals, with the resulting collection of intervals being laminar. In this way, we can adapt the proof techniques developed for the single-location case to those laminar intervals and their associated counters.
1.2 Related Work
The MPMD problem with linear delay functions was introduced by Emek, Kutten, and Wattenhofer [23], who presented a randomized algorithm with competitive ratio , where denotes the aspect ratio of the underlying metric. Later, Azar, Chiplunkar, and Kaplan [3] improved this bound to , thereby eliminating the dependence on . They also proved an lower bound on the competitive ratio of any randomized algorithm. This lower bound was subsequently strengthened by the authors in [2] to , nearly closing the gap. The upper bound of was later generalized for identical concave delay functions by [9].
The authors in [31] later studied MPMD with convex delay functions on -point uniform metrics. They first established an lower bound on the competitive ratio of any deterministic algorithm. Their lower-bound construction uses delay functions of the form , for . They also presented a deterministic -competitive algorithm under the same class of delay functions. Gan, Sun, and Umboh [28] complemented this study by presenting a deterministic -competitive algorithm for polynomial delays such that .
The only non-clairvoyant delay models that have been studied in prior works are set and size-based delays proposed by Deryckere and Umboh [20]. They showed a deterministic lower bound of for set delays and gave a randomized upper bound of for size-based delays, where is the number of requests. The results on size-based delays were subsequently improved by Gan, Sun, and Umboh [28] and they showed that the randomized competitive ratio is and for every metric, refuting the possibility of a polylogarithmic competitive ratio.
A related line of work considers Minimum-Cost Bipartite Perfect Matching with Delays (MBPMD), the bipartite variant of MPMD with linear delay functions, in which requests can only be matched to requests of the opposite polarity. The authors in [2] established an lower bound on the competitive ratio of any randomized algorithm. They also presented two -competitive randomized algorithms: the first extends the algorithm of Emek, Kutten, and Wattenhofer [23] to the bipartite setting, while the second extends the algorithm of Azar, Chiplunkar, and Kaplan [3].
The deterministic variants of MPMD and MBPMD with linear delay functions have also attracted considerable attention. For deterministic algorithms and further developments, see [15, 14, 6, 22, 1, 24].
Although this paper focuses on online matching with delays, the notion of delays has been extensively studied in many other online optimization problems. Such models have numerous applications spanning operations management, operating systems, supply chain management, and other domains. Examples include the online service with delays problem [7, 16, 10], the multi-level aggregation problem [13, 17, 10], and many others. For a broader overview of online optimization problems with delays, we refer the reader to [18, 29, 25, 5, 4, 11, 34, 19, 36].
Finally, we note that in other optimization problems with delays, there has been much recent interest in studying the power of clairvoyance [4, 30, 35, 37, 26, 21] and novel delay models [32, 8, 33, 12].
Paper Organization: We start in Section 2 by formally defining the problem and introducing some useful notations and basic properties, including laminar solutions and randomized embedding of general metrics into -HSTs. We introduce the pseudo-reduction to single-location instances in Section 3, and present our algorithm on a 2-HST of height H by describing the algorithms that run on each of its vertices in Section 4. We prove that our global algorithm is -competitive on the 2-HST in Section 5, thus completing the proof of Theorem 1.1. We conclude with some remarks and open problems in Section 6.
2 Preliminaries
2.1 Problem Definition and Notation
In the online matching with delays problem, a set of requests arrive over time (we assume WLOG that no two requests arrive at the same time) in a given metric space , and each request incurs delay cost until it is matched with another request. More precisely, each request has a location , and a continuous delay function that is initially 0 at the arrival time of , which we denote by , and is nondecreasing with time. In addition, we assume that the algorithm is nonclairvoyant: at every moment , the algorithm receives , the instantaneous delay increase rate of , for every request that has arrived.
A solution to the problem consists of a pair where is a matching, and is the time when request is matched, for each request . When requests are matched, we denote the match as writing the requests in order of arrival, i.e., arrives earlier. When request is matched at time , the total delay incurred is . The goal is to match the requests so as to minimize the total delay of requests (delay cost) plus the distance between locations of every matched pair (connection cost), i.e., .
For , we write and . Throughout the paper, for a set of requests , we write “-th latest request of ” to refer to the request in with the -th latest arrival time. For any two requests , we write if , and if .
Definition 2.1 (Noncrossing delays). An instance has noncrossing delays if for every , it holds that and at every time .
Noncrossing delays means that the delay of every request increases at least as fast as the delay of an earlier-arriving request, but its total delay is no larger than the total delay of the earlier-arriving request. Equivalently, for any two requests, the difference in their total delays is always nonincreasing and nonnegative.
2.2 Laminar Solutions
In this part, we introduce the concept of laminarity, which is an important property that holds for every optimal solution on a single location instance (where the connection cost is always zero). Furthermore, the laminar property of a family of intervals will be used in defining our algorithm on metrics as well.
Definition 2.2 (Request intervals and laminarity). Let be a single-point instance where requests' delays are non-crossing and be a solution of . For each request , define its interval to be . The solution is a laminar solution if the set of intervals is laminar.
The following is immediate from the definition.
Proposition 2.3. A solution is laminar if and only if for every request and every request with arrival time , .
From Proposition 2.3, it is easy to see that an online algorithm that only matches the latest two pending requests is laminar. Moreover, since there is an optimal solution that only matches the latest two pending requests on a single-location instance (because their delays increase at the fastest rate), and the optimal solution always matches a pair of requests as soon as they have both arrived to avoid additional delay, we have the following lemma.
Lemma 2.4. For online matching with noncrossing delays on a single location, there is an optimal solution that is laminar, and every match is matched on arrival of the later request .
Although the laminarity of the optimal solution does not hold on metric spaces beyond the single location, we will use Lemma 2.4 in the charging scheme for our algorithm analysis.
2.3 Reduction to 2-HSTs
We solve the online matching with noncrossing delay on general metrics by reducing it to 2-HSTs. This is the key technique that has been used for all previous results of the online matching with delay problem on general metrics, e.g. [23, 3, 9]. We introduce the definition of a -competitive algorithm to separate delay and connection costs.
Definition 2.5. For an arbitrary instance of online matching with noncrossing delays, let ALG be a randomized online algorithm and its cost and SOL be an arbitrary solution. Furthermore, SOL and SOL denote the connection and delay costs incurred by SOL, respectively. We say that ALG is -competitive if .
The reason that we focus on solving the problem on -HSTs is because we can randomly embed general metrics into them. We first formally define the notion of Hierarchically Separated Trees (HSTs) and embedding a metric into another.
Definition 2.6 (-HST). A -hierarchically well-separated tree (-HST) is a rooted tree such that: all edges at a particular level have the same weight and all leaves are at the same level (combinatorial depth), and edge lengths on every root-to-leaf path decrease by a factor of at each step.
Note that in our definition, we require that every leaf has the same combinatorial depth. This key requirement is the reason that we cannot use weighted HSTs to reduce the height as per the techniques that have been used for linear and concave delays [3, 9].
Definition 2.7 (Metric embeddings). Let be a finite metric space, and let be a probability distribution over metrics on a finite set . We say that embeds into if , and for every and every metric space in the support of , we have . The distortion of this embedding is defined to be
We use the following result from [27] to embed any general -point metric with aspect ratio into a distribution over 2-HSTs.
Lemma 2.8. Any -point metric can be embedded, with distortion , into a distribution supported on metrics induced by 2-HSTs with height .
The next lemma introduced in [23] shows how to convert a matching's cost from a metric in the support of the embedding to that on the original metric.
Lemma 2.9. Suppose that a metric can be embedded into a distribution with distortion . Additionally suppose that for every metric space in the support of exists an algorithm that is -competitive for the MPMD problem. Then, there exists a -competitive algorithm for the MPMD problem on the metric .
In remaining parts of the paper, we describe the algorithm on a 2-HST whose height is (including the root level), denoted by . For every vertex , let be the distance between and its leaf descendant, be the subtree rooted at , and be its parent. From the definition of 2-HSTs and properties of geometric sequences, we have as long as is not the root of . If is the root, then define . Moreover, we use to express the set of all requests that arrive at leaves of . For an interval , we define , i.e., the set of requests that arrive at leaves of during .
3 A Pseudo-Reduction to Single-Location Instances
In Section 3.1, we reduce the description of our algorithm ALG on to its subroutines for each vertex of the HST, including the requests that arrive in each instance , and how we translate to ALG while losing a constant factor only (Lemma 3.1). In Section 3.2, we introduce the consolidated instance induced within each (Definition 3.3) and prove their relations with any global solution SOL (Lemma 3.4), which will be used in proving the competitive ratio of ALG. We abuse the notations by using ALG and to refer to both the solution and its cost, the same for SOL and (defined in Section 3.2).
3.1 Transform Virtual Algorithms ALG 's to ALG
Algorithm overview. Our algorithm ALG creates several single-location instances for each vertex of the HST; these are called virtual instances. The requests in the virtual instances are called virtual copies of actual requests. The arrivals of virtual copies in virtual instances are based on a global mechanism where ALG promotes every request to different levels of its ancestors based on its total incurred delay. We then run a single-location algorithm on each of these instances independently. When two virtual copies of requests are matched, the global algorithm decides whether or not to match the corresponding actual requests. We will prove that the total cost of ALG is within a constant factor of that of all 's:
Lemma 3.1 (Reduction to Single-Location). .
Virtual instances. At every moment , we say that a pending request 's position is if is the ancestor of its leaf location (or itself) such that . Each request's position is uniquely defined at every moment when it is unmatched by ALG (note that the position of is different from its location , where the latter is its arrival location in the metric).
We now describe the single-location virtual instance for each . For each request that arrives at and vertex that is an ancestor of , a virtual copy of it arrives in the moment when . Or equivalently, its arrival time in is the earliest moment when 's position is ( is promoted to ). Since each creates at most one such virtual copy in any , we still use to denote this virtual copy without ambiguity.
After the arrival of virtual in , its delay increase in is the delay increase of while its position is . We emphasize that, later on, when the position of the virtual is an ancestor of , the virtual copy of remains in and its delay in stops increasing after reaches . In summary, the delay function of a request that arrives in at time (without loss of generality, assume that for every and ), then is a bijection) can be expressed as:
In other words, receives part of request 's delay increase while its total value is between and . It is easy to see that the delays for virtual copies of in satisfy the non-crossing properties as well, and this is why we treat each as a virtual instance. We note that those virtual instances of different vertices are not independent of each other, because the set of requests that are promoted to depends on the output of other instances whose vertices are in the subtree : only receives requests that have not been matched by ALG when their positions are descendants of , and we can regard ALG's matches of requests positioned at descendants of as a filter removing some requests from .
We observe that when is positioned at , its delay increase rate in is , otherwise if has been promoted to a higher level. The next observation is immediate from the mechanism of ALG's promotion of requests to different levels based on their total delays and the symmetric structure of a HST.
Observation 3.2. For every , the arrival order of requests in is the same order as in the actual instance. Moreover, if 's position is and 's position is such that is a descendant of , then .
We will use it in our charging method for analysis.
Virtual to actual matches. Now we describe how to transform the virtual matches produced by 's to the actual solution output by . For every vertex , if matches two requests and , then there are two cases according to whether the position of each of and is at the moment. If and both are still positioned at , then matches and the moment when they are matched by . If at least one of and has been promoted to a higher level, then “ignores” the action of matching them and both of them will be promoted to when the total delay reaches , and how each of and is eventually matched by will depend on other sub-routines at ancestors of . As a result, the actual matches produced by can be significantly different from those made by its sub-routines 's.
The proof of Lemma 3.1 can be found in the Appendix. As a result, with 's global mechanism of promoting requests to different levels of their ancestors, it suffices to describe the sub-algorithm for each vertex in Section 4.
3.2 Consolidated Instances
For every , we define a consolidated single-location instance comprising all requests whose locations are within , the subtree rooted at .
Definition 3.3 (Consolidated instance induced within ). The input request set is the same as , all requests whose locations are leaves of . For every request , its arrival time in the consolidated instance is also as in the original instance on . The total delay incurred by until if unmatched is equal to , i.e. it increases at the same rate as until its value is capped by .
It is easy to see that such delays are non-crossing. However, different from the conventional online matching with delays, here for each that is not the root of , the number of requests in the instance is not necessarily even, i.e. there might be requests unmatched at the end. Since the delay function of each request is capped by a constant , this is the cost of leaving one request unmatched, and so the objective is well-defined. We also note this consolidated instance is different from the virtual instance that is described in Section 3.1: here every request that arrives within is counted from its arrival time, rather than the moment when it is promoted to , and the consolidated instance includes those not promoted to by as well. This is why we call it a “pseudo-reduction”, because we compare the cost of against a different instance. For every request , it holds that and for all .
We use to denote the optimal solution as well as its cost of the consolidated instance induced within . Without loss of generality, we assume that is laminar (Lemma 2.4), and it matches all requests into pairs if is even and leaves exactly one request unmatched if is odd.
Given a solution of the online matching with noncrossing delay instance on , let be its connection cost and be its delay cost. Moreover, for every vertex , we use to denote its cost of using the edge connecting and to make a match (zero if is the root) and to denote part of its delay cost incurred by requests whose locations are within . It holds that and , where the latter is because the delay incurred by each request is counted for times along the path from its leaf location to the root.
We now establish the relation between SOL and 's, whose proof we defer to the Appendix.
Lemma 3.4 (Consolidated to Global). For any solution SOL, .
With Lemmas 3.1 and 3.4, to prove the competitive ratio of ALG, it suffices to compare the total cost of all 's against that of all 's. At the end of Section 5, we will show that (Lemma 5.31).
In the remainder of the algorithm description and analysis, we may consider each vertex separately by fixing and only considering request arrivals within without explicitly specifying it every single time.
4 Single-Location Algorithms
In this section, we define for every , which completes the description of ALG combined with the way to translate 's to ALG that has been defined in Section 3.1. In Section 4.1, we use laminarity defined in Section 2.2 to define a forest structure of laminar intervals, which is key to applying tree terminologies including parents and children to the potential function and algorithm in Section 4.2.
4.1 Forest Structure of Laminar Intervals
In this subsection, we fix a vertex of , and define a forest structure that evolves over time, where each node represents a time interval (we reserve “vertices” to mean vertices of and “nodes” to mean those of the forest ). Moreover, the intervals in the forest form a laminar family, and the interval of each node is a subset of the pending time of a request that arrives in , which we use to denote. We also call the request of node . On the other hand, we note that the solution of the single-point instance itself is not necessarily laminar as those intervals in the forest are not the same as the request pending intervals.
We use to denote the set of all nodes that are added to at some time . Once a node is added to , it will never be deleted, while it can be terminated. We use to denote the moment when node is added to (we also call it the arrival time of ), and to denote the moment when is terminated, for which the conditions we will specify later. For each node of , we define the notion of online node intervals at moment .
Definition 4.1 (Online intervals). Given an online algorithm on , the interval at time of node is defined as follows:
Same as the terminology that we use for requests, for a set of nodes in , we write “-th latest node of ” to refer to the node in with the -th latest arrival time. For any two nodes , we write if , and if .
Without specifying the exact rules of matching requests of , for this part we only need the following property to make the laminar forest structure well-defined:
Property 4.2. At every moment, among all currently live nodes and their requests , the online algorithm only matches either and , or and . We will see later in Section 4.2 that indeed satisfies this property.
Update rules of . Now we define the rules of updating , given any online algorithm of that satisfies Property 4.2. There are two events that change the structure of : when a new request arrives in , and when two requests are matched by the online algorithm.
When a request arrives in , if there is no live node, then we create a new node that is the root of a new tree in , and let . If is the latest live node right before arrives in , then we create a new node as a child of and let .
When two requests are matched, if they are the requests of the latest two live nodes in at the moment, then we terminate those two nodes; if they are the requests of the third and second latest live nodes, then we terminate those two nodes together with the latest live node, and create a new node as a child of the fourth latest live node (if it exists) or the root of a new laminar tree (otherwise), and let the request of this node be that of the previous latest live node that has just been terminated.
We can apply Proposition 2.3 to the termination time of interval nodes in as well, which implies the following proposition.
Proposition 4.3. At every time t, the intervals form a laminar family.
We apply tree terminology to nodes as follows: node is said to be a parent, child, ancestor, descendant, or sibling of node at time if is a parent, child, ancestor, descendant, or sibling of in , respectively. Denote by the children of at time . We also define the roots of the trees to be siblings of each other. See Fig. 1 for an illustration of .

(a) The online intervals at time t = 9.

(b) Laminar tree representation of the intervals in Fig. 1a.
Figure 1: Illustration of the online intervals of a laminar online forest at time . In this example, we have nodes with arrival times . The algorithm has matched at time 4.5, at 8, where the latter leads to the termination of and the creation of such that . At , requests , and are still pending.
It is easy to see that the following properties are maintained after every event.
Proposition 4.4. Given an online algorithm that satisfies Property 4.2, for each time t, the set of intervals and satisfy the following properties:
-
for every pending request , there is exactly one live node such that ;
-
the set of live nodes of pending requests forms a chain and corresponds to a rooted subpath in ;
-
for each , the -th latest pending request's live node is the parent of the -th latest pending request's live node;
-
when a request arrives at time and it is not the only pending request, a new node such that becomes a child of the previous latest pending request's live node; if is the only pending request, then a new node such that becomes a new root in .
Proposition 4.4 immediately implies that the corresponding requests of each node and its children satisfy the following ordering, which will be used later in the analysis.
Corollary 4.5. For every node and at time when both and are live, it holds that .
4.2 Description of Algorithm and Potential Function
In this part, we describe the sub-routine of ALG for every vertex of . is based on the previously defined laminar trees of interval nodes according to the requests that appear in . We first describe our algorithm in terms of the potential function for each node , and then define the potential function.
Odd and even states. At a high level, our algorithm associates each node with a counter. At any point in time, can either be in odd or even states, determined externally by the number of pending requests positioned at descendants of . If this number is even, then the latest node is active and all other nodes are frozen; otherwise if this number is odd, then the second latest node is active and all other nodes are frozen. Note that if is a leaf of , then is always in the even state and so the latest counter is active, which is the special case of a single-location metric as discussed in Section 1.1. The algorithm then matches either the corresponding requests of the latest two nodes or those of the second and the third latest nodes, based on the potential function. Based on those two states of and the corresponding rules of increasing the counter, we have the following definition:
Definition 4.6 (Critical parent and child). At time , if is in even state, then the latest two live nodes are said to be critical; otherwise the second and third latest live nodes are critical. More specifically, among two critical nodes, the earlier one is the critical parent and the later one is the critical child.
Since every request has a unique corresponding node at every moment when it is pending in , the critical nodes correspond to two pending requests at every .
Algorithm description. Our algorithm associates every node with a counter that evolves over time as follows. Denote by the value of 's counter at time and to be its instantaneous increase. When a node arrives in , its counter is initialized to zero, i.e., . At time , if is the node that is active, then we increase its counter at the same rate as its corresponding request's delay in , i.e., the instantaneous counter increase is ; every remaining node's counter is frozen. Recall that we call the active node critical child and its parent critical parent (if its parent exists). We now specify the algorithm's matching condition in terms of the counter values and the potential functions . Suppose we are at time and is the critical parent. The algorithm matches with the request of the critical child when
And we call a primary node for every such match.
Remark 4.7. We remark that the two failed attempts discussed in Section 1 can also be defined in this framework, by setting the potential function to be ( is the current pending child) and respectively. In the single-location case, every request has a unique node at all times and so we can use the notation of requests to express nodes without ambiguity.
Potential function . At a high level, the potential of node at time depends on the counters of its children, and when those children were previously terminated when was not the critical parent.
The key insight underlying the potential function is as follows. Let be two children of , and be a laminar optimal solution (Lemma 2.4) of the consolidated instance induced within . If matches some request that arrives before with one that arrives after , then we can charge the delay increase of between and to the match of made by . By laminarity, we can find distinct matches of that induce a partition of 's children, which naturally suggests a charging scheme to ; we prove this formally in Section 5.4.2. Since and thus the partition is unknown to our online algorithm, we define the potential function to minimize among all.
Definition 4.8 (Canonical partitions). Let be a node of that is pending at time and be its current children in . A partition of is contiguous if every part of the partition consists of consecutive children , and moreover, is canonical if is one of its parts.
Given a canonical partition of , its value is defined to be the sum of the values of its parts, where the value of part is defined as follows:
where is assigned a tentative value of if is still alive at time . In other words, if is a singleton, then its value is simply the counter value of its unique child. Otherwise, its value is the delay increase of between the moments when is added to the tree and when the last child in is terminated.
Definition 4.9 (Potential function ). The potential function for node n is:
Note that at any point in time, only the counter of the critical child can increase, and so only the potential of the critical parent can increase.
Remark 4.10. We remark that the algorithm indeed matches all pending requests, provided that is even and is unbounded for every . Otherwise, suppose for contradiction that some requests remain unmatched forever, then they are all going to be promoted to the root of . Consider the latest two live nodes in the instance of root , then is the critical parent and is the critical child, because there is zero request that is positioned at any other vertex. By definition, is the active node, so tends to infinity, whereas remains bounded because is frozen. Consequently, the matching condition must eventually be satisfied since , contradicting the assumption that and stay alive at the end.
5 Algorithm Analysis
We now analyze the competitive ratio of our algorithm and prove our main result Theorem 1.1.
Section overview. In Section 5.1, we prove a key property of that the counters are geometrically decreasing along chains (Lemma 5.2). In Section 5.2, we define a set of primary nodes for each and show that the cost of is at most times the total value of the counters of all 's (Lemma 5.7). In Section 5.3, we further prune the set of counters from into while only losing a constant factor of counter values (Proposition 5.11). Finally, in Section 5.4, we show that the total value of the counters of is at most times , the optimal cost of the consolidated instance induced within (Lemmas 5.21 and 5.26), and thus the desired competitive ratio of .
Notation. For brevity, for every , we write , , and for the values of , , and at time , respectively (if stays alive at the end, then define ). Since the counter is frozen once is terminated, we have for every . Likewise, and for every . We write to mean where tends to infinity.
5.1 Geometric Chain Property
We show that for every node n in the forest , its counter value is always at least twice its potential (Lemma 5.1) and then use it to prove that the counter values along chains are geometrically decreasing (Lemma 5.2).
Lemma 5.1. For every vertex and node , at every time , and if and only if is the critical parent when it is terminated by .
Proof. Fix a node and define the function . Since terminates at time as a critical parent if , to prove the lemma, it suffices to show that is continuous for every .
Suppose has children and is the canonical partition of minimum value. For each child , since does not vary between its arrival and the arrival of the next child , we have that also does not vary until arrives. Let be the optimal partition of for . Since the counter value is continuous for every node , we also have that and are continuous in the interval .
At , the set of canonical partitions changes, which may cause a discontinuity in . Since the counter of is 0 on arrival, the partition is a canonical partition of with value equal to that of . Thus, if it is discontinuous at , the potential can only decrease and so remains continuous.
We conclude that is continuous for every , as desired.
We now use Lemma 5.1 to prove that the counter values along chains are geometrically decreasing.
Lemma 5.2 (Geometric Chain Property). Let be all of the live nodes in . Then and for every .
Proof. Proposition 4.4 implies that is the latest child of among . By Lemma 5.1 and the fact that is a part in every canonical partition of , we have that . This proves the first part of the lemma.
For the second part of the lemma, we first note that according to laminarity of node intervals. As a result, we apply the first part of the lemma to and get
Since counter values are nondecreasing with time, we get that .
This property of decreasing geometric sequence will play an important role in allowing us to consider a subset of nodes and charge their counters to , so as to avoid overcharging (Lemma 5.10).
5.2 Charging to Counters
In this part, we show that we can use the total counter value of all primary requests as a proxy for the total cost of all 's.
Definition 5.3 (Active and reluctant time). For every , define its active time to be the set of times in which is active, its reluctant time to be the set of times in which is the latest live node in yet inactive (ALG is in odd state). We also use to denote the time when is neither active nor reluctant, or equivalently, .
For each node , we are going to relate the actual delay increase during interval of request to the final counter values of some nodes among different positions in . Since every pending request in has a unique corresponding node interval at each moment, the total delays of all 's can be bounded by the sum of delay increase during every node interval of its corresponding request, which allows us to analyse in the node-wise instead of request-wise way. Furthermore, for each node, we charge its reluctant time and the remaining part separately.
We first establish the following structural property, which shows that the interval can be expressed as the union of and of every of its children q.
Claim 5.4. Let be a node. Then, for any two children of , we have . Moreover, .
Proof. Since and are siblings, Proposition 4.4 implies that they cannot both be live at the same time, which in turn implies that . According to our definition of two states of and reluctant time of nodes, . Moreover, at each for a child : if , then counter is active and ; if , then is neither active nor reluctant, and so . As a result, .
Lemma 5.5. For every vertex and , we have .
Proof. Observe that , and so is immediate. We prove by induction over .
We start with the base case: when is a leaf in . In this case, , and so by Claim 5.4, . Thus, .
Next, suppose and the claim holds for every child . By Claim 5.4, we have . It remains to relate the sum to , which is at most by Lemma 5.1.
Suppose consists of and is the canonical partition of such that , then we have . We now show, for each part , that . Suppose , and let be the earliest node and the latest in . Then,
On the other hand, if , then because (Corollary 4.5) and delays are noncrossing, we have
where the last inequality is obtained by applying the inductive hypothesis on . Thus, we have shown that for each part .
Putting the above together, we have
where the last inequality holds by Lemma 5.1.
Next we consider the delay increase during when is reluctant. In this part, we want to avoid nodes such that: but is not positioned at , because they do not actually represent their requests' positions or contribute to positive counter increase. At time , we call a live node a valid node if is a pending request positioned at . We then show that when a valid node is reluctant at time , we can always find another valid node that is not reluctant at some moment within the subtree to charge the instantaneous delay increase of to. Moreover, the total charge a valid node that is not reluctant at a given moment can receive is no more than times its instantaneous delay increase. In summary, the following lemma gives us an upper bound of the total delay incurred by every node when it is reluctant, expressed in terms of the total counter values.
Lemma 5.6.
Proof. We will define a pair of mappings on all tuples of valid node and time such that is reluctant at . Furthermore, is a tuple such that is a valid node at , and is a value such that .
Now we show how to define the mapping. Given a valid reluctant n at time t whose position is u, the total number of requests positioned at descendants of u is odd. As a result, there is a descendant of u such that: at time t, there is at least one request positioned at and the total number of requests positioned with is odd, while no request is positioned at any vertex on the path between and . If there is at least one valid active node at , then define and . Otherwise, we show that there must be a request positioned at that does not have a live node: (Case 1) if an odd number of requests are positioned at , then is in even state and so as long as there exists at least one valid node, the latest one must be active; (Case 2) if an even number (at least two) of requests are positioned at , then is in odd state and so the second latest live (and valid) node is active if every request positioned at has a live node. As a result, must have matched with a request such that has already been promoted to the parent of before this match. In this case, let be the moment that ( is unique according to our bijection assumption of every request's delay), then has a unique valid node in . We define and . It is easy to see that holds as (Observation 3.2), and we have the local derivative .
From the above paragraph, is well-defined for every reluctant valid node at . Moreover, if , then the position of is a descendant of that of . Because there is no reluctant node at any leaf vertex, for every reluctant at time , there exist and such that is not a reluctant node at time . We define and , then and so we charge the delay increase of to by the substitution derived from the chain rule of differentiation.
Next we bound the number of tuples such that for every valid non-reluctant node at time . according to the two cases that we define . For every reluctant node at time , is at most one, because in the first case the function value has to be an active node at time . As a result, there are at most two different chains beginning at where the next element in the chain is a pre-image of the previous one, and each chain is of length no more than (including itself). Therefore, .
We conclude that the total charge is no more than , which is no more than according to Lemma 5.5.
Combined with Lemma 5.5, it holds that .
Next, we show that it suffices to consider the counters of primary nodes. Let denote the set of primary nodes in : we have previously defined every critical parent node when a match happens to be a primary node, here we complement it by also including the earliest node among all that stay alive at the end (if there is any). By applying Lemma 5.2 to nodes that are terminated at the same moment and nodes that stay alive at the end, it is easy to see that we can use to represent node counters in while only losing a factor of 2. Thus, we can bound the cost of all single-location subroutines by the counters of primary nodes, up to a constant:
Lemma 5.7 (Charging to Counters). .
5.3 Pruning Counters
We now fix a vertex of and prune the set of counters from based on 's matching , to finally define the desired set that we will charge to .
For the case where there is one request unmatched by because is odd, we define a request such that and its delay is zero, and include . For every time interval , we say that if is right-unbounded. In the definitions and analysis hereafter (e.g. Definitions 5.8 and 5.19) we regard as a request in and as a match made by .
In the following analysis and definitions, for an interval , if is at a leaf vertex and so , then we do not include the request itself when we consider . Otherwise, we assume without loss of generality that no request arrival occurs at the exact moment .
Definition 5.8 (Preempted nodes and intervals). A node and its interval are said to be left-preempted (or right-preempted, resp.) if there exists a request that arrives during that matches with a request with (or , resp.).
Note that a node may be simultaneously left- and right-preempted.
Definition 5.9 (Left- and right-equivalent requests). For every , if is left-preempted, define to be the latest arrival in that is matched by to a request that arrives before . Similarly, if it is right-preempted, define to be the earliest in that is matched by to a request that arrives after . Nodes are said to be left-equivalent if , and right-equivalent if .
Later, we will charge portions of the counter values to based on and . This may lead to overcharging if multiple requests belong to the same left- or right-equivalence class. The following lemma allows us to restrict our attention to a pruned subset in which no two requests are left- or right-equivalent, while losing only a constant factor.
Lemma 5.10. For any set of nodes , there exists a subset such that and no two nodes in are left-equivalent or right-equivalent.
Proof. First, observe that if two nodes are left-equivalent or right-equivalent, then either or . In particular, a left-equivalence (or right-equivalence) class forms a chain, and thus Lemma 5.2 implies that .
Given any , we obtain in two stages. Initially, let . In the first stage, for each left-equivalence class in , we remove from all nodes except the one with the highest counter value. In the second stage, we apply the same pruning procedure to each right-equivalence class among the remaining nodes in .
By the above argument, the total counter value of decreases by a factor of at most 2 in each stage. Hence, .
Combining Lemmas 5.7 and 5.10, we immediately get the following:
Proposition 5.11. There is a set of nodes such that the total cost of all virtual algorithms and no two nodes in are left-equivalent or right-equivalent.
5.4 Charging Counters to
Fix . Let be the pruned set of primary nodes guaranteed by Proposition 5.11. In the remainder of this section, we show that via a charging scheme. We first define odd and even subintervals which lets us partition nodes into two groups: aligned and misaligned, based on the state of right after their arrivals as well as how matches requests that arrive during those intervals. In Section 5.4.1, we show that the total counter value of aligned nodes is at most . Handling the misaligned nodes is significantly more challenging, and is where the potential function becomes necessary. In Section 5.4.2, we charge part of the counters to aligned nodes and some directly to .
Definition 5.12 (Odd and even nodes). For every , consider the state of right after when arrives: we say that is odd (or even, resp.) if is in odd (or even, resp.) state.
Note that if is at a leaf vertex, then it is always even, which is a special case where the algorithm runs on a single-location metric.
Odd and even subintervals. We use to denote all time by which an odd number of requests from have arrived and similarly define . We get that whenever the counter of node is active at , it must hold that if is odd and if is even (Lemma 5.15). As a result, when we charge to , we want to find a request that is pending during or depending on the state of right after , and we will discuss different cases depending on whether such a request can be found.
Definition 5.13 (). Let be a node in and , the number of requests that arrive during time interval within subtree . For each , let be the -th earliest request of and be its arrival time (define to be ). Moreover, define a request to be -odd if is odd and -even otherwise. The arrival times partition into odd and even subintervals as follows: for , the -th subinterval is ; the final subinterval is . Denote by and the union of the -th subintervals for odd and even , respectively.
In the remainder of the analysis, when we compare and its node counters and intervals against all requests in , we regard those that have not been promoted to as requests under as well. For requests that have not been promoted to , we regard their matching status under as per whether they are pending or have been matched by the algorithm . After they are promoted to , we regard their matching status under as per whether they have been matched in the instance , rather than whether they have actually been matched by . According to the mechanism of each and Corollary 4.5, the counter of a live node is only active when the number of pending requests under that arrive later than is even. The next lemma derived from basic properties of and the laminar forest relates its parity to the arrivals of requests in .
Lemma 5.14. For every , during , the parity of the number of pending requests under that arrive after only changes when a new request in arrives.
Proof. It is easy to see the parity in question does not change when a request is promoted to a new vertex within , or when two requests that are positioned at some descendant of are matched by . If it is changed by a match made by in , then must have matched a pair of requests that . Assume this happens at time , then is between nodes of and on the path of live nodes in (Proposition 4.4), a contradiction to Property 4.2.
Now we come to the key property that links the counter increase to the parity of subintervals.
Lemma 5.15. For every node , we have if is odd and if is even.
Proof. We prove the case that is odd, and the other case can be shown analogously. At each moment , there are even number of pending requests in under that arrive after . Because is odd, the parity in question is odd at . Furthermore, it only changes when a new request in arrives (Lemma 5.14), and so for every moment when it is even, must be in , hence our claim.
We now consider how the requests in are matched by , which will be important for our charging scheme.
Definition 5.16 (Aligned and misaligned nodes). A node is aligned if: is -odd (or -even, resp.) and is even (or odd, resp.); or, if is odd and not left-preempted. Otherwise is misaligned. Let and be the sets of aligned and misaligned nodes in , respectively.
We need to be cautious with the primary node (at most one) that stays alive at the end, because it is not matched as a critical parent and hence we cannot use its potential to charge, as what we do to misaligned primary nodes in Section 5.4.2. Luckily, we show that such a primary node must be aligned and so we can directly charge to as in Section 5.4.1, without reliance on .
We first prove a property that will be used for , as it is laminar.
Lemma 5.17. Let be a laminar solution. Then, for every match , the number of requests such that is even.
Proof. Because a laminar solution always matches the latest two pending requests at the time, when is matched, all requests that arrive between and have all been matched. Any request that cannot be matched with any request such that or when and are both unmatched, otherwise it is a violation of the laminar property. As a result, all requests that arrive between and are matched into pairs by , and thus the number of such requests must be even.
Lemma 5.18. If is the primary node that stays alive at the end, then is aligned.
Proof. Because is the primary node that stays alive at the end, all requests that arrive before are: either never promoted to , or matched in before . Let be the number of requests that arrive before , be the number of requests that arrive during , be the number of requests that arrive during and are unmatched under at . According to the mechanism of and Lemma 5.14, for requests that arrive before : under , either they are matched with each other, or they can only be matched with requests that arrive during by the moment . Therefore, has the same parity as , and is odd (or even, resp.) if and only if is odd (or even, resp.); this happens if and only if , the number of requests that arrive before (including , is even (or odd, resp.). By laminarity of and Lemma 5.17, when exists, because is at an odd position among all requests in , is at an even position. If the number of requests that arrive before is even (or odd, resp.), then is -even (or -odd, resp.). If does not exist, then must be even and so must be odd. In summary, must be aligned.
We introduce the following notation to express the structure of as well as its cost.
Definition 5.19. For every that is matched by , let denote the request that matches with, and denote the delay incurred by a request under if or the delay incurred by if , both under .
Observe that .
Dividing and into two parts. If is left-preempted, let be the first request that arrives after ; otherwise, define to be the first request that arrives after . We divide into two parts: and ( if arrives after or does not exist). Observe that is the subset of that arrive before (including if is left-preempted). Moreover, if is not left-preempted, then all requests in arrive during ; if or does not exist, then all requests in arrive during . We also divide into and .
Claim 5.20. matches every request in to one that arrives no earlier than .
Proof. By definition of left-preemption, the claim is true if is not left-preempted. Suppose is left-preempted. Since every request of arrives after , by definition of , no request in is matched by to a request that arrives earlier than . Moreover, matches to a request that arrives earlier than . Thus, by laminarity, no request in can be matched with a request in either. This gives us the claim.
5.4.1 Charging aligned counters to
Recall that node is aligned if is -odd (or -even, resp.) and is even (or odd, resp.), or if is odd and not left-preempted. In this subsection, we are going to prove a stronger statement. Let be the set of all aligned nodes in and be the pruned subset of it by applying Lemma 5.10 to , and so . We will charge to , which then provides an upper bound of as well as since . Our main lemma is the following:
Lemma 5.21 (Bounding Aligned Counters). .
High level overview. The key property of an aligned node that is odd (or even, resp.) is that, for every odd (or even, resp.) subinterval of from onwards, has at least one request in that is pending for the entire subinterval. Since can only be active during odd (or even,resp.) subintervals if is odd (or even, resp.), for , we can charge the instantaneous delay of when is active to the instantaneous delay of a pending request in . Since we can find such a pending request in , its instantaneous delay increase must always be at least that of by noncrossing delays, and thus the instantaneous charging argument works. We can charge the remaining portion of the counter value, i.e., the part up till , to , whose value is at least no matter whether arrives before or after , also by properties of noncrossing delays, and thus at least .
Claim 5.22. Let be an aligned node such that . If is odd (or even, resp.), then for every odd (or even, resp.) subinterval of with , there exists a request that is pending in for every .
Proof. Let be the set of requests that arrive in . Since is aligned, regardless of whether is left-preempted or not, is -odd (or -even, resp.) if is odd (or even, resp.). Thus, is odd in both cases. By Claim 5.20, matches none of to requests earlier than . Since the next request arrives at time , must keep some request of pending during the subinterval .

Figure 2: Illustration of a node and requests in . The red dot represents the start time of interval , black dots represent the arrivals of requests, the dashed curve illustrates the interval , and the solid curves illustrate matches made by . is even and is -odd. We can let when is pending under , for . In this figure, is , and .
Lemma 5.23. Let be an aligned node. If is left-preempted, then ; otherwise, .
Proof. We have
We now bound the two terms separately. According to Lemma 5.15 and Claim 5.22, is defined for every . The fact that and the noncrossing property of the consolidated instance imply the following bound on the integral: .
It remains to bound . If is not left-preempted, then must be odd and so is frozen before the arrival of , we are done. Otherwise, is -odd (or -even, resp.) and is only active during even (or odd, resp.) subintervals if is even (or odd, resp.), we have that . The arrival time of is earlier than , and there are two cases: , or . If , then
according to the noncrossing property that the total delay of a later request is no more than that of an earlier one. If , then
according to the noncrossing property that the delay increase rate of an earlier request is no more than that of a later one. Because , in both of the above cases it holds that
This completes the proof of the lemma.
We now use Lemma 5.23 to charge the total counter value of to and prove the following.
Lemma 5.24. .
Proof. Consider the following charging scheme. For each node , we charge to the request for each . Moreover, if is left-preempted, then we also charge to the request . We call the first type of charging instantaneous charging, and the other non-instantaneous charging. By Lemma 5.23, the total charge is at least .
We now show that we do not overcharge . We first bound the total charge due to instantaneous charging. Since at most one node can be active at any time, at each time , there is at most one request that is pending in that is charged , and incurs an instantaneous delay cost of . Thus, the total instantaneous charge is at most .
Every request also receives a non-instantaneous charge of for each node for which . Since no two nodes in are left-equivalent, we get that it is charged at most once. Moreover, only requests that arrive later in a matched pair by can receive a non-instantaneous charge. Thus, the total non-instantaneous charge is at most .
In conclusion, the total charge is at least , and is at most . As a result, we have , as desired.
Combined with Lemma 5.10, we have the following corollary, which immediately implies Lemma 5.21, and will be used in the following subsection to charge to .
Corollary 5.25. .
5.4.2 Charging misaligned to
Next we consider requests in . This subsection will be devoted to proving the following result:
Lemma 5.26 (Bounding Misaligned Counters). .
Roadmap. We first prove properties of and (Lemmas 5.17 and 5.27). Next, we define n-crossing requests and split children, and use these properties to define an -induced canonical partition that we will charge to. Finally, we put these together to prove Lemma 5.26.
In the previous section where we considered the case , we are able to directly charge the instantaneous increase of for each to a request that is also pending under , while this fails for . Therefore, we now need to better exploit the structure of and the property that (Lemmas 5.1 and 5.18), to charge against through as the medium.
The following lemma provides us with more insight into the relation between a node and its children, which will be used when we charge the potential to .
Lemma 5.27. For every and , if , then and have the same parity; if , then and have opposite parities. Furthermore, for , is odd (or even, resp.) if is even (or odd, resp.).
Proof. For every node and , according to Corollary 4.5. We discuss two different cases: is before , is after .
In the first case, let denote the number of requests that arrive during and are unmatched under at , denote the number of requests that arrive during and are unmatched under at , denote the number of requests that arrive during (note that is not included in any of the three parts). By definition, is odd (or even, resp.) is equivalent to that is odd (or even, resp.). Because is a child of , all requests that arrive during must have been matched by time under . By Lemma 5.14, they can only be matched with requests that arrive later than . As a result, at time , the parity of the number of unmatched requests under that arrive after is the same as , which differs from if and only if is even, if and only if .
In the second case, let denote the number of requests that arrive during and are unmatched under at , denote the number of requests that arrive during , denote the number of requests that arrive during . The parity of has the same parity as . At time , all requests that arrive between and have been matched under . Similar to the previous case, by Lemma 5.14, the number of unmatched requests under at that arrive after has the same parity as , which differs from if and only if is even, if and only if .
Now we come to the last statement. By the definition of primary nodes and Lemma 5.18, it holds that every misaligned primary node is the critical parent when it is terminated, and so (Lemma 5.1). Let be the critical child, then is active at , which implies that the number of unmatched requests under that arrive after is even at . Since no request that arrives between and is unmatched under at the moment, the number of unmatched requests under that arrive after is odd at . If is even (or odd, resp.), then this amount at is even (or odd, resp.), so the number of new arrivals during (the only event that changes its parity), , is odd (or even, resp.).
We now show how to construct the -induced canonical partition that we will charge to. For every , we define a set of -crossing requests based on how 's matches intersect , as well as split children according to how those requests' matches of intersect each of 's child interval. We will use the -crossing requests to define a canonical partition of and charge its value, and thus , to the cost that incurred on the -crossing requests and the counters of some aligned requests, which we have already bounded in Corollary 5.25.
Definition 5.28 (n-crossing, split children). Let be a node in and be a request in . We say that and its pending interval under are -crossing if is maximal among 's requests' intervals that intersect but does not contain , i.e., . Moreover, is internal -crossing if, in addition, . The set of -crossing requests is denoted by .
A child node is said to be split by an -crossing request if it is the earliest request in such that or . The set of split children nodes is denoted by .

Figure 3: Illustration of -crossing requests with 7 children and 3 -crossing requests . In this figure, the red dots represent the starts of node intervals, the black dots represent the arrivals of requests in , the arcs represent the matching for the -crossing requests, and the gray boxes represent for each child , its interval . The requests and are not in . The split children are (split by ) and (split by ).
Proposition 5.29. Let , be its children, and be the -th earliest -crossing request. Then, if is left-preempted, otherwise is the first request that arrives during . For each , is the next request that arrives after . Moreover, for each , the request is -odd (or -even, resp.) if is even (or odd, resp.). Finally, if is the latest -crossing request, then .
Proof. If is left-preempted, first of all, observe that : otherwise if is not maximal, then there is a request in that arrives later than and is matched by with another that arrives before , a contradiction to the definition of . Therefore, by definition that is the earliest request in , which then implies that by laminarity. As a result, must be and . The case that is not left-preempted is easy to show analogously.
It is easy to see that , otherwise if , then is not maximal among intervals that intersect as it is contained in . Suppose, towards a contradiction, that there is a request that arrives after and before . Let be the next request that arrives after . Observe that is not an -crossing request as it would have implied that . By laminarity of , there are 3 possible cases: (1) contains ; (2) contains ; or (3) . The first two cases are ruled out by the fact that and are -crossing. The last case is also ruled out since it implies that should have been an -crossing request. Since every possibility leads to a contradiction, we get the first part of the proposition.
Moreover, since is -even (or -odd, resp.) if is even (or odd, resp.), is the next request that arrives after , and the number of requests that arrive between and is even for every (Lemma 5.17), we get that is -odd (or -even, resp.) if is even (or odd, resp.), for every .
Finally, we show that , where is the latest -crossing request. Because is -odd (or -even, resp.) if is even (or -odd, resp.), if , then must be -even (or odd, resp.) if is even (or odd, resp.), and the next request that arrives after should be in (Lemma 5.27) and thus as well, a contradiction. Therefore, arrives after , and so is right-preempted. By the maximality of and the definition that is the earliest in that is matched by with a request that arrives after , must be .
-Induced Partition. Let , be its children, be the split children, and be request in that splits for each . The -induced partition of consists of:
• singleton for each split child, ;
• the singleton if not already included in the previous step;
- among all remained children of : every maximal contiguous set such that there exists that and ; if such an -crossing request that and does not exist for child , then singleton .
Proposition 5.29 implies that indeed partitions . In the example in Fig. 3, the partition consists of .
In the remainder of this subsection, we describe the charging scheme for every individually (Lemma 5.30), and then in the proof of Lemma 5.26, use Lemma 5.10 to show that there is no overcharging.
We first observe that in the last case, if a non-split child satisfies that such an -crossing request that and does not exist, then there is no new request arrival in during the whole . In this case, if the counter of increases to a positive value, then the child counter of cannot be active (because and its child have opposite parities in this case according to Lemma 5.27) and so cannot be terminated as a critical parent, a contradiction. As a result, must be zero, and we omit the singleton in the remaining analysis.
Lemma 5.30. For , we have .
Proof. Observe that is a canonical partition and thus, . We now show that .
We consider every part such that: , arrives before and arrives after . If , then its value is no more than . There are two cases: , or . In the first case,
in the second case,
If , then , and we can analogously discuss two cases or to prove that always holds. Moreover, because of the maximality in defining each part, we do not charge different parts to the same -crossing request .
If is a split child, we are already done. Otherwise let be the latest request in , then must arrive before . Because matches after (Proposition 5.29), we can similarly show that .
Combining the above gives us the desired upper bound on and thus on .
Proof of Lemma 5.26. Consider the following charging scheme. For each node , we charge to each -crossing request that is used to cover a non-split part of , and to each split child . We call the first type of charging a crossing charge and the second a split charge. Lemma 5.30 and Lemma 5.1 imply that the total charge is at least .
We now argue that the total charge is at most . Let be a request. First, we bound the total crossing charge receives. Observe that if is an internal -crossing request and receives crossing charge for some , such a node must be unique: otherwise if there are two such nodes , then for some due to that and laminarity of intervals, but in this case cannot receive crossing charge for any . As a result, every can receive crossing charge for some as an internal -crossing request at most once, left-preempts at most one node and right-preempts at most one node—thus the total crossing charge that all requests receive is at most .
Next, we bound the total split charge. Let be a split child of and be the request in that splits it. If , then must be the first request that arrives during and so is not left-preempted. If is even, then is -odd (Proposition 5.29) and so arrives during , which implies that is odd (Lemma 5.27). Therefore, is aligned. If and is even, then is -even. If arrives during , then is odd and is -even, is aligned; if arrives during , then is even and is -odd, is aligned as well. Similar arguments also hold for the case that is odd. In summary, is an aligned node. As a result, is a subset of . By Corollary 5.25 from the earlier subsection, we have the following upper bound on the total split charge:
We conclude that the total of crossing charge and split charge is at most . Since the total charge is also at least , we have .
By combining Proposition 5.11 and Lemmas 5.21 and 5.26, we can compare the total cost of all 's against that of all 's:
Lemma 5.31. .
We now complete the proof of Theorem 1.1. By Lemmas 3.1 and 5.31, we have
where the last part of the equalities is no more than
for any global solution SOL, according to Lemma 3.4. Together with the randomized embedding of general metrics into 2-HSTs with height with distortion ratio (Lemma 2.8) and Lemma 2.9, there is an -competitive algorithm on general n-point metrics with aspect ratio . In the special case of the single location, there is only one vertex u of which no descendant filters out any request, and so is the same as the consolidated instance and the constant competitiveness is straightforward from Lemma 5.31 applied to H = 1. This concludes the proof of Theorem 1.1.
6 Concluding Remarks and Open Problems
In this paper, we presented the first polylogarithmic-competitive algorithm on general metrics as well as constant-competitive algorithm on the single location for online matching problem with non-identical delay functions. Our algorithm operates in the non-clairvoyant setting and applies to arbitrary noncrossing delay functions, thereby simultaneously removing the assumptions of identical delay functions, concavity, and clairvoyance that underlie all previous constant- or polylogarithmic-competitive algorithms. Our result substantially broadens the class of delay functions for which competitive algorithms are known and narrows the gap between online matching with delays and many other online optimization problems with delays.
Several interesting questions remain open. The most immediate one is whether the noncrossing assumption can be relaxed. As we show in Proposition A.1 (Section A), some restriction on the delay functions is necessary, since arbitrary delay functions do not admit a bounded competitive ratio even in the clairvoyant setting. It would therefore be interesting to characterize the largest natural class of delay functions that admits a constant-competitive algorithm.
Another natural direction is to remove the dependence of the competitive ratio on the aspect ratio of the metric space, as it can be unbounded as a function of the number of points. In particular, can one design an -competitive algorithm for general metric spaces? Existing algorithms for linear and concave delays rely on the height reduction technique to embed general metrics into weighted HSTs with height . However, weighted HSTs do not preserve the symmetry that all leaf descendants of a vertex are at the same distance from it, which breaks our charging scheme as the total delay when different leaves' requests are promoted to the same vertex can differ significantly. Moreover, our method to charge a request's delay increase in the odd state to some counter increase within the subtree (Lemma 5.6) is more complex than the previous ones while losing another height factor due to properties of virtual algorithms and matches. If one can achieve an -competitive algorithm for general metric spaces, then it would be a unifying framework that includes the previous results on uniform linear and concave delays as special cases.
AI Usage
All algorithms and proofs were developed by the authors without the use of AI tools. We subsequently used Gemini DeepReview, the paper-review tool suggested by the conference, and addressed various issues identified in its report, particularly those concerning Section 5.
References
[1] Sara Ahmadian, Shuchi Chawla, Ravi Kumar, Manish Purohit, and Shirley Zhang. A General Framework for Matching with Delays. 2026. arXiv: 2610.21285 [cs.DS]. URL: https://arxiv.org/abs/2610.21285.
[2] 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, August 16-18, 2017, Berkeley, CA, USA. Ed. by Klaus Jansen, José D. P. Rolim, David Williamson, and Santosh S. Vempala. Vol. 81. LIPIcs. Schloss
Dagstuhl - Leibniz-Zentrum für Informatik, 2017, 1:1–1:20. DOI: 10.4230/LIPICS.APPROX-RANDOM.2017.1. URL: https://doi.org/10.4230/LIPIcs.APPROX-RANDOM.2017.1.
[3] Yossi Azar, Ashish Chiplunkar, and Haim Kaplan. "Polylogarithmic Bounds on the Competitiveness of Min-cost Perfect Matching with Delays". In: Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16-19. Ed. by Philip N. Klein. SIAM, 2017, pp. 1051–1061. DOI: 10.1137/1.9781611974782.67. URL: https://doi.org/10.1137/1.9781611974782.67.
[4] Yossi Azar, Ashish Chiplunkar, Shay Kutten, and Noam Touitou. "Set Cover with Delay – Clairvoyance is not Required". In: Proc. ESA. 2020, 8:1–8:21.
[5] Yossi Azar, Yuval Emek, Rob van Stee, and Danny Vainstein. "The Price of Clustering in Bin-Packing with Applications to Bin-Packing with Delays". In: Proc. SPAA. 2019, pp. 1–10.
[6] Yossi Azar and Amit Jacob Fanani. "Deterministic min-cost matching with delays". In: Theory of Computing Systems (2020), pp. 1–21.
[7] Yossi Azar, Arun Ganesh, Rong Ge, and Debmalya Panigrahi. "Online service with delay". In: Proc. STOC. 2017, pp. 551–563.
[8] Yossi Azar and Shahar Lewkowicz. "Online Joint Replenishment Problem with Arbitrary Holding and Backlog Costs". In: Proceedings of the Thirty-Seventh Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2026, Vancouver, Canada, January 11-14, 2026. SIAM, 2026, pp. 2702–2725. DOI: 10.1137/1.9781611978971.99.
[9] 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, Virtual Conference, January 10 - 13, 2021. Ed. by Dániel Marx. SIAM, 2021, pp. 301–320. DOI: 10.1137/1.9781611976465.20. URL: https://doi.org/10.1137/1.9781611976465.20.
[10] Yossi Azar and Noam Touitou. "General framework for metric optimization problems with delay or with deadlines". In: Proc. FOCS. 2019, pp. 60–71.
[11] 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, Durham, NC, USA, November 16-19, 2020. Ed. by Sandy Irani. IEEE, 2020, pp. 1368–1379. DOI: 10.1109/FOCS46700.2020.00129. URL: https://doi.org/10.1109/FOCS46700.2020.00129.
[12] Sujoy Bhore, Michal Pawlowski, and Seeun William Umboh. "Online TCP Acknowledgment Under General Delays". In: Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, APPROX 2026, Boston University, Boston, Massachusetts, USA, and RANDOM 2026, Boston University, Boston, Massachusetts, USA, August 19-21, 2026. Ed. by Mohit Singh and Tom Gur. Vol. 392. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2026, 26:1–26:24. DOI: 10.4230/LIPICS.APPROX/RANDOM.2026.26. URL: https://doi.org/10.4230/LIPics.APPROX/RANDOM.2026.26.
[13] Marcin Bienkowski, Martin Böhm, Jaroslaw Byrka, Marek Chrobak, Christoph Dürr, Lukas Folwarczny, Lukasz Jez, Jiri Sgall, Nguyen Kim Thang, and Pavel Vesely. "Online Algorithms for Multi-Level Aggregation". In: Proc. ESA. 2016.
[14] Marcin Bienkowski, Artur Kraska, Hsiang-Hsuan Liu, and Pawel Schmidt. "A primal-dual online deterministic algorithm for matching with delays". In: Proc. WAOA. Springer. 2018, pp. 51–68.
[15] Marcin Bienkowski, Artur Kraska, and Pawel Schmidt. "A Match in Time Saves Nine: Deterministic Online Matching with Delays". In: Proc. WAOA. 2017, pp. 132–146.
[16] Marcin Bienkowski, Artur Kraska, and Pawel Schmidt. "Online Service with Delay on a Line". In: Proc. SIROCCO. 2018.
[17] Niv Buchbinder, Moran Feldman, Joseph Naor, and Ohad Talmon. "O(depth)-competitive algorithm for online multi-level aggregation". In: Proc. SODA. 2017, pp. 1235–1244.
[18] Rodrigo A Carrasco, Kirk Pruhs, Cliff Stein, and José Verschae. "The online set aggregation problem". In: Proc. LATIN. Springer. 2018, pp. 245–259.
[19] Ryder Chen, Jahanvi Khatkar, and Seeun William Umboh. "Online Weighted Cardinality Joint Replenishment Problem with Delay". In: 49th International Colloquium on Automata, Languages, and Programming, ICALP 2022, Paris, France, July 4-8, 2022. Ed. by Mikolaj Bojanczyk, Emanuela Merelli, and David P. Woodruff. Vol. 229. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2022, 40:1–40:18. DOI: 10.4230/LIPICS.ICALP.2022.40. URL: https://doi.org/10.4230/LIPIcs.ICALP.2022.40.
[20] 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, Atlanta, Georgia, USA, September 11-13, 2023. Ed. by Nicole Megow and Adam D. Smith. Vol. 275. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2023, 17:1–17:17. DOI: 10.4230/LIPICS.APPROX/RANDOM.2023.17. URL: https://doi.org/10.4230/LIPIcs.APPROX/RANDOM.2023.17.
[21] Michael Dinitz, Jeremy T. Fineman, and Seeun William Umboh. "Learning-Augmented Online Algorithms for Nonclairvoyant Joint Replenishment Problem with Deadlines". In: 53rd International Colloquium on Automata, Languages, and Programming, ICALP 2026, Royal Holloway, University of London, Egham, United Kingdom, July 7-10, 2026. Ed. by Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis. Vol. 374. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2026, 77:1–77:21. DOI: 10.4230/LIPICS.ICALP.2026.77. URL: https://doi.org/10.4230/LIPIcs.ICALP.2026.77.
[22] 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, Vancouver, BC, Canada, January 11-14, 2026. Ed. by Kasper Green Larsen and Barna Saha. SIAM, 2026, pp. 3936–3964. DOI: 10.1137/1.9781611978971.144. URL: https://doi.org/10.1137/1.9781611978971.144.
[23] Yuval Emek, Shay Kutten, and Roger Wattenhofer. "Online matching: haste makes waste!" In: Proc. STOC. 2016, pp. 333–344.
[24] Yuval Emek, Yaacov Shapiro, and Yuyi Wang. "Minimum cost perfect matching with delays for two sources". In: Theoretical Computer Science 754 (2019), pp. 122–129.
[25] Leah Epstein. "On bin packing with clustering and bin packing with delays". In: Discret. Optim. 41 (2021), p. 100647. DOI: 10.1016/J.DISOPT.2021.100647. URL: https://doi.org/10.1016/j.disopt.2021.100647.
[26] Tomer Ezra, Stefano Leonardi, Michal Pawlowski, Matteo Russo, and Seeun William Umboh. "Universal Optimization for Non-Clairvoyant Subadditive Joint Replenishment". In: Algorithmica 88.3 (2026), p. 43. DOI: 10.1007/S00453-026-01389-1. URL: https://doi.org/10.1007/s00453-026-01389-1.
[27] Jittat Fakcharoenphol, Satish Rao, and Kunal Talwar. "A tight bound on approximating arbitrary metrics by tree metrics". In: J. Comput. Syst. Sci. 69.3 (2004), pp. 485–497. DOI: 10.1016/J.JCSS.2004.04.011. URL: https://doi.org/10.1016/j.jcss.2004.04.011.
[28] 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 2026, Boston University, Boston, Massachusetts, USA, and RANDOM 2026, Boston University, Boston, Massachusetts, USA, August 19-21, 2026. Ed. by Mohit Singh and Tom Gur. Vol. 392. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2026, 25:1-25:23. DOI: 10.4230/LIPIcs.APPROX/RANDOM.2026.25. URL: https://doi.org/10.4230/LIPIcs.APPROX/RANDOM.2026.25.
[29] Anupam Gupta, Amit Kumar, and Debmalya Panigrahi. "Caching with time windows". In: Proc. STOC. 2020, pp. 1125–1138.
[30] Ngoc Mai Le, Seeun William Umboh, and Ningyuan Xie. "The Power of Clairvoyance for Multi-Level Aggregation and Set Cover with Delay". In: Proceedings of the 2023 ACM-SIAM Symposium on Discrete Algorithms, SODA 2023, Florence, Italy, January 22-25, 2023. Ed. by Nikhil Bansal and Viswanath Nagarajan. SIAM, 2023, pp. 1594–1610. DOI: 10.1137/1.9781611977554.CH59. URL: https://doi.org/10.1137/1.9781611977554.ch59.
[31] Xingwu Liu, Zhida Pan, Yuyi Wang, and Roger Wattenhofer. "Impatient Online Matching". In: Proc. ISAAC. 2018, 62:1-62:12. DOI: 10.4230/LIPIcs.ISAAC.2018.62. URL: https://doi.org/10.4230/LIPIcs.ISAAC.2018.62.
[32] Benjamin Moseley, Aidin Niaparast, and R Ravi. "Putting Off the Catching Up: Online Joint Replenishment Problem with Holding and Backlog Costs". In: Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA). SIAM. 2025, pp. 3865–3883.
[33] David B. Shmoys, Varun Suriyanarayana, and Seeun William Umboh. "Improved Online Algorithms for Inventory Management Problems with Holding and Delay Costs: Riding the Wave Makes Things Simpler, Stronger, & More General". In: Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2026, Vancouver, BC, Canada, January 11-14, 2026. Ed. by Kasper Green Larsen and Barna Saha. SIAM, 2026, pp. 2726–2742. DOI: 10.1137/1.9781611978971.100. URL: https://doi.org/10.1137/1.9781611978971.100.
[34] Noam Touitou. "Nearly-Tight Lower Bounds for Set Cover and Network Design with Deadlines/Delay". In: 32nd International Symposium on Algorithms and Computation, ISAAC 2021, Fukuoka, Japan, December 6-8, 2021. Ed. by Hee-Kap Ahn and Kunihiko Sadakane. Vol. 212. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2021, 53:1–53:16. DOI: 10.4230/LIPICS.ISAAC.2021.53. URL: https://doi.org/10.4230/LIPIcs.ISAAC.2021.53.
[35] Noam Touitou. "Frameworks for Nonclairvoyant Network Design with Deadlines or Delay". In: 50th International Colloquium on Automata, Languages, and Programming, ICALP 2023, July 10-14, 2023, Paderborn, Germany. Ed. by Kousha Etessami, Uriel Feige, and Gabriele Puppis. Vol. 261. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2023, 105:1–105:20. DOI: 10.4230/LIPICS.ICALP.2023.105. URL: https://doi.org/10.4230/LIPIcs.ICALP.2023.105.
[36] 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, Orlando, FL, USA, June 20-23, 2023. Ed. by Barna Saha and Rocco A. Servedio. ACM, 2023, pp. 761–774. DOI: 10.1145/3564246.3585107. URL: https://doi.org/10.1145/3564246.3585107.
[37] Noam Touitou. “Nearly-Optimal Algorithm for Non-Clairvoyant Service with Delay”. In: 42nd International Symposium on Theoretical Aspects of Computer Science, STACS 2025, Jena, Germany, March 4-7, 2025. Ed. by Olaf Beyersdorff, Michal Pilipczuk, Elaine Pimentel, and Kim Thang Nguyen. Vol. 327. LIPIcs. Schloss Dagstuhl - Leibniz-Zentrum für Informatik, 2025, 74:1–74:21. DOI: 10.4230/LIPICS.STACS.2025.74. URL: https://doi.org/10.4230/LIPIcs.STACS.2025.74.
A Proofs for Section 1 (Introduction)
Proposition A.1. There is no deterministic clairvoyant algorithm with bounded competitive ratio if later requests are allowed to have larger delay cost than earlier requests.
Proof. Consider the following adversarial instance where all requests arrive at the same location. Initially, two requests and arrive simultaneously at time , and both incur delay that grows linearly at unit rate. If the algorithm never matches them, then no additional requests arrive, and its competitive ratio is unbounded. Otherwise, suppose the algorithm matches and at time . At time , a new request arrives whose delay grows linearly at rate . Finally, request arrives at time . The optimal solution matches with and with , incurring a total cost of , whereas the algorithm incurs a cost of at least . Therefore, the competitive ratio is at least which is unbounded as can be arbitrarily large.
B Counterexamples
Counterexample of the first attempt. The first attempted algorithm increases the counter of the latest pending request with its instantaneous increase rate and matches the latest two requests if the counter value of reaches half of that of .
We construct a sequence of instances , and then show that the competitive ratio of the algorithm is unbounded as tends to infinity. The delay function is the uniform linear delay that for every request and . For every , we use to denote the cost of the algorithm, to denote the time difference between the arrival of the first request and the time all requests are matched by the algorithm, and to denote the final counter value of the first request when it is matched. Under the uniform linear delay, it is easy to see that is an upper bound of the optimal cost, and we will compare against to give a lower bound of the competitive ratio.
The first instance has two requests in total: . Under the algorithm, and are matched at time . As a result, we have and .
We now show how to construct when is defined. The first request of arrives at time 0. At time , we start to repeat a copy of , until the moment when all requests in this copy of are matched, and immediately at the same moment the first request of the next copy of arrives, and so on. We repeat for times in this way, where is a large integer. The moment when all requests of the 'th repetition are matched by the algorithm, the last request of arrives.
With the inductive argument, it is easy to see that the following observations hold, when we are allowed to choose the way of breaking ties.
Observation B.1. For every :
-
The algorithm always matches the first request with the last request in .
-
and hence .
-
and .
Now we consider the ratio between and : given and , the ratio between and tends to when tends to infinity. Therefore, we can choose appropriate values of 's such that for every , and so the algorithm has unbounded competitive ratio.

Figure 4: An illustration of the construction of with , where we use dots on the axis to represent the first and last requests of as well as the first request of each copy of . The arcs represent the time period of each and (from the arrival of the first request until all requests in it have been matched) rather than matches.
Counterexample of the second attempt. The second attempted algorithm increases the counter of the latest pending request with its instantaneous increase rate and matches the latest two requests when the sum of counter values of all children (see Section 4.1 for the definition of children, as well as roots that we are going to use later) of r reaches half of the counter value of r itself.
We still construct a sequence of instances . comprises a sufficiently long sequence of requests where the time differences between two consecutive arrivals are chronologically, and the delay function of each request is . The algorithm always matches two consecutive requests at time after the arrival of the later one in the pair. Let be the number of pairs in and be the sum of counter values of all roots of the laminar forest induced by the algorithm on , then . One feasible solution is to match the first request with the last request and all other consecutive requests from early to late into pairs, which provides an upper of the optimal cost . While slightly abusing the notation, we will use to denote the cost of the suggested solution for every , which provides an upper bound of the optimal cost.
Now we show how to construct recursively with . We first state the arrival times of all requests and then we define the delay function associated with each request. Let be the sum of final counter values of all roots of the laminar forest induced by the algorithm on , which will be used as a lower bound of the algorithm's cost. The first request of arrives at time 0. At time , we start a copy of , until the moment when all requests in this copy of are matched by the algorithm, then a new request arrives exactly at this moment. Time 1 after the arrival of the last request in the above process, we start to repeat this process. Let be the total number of such processes (including the first process).
We now describe the delay function of each request in the first repetition of such process, and the delays of requests in other repetitions are essentially the same functions shifted by their arrival times. The first request 's delay is . The last request of the process has the same delay increase shifted by its arrival time. For each request in a copy of : their delay increases in the same way as the corresponding request in (shifted by arrival times) until the end

Figure 5: An illustration of the construction of with , where we use dots on the axis to represent the first and last requests of each process as well as the first request of each copy of , and the request that arrives at the end of a process is the first request of the following process. The arcs represent the time period of each and (from the arrival of the first request until all requests in it have been matched) rather than matches.
when all requests in are matched by the algorithm, then it starts to increase at the same rate as the next request that arrives after it (the maximum possible increase rate while maintaining the noncrossing delays), until its total delay reaches and then it stops increasing hereinafter. Such delays satisfy the noncrossing property.
We have the following observations when we are allowed to choose the way of breaking ties for the algorithm:
Observation B.2. For every :
- The first request in each process has all roots under the implementation of the algorithm on and the last request of the process as all its children, and the algorithm always matches the first and last requests in the same process.
•
by matching the first and last requests of , all requests in the same copy of in the same way as , and the last request of a process with the first request of the following process.
Given and , the ratio between and tends to when is sufficiently large, which tends to by letting (and thus ) tend to infinity. Therefore, we can choose appropriate values of 's to make for every , and so the algorithm has unbounded competitive ratio.
C Proofs for Section 3 (A Pseudo-Reduction to Single-Location Instances)
Proof of Lemma 3.1. We first fix a vertex and consider the total delay incurred by each request when it is positioned at , for both and , and then compare them. There are two cases to consider. (Case 1) If stays unmatched in , then its delay while being positioned at is for both and . (Case 2) For every matched pair such that by , we discuss two different subcases according to whether the position of each of them is when makes the match. (Case 2a) If both are positioned at , then and are matched by at the same time, and the actual delay of and incurred when they are positioned at is equal to their virtual delay in . (Case 2b) If 's position is not , then the total delay incurred by when it is positioned at is by both and , which is a lower bound of the sum of the virtual delay of and in . Since the actual delay of them incurred while being positioned at is no more than , we lose a factor of at most 2. By summing up all vertices of , we conclude the total delay cost of is no more than .
Because ALG only matches a pair of requests with connection cost when they have both been promoted to , its connection cost is no more than the corresponding requests' total actual delays. As a result, the connection cost of ALG is no more than as well.
Therefore, the total cost of ALG is no more than .
Proof of Lemma 3.4. Because and , it suffices to show that for every .
Given any SOL, we construct a solution of the consolidated instance in the following way: if SOL matches a pair such that both and are in , then we match them on arrival of the later request; if SOL matches with another request not in , then stays unmatched.
Now we compare the cost of this solution to and . For every matched pair , the delay cost of the earlier request is no more than that under SOL because of our definition of the capped delay, and this part of the delay is counted as part of . For every unmatched request , SOL matches it with a request outside the subtree , which incurs cost of of using the edge connecting to . Because of the geometric property of 2-HST, this is at least , half the capped delay in the consolidated instance. As a result, .