Title: Improved Online Reachability Preservers
Domain: Computer Science

Question: How to construct a sparse reachability preserver online to preserve the reachability of given demand pairs in a directed graph?

Background: ## Definitions of Related Concepts | | 1. **Reachability Preservers**: | - Given a directed graph \( G = (V, E) \) and a set of demand pairs \( P \subseteq V \times V \), a reachability preserver is a subgraph \( H \subseteq G \) such that for all \( (s, t) \in P \), there is an \( s \leadsto t \) path in \( H \) if and only if there is one in \( G \). | | 2. **Offline Model**: | - In the offline model, both the graph \( G \) and all the demand pairs \( P \) are provided as input, and the goal is to construct a sparse reachability preserver \( H \). | | 3. **Online Model**: | - In the online model, the graph \( G \) is given, and the demand pairs \( (s, t) \in P \) arrive one by one. For each arriving demand pair, edges must be irrevocably added to the preserver \( H \) to ensure reachability for that pair before the next one arrives, without knowledge of future demand pairs. | | 4. **Competitive Ratio**: | - In online algorithms, the competitive ratio is the ratio of the size of the preserver constructed by the online algorithm to the size of the optimal offline solution (constructed with full knowledge of all demand pairs). The goal is to minimize this ratio. | | ## Research Background | | 1. **Applications of Reachability Preservers**: | - Reachability preservers are a fundamental graph sparsification tool with applications in various areas such as graph spanners, shortcut sets, property testing algorithms, flow/cut approximation algorithms, and Steiner network design algorithms. | | 2. **Historical Context of Reachability Preservers**: | - The study of reachability preservers dates back to the Directed Steiner Network (DSN) problem, a classic NP-hard problem. DSN aims to find the sparsest (or minimum-weight) reachability preserver for a given instance \( G, P \). | - Recently, there has been intensive research on reachability preservers from an extremal perspective, focusing on determining the worst-case number of edges needed as a function of the number of nodes \( n \) and the number of demand pairs \( p \). | | 3. **Challenges in the Online Setting**: | - The online setting for reachability preservers poses significant challenges as the algorithm must make irreversible decisions without knowledge of future demand pairs. This contrasts with the offline setting where the algorithm can leverage complete information about all demand pairs to construct an optimal solution. | | 4. **Previous Results**: | - **Coppersmith and Elkin**: Their work implies an online upper bound of \( O(\min\{np^{0.5}, n^{0.5}p\} + n) \). | - **Source-Restricted Setting**: When demand pairs are restricted to \( P \subseteq S \times V \) (or \( P \subseteq V \times S \)), the online upper bound for the number of edges is \( O(n|S|) \).

Definitions: ## Half-Bridge-Free System | A system is half-k-bridge-free if it contains no bridges of size at most k where the last arc comes before the river.

Methodology: 1. **Online Path Generation**: Dynamically maintain paths via local greedy strategies (Forward/Backward-Growth) to avoid dependency on global information. | 2. **Extremal Graph Theory Analysis**: Exploit combinatorial properties (bridge-freeness) of path systems and recursive techniques to bound edge counts. | 3. **Parameterization and Balancing**: Achieve tight upper bounds through optimized parameters (e.g., $ \ell, d, h $) and classified handling (source constraints, thick/thin pairs). | 4. **Application Transformation**: Integrate preserved graph results into online algorithm frameworks to enhance competitive ratios.

Answer: Develop a framework in which to analyze online reachability preservers, and we use it to prove two new upper bounds, improving on both of the results mentioned above: | | **Theorem 1 (Online Pairwise Reachability Preservers).** Given an \( n \)-node directed graph \( G \), there is an online algorithm that constructs a reachability preserver \( H \) of \( |P| = p \) total demand pairs of size at most | \[ |E(H)| \leq O\left( \frac{n^{2+\alpha}}{3+\alpha + o(1)} p^{\frac{2}{3+\alpha}} + n^{2-2\alpha+o(1)} p^{\alpha} + n \right) < O\left( n^{0.72} p^{0.56} + n^{0.6} p^{0.7} + n \right), \] | where \( \alpha \geq 0.7 \) is a root of \( 4x^3 - 13x^2 + 10x - 2.1 \). | | **Theorem 2 (Online Source-Restricted Reachability Preservers).** Given an \( n \)-node directed graph \( G = (V, E) \), and a promise that the demand pairs will satisfy \( P \subseteq S \times V \) for some set of source nodes \( S \subseteq V \), there is an online algorithm that constructs a reachability preserver \( H \) of \( p \) total demand pairs of size at most | \[ |E(H)| \leq O\left( (n|S|p)^{1/2} + n \right). \] | The same result holds under the promise that \( P \subseteq V \times S \), but requires a slightly different algorithm. | | All of our construction algorithms are deterministic, run in polynomial time, and do not require any knowledge of \( P \) or \( S \) (including their size). **Theorem 2** ties the state-of-the-art upper bound in the offline sourcewise setting [1]. | | It may also be interesting to compare **Theorem 1** to the following lower bound, proved in [8] in a stronger online model: | | **Theorem 3.** Consider a stronger version of the online model where the graph \( G \) is initially empty, and an adversary may add new edges to \( G \) in each round before providing the next demand pair. Then there is a strategy for the adversary that guarantees that any online reachability preserver \( H \) will have size | \[ |E(H)| \geq \Omega\left( (np)^{2/3} + n \right). \] | | Our bound in **Theorem 1** is polynomially better than this one (in exchange for a weaker adversary), and so it formally separates these two models. | | A couple of the new tools that we develop for the online setting also turn out to be helpful in the classical offline setting. This yields the following small polynomial improvement in the state of the art: | | **Theorem 4 (Offline Reachability Preservers).** Given an \( n \)-node directed graph \( G \) and a set of demand pairs \( P \), one can construct in polynomial time a reachability preserver \( H \) of size | \[ |E(H)| \leq O\left( n^{\frac{3}{4}} p^{\frac{1}{2}} + n^{2 - \sqrt{2} + o(1)} p^{\frac{1}{\sqrt{2}}} + n \right) \leq O\left( n^{0.75} p^{0.5} + n^{0.59} p^{0.71} + n \right). \] | | **Theorem 5 (Non-Adaptive Reachability Preservers).** There are online algorithms satisfying **Theorem 1** and **Theorem 2** where the selected path for each demand pair \( (s, t) \) depends only on the input graph \( G \), the set of source nodes \( S \) (for **Theorem 2**), and | - the index \( i \) of the current demand pair, or | - the total number \( p \) of demand pairs that will arrive. | | **Theorem 6 (Offline UDSN [1, 15]).** There is a randomized polynomial time algorithm for (offline) UDSN that, given an \( n \)-node input graph \( G \) and a set of \( p \) demand pairs \( P \), returns a reachability preserver \( H \) of size | \[ |E(H)| \leq \text{OPT} \cdot O\left( \min\left\{ n^{\frac{4}{7} + \varepsilon}, p^{\frac{1}{2} + \varepsilon} \right\} \right) \] | where \( \text{OPT} \) is the number of edges in the sparsest possible reachability preserver of \( G, P \). | | **Theorem 7 (Online UDSN, parametrized on \( p \) [21]).** There is a randomized polynomial time algorithm for online UDSN that achieves a competitive ratio of \( O(p^{\frac{1}{2} + \varepsilon}) \). | | Thus, the remaining question is whether the dependence on \( n \) in **Theorem 6** can be recovered in the online setting. Here the state of the art is due to Grigorescu, Lin, and Quanrud, who obtained a competitive ratio of \( n^{\frac{2}{3} + \varepsilon} \) [24], roughly following the framework of Chlamtác et al. [16] but with adaptations for the online setting. As an application of our new online source-restricted preservers, we are able to substitute them into this framework, improving the competitive ratio: | | **Theorem 8 (Online UDSN, parametrized on \( n \)).** There is a randomized polynomial time algorithm for online UDSN that achieves a competitive ratio of \( O(n^{\frac{3}{5} + \varepsilon}) \). | | # Technical Preliminaries | ## The DAG reduction | While proving all of our upper bounds, it will be convenient to assume that the input graph is a DAG. That this assumption is without loss of generality comes from the following standard reduction, which we will recap somewhat briefly here: | | **Theorem 9 (DAG Reduction (folklore)).** If there is an algorithm that constructs a reachability preserver \( H \) of size | \[ |E(H)| \leq f(n, p, \sigma) \] | for any \( p \) demand pairs using \( |S| = \sigma \) source (or sink) nodes in an \( n \)-node DAG, then there is an algorithm that constructs a reachability preserver \( H \) of size | \[ |E(H)| \leq f(n, p, \sigma) + 2n \] | in arbitrary graphs. | | **Proof.** Given an input graph \( G \), compute a strongly connected component (SCC) decomposition. For each component \( C \) in the decomposition, choose an arbitrary vertex \( v \in C \) and an in- and out-tree rooted at \( v \) spanning \( C \). There are \( 2(|C| - 1) \) edges in these two trees, and hence there are slightly less than \( 2n \) edges in total, across all trees. | | We add all edges in these trees to our reachability preserver \( H \) at their first opportunity, and then for the rest of the construction we treat each SCC as a single contracted supernode, yielding a DAG \( G' \). For each demand pair \( (s, t) \), we can map the nodes \( s, t \) onto the corresponding supernodes in \( G' \) and choose paths in \( G' \) using our assumed DAG algorithm, to get a reachability preserver \( H' \) in \( G' \) on \( \leq f(n, p, \sigma) \) edges. Each edge \( (u, v) \) added to \( H' \) can be mapped back to any single edge in \( G \) between the set of nodes corresponding to the supernode \( u \) and the set of nodes corresponding to the supernode \( v \). Since our in- and out-trees preserve strong connectivity among all nodes in each of these sets, this will give a correct preserver in \( G \). | | ## Path System Definitions | A path system is a pair \( S = (V, \Pi) \), where \( V \) is a set of vertices and \( \Pi \) is a set of nonempty vertex sequences called paths. We will next recap some basic definitions; see also [8] for more discussion. | | Note that, even when the vertex set \( V \) is that of some graph \( G \), the paths in \( \Pi \) are abstract sequences of vertices that do not necessarily correspond to paths in \( G \). The length of a path \( \pi \in \Pi \), written \( |\pi| \), is its number of vertices (hence off by one from the length of the path through some graph). The degree of a node \( v \in V \), written \( \deg(v) \), is the number of paths that contain \( v \) (which may differ significantly from its degree as a node in a graph). The size of \( S \), written \( \|S\| \), is the quantity | \[ \|S\| := \sum_{\pi \in \Pi} |\pi|. \] | | We note that \( k \)-bridges still count even when they are degenerate; for example, two paths that coincide on two consecutive nodes count as a 2-bridge, and three paths that coincide on three consecutive nodes contain a 3-bridge, etc. | | A path system is **acyclic** if it does not contain any directed cycle as a subsystem, or equivalently, if there is a total ordering of the vertices \( V \) such that the order of vertices within each path \( \pi \in \Pi \) agrees with this ordering. We will frequently consider **ordered path systems**, which are path systems with a total ordering on their path set \( \Pi \). With this, we will sometimes only forbid subsystems with certain ordering constraints, e.g., 3-bridges where the last arc comes before the first in the ordering of \( \Pi \). | | # Online Reachability Preservers | ## Path Growth Algorithms | | A key tool in our online upper bounds will be the following two (very similar) path selection algorithms. We use these algorithms to generate a path \( \pi(s, t) \) for each demand pair \( (s, t) \) as it arrives, and then we add the edges of this path to the current preserver. Our path generation algorithms are greedy, growing paths one edge at a time and locally avoiding new edges if possible. | | ### Algorithm 1: Forwards-Growth Path Generation | ```python | Input: DAG \( G = (V, E) \), current preserver \( H \subseteq G \), demand pair \( (s, t) \) | 1. Let \( \pi \leftarrow (s) \) | 2. while last node of \( \pi \) is not \( t \) do | 3. \( u \leftarrow \) last node of \( \pi \) | 4. if there exists an edge \( (u, v) \in E(H) \) with \( t \) reachable from \( v \) then | 5. append any such edge \( (u, v) \) to the back of \( \pi \) | 6. else | 7. append to the back of \( \pi \) any edge \( (u, v) \in E(G) \) with \( t \) reachable from \( v \) | 8. return \( \pi \) | ``` | | ### Algorithm 2: Backwards-Growth Path Generation | ```python | Input: DAG \( G = (V, E) \), current preserver \( H \subseteq G \), demand pair \( (s, t) \) | 1. Let \( \pi \leftarrow (t) \) | 2. while first node of \( \pi \) is not \( s \) do | 3. \( v \leftarrow \) first node of \( \pi \) | 4. if there exists an edge \( (u, v) \in E(H) \) with \( u \) reachable from \( s \) then | 5. append any such edge \( (u, v) \) to the front of \( \pi \) | 6. else | 7. append to the front of \( \pi \) any edge of the form \( (u, v) \in E(G) \) with \( u \) reachable from \( s \) | 8. return \( \pi \) | ``` | | The two algorithms are symmetric to each other, and differ only in whether we grow the path from front to back or from back to front. | | As we use these algorithms to sequentially generate paths and build our preserver, it will be helpful to track an auxiliary path system \( Z = (V, \Pi) \). Each time we add a path \( \pi(s, t) \) to \( H \), say that a new edge is an edge \( e \in \pi(s, t) \) that was not previously in the preserver. We then add a corresponding path \( \pi' \) to \( Z \), whose nodes are | \[ \pi' := \begin{cases} | \{u \mid \text{there is a new edge } (u, v) \in \pi(s, t)\} \cup \{t\} & \text{if forwards-growth is used} \\ | \{v \mid \text{there is a new edge } (u, v) \in \pi(s, t)\} \cup \{s\} & \text{if backwards-growth is used} | \end{cases} \] | and in either case, these nodes are ordered in the path \( \pi' \) the same as their order in \( \pi(s, t) \). We will also treat \( Z \) as an ordered path system, with the paths in \( Z \) ordered by the arrival of the demand pairs that generated each path. The following properties of \( Z \) all follow straightforwardly from the construction: | | **Lemma 10 (Properties of \( Z \)).** | 1. \( Z \) is acyclic, | 2. \( \|Z\| = |E(H)| + p \), | 3. Under forwards-growth, \( Z \) has no bridge in which the first arc comes before the river in the ordering of \( \Pi \). Under backwards-growth, \( Z \) has no bridge in which the last arc comes before the river in the ordering of \( \Pi \). | | **Proof.** | 1. Since the input graph \( G = (V, E) \) is a DAG, the order of nodes in each path \( \pi \in \Pi \) agrees with the topological ordering of the nodes in \( V \), implying that \( Z \) is acyclic. | 2. Initially, we have \( \|Z\| = |E(H)| = 0 \). Then, every path \( \pi' \) added to \( Z \) corresponds to a path \( \pi(s, t) \) that contributes exactly \( |\pi'| - 1 \) new edges to \( H \), so in the end we have \( \|Z\| = |E(H)| + p \). | 3. We will prove this for forwards-growth; the argument for backwards-growth is symmetric (up to reversal of direction of the edges of the input graph \( G \)). Seeking contradiction, suppose there is a bridge formed by nodes \( (x_1, \ldots, x_k) \), arc paths \( \pi_1, \ldots, \pi_{k-1} \), and river path \( \pi_r \), with \( \pi_1 <_\Pi \pi_r \). Let \( \pi(s_1, t_1), \pi(s_r, t_r) \) be the paths generated by forwards-growth corresponding to \( \pi_1, \pi_r \) respectively. By construction, since \( x_1 \in (\pi_1 \cap \pi_r) \), these paths both contribute new edges to \( H \) leaving \( x_1 \); call the first one \( (x_1, y) \in \pi(s_1, t_1) \). Now notice that the arcs witness reachability among all of the node pairs | \[ | (y, x_2) \in \{z \mid z \in \pi_1\}, (x_2, x_3) \in \{z \mid z \in \pi_2\}, \ldots, (x_{k-1}, x_k) \in \{z \mid z \in \pi_{k-1}\}, (x_k, t_r) \in \{z \mid z \in \pi_k\}. | \] | So by transitivity, the node pair \( (y, t_r) \) is reachable. When we generate \( \pi(s_r, t_r) \) using forwards-growth, since we have already added \( \pi(s_1, t_1) \), the edge \( (x_1, y) \) is already present in \( H \) and we have \( (y, t_r) \) reachability. So the algorithm will not choose to add a new edge leaving \( x_1 \) while generating \( \pi(s_r, t_r) \), which completes the contradiction. | | | | | ## Online Source-Restricted Reachability Preservers | We will prove the following upper bound on source-restricted preservers in the online model: | | **Theorem 11.** In the online model with an \( n \)-node input DAG \( G = (V, E) \) and \( p \) total demand pairs, the final preserver \( H \) will have size | \[ |E(H)| \leq O\left( (np|S|)^{1/2} + n \right) \] | in either of the following two settings: | - \( S \) is the set of start nodes used by the given demand pairs \( P \) (that is, \( P \subseteq S \times V \)), and the builder generates paths in each round using the backwards-growth algorithm, or | - \( S \) is the set of end nodes used by the given demand pairs \( P \) (that is, \( P \subseteq V \times S \)), and the builder generates paths in each round using the forwards-growth algorithm. | | Notably, neither the forwards- nor backwards-growth algorithm requires the builder to know the number of demand pairs \( p \) or any information about the set of source/sink nodes \( S \). We will only prove the latter point in **Theorem 11**, analyzing forwards-growth and assuming \( P \subseteq V \times S \). The other point is symmetric. | | The proof will work by analyzing the path system \( Z \) associated with the online path-adding process; recall its essential properties in **Lemma 10**. Let \( \ell := \|Z\| / p \) be the average path length and let \( d := \|Z\| / n \) be the average node degree. If \( d \leq O(1) \) then we have \( \|Z\| \leq O(n) \) and the theorem holds, so we may assume in the following that \( d \) is at least a sufficiently large constant. | | Imagine that we add the paths from \( Z \) to an initially-empty system, one at a time, in the reverse of their ordering in \( \Pi \). We observe: | | **Lemma 12.** There is a path \( \pi \in \Pi \) such that when \( \pi \) is added in the above process, it contains at least \( \ell / 4 \) nodes of degree at least \( d / 4 \) each. | | **Proof.** Suppose not. Then, by counting the first \( d / 4 \) times each node appears in a path separately from the remaining times, the total size of \( Z \) can be bounded as | \[ \|Z\| \leq \frac{nd}{4} + \frac{p\ell}{4} \leq \frac{\|Z\|}{4} + \frac{\|Z\|}{4} = \frac{\|Z\|}{2}, \] | which is a contradiction. | | **Lemma 13.** \( \ell d \leq O(|S|) \). | | **Proof.** Suppose for contradiction that \( \ell d > 16|S| \). By the previous lemma, there is a path \( \pi \in \Pi \) that intersects at least \( \ell d / 16 > |S| \) other paths in \( \Pi \), which were added to the system before \( \pi \) (and hence come later than \( \pi \) in the ordering of \( \Pi \)). By the Pigeonhole principle, and since the demand pairs satisfy \( P \subseteq V \times S \), at least two of these intersecting paths \( q_1, q_2 \) end at the same node \( t \in S \). Since by **Lemma 10** \( Z \) does not contain any 2-bridges, \( q_1, q_2 \) may not intersect at any other nodes, and so they intersect \( \pi \) at two different nodes. But this implies that \( \pi, q_1, q_2 \) form a 3-bridge in which \( \pi \) is the first arc and it precedes both \( q_1, q_2 \) in the ordering of \( \Pi \) (see Figure 2). This contradicts **Lemma 10**, completing the proof. | | We now complete the proof by algebraically rearranging the inequality from the previous lemma. We have: | \[ \ell d \leq O(|S|) \] | \[ (p\ell)(nd) \leq O(|S|pn) \] | \[ \|Z\|^2 \leq O(|S|pn) \] | \[ \|Z\| \leq O((|S|pn)^{1/2}) \] | | Since by **Lemma 10** we have \( \|Z\| \geq |E(H)| \), this implies our desired bound on the size of the output preserver. | ## Online Pairwise Reachability Preservers | | By following an identical proof strategy to our upper bound in the source-restricted setting (i.e., exploiting forbidden ordered 2- and 3-bridges), it is possible to prove an upper bound of |E(H)| ≤ O((np)^(2/3) + n) (details omitted, since we will show a stronger bound than this). As discussed in [8], this is probably the best upper bound one can show by exploiting only the forbidden ordered 2- and 3-bridges from Lemma 10. Nonetheless, we will show a stronger bound, which crucially also exploits the forbidden ordered 4-bridges from Lemma 10. | | Recap of [8]. Recent work of Bodwin, Hoppenworth, and Trabelsi [8] on offline reachability preservers introduced a framework for extremal analysis of forbidden 4-bridges, which we will briefly recap here. First: | **Lemma 14 (Independence Lemma, c.f. [8], Lemma 38).** Let β(n, p, ∞) denote the maximum possible size of a path system with n nodes, p paths, and no bridges as subsystems. Then every n-node directed graph and set of p demand pairs has an offline reachability preserver H of size |E(H)| ≤ O(β(n, p, ∞)), and this is asymptotically tight. | | Thus, it suffices to argue about the extremal size of a bridge-free path system. We remark here that versions of this lemma are perhaps implicit at a low level in prior work. It is also an inherently offline lemma, and breaks down completely in the online setting; the reliance on this lemma (or its underlying ideas) is essentially why the known results for offline reachability preservers do not tend to extend to the online setting. | | This previous paper then argues as follows. Assume for convenience that all paths have length Θ(ℓ) and all nodes have degree Θ(d), for some parameters ℓ, d. Recall that the upper bound from forbidden 2- and 3-bridges is O((np)^(2/3) + n), and so our goal is to show that this bound cannot be tight. A few straightforward calculations reveal that, if this bound were tight, then for the typical pair of paths π1, π2 in the system there will be Θ(ℓ) paths that intersect π1 and then π2. However, no pair of these intersecting paths may have crossing intersection points with π1, π2. | | If there are Θ(ℓ) paths that intersect both π1, π2, and yet these intersecting paths cannot cross each other, then the typical intersecting path must “lie flat” in the sense that there is not much of a gap along either π1 or π2 to, say, the h nearest intersecting paths (for some parameter h). In order to exploit this, the key strategy in [8] is to sample a random base path πb ∈ Π, and then analyze the random subsystem S′ on the vertex set formed by examining the h adjacent nodes along the paths that intersect πb. | | Since πb extends along its branching paths, we should expect S′ to contain many long paths. But we can apply known upper bounds to S′ to rule out this possibility. This implies that, in fact, the typical pair of paths π1, π2 have ≪ ℓ paths that intersect both, leading to an improved upper bound. | | Our Offline Improvements. An auxiliary result of this paper is an improvement in the bound shown by [8]. We refer back to Theorem 4 for the statement, or Appendix B for the proof. The source of these improvements is from an improved strategy for controlling the size of the random subsystem S′. One of the two ways in which this part improved is by recursively bounding the size of S′ (this is executed in Lemma 40). Although this idea is conceptually straightforward, it requires a significant refactoring of the proof to enable it. The technical reason is that [8] bounds the input system Z using an ℓ1 norm of path lengths (the standard notion of size) but S′ using an ℓ2 norm of path lengths, making it impossible to directly apply the bound on Z recursively to S′. We switch to bounding both using the ℓ2 norm everywhere, and we only move back to our desired ℓ1 norm at the very end of the proof. The other new ingredient is an improved counting of the contribution of “short” paths to the size of S′, which is executed in Lemma 40. | | Our Online Adaptation. It will be slightly more convenient in this exposition to consider the backwards-growth strategy for path generation here, although of course by symmetry either strategy works (we use this convention in Appendix A as well). We will analyze the path system Z constructed above, and in particular Lemma 10 states that bridges are forbidden in Z whose last arc comes before the river. | | Can we exploit forbidden ordered 4-bridges by following the strategy outlined above? Some parts of the method extend easily, with minor tweaks. For example, instead of counting any paths π that intersect the typical pair of paths π1, π2, we can restrict attention to those that also come after π1, π2 in the ordering. Then the “crossing” in Figure 3 is still forbidden (since the river π3 is assumed to come after the last arc π2). Relatedly, when we define S′, we need to consider only the paths that intersect πb and come before it. Nonetheless, all these definitional adaptations turn out to affect the relevant counting arguments by only constant factors, and so they do not harm the argument. There are many other minor issues that we will not overview, which can be dispatched with a little technical effort. | | However, there is one major problem: there is now potential for overlap in the paths that branch off πb. That is, in the offline setting, we can exploit 3-bridge-freeness to argue that no two paths that branch off πb also intersect each other, and thus every node in S′ (except those on πb itself) is in exactly one branching path. But in the online setting, this is not so: these intersections form a 3-bridge that may be allowed. | | Naively, the typical node in S′ could be in Θ(d) branching paths, and this complication completely wipes out all the gains from the analysis. Although we cannot rule out the possibility of some nodes having Θ(d) branching paths, we are able to use a more intricate maneuver to show that there is some threshold t ≪ d such that, in expectation, the number of nodes of branching degree Ω(x) in S′ is far less than the trivial bound of ℓdh/x for x ≥ t. This turns out to be good enough to recover some gains from the method. We unfortunately cannot show this for t = 1, which is the fundamental reason why our online bounds are polynomially worse than the corresponding offline bounds. | | # Non-Adaptive Reachability Preservers | We next describe our method to convert our online algorithms to (almost) non-adaptive algorithms. Our algorithm essentially works by simulating a greedy adversary in the online model, who repeatedly provides the most costly demand pair in each round, and then we set paths by running our online algorithm against this adversary, halting at the appropriate place. Our proof will thus imply indirectly that this greedy strategy is the most effective one for an adversary in the online model, up to constant factors. | | Our algorithms will reference an extremal function *f*(*n*, *p*) for online reachability preservers, achieved by a generic path selection algorithm π(*s*, *t* | *G*, *H*). That is, we imagine an algorithm that starts with *G* as any *n*-node graph, and *H* as the *n*-node empty graph. When each demand pair (*s*, *t*) arrives, we select the path π(*s*, *t* | *G*, *H*) and add all of its edges to *H*. Then *f*(*n*, *p*) is the largest possible number of edges in *H* after *p* rounds of this process. | | We use this generic extremal function *f*, rather than the particular extremal upper bound from Theorem 1, in order to emphasize that this bound and the technical details of the forwards- or backwards-growth algorithms are not really important in this proof. If a future result improves on Theorem 1, then the new bound will automatically transfer to these results as well. For simplicity we will focus on *f*(*n*, *p*) here, but the proof would generalize readily to extremal functions that incorporate additional parameters beyond *n* and *p*. This includes the online source-restricted preservers of Theorem 11, which incorporate |*S*| as a parameter, although we note that these require the set *S* to be given on input, so that we know the set of possible demand pairs and we can properly simulate the adversary (i.e., search over the proper subset of demand pairs in the condition of the while loop). | | **Input:** *n*-node directed graph *G* = (*V*, *E*), number of demand pairs *p* | - All reachable node pairs (*s*, *t*) in *G* have “unfinalized” path | - *H* ← (*V*, ∅) | - Let *f*(*n*, *p*) be an extremal function for online reachability preservers, achieved by a deterministic path selection algorithm π(*s*, *t* | *G*, *H*) | - while there is reachable (*s*, *t*) with > *f*(*n*, *p*)/*p* edges in π(*s*, *t* | *G*, *H*) \ *E*(*H*) do | - finalize path π(*s*, *t* | *G*, *H*) for (*s*, *t*) | - add edges of π(*s*, *t* | *G*, *H*) to *H* | - foreach remaining unfinalized reachable pair (*s*, *t*) do | - finalize path π(*s*, *t* | *G*, *H*) for (*s*, *t*) | | **Algorithm 3: known-p-non-adaptive-rps** | | **Theorem 15.** For all *n*-node graphs *G* and sequences *P* of |*P*| =: *p* demand pairs, the paths set by Algorithm 3 satisfy | \[ | \left| \bigcup_{(s,t) \in P} \pi(s, t) \right| \leq 2f(n, p). | \] | | *Proof.* Let *Q* be the set of demand pairs whose paths are set in the initial while loop, and let *H*_*Q* be the subgraph *H* just after the paths for *Q* have been set and the while loop terminates. We first note that |*Q*| < *p*, since otherwise by counting the edges contributed to *H*, the first *p* demand pairs in *Q* create a subgraph *H*_*Q* of size |*E*(*H*_*Q*)| > *f*(*n*, *p*) which contradicts the definition of the extremal function *f*. Since |*Q*| < *p*, we therefore have | \[ | |E(H_Q)| \leq f(n, p). | \] | Meanwhile, all demand pairs in *P* \ *Q* have their path set in the final for loop, and by construction there are ≤ *f*(*n*, *p*)/*p* edges outside *H*_*Q* in each path. So we have | \[ | \left| \bigcup_{(s,t) \in P} \pi(s, t) \right| \leq |E(H_Q)| + \sum_{(s,t) \in P \setminus Q} |\pi(s, t) \setminus E(H_Q)| \leq f(n, p) + p \cdot \left( \frac{f(n, p)}{p} \right) = 2f(n, p). | \] | | This theorem implies that, if one uses the precomputed paths from Algorithm 3 to respond to online queries, then the online upper bound of *f*(*n*, *p*) will still apply (up to a factor of 2). The main weakness of Algorithm 3 is that it requires advance knowledge of the parameter *p*, in order to compute the threshold *f*(*n*, *p*)/*p* at which we exit the initial while loop. It is tempting, but incorrect, to think this can be generally avoided by setting all paths as in the main while loop. Such a strategy would work for a path selection algorithm that happens to satisfy an axiom like monotonicity, for which adding edges to *H* can only decrease the number of new edges in a selected path π(*s*, *t* | *G*, *H*) (it might also be fine to tolerate an approximate version of monotonicity). However, we note that the path selection algorithms (forwards- and backwards-growth) used in our online upper bounds are not monotonic in this way (or even approximately monotonic). | | That said, we next describe a wrapper for the algorithm that can avoid the need to know *p* ahead of time: | | **Theorem 16.** Suppose that the extremal function *f*(*n*, *p*) depends polynomially on its second parameter *p* in the regime where *p* ≥ *p*⁺. Then the online algorithm that runs Algorithm 4 as a preprocessing routine upon receiving *G*, and which then uses Algorithm 5 to select the path added to the preserver for each *i*ᵗʰ demand pair (*s*, *t*), will construct a reachability preserver *H* of size |*E*(*H*)| ≤ *O*(*f*(*n*, *p*)). | | **Input:** *n*-node directed graph *G* = (*V*, *E*) | - Let *f*(*n*, *p*) be an extremal function for online reachability preservers, achieved by a deterministic path selection algorithm π(*s*, *t* | *G*, *H*) | - Let *p*⁺ := arg maxₚ *f*(*n*, *p*) ≤ *O*(*n*) | - foreach *q* ∈ {*p*⁺, 2*p*⁺, 4*p*⁺, 8*p*⁺, . . . } do | - Run Algorithm 3 with number-of-paths parameter *q* | - Denote selected paths by π_*q*(*s*, *t*) | | **Algorithm 4: Preprocessing for Index-Sensitive Non-Adaptive Reachability Preservers** | | **Input:** demand pair (*s*, *t*), index *i* | - // run Algorithm 4 as preprocessing | - Let *q* be the least value in {*p*⁺, 2*p*⁺, 4*p*⁺, 8*p*⁺, . . . } with *q* ≥ *i* | - Return π_*q*(*s*, *t*) | | **Algorithm 5: Path Selection for Index-Sensitive Non-Adaptive Reachability Preservers** | | *Proof.* For each possible choice of *q*, we will add at most *q* paths selected by π_*q* to the preserver. By Theorem 15, these paths will have at most 2*f*(*n*, *q*) edges in their union. Additionally, letting *q*⁺ be the largest choice of *q* for which we add any corresponding paths, note that we have *q*⁺ ≥ *p* ≥ *q*⁺/2. So we can bound the total number of edges in the preserver as: | \[ | |E(H)| \leq \sum_{q \in \{p^+, 2p^+, 4p^+, 8p^+, \ldots, q^*\}} 2f(n, q) \leq O(f(n, q^*)) \leq O(f(n, p)). | \] | Here the second inequality holds because *f* depends polynomially on its second parameter, and so this sum is asymptotically dominated by its largest term. The third inequality holds because we have *p* ≥ *q*⁺/2, and (again since *f* depends polynomially on its second parameter) this means the values of *f*(*n*, *q*⁺), *f*(*n*, *p*) differ by at most a constant factor. | | # Online Unweighted Directed Steiner Forest Algorithms | We will next apply our extremal bounds for online reachability preservers to the problem of Online UDSF. As a reminder, in this problem we receive an n-node directed graph G = (V, E) on input, and then in each round we receive a new demand pair (s, t) that is reachable in G. We must irrevocably add edges to a reachability preserver H to ensure that (s, t) is reachable in H before the next demand pair is received. We do not know the number of demand pairs p ahead of time. We will denote by OPT the size of the smallest possible (offline) reachability preserver for G, P, where P is the set of all demand pairs received. | ## Recap of the Grigorescu-Lin-Quanrud Bound | Our new bound will use the structure and several technical ingredients from the previous state-of-the-art online algorithm by Grigorescu, Lin, and Quanrud [24]. They proved: | | **Theorem 17 ([24]).** For online UDSF, there is a randomized polynomial time algorithm with competitive ratio *O*(*n*^(2/3+ε)). | | Their algorithm carries two parameters, *T* and τ, which will be set at the end by a balance. In the following, we will say that a demand pair (*s*, *t*) is nontrivial if it is not already reachable when it arrives, and thus it requires us to add at least one new edge to the preserver. We let *p* be the total number of nontrivial demand pairs. | | - For the first *T* nontrivial demand pairs that arrive, we use the following result by Chakrabarty et al.: | **Theorem 18 ([21]).** There is a randomized polynomial-time online algorithm that constructs a preserver of the first *T* demand pairs of size at most *OPT* · *O*(*T*^(1/2−ε)). |

Checklist: 1. The answer should explain what a reachability preserver is, and clarify the online model where demand pairs arrive one by one.  
2. It should present Theorem 1 with the precise upper bound formula, including the dependence on n, p, and α, and note that α ≈ 0.7 is the root of a cubic.  
3. It should present Theorem 2 (source-restricted preservers), giving the O((n|S|p)^(1/2) + n) bound and noting symmetry between source-restricted and sink-restricted cases.  
4. It should emphasize that the algorithms are deterministic, polynomial-time, and require no knowledge of P or S in advance.  
5. Theorem 3 should be included, describing the stronger adversarial model with edge insertions and the lower bound Ω((np)^(2/3)+n).  
6. The answer should explicitly compare Theorem 1 to Theorem 3 and note that the new upper bound is polynomially better, thus separating the models.  
7. It should mention that the new tools developed for online analysis also yield improvements in the offline setting, leading to Theorem 4 with the refined bound.  
8. Theorem 5 should be included, describing the existence of non-adaptive online algorithms where paths depend only on G, S, and either the index i or total p.  
9. Theorem 6 should be presented, stating the offline UDSN bound involving OPT and the min{n^(4/7+ε), p^(1/2+ε)} factor.  
10. Theorem 7 should be mentioned, giving the online UDSN competitive ratio O(p^(1/2+ε)).  
11. Theorem 8 should be included, improving the online UDSN bound parametrized on n to O(n^(3/5+ε)), and contrasted with the previous O(n^(2/3+ε)).  
12. The DAG reduction (Theorem 9) should be summarized, explaining why analysis can assume input graphs are DAGs at the cost of adding ≤2n edges.  
13. The answer should describe the path-growth algorithms (forwards and backwards), how they greedily select paths, and how they are used to build the preserver.  
14. It should define the auxiliary path system Z, state its properties (acyclic, |Z| = |E(H)|+p, forbidden bridges), and explain how these are central to the analysis.  
15. Finally, the overall contribution should be summarized: a unified framework for analyzing online reachability preservers, new upper bounds (Theorems 1–2), separation from lower bounds (Theorem 3), improvements in offline bounds, and new results for UDSN (Theorems 6–8).