arXiv:2611.05769cs.DSNov 2026

Manuscript Offprint

arXiv:2611.05769

Noncrossing is All You Need: Beyond Identical Delay Functions in Online Matching with Delays on General Metrics

Yossi Azar, Junhao Gan, Shahar Lewkowicz, Xiao Sun, Seeun William Umboh

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 O(1)O(1)-competitive algorithm for the single-location online matching problem with noncrossing delay functions in the non-clairvoyant setting as well as a randomized O(log⁡nlog⁡Δ+log⁡2Δ)O(\log n \log \Delta + \log^2 \Delta)-competitive algorithm of an arbitrary metric space where nn is the number of points of the metric space and Δ\Delta 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 (X,d)(X, d). 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 rr arrives at location ℓ(r)∈X\ell(r) \in X, has an arrival time a(r)a(r), and a delay function fr(t)f_r(t) that starts at 0 at a(r)a(r), and is nondecreasing with time. When rr is matched at time m(r)m(r), it incurs a delay cost of fr(m(r))f_{r}(m(r)). If request r is matched to request r′r', they incur a connection cost of d(ℓ(r),ℓ(r′))d(\ell(r), \ell(r')). The total cost of a matching is

∑rfr(m(r))+∑(r,r′)∈Md(ℓ(r),ℓ(r′)),\sum_{r}f_{r}(m(r))+\sum_{(r,r^{\prime})\in M}d(\ell(r),\ell(r^{\prime})),

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:

  1. all requests share the same delay function (shifted by the arrival time) 1^{1};

  2. the delay function is linear or concave;

  3. 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

  1. each request may have a different delay function;

  2. delay functions are arbitrary noncrossing functions (defined formally in Section 2);

  3. 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 O(1)O(1)-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 Δ\Delta, we obtain a randomized O(log⁡nlog⁡Δ+log⁡2Δ)O(\log n \log \Delta + \log^2 \Delta)-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.

1^{1}More specifically, fr(a(r)+d)=fq(a(q)+d)f_{r}(a(r)+d)=f_{q}(a(q)+d) for any two requests q, r and d≥0d\geq0.

Theorem 1.1. For any metric space with nn points and aspect ratio Δ\Delta, there is a randomized nonclairvoyant O(log⁡nlog⁡Δ+log⁡2Δ)O(\log n \log \Delta + \log^2 \Delta)-competitive algorithm for the online matching problem with noncrossing delay functions. For the special case of a single location, there is a deterministic nonclairvoyant O(1)O(1)-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 xx-axis, where the xx-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 2m2m requests arrive at times {0}∪{i,i+ε}i=1m−1∪{m}\{0\} \cup \{i, i + \varepsilon\}_{i=1}^{m-1} \cup \{m\} and the delay function of each request rr is given by fr(t)=min⁡{t−a(r),1}f_r(t) = \min\{t - a(r), 1\}. The greedy algorithm incurs a total cost of 1+(1−ε)(m−1)1 + (1 - \varepsilon)(m - 1). In contrast, the optimal solution matches the first request with the last and matches all remaining requests greedily, thereby yielding a total cost of 1+(m−1)ε1 + (m - 1)\varepsilon. By choosing ε\varepsilon sufficiently small, the competitive ratio of the greedy algorithm becomes at least mm, 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 O(log⁡Δ)O(\log \Delta), together with an additional O(log⁡Δ)O(\log \Delta) loss in the delay-cost term alone. Embedding the original metric space into HSTs introduces an O(log⁡n)O(\log n) 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 O(log⁡Δ(log⁡n+log⁡Δ))=O(log⁡nlog⁡Δ+log⁡2Δ)O(\log \Delta(\log n + \log \Delta)) = O(\log n \log \Delta + \log^2 \Delta).

References (36)