arXiv:2610.40569cs.DSOct 2026

Manuscript Offprint

arXiv:2610.40569

The Tight Competitive Ratio of Greedy for Online Steiner Forest

Iman Gholami, Ilya Hajiaghayi, MohammadTaghi Hajiaghayi, Peyman Jabbarzade

Abstract

The online Steiner Forest problem is a fundamental network design problem in which terminal pairs arrive one at a time and an algorithm must irrevocably purchase edges connecting each pair. The natural greedy algorithm connects each terminal pair by a shortest path after making all previously purchased edges free. Awerbuch, Azar, and Bartal (SODA 1996) proved that this algorithm is O(log⁡2k)O(\log^2 k)-competitive and conjectured an O(log⁡k)O(\log k) bound, where k is the number of terminal pairs. Bamas, Drygala, and Maggiori (SODA 2022) obtained an O(log⁡klog⁡log⁡k)O(\log k \log \log k) bound for greedy on a restricted class of inputs, leaving the general case open.

In this paper, we resolve the competitive ratio of the greedy algorithm for online Steiner Forest, proving that it is tightly Θ(log⁡klog⁡log⁡k)\Theta(\log k \log \log k). Specifically, we establish an O(log⁡klog⁡log⁡k)O(\log k \log \log k) upper bound for arbitrary instances and construct a matching Ω(log⁡klog⁡log⁡k)\Omega(\log k \log \log k) lower bound. Our results refute the O(log⁡k)O(\log k) conjecture of Awerbuch, Azar, and Bartal and establish a tight Θ(log⁡log⁡k)\Theta(\log \log k) separation between the greedy algorithm and the best possible online algorithm for Steiner Forest.

*University of Maryland. Email: igholami@umd.edu.

†^{\dagger}Takoma Park Middle School. Email: ihajiaghayi@gmail.com.

‡^{\ddagger}University of Maryland. Email: hajiagha@umd.edu.

§University of Maryland. Email: peymanj@umd.edu.

1 Introduction

The Steiner Forest problem, also known as the Generalized Steiner Tree problem, is a fundamental optimization problem on edge-weighted graphs. Given an undirected graph G=(V,E)G = (V, E) with strictly positive edge costs and a collection of terminal pairs, the objective is to find a minimum-cost subgraph connecting the two endpoints of every pair. The problem generalizes Steiner Tree, in which all terminals must belong to one connected component. In the online setting, the graph is known in advance, but the terminal pairs arrive one at a time. The algorithm must satisfy each terminal pair before seeing the next one, and purchased edges cannot be removed.

A natural algorithm satisfies each terminal pair as cheaply as possible. To connect the ith terminal pair (si,ti)(s_i, t_i), it makes previously purchased edges free and buys the unpurchased edges of a shortest si−tis_i - t_i path in the resulting metric. We refer to this algorithm as greedy (the Min-Cost algorithm of Awerbuch, Azar, and Bartal [AAB04] and Rule 1 of Bamas, Drygala, and Maggiori [BDM22]). Let ALG denote the total cost of edges purchased by greedy, and let OPT denote the minimum cost of an offline solution satisfying the entire sequence of terminal pairs. The rule of greedy is simple, but its competitive ratio has remained difficult to determine. Awerbuch, Azar, and Bartal [AAB04] proved an O(log⁡2k)O(\log^2 k) bound in work first presented at SODA 1996, and explicitly conjectured in the journal version that greedy is O(log⁡k)O(\log k)-competitive. Here k denotes the number of terminal pairs. This conjecture would place greedy on the same asymptotic footing as the best online algorithms for Steiner Forest.

The corresponding question for online Steiner Tree was resolved much earlier. Imase and Waxman [IW91] showed that connecting each new terminal to the existing tree gives an O(log⁡k)O(\log k)-competitive algorithm, matching a logarithmic lower bound. However, this analysis does not extend to arbitrary pairs. Greedy can maintain many connected components of purchased edges, even when a single inexpensive tree connects all terminals in the input pairs. Consequently, a common reference tree does not reduce the online Steiner Forest execution to an online Steiner Tree execution.

Westbrook and Yan [WY95] initiated the analysis of greedy for online Steiner Forest. After the O(log⁡2k)O(\log^2 k) analysis of Awerbuch, Azar, and Bartal, Berman and Coulston [BC97] obtained an O(log⁡k)O(\log k)-competitive algorithm by purchasing additional edges beyond the cheapest route for the current terminal pair. This establishes the optimal order for the problem, but leaves open whether those additional purchases are necessary to improve on greedy.

Bamas, Drygala, and Maggiori [BDM22] proved an O(log⁡klog⁡log⁡k)O(\log k \log \log k) bound for greedy when each pair's contraction, the ratio of its original endpoint distance to its greedy payment, is polylogarithmically bounded (their Theorem 1.1, which includes our full purchased-path contraction rule, whereas their unrestricted-contraction results for a single-tree comparator or non-increasing greedy payments or original endpoint distances concern terminal-only contraction, their Rule 3). The competitive ratio of greedy on general instances remained open and was again highlighted as an open problem by Long, Mahabadi, Sarkar, and Tarnawski [LMST26].

In this work, we determine the competitive ratio of greedy. We prove an O(log⁡klog⁡log⁡k)O(\log k \log \log k) upper bound for arbitrary instances and a matching Ω(log⁡klog⁡log⁡k)\Omega(\log k \log \log k) lower bound. Thus the logarithmic conjecture is false, and the additional log⁡log⁡k\log \log k factor is necessary.

Our analysis shares with Bamas, Drygala, and Maggiori [BDM22] the grouping of cost scales into residue classes with polylogarithmic separation. Their proof uses dual balls and balanced dual solutions to recursively decompose the instance. We track greedy components through lifetime trees to extract paths of bounded original cost, and use these paths to replace dense regions of an evolving reference forest. Charging to the resulting cost savings removes the bounded-contraction assumption.

References (39)