Manuscript Offprint
arXiv:2608.23350Asymptotically Tight Fractional Online Matching Under Edge Arrivals
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
In this brief note, we close the asymptotic gap between known upper and lower bounds for fractional online matching under edge arrivals. We prove that the optimal competitive ratio for this problem is . The algorithm was suggested and analyzed by OpenAI's ChatGPT Sol based on a single prompt. The presentation was streamlined over a few hours, based on a back and forth discussion with the author, who assumes responsibility for any errors.
1 Introduction
Online matching is an intensely studied problem (see surveys [Meh13, HTW24]). In the most basic setting, edges of an n-node graph arrive online sequentially, and one must decide immediately and irrevocably whether to match each arriving edge. A trivial greedy algorithm achieves a competitive ratio of 1/2: it outputs a matching of size at least OPT/2, where OPT denotes the size of a hindsight-optimal matching. Competitive ratios of are achievable if nodes are revealed sequentially [KVV90, GKM 19, HKT 18]. In contrast, in the stricter edge-arrival model, the optimal competitive ratio is : [BST19, LS20] achieve a ratio of , while [GKM 19] show that no ratio above is attainable, even by fractional algorithms.
Fractional algorithms assign each edge a value on arrival so that is a fractional matching: for each edge and for each node . Such an algorithm has value , and it is -competitive if .
In this note we close this asymptotic gap, giving a -competitive fractional algorithm. Together with the result of , this shows that the optimal competitive ratio is .
denote the load of node v before time e. We also define the residual capacity of v as
With this notation, the algorithm is particularly simple to state:
Supported by ISF grant 3200/24. Work done while visiting the University of Waterloo.
Algorithm 1 Fractional Online Matching
1: for each arriving edge , on arrival do 2: Set: , where .
Intuitively, after processing an edge, either one endpoint is saturated or its endpoints have combined load at least 3/2. This dichotomy drives the analysis.
Before proving this intuitive property, we first verify feasibility and monotonicity of the loads.
Fact 2.1 (Feasibility). Algorithm 1 outputs a fractional matching.
Proof. We prove inductively that all residual capacities remain non-negative. Since for each , we get that . Consequently, for each vertex and edge . On the other hand, for each edge , each of the three quantities in the minimum defining is nonnegative, and so .
Let and denote the load and residual capacity of node after all edges have their value set. We say a node is saturated if . Note that , with the inequality following by non-negativity of (Fact 2.1).
The algorithm is designed with the following lemma in mind:
Lemma 2.2 (Edge-load dichotomy). For every arriving edge , the final loads satisfy
Moreover, if both and are unsaturated at termination, then
Proof. As is non-negative by Fact 2.1, the claim is trivial if either endpoint is saturated. Hence, to prove the stronger assertion, suppose both endpoints are unsaturated at termination. By load monotonicity , neither is saturated immediately after processing . So, .
If , then . Consequently,
Conversely, if , then since , we have that , and so
In either case, we have by load monotonicity that
The following lemma asserts that if positive mass is assigned to an edge, then at least 1/2 residual capacity remains across its two endpoints immediately afterward. This residual slack will later force mass to leave the set of saturated nodes.
Lemma 2.3 (Residual slack). For each edge for which , we have .
Proof. First, the lemma's hypothesis implies that . Now, if , then the claimed inequality holds with equality, by the choice of . Else, let and . Then, by our choice of ,
from which we obtain that . But then after the update, , we have that
We are now ready to quantify Algorithm 1's improvement over the greedy algorithm.
Theorem 2.4. For every graph with , Algorithm 1 outputs a fractional matching of value
Proof. The second inequality follows from the trivial bound .
It remains to prove the first inequality, , or equivalently, as ,
To prove Equation (1), fix a maximum matching M of size . Decomposing the sum across M, we have that
By Lemma 2.2 and Fact 2.1, each summand on the right-hand side, for some and for some , is non-negative. So, if any edge has both endpoints unsaturated, then by Lemma 2.2, , and so . We may therefore assume that each edge in has at least one saturated endpoint. We will show that in this case at least unit of mass must cross from the saturated nodes to that set's complement, implying the desired bound.
Denote by the saturated nodes. Since each of the (node-disjoint) edges in has at least one endpoint in , we have that , and so
Now, if no edge is assigned , then since , we must assign a value of at least to edges in . Otherwise, let be the last edge in receiving . By Lemma 2.3, immediately after assigning ,
But, since by definition
we must further decrease the residual capacity of the nodes in by assigning value of at least to the set of edges in . In either case, using non-negativity of by Fact 2.1,
Combined with Equations (1) and (2), this concludes the proof.
Remark 2.5. We leave open the question of closing the constant gap between the precise terms in the competitive ratios of Algorithm 1 ( ) and the impossibility bound of ( ).
3 Reflections
The main purpose of this note is to provide yet another example of a simple research question that can be resolved with the aid of large language models. Although the result itself is likely of limited interest to experts, the example raises again a broader question: what are good introductory research problems for beginning researchers in an era in which LLMs can quickly dispatch many accessible problems? We leave this as the main open problem.
References
[BST19] Niv Buchbinder, Danny Segev, and Yevgeny Tkach. Online algorithms for maximum cardinality matching with edge arrivals. Algorithmica, 81(5):1781–1799, 2019. ↑1
[GKM 19] Buddhima Gamlath, Michael Kapralov, Andreas Maggiori, Ola Svensson, and David Wajc. Online matching with general arrivals. In Proceedings of the 60th Symposium on Foundations of Computer Science (FOCS), 2019. ,
[HKT 18] Zhiyi Huang, Ning Kang, Zhihao Gavin Tang, Xiaowei Wu, Yuhao Zhang, and Xue Zhu. How to match when all vertices arrive online. In Proceedings of the 50th Annual ACM Symposium on Theory of Computing (STOC), pages 17–29, 2018. 1
[HTW24] Zhiyi Huang, Zhihao Gavin Tang, and David Wajc. Online matching: A brief survey. ACM SIGecom Exchanges, 22(1):135–158, 2024. ↑1
[KVV90] Richard M Karp, Umesh V Vazirani, and Vijay V Vazirani. An optimal algorithm for on-line bipartite matching. In Proceedings of the 22nd Annual ACM Symposium on Theory of Computing (STOC), pages 352–358, 1990. ↑1
[LS20] Euiwoong Lee and Sahil Singla. Maximum matching in the online batch-arrival model. ACM Transactions on Algorithms (TALG), 16(4):1–31, 2020. ↑1
[Meh13] Aranyak Mehta. Online matching and ad allocation. Foundations and Trends in Theoretical Computer Science, 8(4):265–368, 2013. ↑1
[GKM 19] prove a bound of for bipartite graphs with nodes on either side, so nodes total.