Manuscript Offprint
arXiv:2611.12237A 1.764-competitive algorithm for online fractional vertex cover on forests
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
ABSTRACT
We study online fractional vertex cover on forests under edge arrival. We give a deterministic algorithm with competitive ratio at most , which simultaneously produces an online fractional matching with competitive ratio of at least . This improves on the previous best competitive ratios of and , respectively.
Keywords.
Funding.
1 Introduction
In the online fractional vertex cover problem with edge arrivals, a graph is revealed one edge at a time, for a fixed vertex set . An algorithm maintains a non-decreasing vector of weights , initially . For each revealed edge , the algorithm has to ensure that ; to this end, the algorithm may increase arbitrary weights. The goal is to minimize the sum of all weights.
We focus on the online model, where the algorithm sees only the edges revealed so far. For a vector , we write for its weight. We write for the vector maintained after step and for the minimum weight of a fractional vertex cover of the edges revealed so far. The competitive ratio of an algorithm is the supremum of over instances.
Online fractional matching. Similarly, in the online fractional matching problem with edge arrivals, an algorithm maintains a non-decreasing vector of weights , initially . For each revealed edge , the algorithm may increase arbitrarily, but it must ensure that for every vertex , the sum of weights of edges incident to is at most 1. The goal is to maximize the sum of all weights. Analogously, the competitive ratio of an algorithm is the infimum of over instances. By the strong LP duality, the values of optimal solutions for the two problems are equal.
Previous work. For general graphs, the online complexity of fractional vertex cover and fractional matching is resolved. The trivial algorithm that takes both endpoints of every revealed edge is 2-competitive for vertex cover, and the greedy algorithm is 1/2-competitive for matching. Tang and Zhang [TZ26] showed that no algorithm for vertex cover is better than 2-competitive, and Gamlath, Kapralov, Maggiori, Svensson and Wajc [GKM⁺19] showed that no algorithm for matching is better than 1/2-competitive.
This motivated the study of the problem on forests. For the fractional vertex cover, Baligács, Bosek, Disser, Feldmann, Gutowski, Kępińska, Putra and Zych-Pawlewicz [BBD⁺26] gave an algorithm RGB with competitive ratio , and showed a lower bound of 1.5 holding even in
*This work has been supported by Polish National Science Centre grant 2022/45/B/ST6/00559.
the so-called incremental model. For the fractional matching, Buchbinder, Segev and Tkach [BST19] gave an algorithm with ratio of , and showed an upper bound of 0.591.
For a more comprehensive treatment of the problem, including vertex arrivals, integral solutions, and disposal models, we refer the reader to [BBD 26].
Our result. We give a deterministic primal-dual algorithm, Host-or-Halve (HOH), that maintains simultaneously a solution to online fractional vertex cover and a solution to online fractional matching. On forests, the former is -competitive, where , and the latter is -competitive, where (Theorem 3).
This improves both over the ratio of 1.833 for online fractional vertex cover [BBD 26] and over the ratio of 0.555 for online fractional matching [BST19].
Independent work. Independently of this paper, Bosek, Gutowski, Putra and Zych-Pawlewicz obtain better bounds by constructing a primal-dual algorithm for forests that is simultaneously 7/4-competitive for online fractional vertex cover and 4/7-competitive for online fractional matching [BGPZ26].
AI disclosure. The function of Section 2.3 was optimized with the help of Claude Opus 5.5. The resulting function and its properties were checked manually by the author, who takes full responsibility for the whole content of this paper.
Intuition. Before we formally define the algorithm, we give main ideas behind its construction and analysis. When algorithm is performing a merge, it raises the weights of both endpoints at the same pace. On the other hand, when it is performing a leaf attachment, it raises the weight of the host vertex from to , where is a carefully chosen non-decreasing function satisfying . The weight of the attached leaf is set to , so that the edge is covered. The competitive ratio is then expressed in terms of the function . The intuition behind favoring the host is that more leaves may be later attached to it, and each such attachment is cheaper when the weight of the host is larger.
For the analysis, a rough observation is that the local performance of the algorithm is best on trivial merges, but worst on non-trivial merges. We note however that in a forest the number of non-trivial merges is at most that of trivial merges. Hence, in our analysis, we assign “credit” to trivial merges, which can be used to compensate for the cost of non-trivial merges.
Notation. For , let be the set of edges revealed in steps , and let be the set of vertices incident to at least one edge of . For , let be the edge that arrives in step , and let be the weight added to the vertex cover in step . Let be the number of components of the graph revealed in steps ; note that . Let . Note that is 1 for a trivial merge, 0 for a leaf attachment, and is -1 for a non-trivial merge. Note that this value of for a non-trivial merge requires that the graph is a forest and, in fact, it is the only place where the forest assumption is used.

(a) trivial merge

(b) leaf attachment

(c) non-trivial merge, deficiency
Figure 1. The three kinds of arriving edges (thick) in the analysis of the algorithm of Definition 1, with the weights before and after the arrival.
Definition 1. Let be a non-decreasing function such that for every . The algorithm HOST-OR-HALVE(g) (HoH(g)) maintains a vector of vertex weights and a vector of edge weights, both initially , and it outputs the cover and the matching , where is the constant defined below. Upon arrival of an edge , HoH(g) first updates the weights of and in the following way.
leaf attachment. If exactly one endpoint, say , has degree 0, we call the host. Let be the current weight of . sets and .
merge. Otherwise, let be the deficiency of . If , the weights of both endpoints increase by . If , no weight changes.
Then, sets
where is the constant defined below, and it never modifies later.
Clearly, is a feasible solution to the vertex cover problem; what remains to be shown is that is a feasible solution to the matching problem. We then observe that the “credit” terms sum up to a non-negative value, which leads to . This will show the competitive ratio of for both the vertex cover and the matching problems.
To proceed with the formal analysis, we first need to define and .
Parameters. We define
where is the -th iterate of and . By the definition, , and as . Thus, is the total weight that adds to the cover while new leaves are attached, one after another, to a vertex of initial weight .
In the analysis, we restrict attention to functions for which is finite for every . For such functions, let
Taking shows that . The choice and meaning of the values of , and will become clear in the analysis of in Sections 2.1 and 2.2.
2.1 Competitive ratios
The main technical part of the analysis is to show that the matching is feasible (cf. Lemma 2). The proof is postponed to Section 2.2.
Lemma 2 (dual feasibility). Fix a function as in Definition 1 with finite . For every step , the vector is a feasible fractional matching of .
Theorem 3. Fix a function as in Definition 1 with finite , and assume that the input graph is a forest. Then, the cover maintained by is -competitive for online fractional vertex cover, and the matching maintained by is -competitive for online fractional matching.
Proof. Fix a step . The cover is feasible by the definition of , and the matching is feasible by Lemma 2. Thus,
Hence, and , which concludes the proof.
2.2 Dual feasibility
In this section, we prove Lemma 2. We fix a function as in Definition 1 with finite , and we assume that the input graph is a forest. We write , , and . As is non-decreasing, so is every iterate , and thus is non-increasing.
For , let
be the load of a vertex at time . As , to show that is a feasible fractional matching of , it suffices to show that for every vertex .
Free part of a dual constraint. For and a vertex , let be the weight of after step . For , we show that lower-bounds the slack of the inequality , i.e., we show that . In other words, is the “budget” that vertex keeps for the edges that may arrive at later. The next two lemmas bound the dual value of an edge at each of its endpoints: Lemma 4 for an endpoint that the edge reveals, and Lemma 5 for an endpoint that already has positive degree.
Lemma 4. For every step and each degree-0 endpoint of , it holds that .
Proof. Let . As has degree 0, edge is not a non-trivial merge, so . As also , we have , and it remains to show that . We consider two cases depending on the degree of .
• has degree 0. Then is a trivial merge, and , so
(by the definition of )
• has positive degree. Then is a leaf attachment, is the leaf, and is the host. Let
. Then and , so
(by the definition of )
(by the definition of )
Lemma 5. For every step and each positive-degree endpoint of , it holds that .
Proof. Let . As and is non-increasing, . As , it remains to show that . We consider two cases depending on the degree of .
• has degree 0. Then is a leaf attachment, is the host, and is the leaf. Let . Then , and , so
(by the definition of T)
• has positive degree. Then is a non-trivial merge, and . Let and . The weights of both endpoints increase by , so . As , we have . Thus, the definition of applied with yields . Hence,
(by the bound on )
Proof of Lemma 2. Fix a step and a vertex . If , then . Otherwise, let be the first step with . Then,
(by Lemmas 4 and 5)
(as changes only in steps with )
(as )
2.3 Optimizing constants
Let be the golden ratio. Let . Note that . In this section, we show that the function
gives .
It is straightforward to verify that satisfies the conditions of Definition 1. Note that for every , so for every , and hence
that is,
Lemma 6. It holds that .
Proof. We have , and thus
The function is non-decreasing, as is continuous with slope at most . Hence, for a fixed , the expression in the supremum is non-decreasing in . Thus, the supremum is attained at , and , where
The function is concave, as its slope drops from to 0. On , is affine and is convex, so is convex and is maximized at an endpoint. On , both and equal 1, so is decreasing. Hence, is maximized at or at . As , we have and . Thus, .
Lemma 7. It holds that .
Proof. By the definition of , it suffices to show that and . For the former bound, fix any , and observe that
Hence, . For the latter bound, we have
(by Lemma 6 and as )
Applying function to Theorem 3 and using by Lemma 7, immediately gives the main result of this paper.
Corollary 8. For the function defined above, the algorithm executed on an input graph that is a forest produces a pair of feasible solutions and . The fractional vertex cover has competitive ratio at most and the matching has competitive ratio at least .
References
[BBD 26] Júlia Baligács, Bartłomiej Bosek, Yann Disser, Andreas Emil Feldmann, Grzegorz Gutowski, Katarzyna Kępińska, Paweł Putra, and Anna Zych-Pawlewicz. Online and incremental fractional vertex cover on trees. In Proc. 34th European Symp. on Algorithms (ESA), volume 388 of LIPIcs, pages 158:1–158:15. Schloss Dagstuhl, 2026. doi:10.4230/LIPICS.ESA.2026.158.
[BGPZ26] Bartłomiej Bosek, Grzegorz Gutowski, Paweł Putra, and Anna Zych-Pawlewicz. Tight competitive bounds for online matching on forests. Unpublished manuscript, 2026.
[BST19] Niv Buchbinder, Danny Segev, and Yevgeny Tkach. Online algorithms for maximum cardinality matching with edge arrivals. Algorithmica, 81(5):1781–1799, 2019. doi: 10.1007/S00453-018-0505-7.
[GKM 19] Buddhima Gamlath, Michael Kapralov, Andreas Maggiori, Ola Svensson, and David Wajc. Online matching with general arrivals. In Proc. 60th IEEE Symp. on Foundations of Computer Science (FOCS), pages 26–37, 2019. doi:10.1109/FOCS.2019.00011.
[TZ26] Zhihao Gavin Tang and Yuhao Zhang. A tight bound on online vertex cover under edge arrivals. arXiv:2608.04994, 2026. arXiv:2608.04994.