Abstract 1 Introduction 2 Preliminaries 3 Approximated Decremental Max Flow 4 Incremental Max Flow References Appendix A Finding a flow approximation, given the approximate flow value

Partially-Dynamic Maximum Flow in Dense Graphs

Egor Kravchenko ETH Zurich, Switzerland    Maximilian Probst Gutenberg ORCID ETH Zurich, Switzerland
Abstract

We give the first algorithms that, with high probability, maintain (1ϵ)-approximate s-t maximum flow in an n-vertex undirected, capacitated graph undergoing either only edge insertions or only edge deletions in total update time 𝒪ε~(n2).111We use 𝒪ε~(X) to hide polylogarithmic factors in the size of the input graph and polynomial factors in ϵ, e.g. f(n)log8(n)/ϵ5𝒪ε~(f(n)). For dense graphs, this yields polylogarithmic amortized update time, which was previously only obtained for the special case of uncapacitated graphs undergoing edge insertions.

We develop the following two algorithms:

  • For graphs undergoing deletions, we generalize the congestion-balancing framework from [6], which was developed for maximum matching. We then show that this framework can be simulated on cut sparsifiers, which yields significant speed-ups.

  • For graphs undergoing insertions, we show that the sparsification techniques by Eppstein et al. [13] can be combined more directly with the techniques from Henzinger and Goranci [15]. We thereby bypass the need to dynamize the more involved residual graph sparsification approach by Levin and Karger [25] suggested in [17], and extend their result to capacitated graphs.

Keywords and phrases:
Maximum Flow, Dynamic Graph Algorithm, Data Structure
Category:
Track A: Algorithms, Complexity and Games
Funding:
Maximilian Probst Gutenberg: The research leading to these results has received funding from grant no. 200021 204787 of the Swiss National Science Foundation.
Copyright and License:
[Uncaptioned image] © Egor Kravchenko and Maximilian Probst Gutenberg; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Dynamic graph algorithms
Acknowledgements:
The authors would like to thank Simon Meierhans for various insightful discussions.
Editors:
Sayan Bhattacharya, Danupon Nanongkai, Michael Benedikt, and Gabriele Puppis

1 Introduction

Computing the st maximum flow is a central problem in network optimization. Given a graph with capacities on its edges, the goal is to compute the largest amount of flow that can be routed from a designated source s to a designated sink t, subject to capacity constraints and flow conservation at all intermediate vertices. Improvements in maximum flow algorithms have a broad impact, since the problem underlies many classic reductions and applications, including maximum bipartite matching, finding a maximum collection of edge-disjoint st paths, and a variety of cut and connectivity tasks [27, 26, 8, 2, 1, 21, 20]. Beyond its theoretical role, maximum flow also appears in numerous real-world settings, such as scheduling, image segmentation, and transportation and logistics. Recently, the first algorithm achieving almost-linear running time in the number of edges was obtained in [10, 31].

This progress naturally raises the question of maintaining st max flow in dynamic graphs, where the input graph undergoes edge insertions and deletions. For directed graphs, lower bounds from [3, 22, 12] essentially rule out algorithms to maintain the exact s-t max flow value even in partially-dynamic graphs, where the update sequence only consists of either edge insertions or edge deletions. We refer to graphs undergoing only edge insertion as incremental and refer to graphs only undergoing edge deletions as decremental.

Since exact algorithms even for partially-dynamic are ruled out by conditional lower bounds, research has largely focused on (1ε)-approximation algorithms. In our discussion, we let n denote the number of vertices, and m denote the maximum number of edges in the graph at any point in time. Note that m serves as an upper bound on the number of updates for partially-dynamic graphs. To avoid clutter, we assume throughout that capacities are polynomially-bounded in n and the number of updates m does not exceed n2.222Our algorithm, like all previous results, has polylogarithmic dependency on the aspect ratio of the graph. Table 1 gives a more detailed summary of the landscape of results in the partially-dynamic setting. For a discussion of the literature on the static max flow problem, we refer the reader to [30].

In [32, 11, 30], (1ε)-approximate partially-dynamic algorithms are given with total update time 𝒪ε~(m1+o(1)) even for directed graphs. In [15, 17], it was shown that for undirected, uncapacitated graphs undergoing edge insertions, total update time 𝒪ε~(n2) can be achieved, which is near-optimal for dense graphs.

In this paper, we give near-optimal algorithms for maintaining approximate st max flow in undirected partially-dynamic graphs with capacities.

Theorem 1.

For any partially-dynamic graph G, vertices s,tV, and ε(0,1), there exists a randomized algorithm with total update time 𝒪ε~(n2), that, after each update, outputs a (1ε)-approximation to the st maximum flow in G.333In graphs undergoing edge insertions, the algorithm maintains an approximate flow explicitly, in graphs undergoing edge deletions, only the approximate max flow value is maintained. Note that [11, 32, 30] all only maintain an approximate flow value, only the algorithms for graphs undergoing insertions in [15, 17] can maintain such an approximate flow.

The algorithm succeeds with high probability and works against an adaptive adversary.

For dense graphs, this implies polylogarithmic amortized time per update, improving over the subpolynomial update time of the state-of-the-art algorithms in [11, 30]. Our bound also matches the polylogarithmic update time achieved in [17], while extending also to graphs that undergo edge deletions and additionally support general capacities.444[17] obtains a bound of 𝒪ε~(m+nF) total update time, which is tighter in simple uncapacitated graphs since there F=O(n). We show in Theorem 16 that the same bound can be obtained in capacitated graphs.

Our algorithms are simple and combinatorial in nature. This contrasts starkly with [11, 30], which rely on a sophisticated combination of interior-point methods and dynamic data structures. We note that the decremental algorithm in Theorem 1 uses the algorithm from [28], which is based on first-order optimization methods. While the notion of “combinatorial” is not well-defined, this algorithm is typically considered to be combinatorial. However, even when replaced by the classic, unambiguously “combinatorial” algorithm in [14], we still obtain 𝒪ε~(n5/2) total runtime.

We give two separate algorithms, one for decremental graphs and another for incremental graphs:

  • Decremental: The original paper [6] introduced the congestion-balancing framework and used it to obtain a 𝒪ε~(m) time algorithm for decremental bipartite matching. The main idea is to find a fractional matching that is well-spread, so that a substantial amount of the matching can only be removed by deleting either many edges or some very “important” edges. This allows them to show that only few, i.e. 𝒪ε~(1), fractional matchings have to be computed over the course of the algorithm.

    We show how to extend their approach to the more general problem of decremental maximum flow. However, this extension by itself yields only a 𝒪ε~(mn)-time bound, since it can be shown to be essential to recompute up to Ω(n) fractional flow certificates. To overcome this, we combine congestion balancing with cut sparsification: we maintain a sparse cut sparsifier with 𝒪ε~(n) edges and run the framework’s updates on this sparsified graph. Combined with a simple data structure, this reduces the algorithm’s dependence on m to the sparsifier size 𝒪ε~(n).

  • Incremental: We build on the idea from [15] to maintain the residual network under further insertions, along with a data structure that checks s-t reachability. Whenever the data structure detects s-t reachability, we augment along a new s-t path. A direct implementation yields 𝒪(mFlogm) total time: each augmentation requires an 𝒪(mlogm) time for reachability and path search, and we perform at most F augmentations. We accelerate this by running the same procedure on a cut-sparsified representation of the residual network with only 𝒪ε~(n) edges, which replaces the m factor by the sparsifier size and gives 𝒪ε~(nF) total time; this is sufficient when F=𝒪(n).

    While it seems at first rather straightforward to simply maintain a cut sparsifier of G and then simulate the above procedure for O(n) edge insertions until re-sparsification is necessary, the fluctuations in the max flow value of the sparsifier graph between re-computations can cause Ω(εF) augmentations for every O(n) edge insertions resulting in a catastrophic runtime.

    We show that the simple hierarchical re-sparsification technique from [13] can be adapted to update the sparsifier of G such that the max flow value monotonically increases over time, thus avoiding any fluctuations. We achieve this simply by scaling up cut sparsifiers slightly and careful composition. While much like in [17], the key to our algorithm is a re-sparsification framework, our approach is arguably much more direct, as we only require sparsification of undirected graphs as opposed to residual networks. In this way, our algorithmic framework can also deal with capacities while retaining comparable simplicity.

    For the regime where the maximum flow value F is large, i.e., F=Ω(n), we use a standard truncation argument that allows us to discard edges of small residual capacity while preserving a 1ε approximation, obtaining a total running time of 𝒪ε~(n2).

Table 1: Results on dynamic maximum flow. We give total update times for handling m updates on a graph with m edges (where mn2).
Setting Apx. Factor Directed Weighted Update Time Reference
Incremental 1 Yes Yes 𝒪ε~(mF) [23, 19]
1 No No 𝒪ε~(n2.5) [15]
1ε Yes No 𝒪ε~(m1+0.5+o(1)) [15]
1ε Yes Yes 𝒪ε~(mn0.5+o(1)) [33]
1ε No Yes 𝒪ε~(m1+o(1)) [32]
1ε Yes Yes 𝒪ε~(m1+o(1)) [11]
1ε No No 𝒪ε~(n2) [17]
1ε No Yes 𝒪ε~(n2) Theorem 1
Decremental 1ε Yes Yes 𝒪ε~(m1+o(1)) [30]
1ε No Yes 𝒪ε~(n2) Theorem 1
Fully dynamic 𝒪(logn) No Yes mn0.667+o(1) [9]
𝒪(polylog n) No Yes mδ,δ>0 [16]
mo(1) No No m1+o(1) [18]
mo(1) No Yes m1+o(1) [30]

2 Preliminaries

Logarithms.

We denote by logx, the logarithm of x with base 2.

Flows.

Our algorithm works on undirected, capacitated graphs G=(V,E,u), where V denotes the set of vertices, E the set of edges, and u the capacity function E+. For two vertices s,tV, an s-t flow fm assigns a value fe to each edge such that evfe=0 for all v{s,t} with |fe|u(e). The value of a flow f is F(f)=esfe and a maximum flow f=argmaxf is st flowF(f), with value F(G)=F(f). When the flow is clear from the context, we use F without the argument f. We call a flow f an α-approximate max flow for α(0,1) if F(f)αF.

Cuts.

For any cut (S,S¯=VS), we denote by E(S,S¯) the set of edges crossing the cut and by u(E(S,S¯) the capacities of the edges in the cut. For distinct vertices s,t, we say (S,S¯) is an s-t cut if sS,tS¯. In this paper, we extensively (and sometimes implicitly) use the max-flow min-cut theorem, which states that the maximum s-t flow value is equal to the capacity of the minimum s-t cut.

Cut Sparsifier.

We use the following definition of cut sparsifiers. This definition is slightly non-standard but obtained straightforwardly from classic constructions.

Definition 2.

Let G=(V,E,u) be a capacitated graph and given any ε>0. We call a graph H=(V,E,u) an (1ε) cut sparsifier for G if for every cut (S,S¯), (1ε)u(EH(S,S¯))u(EG(S,S¯))u(EH(S,S¯)).

3 Approximated Decremental Max Flow

In this section, we give our main technical contribution: a simple algorithm to maintain max flow in a graph undergoing edge deletions.

Theorem 3 (Decremental Max Flow).

For any decremental graph G, vertices s,tV, and ε(0,1), there exists a randomized algorithm with total update time 𝒪ε~(n2), that, after each update, outputs a (1ε)-approximation to the st maximum flow in G.

The algorithm succeeds with high probability and works against an adaptive adversary.

3.1 Thresholded Approximated Decremental Max Flow

We first observe that it essentially suffices to solve a thresholded version of the decremental max flow problem.

Lemma 4.

For any decremental graph G, threshold F and ε(0,1), there exists a randomized algorithm Decremental-Thresholded-Flow(G,F,ε) with total update time 𝒪ε~(n2+m), that, after each update, certifies that either

  1. 1.

    there is a flow f in G with F(f)(1O(ε))F, or

  2. 2.

    F(G)(1+ε)F.

The algorithm succeeds with high probability and works against an adaptive adversary.

Only 𝒪ε~(1) instantiations of Decremental-Thresholded-Flow(G,F,ε) suffice to implement Theorem 3 via standard techniques (see for example [33]).

We therefore focus in this section on proving Lemma 4. To this end, we extend the congestion-balancing flow framework introduced in [6]. [6] uses it to solve the approximate decremental matching problem in time 𝒪ε~(m). We apply the same framework to the more general decremental maximum flow problem and combine it with a cut-sparsification technique. The congestion-balancing flow framework bounds the number of re-computations of the flow by O~(n). Each round requires computing a static max flow of value at least (1ϵ)F or returns a cut of capacity less than F. We use the algorithm Maxflow(G,F) from [29, 28] which runs in O~(m) time. However, this would result in overall time 𝒪ε~(mn). To improve runtime, we show that we only need to compute flows on cut sparsifiers, which reduces the runtime of each iteration to 𝒪ε~(n2), which yields the desired runtime.

We use the theorem below, which is implicit in [7], and maintains a partition of the edges of a fully-dynamic graph into O(logn) expander decompositions of almost uniform degree. For such uniform degree expanders, it is well-known that uniform down-sampling yields (1ε) cut sparsifiers. The sparsifiers can be sampled implicitly at cost of 𝒪ε~(1) per edge that is added to the sparsifier. The overall sparsifier has 𝒪ε~(n) edges.

Theorem 5 (see [7]).

There exists a randomized data structure Sparsifier which takes a fully-dynamic graph G=(V,E,u) and ε>0, and processes updates and returns an (1ε) cut sparsifier H of G on query at any time. The data structure takes time 𝒪ε~(|E(G)|) on initialization, processes each update with amortized time 𝒪ε~(1), and queries in time 𝒪ε~(n). The algorithm succeeds with high probability and works against an adaptive adversary.

Algorithm 1 Decremental-Thresholded-Flow(G,F,ε).

The Algorithm.

We are now ready to describe our high-level algorithm (see Algorithm 1). We assume throughout w.l.o.g. that n is a power of 2 and so are all capacities 555If edge e has capacity u(e) with binary representation u(e)=2r1+2r2++2rp, we can split it into at most logu(e)=𝒪(logn) edges with capacities 2r1,2r2,,2rp.. Our algorithm proceeds in phases. Each edge e is assigned a capacity κ(e)u(e), which captures the importance of the edge. We use the function κ to scale capacities in G down as much as possible, so that a maxflow of value (1O(ε))F can still be routed. This results in the corresponding flow being spread out as much as possible, which makes it harder for the adversary to delete it. Initially, we set κ(e)=1n for every edge e. Later, we repeatedly double the capacities of some edges. Importantly, we never double the scaled capacity κ if the original capacity was achieved, i.e. at all time, for all eE, we have κ(e)u(e). Throughout the algorithm, we maintain two sparsifiers: the graph Horiginal, which is a cut sparsifier of G, and the graph Hscaled, which is a cut sparsifier of G with scaled capacities κ. To this end, we use the data structure from Theorem 5 with accuracy ε. As G and κ undergo updates, so do Horiginal and Hscaled.

At the beginning of each phase, we run Maxflow(Horiginal,F) to ensure that F(G)(1O(ε))F; if this is not true, we terminate. Otherwise, we call Maxflow(Hscaled,F) until it returns a flow. If the procedure returns a cut (S,S¯), we double capacities κ(e) for all edges eEG(S,S¯) in the cut with κ(e)<u(e) (and therefore κ(e)u(e)/2). Once this process terminates, the algorithm finds a witness flow f to certify that the maximum flow is of value at least (1O(ε))F. Then, we wait until the adversary deletes edges that carry at least εF flow in f. Once this threshold is reached, we start a new phase.

Analysis of Congestion-Balancing.

In our analysis, we assume that the algorithms that maintain Horiginal and Hscaled succeed, i.e., the two graphs are (1ε) cut sparsifiers of the original graphs G, and the graph G with capacities κ at any time.

We start with the following simple observation.

Observation 6.

Throughout Algorithm 1, the function κ only changes via doubling in line 15, and we always have 1nκ(e)u(e).

For our analysis, we introduce the following potential function.

Definition 7 (Potential function).

Let be the collection of all s-t flows f in the current graph G for which F(f)(12ε)F. Define the cost of an edge e by

c(e)=log(nκ(e)),

which is always nonnegative. For any (possibly fractional) s-t flow f, define its cost by

c(f)=eE(G)|f(e)|c(e).

Define the potential of the graph as

Π(G,κ,F)=minfc(f).

If is empty, then we set Π(G,κ,F)=+.

Again, we make some simple observations about the potential.

Observation 8.

If κ(e) increases for some edge e, then Π(G,κ,F) cannot decrease as a result. Moreover, edge deletions do not decrease Π(G,κ,F).

Observation 9.

At the beginning of Algorithm 1, we have c(e)=0 for every edge eE(G), so Π(G,κ,F)=0. Moreover, throughout the algorithm, the potential can only increase, and once it becomes +, it will remain + forever.

We have established that the potential starts at 0 and only increases. We now show that as long as the algorithm does not terminate, it is never too large.

Proposition 10.

Let Π(G,κ,F)<+. Then Π(G,κ,F)=𝒪(nFlogn).

Proof.

Note that for every flow f we have

c(f)=eE(G)c(e)|f(e)|=eE(G)log(nκ(e))|f(e)|O(log(n))eE(G)|f(e)|

where we use κ(e)u(e) and that all capacities are polynomially-bounded in n. Consider next that f is acyclic. Then, we can decompose the flow into flow paths. Clearly, each unit of flow contributes to at most n1 edges at cost at most O(logn), and thus the cost is bounded from above by O(Fnlogn). Since we can remove cycles from any flow f without decreasing its value and while monotonically removing its cost, we have that some minimizer for Π(G,κ,F) is acyclic. This yields the proposition.

Next, we bound the increase in potential and total cost of all edges with each scaling κ.

Definition 11.

Let E0 be the edge set of the initial graph G. We define κ(E0)=eE0κ(e). If eE0 was deleted, then κ(e) refers to the version right before the deletion of edge e.

Lemma 12.

Consider a call of Maxflow on Hscaled in Line 12 that returns a cut (S,S¯). Let κ be the capacities before the doubling step in line 15, and let κ be the capacities after this step. Then the following two statements hold simultaneously:

  1. 1.

    κ(E0)κ(E0)+F,

  2. 2.

    Π(G,κ,F)Π(G,κ,F)+εF.

Proof.

When a cut (S,S¯) is found in Line 12, we have κ(EHscaled(S,S¯))<(13ε)F by definition. Since Hscaled is a (1ε) cut sparsifier of G with capacities κ, we have κ(EG(S,S¯))<(13ε)F<F. Since each edge in eEG(S,S¯) has κ(e) either doubled (if κ(e)u(e)/2) or unchanged (if κ(e)=u(e)), we thus have that the increase in κ is at most F overall.

We prove the second claim in two steps:

  • 𝚷(𝑮,𝜿,𝑭) is finite: In Line 9, the algorithm returned proving that for Horiginal, we have that all s-t cuts (S,S¯) have capacity at least (1ε)F. Since Horiginal is a (1ε) cut sparsifier of G, we thus have

    u(EG(S,S¯))(1ε)(1ε)F(12ε)F.

    Using the max-flow min-cut theorem and Definition 7, is non-empty and Π(G,κ,F) finite.

  • Every flow in has increased cost: consider any flow f. Let Efull be the set of all edges eEG(S,S¯) such that κ(e)=u(e), and let Edouble=EG(S,S¯)Efull, i.e. the edge for which κ(e)=2κ(e).

    Since the cut was outputted in Line 12, we have that it has capacity in Hscaled at most (14ε)F. Since Hscaled is a (1ε) cut sparsifier of G with capacities κ, we have

    κ(EG(S,S¯))(13ε)F.

    Thus, EfullEG(S,S¯) have capacity at most (13ε)F under κ and since they have κ(e)=u(e), we have indeed that u(Efull)(13ε)F. Since flow f sends at least (12ε)F units of flow, at least εF units of flow are sent along edges in Edouble. Since eEdouble|f(e)|εF, we have

    c(f)c(f)=eEdouble(log(2nκ(e))log(nκ(e)))|f(e)|=eEdouble|f(e)|εF.

    Therefore, Π(G,κ,F)Π(G,κ,F)+εF.

Corollary 13.

In any execution of Algorithm 1, the total number of times that the invocation of Maxflow in line 12 returns a cut is 𝒪ε~(n). Moreover, we always have κ(E0)=𝒪ε~(nF).

Proof.

By Lemma 12, every time Maxflow returns a cut, Π(G,κ,F) increases by at least εF. By Proposition 10, this quantity is always 𝒪ε~(nF), so the number of such increases is at most 𝒪ε~(n/ε). By Lemma 12, every call of Maxflow that returns a cut incurs increases in κ(E0) by at most F, so in the end we have κ(E0)=𝒪ε~(nF).

Corollary 14.

The total number of phases before Algorithm 1 terminates is 𝒪ε~(n).

Proof.

Denote the set of all deleted edges by Edel and consider the quantity κ(Edel)=eEdelκ(e). We begin a new phase only when the counter Flow-Deleted exceeds εF, so the total number of phases is bounded by κ(Edel)/(εF). Using κ(Edel)κ(E0), that fact that initially κ(E0) is |E0|1nO(n) and Corollary 13, we obtain

κ(Edel)εF𝒪ε~(nF)εF=𝒪ε~(n).

Runtime Analysis.

It remains to analyze the runtime. Before we delve into the full analysis, we still need to clarify an implementation detail: when the Maxflow algorithm is executed in Line 12 terminates with a cut (S,S¯), it subsequently requires enumerating the edges in EG(S,S¯). Notably, it finds the cut in the graph Hscaled. We use the following fact.

Claim 15.

Given a fully-dynamic graph G, at anytime, given a cut (S,S¯), it can output the edges EG(S,S¯). The algorithm is deterministic, requires 𝒪ε~(|E(G)|) initialization time, 𝒪ε~(1) update time and time 𝒪ε~(n+|EG(S,S¯)|) to report all edges in EG(S,S¯) given the vertices in (S,S¯).

Proof Sketch.

We use a dynamic connectivity data structure as given in [24]. Such data structures maintain a maximal spanning forest F of the current graph, which can be stored efficiently in a dynamic tree data structure such as [4].

Consider now any vertices uS,vS¯ and the u-v path F[u,v] along F. Via the dynamic tree data structure, one can efficiently query the midpoint x on F[u,v] (ties broken arbitrarily). Since we can check efficiently if xS, we set u=x; otherwise, we set v=x. Then, we recurse again on F[u,v]. It is not hard to verify that after O(logn) such steps, (u,v) is an edge in EG(S,S¯).

To enumerate the cut, we use the above process, then delete the edge (u,v) from G. This yields for an adapted forest F that does not use edge (u,v) and thus yields a new edge upon repeating this process. Upon finding all edges in EG(S,S¯) via this process, we simply add the deleted edges back into the connectivity data structure. The tree data structure can also be used to remove vertices uS that are not connected to any vertex in S¯ or otherwise return a vertex vS¯ in the same connected component.

Since the connectivity data structure and dynamic tree data structure support all of the above operations in 𝒪ε~(1) time, the claimed runtime is achieved.

Finally, we are ready to prove Lemma 4.

Proof.

We argue correctness first. Algorithm 1 terminates only if Maxflow returns a cut in Line 9. This means that F(Horiginal)<F. Since F(G)F(Horiginal), we get F(G)<F.

On the other hand, the initialization of a new phase terminates after the Maxflow procedure in Line 12 certifies that an s-t flow of value at least (1ε)(13ε)F(14ε)F can be routed in Hscaled and thus at least (1ε)(14ε)F(15ε)F flow can be routed in G with capacities κ.

Since throughout a phase, edges of total scaled capacity κ at most εF are deleted, we have that at least (15ε)FεF=(16ε)F flow remaining, as desired.

Finally, we argue about the time complexity. In particular, we need to bound the cost of max-flow calls and the subroutine for enumerating cut edges. All other costs are subsumed by these bounds. To this end, we observe that any edge that was enumerated in a cut has its capacity thereafter doubled, and thus appears at most O(logn) times in such cuts. Since by Corollaries 14 and 13, the number of Maxflow calls and cut enumerations is 𝒪ε~(n), and since Maxflow calls run in time linear in the number of edges of the cut sparsifiers that they run on, we obtain total runtime 𝒪ε~(n2).

4 Incremental Max Flow

This section is devoted to the Incremental Max Flow problem. We first present an algorithm with total update time 𝒪ε~(m+nF), and then show how to obtain 𝒪ε~(m+n2) time via a simple trick.

Theorem 16 (Incremental Max Flow).

For any incremental graph G, vertices s,tV, and ε(0,1), there exists a randomized algorithm with total update time 𝒪ε~(m+min{nF,n2}), that, after each update, outputs a (1ε)-approximation to the st maximum flow in G. The algorithm succeeds with high probability and works against an adaptive adversary.

On a high level, we partition the update sequence into m/n phases, each consisting of at most n edge insertions. At the beginning of each phase, we invoke the procedure Sparsify, which computes a (1ε) cut sparsifier of the input graph with 𝒪ε~(n) edges. Such a procedure is a standard primitive and can be computed in near-linear time [5]. We then initialize the residual network with respect to this flow, and for the rest of the phase, we forward newly inserted edges directly to the residual network. After every insertion, we test whether t is reachable from s in the residual network; if so, we find an st augmenting path and augment along it, updating the residual network accordingly.

A key difficulty is that we cannot treat cut sparsification as a black box: a naive approach that (re)computes a sparsifier and then runs a static max-flow algorithm from scratch at the start of every phase yields too large a total running time. Instead, we maintain the sparsifier together with auxiliary state that supports the required flow/residual updates efficiently.

4.1 Cut Sparsifier Segment Tree

In this section, we develop a data structure that efficiently computes cut sparsifiers after edge insertions and maintains a maximum flow on them. Consider the following problem.

We are given a sequence of edge sets E0,,Ek1, each on the same vertex set V and each of size 𝒪(n). After observing each set Ei, we want to return a (1ε) cut sparsifier of the graph with edges E0E1Ei and a maximum flow on this sparsifier in total time 𝒪ε~(n(F+k))666We assume that logk=𝒪(logn)., where F is the maximum flow value in the graph on edges E0Ek1.

We develop a data structure Sparsifier-Tree to solve this problem. We build a complete binary segment tree over the time indices [0,k) (assume k is a power of two; otherwise pad with empty edge sets). Each node u corresponds to a half-open interval I(u)=[a,b), with children representing the left and right halves. For every interval I=[a,b) we define

EI:=t=ab1EtandGI:=(V,EI).

Invariant.

For every node with interval I=[a,b) we store a (1ε0) cut sparsifier HI of GI.

Update.

Upon receiving Ei, we set the leaf structure for [i,i+1) (e.g. H[i,i+1):=(V,Ei)), and then update the nodes on the path to the root. For a parent interval I=ILIR we set

HISparsify(HILHIR),

where denotes weighted union (we assume that weights add on duplicates).

Proposition 17.

Let G1 and G2 be graphs on the same vertex set V, and let H1 and H2 be their (1ε) cut sparsifiers. Then the graph H:=H1H2 is a (1ε) cut sparsifier of G:=G1G2 (with weights added on duplicates).

Proof.

Fix a cut SV. By assumption, for each i{1,2} we have

(1ε)u(EHi(S,S¯))u(EGi(S,S¯))u(EHi(S,S¯)).

Adding the two inequalities and using u(EG(S,S¯))=u(EG1(S,S¯))+u(EG2(S,S¯)) and u(EH(S,S¯))=u(EH1(S,S¯))+u(EH2(S,S¯)), we obtain

(1ε)u(EH(S,S¯))u(EG(S,S¯))u(EH(S,S¯)).

Now set ε0=Θ(ε/logk). Since each H[a,b) is produced by at most logk applications of Sparsify along a root-to-leaf path, the total distortion accumulates multiplicatively: for every cut S,

(1ε0)𝒪(logk)u(EH[a,b)(S,S¯))u(EG[a,b)(S,S¯))u(EH[a,b)(S,S¯)).

Choosing the hidden constant in Θ() appropriately yields

(1ε)u(EH[a,b)(S,S¯))u(EG[a,b)(S,S¯))u(EH[a,b)(S,S¯)).

Together with Proposition 17, this leads to the following result.

Proposition 18.

For every tree node with interval [a,b), H[a,b) is a (1ε) cut sparsifier of the graph with edges E[a,b).

The time complexity of maintaining the segment tree is straightforward. The tree has k leaves and at most 2k1 nodes. By the invariant, each stored sparsifier has 𝒪ε~(n) edges, so each merge

HISparsify(HILHIR)

takes 𝒪ε~(n) time. Each update triggers 𝒪(logk) merges along the path to the root, hence the total time over k updates is 𝒪(nklogk)=𝒪ε~(nk).

Proposition 19.

The total runtime needed to maintain Sparsifier-Tree over k updates is 𝒪ε~(nk).

Now consider any interval [a,b). It can be decomposed (in the standard way) into a disjoint union of at most logk intervals I1,,Is associated with tree vertices. Then we let H[a,b)=j=1sHIj (with weighted union). Finally, when we are asked for a sparsifier for the graph G[0,a) for some a, we return the graph H[0,a), which is a (1ε) cut sparsifier of G[0,a) by Propositions 17 and 18.

Our data structure also needs to maintain a maximum flow for every prefix sparsifier H[0,a). To do so, for every tree node with interval [a,b) we additionally store a flow f[a,b).

Invariant 1 (prefix optimality).

For every prefix [0,a) with canonical decomposition

[0,a)=i=1sIi(slogk),

define the flow f[0,a) by

f[0,a):=i=1sfIi.

Then f[0,a) is a maximum st flow in the graph H[0,a).

Invariant 2 (left-sibling augmentation).

Let [a,b) be a node that is the left child of its parent, and let [0,a) be the prefix interval corresponding to all time indices strictly before a. Denote by R[0,a) the residual network of H[0,a) with respect to the flow f[0,a). Then the stored flow f[a,b) is a maximum st flow in the graph R[0,a)H[a,b).

Update.

Upon receiving Eb (thus initializing the leaf [b,b+1)), we update the flows for nodes affected by the segment-tree update. In particular, for every node of the form [a,b+1) that is a left child, we compute a maximum flow in the graph

R[0,a)H[a,b+1),

where R[0,a) is the residual network of H[0,a) with respect to f[0,a). Together with the flow f[0,a), this yields a maximum flow in

H[0,a)H[a,b+1)=H[0,b+1).

To compute each maximum flow f[a,b) we use the Ford–Fulkerson algorithm on the graph R[0,a)H[a,b).

Time Complexity.

Let us next bound the runtime of this procedure.

Lemma 20.

The total runtime of computing the flows f[a,b) over all tree nodes [a,b) is 𝒪ε~(nF).

Proof.

Fix a node [a,b). The graph on which we compute f[a,b) is of the form R[0,a)H[a,b). By construction, every sparsifier stored in the tree has 𝒪ε~(n) edges, and the residual network adds at most a logk factor more edges. Hence R[0,a)H[a,b) has 𝒪ε~(n) edges.

We compute f[a,b) using the Ford–Fulkerson algorithm. Under our capacity model, each augmentation increases the flow value by at least one unit, and each augmentation can be found in time linear in the number of edges. Therefore, the time to compute f[a,b) is

𝒪ε~(nval(f[a,b))).

Thus it suffices to bound [a,b)val(f[a,b)) over all nodes in the tree.

We prove the following stronger statement by induction on the interval length (ba). Let

Σ([a,b)):=[c,d)in the subtree of[a,b)val(f[c,d)).

Then

Σ([a,b))(log(ba)+1)F(R[0,a)H[a,b)).

Base case.

ba=1. Then the subtree contains only the node [a,a+1), and by definition

Σ([a,a+1))=val(f[a,a+1))=F(R[0,a)H[a,a+1)).

Induction step.

Let m=(a+b)/2, and let L=[a,m) and R=[m,b) be the left and right children. By the induction hypothesis applied to L and R,

Σ(L) (log(ma)+1)F(R[0,a)HL),
Σ(R) (log(bm)+1)F(R[0,m)HR).

Since ma=bm=(ba)/2, we have log(ma)+1log(ba) and log(bm)+1log(ba).

Moreover, by definition,

val(f[a,b))=F(R[0,a)H[a,b)).

Finally, since R[0,m) is the residual network after sending a maximum flow in H[0,m)=H[0,a)HL, the additional maximum flow obtainable after adding HR satisfies

F(R[0,m)HR)=F(R[0,a)HLHR)F(R[0,a)HL).

Combining these bounds, we obtain

Σ([a,b)) =Σ(L)+Σ(R)+val(f[a,b))
log(ba)F(R[0,a)HL)
+log(ba)(F(R[0,a)HLHR)F(R[0,a)HL))
+F(R[0,a)H[a,b))
=log(ba)F(R[0,a)HLHR)+F(R[0,a)H[a,b)).

Since H[a,b) is a cut sparsifier for HLHR, every st cut in R[0,a)(HLHR) has capacity at most the corresponding cut in R[0,a)H[a,b). Hence

F(R[0,a)HLHR)F(R[0,a)H[a,b)),

and therefore

Σ([a,b))(log(ba)+1)F(R[0,a)H[a,b)),

which completes the induction.

Applying the bound to the root interval [0,k) (where R[0,0) is empty) yields

[a,b)val(f[a,b))(logk+1)F(H[0,k)).

Since H[0,k) is a (1ε) cut sparsifier of the final graph, its maximum flow value satisfies F(H[0,k))=𝒪(F). Using logk=𝒪(logn) and that such polylogarithmic factors are hidden in 𝒪ε~(), we conclude that the total time is 𝒪ε~(n[a,b)val(f[a,b)))=𝒪ε~(nF).

4.2 𝓞𝜺~(𝒎+𝒏𝑭) Incremental Algorithm

By a standard trick, it suffices to only maintain the approximate value of the max flow (see Appendix A for details on how to recover an approximate flow). Our algorithm works in phases, each of which corresponds to n edge insertions. Denote Ei={ein,,ein+n1}. At the beginning of phase j, we call Sparsifier-Tree data structure to get the cut sparsifier H for the graph on edges E[0,j)=E0Ej1 and the maxflow f on it. Then we build the residual network R for the flow f in H and insert edges from Ei into R one by one. During edge insertions, we maintain a reachability data structure, which allows us to check whether there exists an s-t path. If it exists, we return such a path. Such a data structure processes q edge insertions in a graph with n vertices and m edges in time 𝒪(q+n+m). Once we found an s-t path, we augment the current flow f along this path, rebuild the residual network and reinitialize the reachability data structure. For pseudocode we refer to Algorithm 2.

Algorithm 2 Simple Incremental Algorithm.

Note that the flow itself is not a flow in the original graph, so for now, we can only output the flow value. First, we argue the correctness of Algorithm 2.

Lemma 21.

For every j{0,,mn1} and i{1,,n}, the flow value ansi+jn is always a (1ε) approximation of the maxflow in Gi+jn.

Proof.

After execution of the while-loop, there is no s-t path in R, so the current flow f is a maxflow in the graph Hcur:=Hejn+1ejn+i. By Proposition 18, H is a (1ε) cut sparsifier of Gjn. Proposition 17 says that then the union Hcur is a (1ε) cut sparsifier of Gjn+i:=Gjnejn+1ejn+i, so the maxflow f is a (1ε) approximation of a maxflow in Gjn+i.

To analyze the time complexity of Algorithm 2, we first bound the total number of iterations of the while-loop.

Lemma 22.

The total number of iterations of the while-loop in Algorithm 2 is 1/(1ε)F(G).

Proof.

Consider the j-th phase. Every iteration of the while-loop increases the value of the flow f by at least one. Thus, the total number of iteration during the j-th phase is at most F(HEj)F(H). Recalling notation from the Sparsifier Segment Tree, H is H[0,j), so this quantity becomes F(H[0,j)Ej)F(H[0,j)). Since H[0,j+1) is a cut sparsifier of H[0,j)Ej, we have

F(H[0,j)Ej)F(H[0,j))F(H[0,j+1))F(H[0,j)).

Summing up this quantities for all j{0,mn1}, results in

F(H[0,mn))F(H[0,0)])1/(1ε)F.

Now we are ready to prove the time complexity of Algorithm 2.

Lemma 23.

The total runtime of Algorithm 2 is 𝒪ε~(m+nF).

Proof.

By Lemma 20, the total runtime of all calls of Sparsifier-Tree is 𝒪ε~(m+nF). Adding edges to the residual network takes 𝒪ε~(n) time in each phase, which results in total time 𝒪ε~(m) across m/n phases. Every iteration of a while-loop takes 𝒪ε~(n) time, since the size of the graph R is 𝒪ε~(n). By Lemma 22, the total number of iterations is 1/(1ε)F, so the total runtime required by all while-loop executions is 𝒪ε~(nF), which yields runtime 𝒪ε~(m+nF).

Lemmata 21 and 23 combined together prove the first part of Theorem 16.

4.3 𝓞𝜺~(𝒎+𝒏𝟐) incremental algorithm

Finally, we describe how to obtain total runtime 𝒪ε~(m+n2) even when F(G) exceeds 𝒪ε~(n). To this end, we want to use a simple trick: given an m-edge graph with maximum flow F(G), we can round all capacities down to the nearest multiple of εF(G)/m and retain (1ε)F(G) of the original flow since the total amount of capacity erased is at most mεF(G)/m=εF(G).

In our case, we have to apply this trick quite carefully. We run the cut sparsifier segment trees as before. However, we ensure that all capacities considered are powers of 2. We can assume this for all edges in G, and it is not hard to adapt [5] enforce that the cut sparsifier scales capacities of sampled edges again by powers of 2 without increasing the number of sampled edges significantly. Finally, since there are only O(logn) different capacities, we can also assume that the cut sparsification procedure is implemented by taking the union of the O(logn) cut sparsifiers obtained from sampling a cut sparsifier for each capacity class separately. Again, this only increases the sparsity by a factor of O(logn).

Recall that it was previously important that cut sparsifiers dominate all cuts and thus have at least the same amount of maxflow as they evolve. It is not hard that due to the above changes, this property is still guaranteed, even when rounding all capacities in the respective cut sparsifiers down to the nearest multiple of some value η. We point out that, crucially, we do not apply the rounding to cut sparsifiers and then run further cut sparsification and round down again!

Finally, whenever we run Algorithm 2, we run it as before but round down all capacities to the nearest multiple of some value η. Since the graphs that we run this algorithm on have at most 𝒪ε~(n) edges, we can choose η=𝒪ε~(F(G)/n) while loosing at most εF(G) in total capacity. Now, our previous analyses can be extended to yield almost the same bounds: every augmentation increases the flow by at least F(G)/𝒪ε~(n) and thus there can be at most 𝒪ε~(n) such augmentations. All other arguments extend almost seamlessly to yield the desired total runtime of 𝒪ε~(n2).

References

  • [1] Amir Abboud, Rasmus Kyng, Jason Li, Debmalya Panigrahi, Maximilian Probst Gutenberg, Thatchaphol Saranurak, Weixuan Yuan, and Wuwei Yuan. Deterministic almost-linear-time gomory-hu trees. In 66th IEEE Symposium on Foundations of Computer Science (FOCS 2025), 2025.
  • [2] Amir Abboud, Jason Li, Debmalya Panigrahi, and Thatchaphol Saranurak. All-pairs max-flow is no harder than single-pair max-flow: Gomory-hu trees in almost-linear time. In 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS), pages 2204–2212. IEEE, 2023. doi:10.1109/FOCS57990.2023.00137.
  • [3] Amir Abboud and Virginia Vassilevska Williams. Popular conjectures imply strong lower bounds for dynamic problems. In 2014 IEEE 55th Annual Symposium on Foundations of Computer Science, pages 434–443. IEEE, 2014. doi:10.1109/FOCS.2014.53.
  • [4] Stephen Alstrup, Jacob Holm, Kristian De Lichtenberg, and Mikkel Thorup. Maintaining information in fully dynamic trees with top trees. Acm Transactions on Algorithms (talg), 1(2):243–264, 2005. doi:10.1145/1103963.1103966.
  • [5] András A Benczúr and David R Karger. Randomized approximation schemes for cuts and flows in capacitated graphs. SIAM Journal on Computing, 44(2):290–319, 2015. doi:10.1137/070705970.
  • [6] Aaron Bernstein, Maximilian Probst Gutenberg, and Thatchaphol Saranurak. Deterministic decremental reachability, SCC, and shortest paths via directed expanders and congestion balancing. In 2020 IEEE 61st Annual Symposium on Foundations of Computer Science (FOCS), pages 1123–1134. IEEE, 2020. doi:10.1109/FOCS46700.2020.00108.
  • [7] Aaron Bernstein, Jan van den Brand, Maximilian Probst Gutenberg, Danupon Nanongkai, Thatchaphol Saranurak, Aaron Sidford, and He Sun. Fully-Dynamic Graph Sparsifiers Against an Adaptive Adversary. In 49th International Colloquium on Automata, Languages, and Programming (ICALP 2022), volume 229 of Leibniz International Proceedings in Informatics (LIPIcs), pages 20:1–20:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ICALP.2022.20.
  • [8] Ruoxu Cen, William He, Jason Li, and Debmalya Panigrahi. Steiner connectivity augmentation and splitting-off in poly-logarithmic maximum flows. In Proceedings of the 2023 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2449–2488. SIAM, 2023. doi:10.1137/1.9781611977554.CH95.
  • [9] Li Chen, Gramoz Goranci, Monika Henzinger, Richard Peng, and Thatchaphol Saranurak. Fast dynamic cuts, distances and effective resistances via vertex sparsifiers. In 2020 IEEE 61st Annual Symposium on Foundations of Computer Science (FOCS), pages 1135–1146. IEEE, 2020. doi:10.1109/FOCS46700.2020.00109.
  • [10] Li Chen, Rasmus Kyng, Yang Liu, Richard Peng, Maximilian Probst Gutenberg, and Sushant Sachdeva. Maximum flow and minimum-cost flow in almost-linear time. Journal of the ACM, 72(3):1–103, 2025. doi:10.1145/3728631.
  • [11] Li Chen, Rasmus Kyng, Yang P. Liu, Simon Meierhans, and Maximilian Probst Gutenberg. Almost-linear time algorithms for incremental graphs: Cycle detection, sccs, s-t shortest path, and minimum-cost flow. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing, STOC ’24, New York, NY, USA, 2024. Association for Computing Machinery. doi:10.1145/3618260.3649745.
  • [12] Søren Dahlgaard. On the Hardness of Partially Dynamic Graph Problems and Connections to Diameter. In Ioannis Chatzigiannakis, Michael Mitzenmacher, Yuval Rabani, and Davide Sangiorgi, editors, 43rd International Colloquium on Automata, Languages, and Programming (ICALP 2016), volume 55 of Leibniz International Proceedings in Informatics (LIPIcs), pages 48:1–48:14, Dagstuhl, Germany, 2016. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. doi:10.4230/LIPIcs.ICALP.2016.48.
  • [13] David Eppstein, Zvi Galil, Giuseppe F Italiano, and Amnon Nissenzweig. Sparsification—a technique for speeding up dynamic graph algorithms. Journal of the ACM (JACM), 44(5):669–696, 1997. doi:10.1145/265910.265914.
  • [14] Andrew V Goldberg and Satish Rao. Beyond the flow decomposition barrier. Journal of the ACM (JACM), 45(5):783–797, 1998. doi:10.1145/290179.290181.
  • [15] Gramoz Goranci and Monika Henzinger. Efficient data structures for incremental exact and approximate maximum flow. In 50th International Colloquium on Automata, Languages, and Programming, ICALP 2023, page 69, 2023.
  • [16] Gramoz Goranci, Monika Henzinger, Peter Kiss, Ali Momeni, and Gernot Zöcklein. Dynamic hierarchical j-tree decomposition and its applications. In Proceedings of the 2026 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1128–1180. SIAM, 2026. doi:10.1137/1.9781611978971.45.
  • [17] Gramoz Goranci, Monika Henzinger, Harald Räcke, and A. R. Sricharan. Incremental Approximate Maximum Flow via Residual Graph Sparsification. In 52nd International Colloquium on Automata, Languages, and Programming (ICALP 2025), volume 334 of Leibniz International Proceedings in Informatics (LIPIcs), pages 91:1–91:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPIcs.ICALP.2025.91.
  • [18] Gramoz Goranci, Harald Räcke, Thatchaphol Saranurak, and Zihan Tan. The expander hierarchy and its applications to dynamic graph algorithms. In Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2212–2228. SIAM, 2021. doi:10.1137/1.9781611976465.132.
  • [19] Manoj Gupta and Shahbaz Khan. Simple dynamic algorithms for maximal independent set, maximum flow and maximum matching. In Symposium on Simplicity in Algorithms (SOSA), pages 86–91. SIAM, 2021. doi:10.1137/1.9781611976496.10.
  • [20] Zhongtian He, Shang-En Huang, and Thatchaphol Saranurak. Cactus representation of minimum cuts: Derandomize and speed up. In Proceedings of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1503–1541. SIAM, 2024. doi:10.1137/1.9781611977912.61.
  • [21] Zhongtian He, Shang-En Huang, and Thatchaphol Saranurak. Cactus representations in polylogarithmic max-flow via maximal isolating mincuts. In Proceedings of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1465–1502. SIAM, 2024. doi:10.1137/1.9781611977912.60.
  • [22] Monika Henzinger, Sebastian Krinninger, Danupon Nanongkai, and Thatchaphol Saranurak. Unifying and strengthening hardness for dynamic problems via the online matrix-vector multiplication conjecture. In Proceedings of the forty-seventh annual ACM symposium on Theory of computing, pages 21–30, 2015. doi:10.1145/2746539.2746609.
  • [23] Monika Rauch Henzinger. A static 2-approximation algorithm for vertex connectivity and incremental approximation algorithms for edge and vertex connectivity. Journal of Algorithms, 24(1):194–220, 1997. doi:10.1006/JAGM.1997.0855.
  • [24] Jacob Holm, Kristian de Lichtenberg, and Mikkel Thorup. Poly-logarithmic deterministic fully-dynamic algorithms for connectivity, minimum spanning tree, 2-edge, and biconnectivity. Journal of the ACM, 48(4):723–760, 2001. doi:10.1145/502090.502095.
  • [25] David R Karger and Matthew S Levine. Fast augmenting paths by random sampling from residual graphs. SIAM Journal on Computing, 44(2):320–339, 2015. doi:10.1137/070705994.
  • [26] Jason Li, Danupon Nanongkai, Debmalya Panigrahi, Thatchaphol Saranurak, and Sorrachai Yingchareonthawornchai. Vertex connectivity in poly-logarithmic max-flows. Journal of the ACM, 72(4):1–34, 2025. doi:10.1145/3743670.
  • [27] Jason Li and Debmalya Panigrahi. Deterministic min-cut in poly-logarithmic max-flows. In 2020 IEEE 61st Annual Symposium on Foundations of Computer Science (FOCS), pages 85–92. IEEE, 2020. doi:10.1109/FOCS46700.2020.00017.
  • [28] Richard Peng. Approximate undirected maximum flows in o (m polylog (n)) time. In Proceedings of the twenty-seventh annual ACM-SIAM symposium on Discrete algorithms, pages 1862–1867. SIAM, 2016. doi:10.1137/1.9781611974331.CH130.
  • [29] Jonah Sherman. Nearly maximum flows in nearly linear time. In 2013 IEEE 54th Annual Symposium on Foundations of Computer Science, pages 263–269. IEEE, 2013. doi:10.1109/FOCS.2013.36.
  • [30] Jan Van Den Brand, Li Chen, Rasmus Kyng, Yang P Liu, Simon Meierhans, Maximilian Probst Gutenberg, and Sushant Sachdeva. Almost-linear time algorithms for decremental graphs: Min-cost flow and more via duality. In 2024 IEEE 65th Annual Symposium on Foundations of Computer Science (FOCS), pages 2010–2032. IEEE, 2024. doi:10.1109/FOCS61266.2024.00120.
  • [31] Jan Van Den Brand, Li Chen, Rasmus Kyng, Yang P Liu, Richard Peng, Maximilian Probst Gutenberg, Sushant Sachdeva, and Aaron Sidford. A deterministic almost-linear time algorithm for minimum-cost flow. In 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS), pages 503–514. IEEE, 2023. doi:10.1109/FOCS57990.2023.00037.
  • [32] Jan van den Brand, Li Chen, Rasmus Kyng, Yang P Liu, Richard Peng, Maximilian Probst Gutenberg, Sushant Sachdeva, and Aaron Sidford. Incremental approximate maximum flow on undirected graphs in subpolynomial update time. In Proceedings of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 2980–2998. SIAM, 2024. doi:10.1137/1.9781611977912.106.
  • [33] Jan van den Brand, Yang P Liu, and Aaron Sidford. Dynamic maxflow via dynamic interior point methods. In Proceedings of the 55th Annual ACM Symposium on Theory of Computing, pages 1215–1228, 2023. doi:10.1145/3564246.3585135.

Appendix A Finding a flow approximation, given the approximate flow value

Algorithm 2 returns approximations only for the flow values. In this section, we discuss how to find a (1ε) approximation of the flow itself after each edge insertion. Consider the following algorithm: we start with an empty flow and let δ=ε4. After each edge insertion, we add the edge to the residual network (without any additional data structure). Then, we find a (1δ)-approximate flow value fapprox and, if the value (1δ)2fcurrent for our current flow is smaller, we find the flow in the residual network using the algorithm of Karger and Levine [25] with runtime 𝒪ε~(m+nF). We present the pseudocode in Algorithm 3.

Algorithm 3 Finding a 1ε flow approximation.
Proposition 24.

Let 0<ε<1. Then for every i, the flow ansi is a (1ε)-approximation of Fi.

Proof.

Consider the i-th iteration of the for cycle. If the condition of the if operator is not satisfied, then we have

fcurrent(1δ)2fapprox(1δ)3fi(1ε)fi.

If the condition of the if operator is satisfied, we find an exact max flow in the residual network, and therefore, fcurrent=fi.

On the other hand, the flow F is always a legal flow in the graph Gi, so it always holds that fcurrentfi.

Proposition 25.

The running time of Algorithm 3 is 𝒪ε~(m+nFε2).

Proof.

The algorithm has two time-consuming subroutines. Finding an approximate flow costs 𝒪ε~(m+nFε2) in general. Each Karger–Levine call takes 𝒪ε~(m+nF(R)) time, where F(R) is the max flow value in R.

Since (1δ)2fapprox(1ε)fi and after every Karger–Levine call we obtain fcurrent=fi, the variable fcurrent scales by a factor of at least 1/(1ε). At the end of the algorithm we have fcurrentF, so there are no more than log1/(1ε)F=𝒪(logFε) calls of Karger–Levine. Thus, the total runtime of Karger–Levine is bounded by 𝒪ε~(m+nFε2).