arXiv:2608.22524cs.DSAug 2026

Manuscript Offprint

arXiv:2608.22524

A tight lower bound for malicious online bipartite matching with limited recourse budget

Julia Baligacs, Bartłomiej Bosek, Paweł Putra, Marek Sokołowski, Anna Zych-Pawlewicz

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Júlia Baligács

University of Oxford

jbaligacs@gmail.com

Bartłomiej Bosek

Jagiellonian University, Kraków

bartlomiej.bosek@uj.edu.pl

Paweł Putra

University of Warsaw

p.putra@uw.edu.pl

Marek Sokołowski

Max Planck Institute for Informatics, SIC, Saarbrücken

msokolow@mpi-inf.mpg.de

Anna Zych-Pawlewicz

University of Warsaw

anka@mimuw.edu.pl

Abstract

We study one-sided online bipartite matching with recourse. In this setting, one side of a bipartite graph is known in advance, while vertices on the other side arrive online together with their incident edges. After each arrival, the algorithm must maintain a maximum-cardinality matching while minimizing the total number of reallocations, also known as the recourse budget. Despite extensive work, the exact recourse complexity of the problem remains unsettled: the best lower bound is Ω(nlog⁡n)\Omega(n \log n), whereas the best upper bound is O(nlog⁡2n)\mathcal{O}(n \log^2 n), where nn denotes the number of online vertices. Tight upper bounds of O(nlog⁡n)\mathcal{O}(n \log n) are known only for restricted graph classes, such as forests.

The best known upper bounds are attained by a very simple and natural algorithm SAP, which after each arrival applies a shortest augmenting path, and it is conjectured to be optimal. All known upper bound analyses of this algorithm do not depend on the particular maximum matching maintained by the algorithm. Consequently, they also apply to a more difficult problem, which we call the malicious matching setting: after each arrival, the maintained matching is replaced by a worst-case maximum matching for the next step. This led to the conjecture that the malicious setting still admits an O(nlog⁡n)\mathcal{O}(n \log n) recourse bound, in line with the conjectured optimal complexity of the original model.

Our main result is an Ω(nlog⁡2n)\Omega(n\log^2 n) lower bound for the malicious matching setting, thus disproving the conjecture. Together with the previous upper bound, this settles the asymptotic recourse complexity of the malicious variant of the problem. We complement our lower bound with an upper bound of O(nlog⁡n)\mathcal{O}(n\log n) for expander graphs.

Funding: This work is a result of research conducted within project number 2023/51/B/ST6/02833 financed by the National Science Centre, Poland (Bartłomiej Bosek, Paweł Putra and Anna Zych-Pawlewicz).

Júlia Baligács was funded by the European Union through the European Research Council under the project BOBR (grant agreement No. 948057) during employment in Warsaw and under the project CCOO (grant agreement No. 101165139) during employment in Oxford. Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or the European Research Council. Neither the European Union nor the granting authority can be held responsible for them.

Marek Sokolowski was supported by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) grant number 559177164.

1 Introduction

One of the most fundamental problems in computer science with a long history of research devoted to it is the bipartite matching problem. In 1973, Hopcroft and Karp [17] presented an elegant deterministic algorithm that computes a maximum matching in a bipartite graph in time O(∣E∣∣V∣)\mathcal{O}(|E|\sqrt{|V|}), where ∣V∣|V| is the number of vertices and ∣E∣|E| is the number of edges in the graph. This algorithm was a milestone, and its running time was hard to beat. Improvements were obtained for dense graphs [21] and for sparse graphs [20], but in the general case, despite countless efforts, no faster algorithm was known for nearly five decades. In a recent breakthrough [14], a randomized algorithm with running time O(∣E∣1+o(1))\mathcal{O}(|E|^{1+o(1)}) was presented for the bipartite matching problem.

Since the early work of Hopcroft and Karp, due to its importance, the bipartite matching problem has been studied in a wide variety of dynamic models, where the bipartite graph is updated over time and the goal is to efficiently maintain a good-quality matching at all times [1, 2, 3, 5, 6, 7, 8, 16, 19, 22, 23]. In this paper, we study the one-sided online model with limited recourse budget introduced by Grove, Kao, Krishnan, and Vitter in 1995 [15] (see Section 2 for a formal definition). This model captures a scenario in which clients arrive online and request service from a given set of servers. Upon arrival, the client reveals the set of servers that can provide the service desired by the client. Our objective is to serve as many clients as possible, that is, to maintain a maximum-cardinality matching after each arrival. Thus, whenever the newly arrived client can be matched in a way that increases the size of the current matching, we assign a server to the client, possibly reallocating previously matched clients. The goal is to minimize the total reallocation cost over all arrivals, referred to in the literature as the recourse budget.

This model of online bipartite matching has a broad range of applications across computer science, including streaming content delivery, web hosting, remote data storage, job scheduling, and hashing (see [13] for a detailed discussion). In these applications, clients may represent, for example, jobs that must be assigned to processing machines, or objects that must be placed in cells of a hash table. In such settings, dropping clients from service is undesirable; instead, we prefer to reallocate them so as to serve as many clients as possible. The cost of not serving a client is typically much higher than the cost of reallocation: for instance, copying an object in a hash table is relatively cheap and much more desirable than dropping it from the table entirely. Nevertheless, it remains important to minimize the total reallocation cost. Another motivation for studying this model is its potential to give rise to simple yet efficient offline algorithms, as it was the case in [4, 9]. This setting contrasts with the classical one-sided online model introduced by Karp, Vazirani, and Vazirani [18], in which matching decisions are irrevocable. There, upon the arrival of a client, the algorithm must decide whether to match the client and, if so, to which server, and this decision cannot be changed later. The objective in that model is to maximize the number of matched clients subject to this irrevocability constraint. For this model, there are pessimistic bounds on the number of clients that can be served [18], which however do not apply to our recourse setting.

The first notable result on the one-sided online model with limited recourse was obtained in [15], where the authors considered the case in which each client has degree at most two and they proved a tight bound of Θ(nlog⁡n)\Theta(n \log n) on the recourse budget. Here, n is the total number of inserted clients, which without loss of generality can be assumed to be also the number of servers (this assumption is very common in the related work that we describe below). Next, in [13], a bound of O(nlog⁡n)\mathcal{O}(n \log n) was established for further restricted scenarios, for instance when the clients arrive in a random order. The authors studied the most natural greedy algorithm, which extends the matching using a shortest augmenting path upon each arrival, and is referred to as the Shortest Augmenting Path algorithm (SAP). This led them to conjecture that the SAP algorithm achieves a recourse budget of O(nlog⁡n)\mathcal{O}(n \log n) also for general bipartite graphs under adversarial arrivals. Nevertheless, at that time it was not even clear whether, in this setting, any recourse budget better than the trivial O(n2)\mathcal{O}(n^{2}) could be achieved, and this was left as the main open question.

The first nontrivial upper bound on the recourse budget, namely O(nn)\mathcal{O}(n\sqrt{n}), was proved in [9], using an algorithm more sophisticated than SAP, but also elegant and simple. Finally, in the breakthrough paper by Bernstein, Holm, and Rotenberg [4], the SAP algorithm was shown to achieve a total recourse budget of O(nlog⁡2n)\mathcal{O}(n\log^2 n), which is within a factor of O(log⁡n)\mathcal{O}(\log n) of the known lower bound of Ω(nlog⁡n)\Omega(n\log n). Closing this gap was left as a main open problem in the area. Shortly after, an upper bound of O(nlog⁡n)\mathcal{O}(n\log n) was established for forests [11], and the authors conjectured that forests are the hardest case for SAP. The result of Bernstein, Holm and Rotenberg [4] was later generalized to the matroid setting [12], still with the same upper bound on the recourse budget.

The SAP algorithm, although it is the most natural strategy for the problem, has its limitations. In particular, the analyses of SAP in [4, 10, 11] note that shortest augmenting paths can change the matching quite erratically. Thus, these analyses do not rely on specific properties of the maintained matching, but rather on the structural properties of the portion of the graph that has already been revealed. As a consequence, a careful inspection of the proofs in [4, 10, 11] shows that all these results extend to a more difficult scenario, in which after the arrival of each client the maintained matching is changed into the worst possible matching for the SAP algorithm. This setting was introduced in [10], where it was called the adversarial dynamic augmenting path setting. We refer to it as the malicious matching setting.

It is easy to see that, in the malicious matching setting, SAP is the best possible strategy: there is nothing to gain from choosing an augmenting path other than a shortest one. In light of the above, it is natural to ask whether the upper bound of O(nlog⁡2n)\mathcal{O}(n\log^2 n) can be improved for general bipartite graphs in the malicious matching setting. In fact, the authors of [10] conjectured an upper bound of O(nlog⁡n)\mathcal{O}(n\log n) for this model, in line with the conjectured bound for the non-malicious setting. In this work, we answer this question in the negative, thereby disproving the conjecture.

Our results. Our main result is the following lower bound for MALICIOUS ONLINE BIPARTITE MATCHING WITH RECOURSE.

Theorem 1. For infinitely many n∈Nn \in \mathbb{N}, there exists an instance for MALICIOUS ONLINE BIPARTITE MATCHING WITH RECOURSE on nn servers and nn clients on which any algorithm incurs total recourse budget at least Ω(nlog⁡2n)\Omega(n \log^2 n).

Since the upper bound proved in [4] also applies to the malicious matching setting, the lower bound of Theorem 1 is tight and thus settles this problem. Moreover, since an upper bound of O(nlog⁡n)\mathcal{O}(n\log n) is known for forests [11], this separates forests from the general setting. It also disproves the conjecture made in [11] that forests are the hardest case for SAP, and the conjectured recourse bound in [10] for the malicious setting.

We remark that the graphs in our construction are subcubic. Hence, while the case where clients have degree at most two admits a bound of O(nlog⁡n)\mathcal{O}(n\log n) [15], any larger degree bound does not simplify the problem.

Another way of viewing the result of Theorem 1 is as follows. If one aims to prove the conjectured bound of O(nlog⁡n)\mathcal{O}(n\log n) for online bipartite matching with recourse in the non-malicious setting, then the techniques currently available in the literature are already pushed to their limits, and substantially new ideas are needed.

We complement our lower bound with the following upper bound for expander graphs, where the precise definition of an expander needed here is deferred to Section 4.

Theorem 2. Let h>0h > 0 and d≥1d \geq 1. On every instance of MALICIOUS ONLINE BIPARTITE MATCHING WITH RECOURSE on nn servers and nn clients containing a dd-regular hh-edge-expanding spanning subgraph, SAP achieves total recourse budget Oh,d(nlog⁡n)\mathcal{O}_{h,d}(n \log n).

We find this result interesting for two reasons. First, supergraphs of expanders are well-connected and can be dense, in contrast to other classes for which a budget O(nlog⁡n)\mathcal{O}(n \log n) has been proven, such as forests and graphs where clients have degree at most two. Our result, together with previous work, shows that the two extreme cases admit the stronger bound, whereas the intermediate case is genuinely harder. Second, the analysis giving O(nlog⁡2n)\mathcal{O}(n \log^2 n) recourse budget [4] crucially relies on a certain bound on the number of long augmenting paths [4, Lemma 6]. During our work, one of our first steps was a construction of an expander graph that proves this bound to be tight. Indeed, our final construction is an expander-like graph with some degree-one vertices attached. Thus, Theorem 2 can be viewed as a key step towards understanding the structure needed for the proof of Theorem 1.

Outline and overview of techniques. In Section 2, we present preliminaries and give a formal description of the problem studied in this paper.

In Section 3, we turn to the proof of our main result, the lower bound of Ω(nlog⁡2n)\Omega(n\log^2 n) for MALICIOUS ONLINE BIPARTITE MATCHING WITH RECOURSE. The proof consists of two key ingredients. In Section 3.1, we first show how to turn a graph GG satisfying certain key properties concerning its girth (i.e., the length of a shortest cycle) into a difficult instance of the problem. The girth plays an important role for us since we make use of the fact that a graph of girth gg looks locally like a tree within any ball of radius less than (g−1)/2(g-1)/2. A second key ingredient is that, once a client of degree one is revealed and matched to its neighbor, no augmenting path can later pass through this client or through its neighboring server. In the previous literature, such vertices were called dead and can be thought of as being deleted from the graph. In Section 3.2, we then carefully construct a graph that initially has girth Θ(log⁡n)\Theta(\log n) and has the following property: if we remove edges in a certain order, its girth gradually and sufficiently increases, eventually becoming Θ(n)\Theta(n). We note that this construction can be viewed as a purely graph-theoretic result and might be of independent interest. At the same time, it provides exactly the missing ingredient needed for our lower bound construction, and applying our results from Section 3.1 to this graph yields our main result, Theorem 1.

Finally, in Section 4, we prove our upper bound for expander graphs, Theorem 2. The key property of expanders that we use is the following: the neighborhood of any not-too-large set is larger than the set itself by a constant factor. Using this, we are able to prove that the number of servers reachable from a client by an alternating path of length i increases exponentially in i. From this, we conclude that, at every time step, there exists an augmenting path of length at most O(log⁡n)\mathcal{O}(\log n).

Comment on AI usage. During the proof-discovery process of Theorem 1, we used the large language model GPT-5.5 Pro. Before using this tool, we had developed a preliminary, weaker version of the lower bound. The tool was then used in an iterative discussion to refine the lower bound, which helped find the final construction presented in this paper.