Flow-augmentation II: Undirected Graphs

We present an undirected version of the recently introduced flow-augmentation technique: Given an undirected multigraph G with distinguished vertices s,t ∈ V(G) and an integer k, one can in randomized k𝒪(1) ⋅ (|V(G)| + |E(G)|) time sample a set A ⊆ \(\binom{V(G)}{2}\) such that the following holds: for every inclusion-wise minimal st-cut Z in G of cardinality at most k, Z becomes a minimum-cardinality cut between s and t in G+A (i.e., in the multigraph G with all edges of A added) with probability 2-𝒪(k log k). Compared to the version for directed graphs [STOC 2022], the version presented here has improved success probability (2-𝒪(k log k) instead of 2-𝒪(k4 log k)), linear dependency on the graph size in the running time bound, and an arguably simpler proof. An immediate corollary is that the Bi-objective st-Cut problem can be solved in randomized FPT time 2𝒪(k log k) (|V(G)|+|E(G)|) on undirected graphs.


Introduction
Fixed-parameter tractable algorithms for graph separation problems has been an important question in parameterized complexity, and a er more than a decade of intense study it would seem that we should by now know of all the major techniques necessary for the design of such algorithms.Certainly, there is an impressive toolbox, leading to the resolution of central problems such as FPT algorithms for M [MR14,BDT18] and M B [CLP + 19].Yet despite this progress, several open problems remained until very recently.Many of these relate to directed graph cuts, such as the existence of FPT algorithms for the notorious C SAT problem identi ed by Chitnis et al. [CEM17], weighted variants of classic problems such as D F V S , or the deceptively simple-looking problem of B (s, t) [KLM + 20].In the last problem, the input is a digraph D = (V, A) with arc weights w and s, t ∈ V , and two budgets k, W , and the task is to nd an (s, t)-cut Z ⊆ A such that |Z| ≤ k and w(Z) ≤ W .Despite the simplicity of the problem, the existence of an FPT algorithm was open for a long time.
is paper is a second one in a series that introduces a new algorithmic technique of ow-augmentation and explores its applications.e rst part [KKPW21a] introduced the technique in full generality in directed graphs and applied it to show xed-parameter tractability of C SAT and weighted D F V S .e third one [KKPW22] uses the technique to show two new tractability isles in the area of parameterized algorithms for Constraint Satisfaction Problems, parameterized by the number of unsatis ed clauses, and completes a complexity dichotomy in the Boolean domain.e main goal of this part is to show a counterpart in undirected graphs that is simpler and has improved guarantees as compared to the (more general) directed version of part one [KKPW21a].
To state formally the main result, we some notation.Consider an undirected graph G = (V, E) with two vertices s, t ∈ V , and an unknown (s, t)-cut Z. Furthermore, let Z s,t ⊆ Z be those edges with one endpoint reachable from s and the other reachable from t in G−Z.We say that Z is a special (s, t)-cut if Z s,t is an (s, t)-cut, and eligible for (s, t) if additionally every edge of Z has its endpoints in di erent connected components of G − Z.In particular, any minimal, not necessarily minimum (s, t)-cut is eligible for (s, t).Let k = |Z|, λ * = |Z s,t |, and let λ G (s, t) ≤ λ * be the value of an (s, t)-max ow in G.We show the following (reformulated slightly from the more formal version in Section 3).eorem 1.1.ere is a randomized algorithm that, given an undirected graph G = (V, E) with s, t ∈ V and two integers k ≥ λ * ≥ λ G (s, t), in time k O(1) (|V | + |E|) outputs an edge multiset A with λ G+A (s, t) ≥ λ * and a ow P in G + A of cardinality λ * , such that for any (s, t)-cut Z in G eligible for (s, t) with |Z| = k and |Z s,t | = λ * , with probability 2 −O(k log k) , the following holds: for every uv ∈ A, u and v are connected in G − Z; and for every path P ∈ P, |E(P ) ∩ Z| = 1.
In particular, in any successful run, in G + A the paths P will be an (s, t) max-ow, and Z s,t will be an (s, t)-min cut.
A quick comparison of eorem 1.1 with the directed version of [KKPW21a] is in order.
• ere is a be er success probability bound: 2 −O(k log k) instead of 2 −O(k 4 log k) .
• ere is an explicit linear dependency on the graph size in the running time bound, instead of just a polynomial of unspe cied degree of [KKPW21a].
• e notion of an eligible cut is a bit more general than the natural casting of the notion of star st-cut of [KKPW21a] to undirected graphs (it allows some part of Z \ Z s,t to separate a bunch of vertices from t, even though these vertices are already separated from s by Z s,t ).
• e algorithm and the proof is arguably simpler than the one of [KKPW21a] (albeit it involves a good amount of tedious calculations in the probability analysis to reach the 2 −O(k log k) bound).
• While in directed graphs we provided a deterministic counterpart with the expected 2 O(k 4 log k) parametric factor in the running time bound, we do not present an analogous result here.All random steps in the presented algorithm can be replaced by with branching or standard derandomization tools for color-coding, so obtaining some deterministic counterpart is de nitely possible.However, to achieve 2 −O(k log k) success probability we needed to carefully optimise probability distributions in a few places and it is not clear to us that the standard derandomization would match the desired 2 O(k log k) parametric factor in the running time bound.Furthermore, the determinization tools for color-coding steps will introduce a number of O(log n) factors in the running time analysis, turning the linear dependency on the graph size into a near-linear one (|V | + |E|) 1+o (1) .We remark also that for any complexity classi cation results (such those in [KKPW22]), the deterministic version of the more general directed case of [KKPW21a] is su cient.Finally, presenting the deterministic counterpart along the randomized proof would signi cantly cloud the picture.
Recall the B (s, t) C problem.Papadimitriou and Yannakakis showed that this is strongly NP-hard, even for undirected graphs, and also showed partial approximation hardness [PY01].
e directed version, with ≥ 2 distinct budgets, was recently considered from a parameterized perspective by Kratsch et al. [KLM + 20], who showed that the problem is FPT if all budgets are included in the parameter, but W[1]-hard if at least two budgets k i are not included in the parameter.e case of a single budget not being included in the parameter, which includes the B (s, t) C problem parameterized by k, has been open prior to our work (in directed graphs).
If k equals the minimum cardinality of an (s, t)-cut, the problem can be easily solved via any polynomial-time minimum cut algorithm: set the capacity of every edge to be a large number (much larger than any weight of an edge) plus the weight of an edge and ask for a minimum capacity cut.Hence, ow-augmentation yields a simple randomized FPT algorithm: We prepend the step above with ow augmentation ( eorem 1.1 in undirected graphs and the version of [KKPW21a] in directed graphs), with newly added edges assigned prohibitively large weights.For undirected graphs, this gives the following corollary.
We remark that although it is a quite standard exercise to provide an FPT algorithm for B (s, t) C in undirected graphs within the framework of randomized contractions [CCH + 16], and recent improvements would also give 2 O(k log k) parametric factor [CKL + 21], these techniques do not give any explicit bound on the polynomial factor in the running time bound, not to mention guaranteeing a linear one.

Preliminaries
In this work we consider only ( nite) undirected multi-graphs without loops.In particular, di erent edges connecting the same pair of vertices are considered to be identi able and non-interchangeable.1 Formally, a multi-graph could be captured as G = (V, E, π) where V and E are nite sets and π : E → V 2 assigns each edge in E an unordered pair of endpoints.To keep notation within reason, we will treat multi-graphs as pairs G = (V, E) where V is a nite set and E is a multi-subset of V 2 but understanding that cuts X (to be de ned in a moment) could involve deleting particular (identi able) copies of virtually the same edge uv.For a multi-graph G and A a multi-set of edges on V , the graphs G + A and G − A are accordingly understood as starting from G and, respectively, adding all edges in A that are not yet in G or removing from G all edges that are also in A; again, note that this may include di erent edges with the same two endpoints.For a vertex set S, we denote by δ(S) the multi-set of edges that have precisely one endpoint in S, and by ∂(S) the set of vertices in S that are incident with at least one edge in δ(S).By a connected component we mean a maximal set S ⊆ V that induces a connected subgraph of G.In all other aspects we follow standard graph notation as set out by Diestel [Die12].
roughout this paragraph let G = (V, E) be an arbitrary multi-graph, let S, T ⊆ V , and let X ⊆ E. De ne R S (X) as the set of vertices that are reachable from any vertex in S in G − X. e set X is an (S, T )-cut if R S (X) ∩ R T (X) = ∅; note that no such cut exists if S ∩ T = ∅.A minimum (S, T )-cut is any (S, T )-cut of minimum possible cardinality; whereas X is a minimal (S, T )-cut if no proper subset of X is an (S, T )-cut.(We will crucially need both minimum and minimal cuts.)By the well-known duality of cuts and ows in graphs (Menger's theorem su ces here) we get that the cardinality of any minimum (S, T )-cut is equal to the maximum number of edge-disjoint paths from S to T in G or, equivalently, to the maximum unit-capacity (S, T )ow.By λ G (S, T ) we denote the maximum ow from S to T or, equivalently, the minimum size of an (S, T )-cut in G; we omit the subscript G when it is clear from context.We mostly apply these notions for the special cases of S = {s} and T = {t} and then write, e.g., (s, t)-cut rather than ({s}, {t})-cut for succinctness.In particular, we write λ G (s, t) rather than λ G ({s}, {t}) and, when G, s, and t are understood, we usually abbreviate this to λ.We say that an (S, T )-cut X is closest to S if for every other (S, T )-cut X with R S (X ) ⊆ R S (X) we have |X | > |X|.Clearly, if X is an (S, T )-cut closest to S then X must in particular be minimal.
Let us recall two useful facts about edge cuts in graphs.
Proof.By de nition of R S (X) we must have δ(R S (X)) ⊆ X.As X is an (S, T )-cut, we have T ∩ R S (X) = ∅ and, thus, δ(R S (X)) is also an (S, T )-cut.Minimality of X now implies that X = δ(R S (X)); the other equation works symmetrically.
Proposition 2.2.ere is a unique minimum (S, T )-cut that is closest to S.
Proof.We use the well-known fact that the cut function f : 2 V → N : Z → |δ(Z)| is submodular.Suppose that there are two di erent minimum (S, T )-cuts X and Y that are both closest to S. We must have 1 as X and Y must be minimal (S, T )-cuts.Using submodularity of f for the sets R S (X) and R S (Y ) we get Clearly, both δ(R S (X) ∩ R S (Y )) and δ(R S (X) ∪ R S (Y )) are (S, T )-cuts and by (1) they must both be minimum contradicting the assumption that X and Y are both closest to S.
e simple argument used in the proof of Proposition 2.2 is called the uncrossing of minimum cuts: From the minimum cuts 3 Undirected ow-augmentation Special cuts, eligible cuts, compatibility, and ow augmentation.Let G = (V, E) be a connected, undirected multi-graph, and let vertices s, t ∈ V .For Z ⊆ E, let Z s,t ⊆ Z be the set of edges with one endpoint in R s (Z) and one endpoint in R t (Z).
e following notions are crucial for this section.
De nition 3.1 (special cut).We say that an (s, t)-cut Z is special if Z s,t is an (s, t)-cut.at is, the set of edges Z s,t ⊆ Z with one endpoint in R s (Z) and one endpoint in R t (Z) is also an (s, t)-cut.
In this section, we focus on solutions that are special (s, t)-cuts with an additional technical property.
De nition 3.2 (eligible cut).We say that an (s, t)-cut Z is eligible for (s, t) if 1. Z is special, and 2. each edge of Z has its endpoints in di erent connected components of G − Z.
For an integer λ * , we say that an (s, t)-cut Z is λ * -eligible if Z is eligible and additionally |Z s,t | = λ * .e next two de nitions formalize two properties we want from a set of edges that we add to the graph: (i) it does not break the solution, and (ii) it increases the ow from s to t.

De nition 3.3 (compatible set). A multi-subset A of V
2 is compatible with a set Z ⊆ E if for every uv ∈ A, u and v are connected in G − Z.

De nition 3.4 ( ow-augmenting set). For an integer λ
Intuitively, the role of Z will be played by an unknown solution to the cut problem in question and compatibility of A with Z means that A cannot add connectivity that was removed by Z (or that was not present in the rst place).e challenge is to nd a ow-augmenting set that with good probability is consistent with at least one solution Z, without knowing Z beforehand.
It will be convenient to take edges in A as being undeletable or, equivalently, as unbounded (or in nite) capacity.Clearly, if A is ow-augmenting and compatible with an (eligible) set Z then A remains ow-augmenting and compatible with Z a er adding an arbitrary number of copies of any edges in A. In particular, having a total of k + 1 copies of every edge in A will make those edges e ectively undeletable for sets Z of size k, that is, the endpoints of any edge in A cannot be separated by Z.Note that for applications, since edges in A are in addition to the original input, one will usually not be interested in deleting edges of A anyway (and costs may not be de ned), and they only help to increase the ow to match an (unknown) solution.For the purpose of ow and path packings, edges in A may, accordingly, be shared by any number of ( ow) paths, fully equivalent to simply having k + 1 copies of each edge.
Witnessing ow.Similarly as in the directed case, in addition to returning a ow-augmenting set, we will also a empt to return an (s, t)-max ow in the augmented graph which intersects Z s,t in a particularly structured way.
In the following, let G be a connected graph with s, t ∈ V (G), and let Z be an (s, t)-cut in G which contains an (s, t)-min cut.A witnessing (s, t)ow for Z in G is an (s, t)-max ow P in G such that every edge of Z s,t occurs on a path of P, and every path of P intersects Z in precisely one edge.
We make a few observations.First, since Z is an (s, t)-cut, every (s, t)-path in G intersects Z in at least one edge.Second, if additionally λ G (s, t) = |Z s,t |, then every (s, t)-max ow in G is witnessing for Z s,t .Hence, if Z is a minimum (s, t)-cut, then nding a witnessing ow is no harder than nding a ow-augmenting set.However, if Z is a special and only Z s,t is a minimum (s, t)-cut, then a witnessing ow is a more restrictive notion.
We now observe that for every special (s, t)-cut Z, one can augment G with a set compatible with Z such that Z s,t becomes a (s, t)-min cut and G + A admits a witnessing ow for G. Lemma 3.5.Let G = (V, E) be a multi-graph, let s, t ∈ V with s = t, let Z ⊆ E be a special (s, t)-cut of size k, and let λ * = |Z s,t |. en there exists a λ * -ow-augmenting set A compatible with Z and a witnessing ow P for Z in G + A.
Proof.For each pair u and v of vertices in the same connected component of G − Z, add to A a set of k + 1 copies of the edge uv.Clearly, A is compatible with Z.For every e = uv ∈ Z s,t with u ∈ R s (Z) and v ∈ R t (Z), let P e be a path in G + A consisting of the edges su ∈ A, uv ∈ Z s,t , and vt ∈ A. en, P := {P e | e ∈ Z s,t } is a witnessing ow for Z in G + A of cardinality λ * .Hence, A is λ * -ow-augmenting.
A few remarks are in place.e proof of Lemma 3.5 shows that a set Z ⊆ E admits a λ * -ow-augmenting set A if and only if Z does not contain an (s, t)-cut of cardinality less than λ * .Indeed, in one direction such a cut C ⊆ Z remains an (s, t)-cut in G + A, preventing the ow from increasing above |C|, and in the other direction the set A constructed in the proof of Lemma 3.5 is in some sense "maximum possible" and all (s, t)-cuts of cardinality at most k in G + A are contained in Z. Furthermore, even if Z is a special (s, t)-cut where Z s,t is an (s, t)-min cut (so no ow increase is possible), while Z may not admit a witnessing ow in G, it is possible to augment G with a set of edges compatible with Z so that a witnessing ow exists.Lemma 3.5 motivates the following extension of the de nition of compatibility.
De nition 3.6 (compatible pair).A pair (A, P) is compatible with a special (s, t)-cut Z if A is a λ * -owaugmenting set compatible with Z for λ * = |Z s,t | and P is a witnessing ow for Z in G + A.
Problem formulation.e proof of Lemma 3.5 shows that the task of nding a compatible ow-augmenting set and a witnessing ow would be trivial if only we knew Z in advance.Not knowing Z, we will have to place additional edges more sparingly than in the proof of Lemma 3.5 to arrive at a su cient success probability.Let us formally de ne our goal, taking into account that the set Z is not known.
In the problem we are given an instance (G, s, t, k, λ * ) consisting of an undirected multi-graph G = (V, E), vertices s, t ∈ V , and integers k and λ * such that k ≥ λ * ≥ λ := λ G (s, t).
e goal is to nd (in probabilistic polynomial-time) a multi-set A of V 2 and an (s, t)ow P in G + A such that the following holds: • λ G+A (s, t) ≥ λ * , | P| = λ * , and • for each λ * -eligible (s, t)-cut Z of size exactly k, the output (A, P) is compatible with Z with probability at least p.
e function p (that may depend on k or λ) is called the success probability.
In order to relax some corner cases, we allow for the event that λ G+A (s, t) > λ * , and note that if Z is an eligible (s, t)-cut with |Z s,t | = λ * then for any such output (A, P) such that A is compatible with Z we must have λ G+A (s, t) = λ * .
Results.We can now formulate the main result of this section.
ere is a randomized polynomial-time algorithm that, given a instance (G, s, t, k, λ * ) with λ G (s, t) ≤ λ * ≤ k, outputs a set A with λ G+A (s, t) ≥ λ * and a ow P in G + A of cardinality λ * , such that the following holds: for each set Z ⊆ E of size k that is λ * -eligible for (G, s, t, k), the output A is compatible with Z and P is a witnessing ow for Z in G + A with success probability 2 −O(k log k) .e algorithm can be implemented to run in time k O(1) O(m).e rest of the section is devoted to proving eorem 3.7.For clarity, we will only argume polynomial-time running time bound through the proof, and only discuss how to reach k O(1) O(m) bound in the end.
We begin by introducing an appropriate decomposition of (the vertex set of) G into what we call bundles, which in turn consist of what is called blocks.We then present our recursive ow-augmentation algorithm, spli ing the presentation into an "outer loop" and an "inner loop." Note that we assume that the input multi-graph G is connected as this somewhat simpli es presentation, but we will circumvent this assumption in applications.
It will be convenient to assume that we only care about λ * -eligible cuts that do not contain any edge incident with s nor t. is can be easily achieved by adding an extra terminal s connected with s with k + 1 edges, adding an extra terminal t connected with t with k + 1 edges, and asking for (s , t )-cuts instead.Consequently, in the proof we can assume one more property of an λ * -eligible (s, t)-cut Z: 3. Z contains no edge incident with s or t.

Blocks and bundles
Given an instance (G, s, t, k, λ * ) of , it should come as no surprise that the minimum (s, t)-cuts of G will be crucial for ow augmentation.Recall, however, that even structurally simple graphs may exhibit an exponential number of possibly crossing minimum (s, t)-cuts.We will use the notion of closest cuts (and implicitly the well-known uncrossing of minimum (s, t)-cuts as used in Proposition 2.2) to identify a sequence of non-crossing minimum (s, t)-cuts.e parts between consecutive cuts will be called blocks; we will also de ne a partition of blocks into consecutive groups called bundles.e decomposition of G into bundles will guide the choice of edges for the ow-augmenting set A in our algorithm and will be used to capture parts of G to recurse on.
For convenience, let us x an instance (G, s, t, k, λ * ) and let λ := λ G (s, t) ≤ k for use in this subsection.Accordingly, in G there is a packing of λ edge-disjoint (s, t)-paths P 1 , . . ., P λ (and no larger packing exists).Clearly, every minimum (s, t)-cut in G contains exactly one edge from each path P j and no further edges.As noted earlier, we assume for now that G is connected.
Blocks.We rst de ne a sequence C 0 , . . ., C p of non-crossing minimum (s, t)-cuts; recall that minimum (s, t)cuts in G all have cardinality λ.To start, let C 0 be the unique minimum (s, t)-cut that is closest to s. Inductively, for i ≥ 1, let C i be the minimum (s, t)-cut closest to s among all cuts that ful l e cut C i is well-de ned (i.e., unique) by an easy variant of Proposition 2.2: Minimum cuts X ful lling the requirement that N [R s (C i−1 )] ⊆ R s (X) uncross into minimum cuts ful lling the same requirement.Intuitively, the construction is equivalent to asking that each C i is closest to s among minimum (s, t)-cuts that do not intersect C 0 ∪ . . .∪ C i−1 but this would need a formal proof and we do not require it.
We can now de ne the blocks V 0 , . . ., V p+1 ⊆ V , which will be seen to form a partition of V .Block V 0 is simply set to R s (C 0 ).For i ∈ {1, . . ., p}, we de ne block V i as the set of vertices reachable from Figure 1: A schematic picture of nine blocks (yellow) partitioned into ve bundles (gray).e extremal blocks and bundles, containing s and t, are not depicted.e s − t ow of value 5 is depicted using blue ow paths, with purple edges being the edges of the consecutive cuts C i .e bundle W 3 is a connected bundle.
so the blocks V i are all nonempty and clearly form a partition of V ; see Figure 1.
Let us point out that blocks V i do not need to be connected even though G is connected.It will be useful to note, however, that blocks V 0 and V p+1 are connected: e graph G is connected and each minimum (s, t)-cut C i will therefore separate it into exactly two connected components are therefore connected.Moreover, each block is at least somewhat connected through subpaths of the ow paths P 1 , . . ., P λ that are contained therein.We establish a bit more structure via the following two propositions.Proposition 3.8.For each (s, t)ow path P j ∈ {P 1 , . . ., P λ }, seen as being directed from s to t, the edges of the minimum (s, t)-cuts C 0 , . . ., C p appear in order of the cuts.ese edges de ne a partition of the ow path P j into P 0 j , . . ., P p+1 j so that P i j is contained in block V i for i ∈ {0, . . ., p + 1}.
Proof.Fix an (s, t)ow path P j and let e i denote the unique edge of P j that is contained in the minimum (s, t)-cut C i , for all i ∈ {0, . . ., p}.Moreover, let u i and v i be the endpoints of e i in order of appearance on P j ; note that v i = u i+1 is possible.(We tacitly assume that the ow paths are cycle free.)Clearly, the vertices of the subpath P 0 j of P j from s to u 0 are contained in R s (C 0 ) because no further edge of P j is in C 0 .us, all vertices of P j up to and including v 0 are contained in N [R s (C 0 )] ⊆ R s (C 1 ).Accordingly, the edge e 1 ∈ C 1 on P j must be part of the subpath from v 0 to t or else, combined with there would be a path from s to t. us, e 1 appears a er e 0 on P j , when seeing P j as directed from s to t. Observe that e 0 and e 1 together de ne a subpath P 1 j from v 0 to u 1 on Iterating this argument for increasing i completes the proof.(Note that the nal subpath of P j , denoted P p+1 j starts with v p and ends in t. Using the fact that, for each (s, t)ow path P j , the blocks V i contain consecutive subpaths of P j , we can prove that each block has at most λ connected components.Moreover, each such component in a block V i , with i ∈ {1, . . ., p} is incident with some number of edges of C i−1 and the same number of edges in C i .Proposition 3.9.Each block V i has at most λ connected components.Moreover, each connected component in a block V i , with i ∈ {1, . . ., p}, is incident with c ≥ 1 edges in C i−1 and with exactly c edges in C i .(Clearly, V 0 is incident with all λ edges of C 0 , and V p+1 is incident with all λ edges of C p .) Proof.We already know that V 0 and V p+1 are connected.Consider now a block V i with i ∈ {1, . . ., p}.Clearly, R s (C i ) is connected in G − C i because all of its vertices are reachable from s.At the same time, the vertices in , so paths from s to V i must use at least one edge in C i−1 .us, each connected component K of V i must be incident with at least one edge of C i−1 ; let c ≥ 1 be the number of such edges.Now, recall that the edges in C i−1 together with those in C i de ne the subpaths of P 1 , . . ., P λ that are in block V i . is implies that the c edges of C i−1 that are incident with component K in block V i correspond to exactly c subpaths of paths P j ∈ {P 1 , . . ., P λ } that are part of component K. is of course implies that K must be incident by the c edges of C i that de ne those paths.Since connected components of V i do not share vertices and edges of C i−1 and C i have exactly one endpoint in V i each, no two connected components of block V i can share their incident edges in C i−1 or C i .us, there are at most λ connected components in each block V i . is completes the proof.
It can be easily veri ed that the decomposition into blocks can be computed in polynomial time.
Proposition 3.10.Given a multi-graph G = (V, E) and vertices s, t ∈ V , the unique sequence of cuts C 0 , . . ., C p and decomposition of blocks V 0 , . . ., V p+1 can be computed in polynomial time. Proof.
is comes down to computing a polynomial number of closest minimum cuts.A closest minimum (S, T )-cut C can be computed by a standard maximum (unit capacity) ow algorithm based on maintaining a residual graph: When the maximum (S, T )ow is reached, let R ⊇ S be the set of vertices that are reachable from S in the residual graph.Clearly, when viewing packed paths as being directed from S to T , there is no path edge entering R from V \ R because that would yield an edge leaving R in the residual graph.As the ow is maximum, T may not be reachable in the residual graph, so R ∩ T = ∅.Consequently, each path in the packing leaves R exactly once and does not return.us, the cardinality of C is equal to the number of paths in the packing, say λ, making it a minimum (S, T )-cut.
To see that C is closest to S, assume that there was a minimum (S, T )-cut Since the cardinality of C is equal to the size of the path packing, all of its edges are used by (S, T )-paths leaving R S (C ).us, in the residual graph, there is no edge leaving R S (C ) and hence no path from S ⊆ R S (C ) to v / ∈ R S (C ); a contradiction.
Bundles.We will now inductively de ne a decomposition of V into bundles W 0 , . . ., W q+1 ; see also Figure 1. e rst bundle W 0 is simply equal to the (connected) block V 0 , which contains s.For i ≥ 1, supposing that blocks V 0 , . . ., V j−1 are already parts of previous bundles, is connected) and call it a connected bundle • otherwise, let W i := V j ∪ . . .∪ V j be the union of contiguous blocks, where j is maximal such that G[V j ∪ . . .∪ V j ] is not connected and call it a disconnected bundle.
Observe that the nal bundle is W q+1 = V p+1 because V p+1 is connected and, due to the included subpaths of (s, t)ow paths (cf.Proposition 3.9), any union V j ∪. ..∪V p+1 induces a connected graph (see also Proposition 3.11).We use B(W i ) to denote the set of blocks whose union is equal to W i , i.e., B(W i ) = {V j } and B(W i ) = {V j , . . ., V j } respectively in the two cases above.We say that two bundles W i and Intuitively, bundles are de ned as maximal sequences of blocks that permit a good argument to apply recursion in our algorithm.In case of a single block, if we augment the edges incident with the block, then in the recursive step the cardinality of the maximum ow λ G (s, t) increases.In case of a union of contiguous blocks that does not induce a connected subgraph, if we recurse into every connected component independently, we split the budget k in a nontrivial way, as every connected component contains the appropriate part of at least one ow path of P.
Clearly, the bundles W 0 , . . ., W q+1 are well de ned and they form a partition of the vertex set V of G.We emphasize that W 0 = V 0 s and W q+1 = V p+1 t and that they are both connected bundles.We note without proof that the bundles inherit the connectivity properties of blocks because the cuts between blocks combined into a bundle connect their subpaths of (s, t)ow paths P 1 , . . ., P λ into longer subpaths, whereas the incidence to the preceding and succeeding cuts stays the same (see Proposition 3.11).For ease of reference, let us denote by C 0 , . . ., C q those cuts among C 0 , . . ., C p that have endpoints in two di erent (hence consecutive) bundles, concretely, with C i having endpoints in both W i and W i+1 ; note that C 0 = C 0 as W 0 = V 0 and C q = C p as W q+1 = V p+1 .Proposition 3.11.Each bundle W i has at most λ connected components.Moreover, each connected component in a bundle W i , with i ∈ {1, . . ., q}, is incident with c ≥ 1 edges in C i−1 and with c edges in C i .(Clearly, W 0 = V 0 is incident with all λ edges of C 0 = C 0 , and W q+1 = V p+1 is incident with all λ edges of C q = C p .) Let us introduce some more notation for bundles: For 0 ≤ a ≤ b ≤ q + 1 let W a,b := b i=a W i .Let W ≤a := W 0,a and W ≥a := W a,q+1 .For any (union of consecutive bundles) W a,b we de ne the le interface left(W a,b ) as ∂(W ≥a ) ∩ W ≥a when a ≥ 1 and as {s} when a = 0. (I.e., when a ≥ 1 then left(W a,b ) are those vertices of W a,b that are incident with the cut C a−1 that precedes bundle W a ).Similarly, we de ne the right interface right(W a,b ) as ∂(W ≤b ) ∩ W ≤b when b ≤ q and as {t} when b = q + 1. (I.e., when b ≤ q then right(W a,b ) are those vertices of W a,b that are incident with the cut C b that succeeds bundle W b .)For single bundles W i the same notation applies using W i = W i,i .A consecutive subsequence of bundles is called a stretch of bundles, or simply a stretch.
While a union of consecutive blocks may be disconnected, this is not true for bundles where, as can be easily checked, any two consecutive bundles together induce a connected subgraph of G. Proposition 3.12.For any two consecutive bundles W i and is the rst block of W i+1 .Using Propositions 3.9 and 3.11 we again directly get that adding the remaining blocks of Clearly, the decomposition into bundles can be e ciently computed from the one into blocks.Proposition 3.13.Given a multi-graph G = (V, E) and vertices s, t ∈ V , the unique sequence of cuts C 0 , . . ., C q and decomposition of bundles W 0 , . . ., W q+1 can be computed in polynomial time.
A ected and una ected bundles.We will later need to reason about the interaction of a special (s, t)-cut Z ⊆ E and G = (V, E) and, hence, about the interaction with the bundles of G.We say that a bundle W is una ected by Z if N [W ] is contained in a single connected component of G − Z; otherwise we say that W is a ected by Z.As an example, the cut Z = C i a ects both W i and W i+1 but no other bundles.Similarly, a cut Z entirely con ned to G[W i ] a ects only W i , since W ≤i−1 and W ≥i+1 are both connected and disjoint from Z.
e more interesting/di cult cuts Z a ect several bundles in a non-trivial way.e following observation limits the number and arrangement of a ected bundles.It will be important for reducing the general case (probabilistically) to the case where G decomposes into a bounded number of bundles.Concretely, this is the purpose of the outer-loop part of our algorithm, which is presented in the following section.Lemma 3.14.Let Z ⊆ E be an (s, t)-cut of size at most k.Let 0 ≤ a ≤ b ≤ q + 1 and let be the number of indices a ≤ i ≤ b such that the bundle W i is a ected.en, In particular, at most 2k bundles are a ected by Z.
Proof.We argue that a bundle W i ∈ W is una ected if Z contains no edge from C i and no edge with both endpoints in which is connected by Proposition 3.12 and all vertices of W i−1 ∪ W i are in the same component of G − Z.As Z is furthermore disjoint from the min-cut C i succeeding W i , all vertices of N [W i ] are in the same connected component.us, W i is not a ected.A symmetric argument holds for W i if Z contains no edge of C i−1 and no edge with both endpoints in To bound the number of a ected bundles, rst note that W 0 and W q+1 are a ected only if Z contains an edge of G[W 0 ] or C 0 , respectively of G[W q+1 ] or C q .For any remaining bundle W i , say that W i is potentially a ected if neither of the conditions ( ) and ( †) in the previous paragraph applies.A bundle For each potentially a ected bundle W i , let us charge some edge of Z as described by 1 point if the former case applies, and otherwise charge one edge of Z in W i−1 and in W i+1 by 1/2 point each.en the total amount of allocated charge equals the number of potentially a ected bundles, and it can be seen that every edge is charged at most 2 points.e lemma follows.
Lemma 3.15.Let Z ⊆ E be an (s, t)-cut of size at most k.ere is at most one maximal stretch W a,b of bundles such that every bundle W i , a ≤ i ≤ b is a ected by Z and such that W a,b contains both a vertex reachable from s and a vertex reachable from t (in G − Z).Moreover, all vertices in the le interface of W a,b are reachable from s and all vertices in the right interface are reachable from t. Finally, if Z is a special (s, t)-cut then there must be such a stretch.
Proof.If there is no such stretch of bundles then the lemma holds vacuously.Else, let W i,j be a maximal stretch of consecutive a ected bundles such that W i,j contains a vertex p that is reachable from s in G − Z and a vertex q that is reachable from t in G − Z.Because the le interface X of the stretch separates the stretch from s, at least one vertex of X must be reachable from s in G − Z. e preceding bundle, namely W i−1 , is una ected (by choosing the stretch as maximal).Since N [W i−1 ] ⊇ X contains a vertex reachable from s in G − Z it follows that all vertices in N [W i−1 ] are reachable from s in G − Z. Since Z separates s from t, no vertex is reachable from both s and t in G − Z.In particular, this holds for all vertices in X and, hence, for all bundles preceding W i .By a symmetric argument, all vertices in the right interface of the stretch, say Y , are reachable from t but not from s.
For the nal part of the lemma, consider any ow path P from s to t in G. Since Z s,t ⊆ Z is also an (s, t)-cut, the path P must contain some edge e ∈ Z s,t .By de nition of Z s,t , e has one endpoint reachable from s in G − Z and one reachable from t in G − Z.Clearly, there is a bundle W with both endpoints of e in N [W ] (as the bundles are a partition of the vertex set, some bundle W contains an endpoint of e and, hence, N [W ] must contain both endpoints). is bundle W is a ected and contains a vertex reachable from s and one reachable from t in G − Z, namely the endpoints of e.By de nition of stretch, W is contained in precisely one maximal stretch of a ected bundles, and this stretch meets the conditions of the lemma.e previous lemma says that each special (s, t)-cut Z yields exactly one maximal stretch of a ected bundles in which it separates s from t (and possibly creates further connected components).We say that Z strongly a ects that stretch.For all other maximal a ected stretches of bundles we say that they are weakly a ected by Z.Note that a non-special cut such as C i ∪ C j for j ≥ i + 3 may contain no strongly a ected stretch.
Let us make some useful observations about bundles not in the strongly a ected stretch.
Proposition 3.16.Let Z be a special (s, t)-cut and let W a,b be the unique strongly a ected stretch.en the following hold.
1.For every i < a, if W i is an una ected bundle then 3. If W i,j is a (maximal) weakly a ected stretch with j < a, then left 4. If W i,j is a (maximal) weakly a ected stretch with i > b, then left(W i )∪right(W j ) ⊆ R t (Z) and (j −i+1) ≤ 2|Z ∩ W i,j |

e outer loop of the algorithm
Our algorithm S consists of an outer loop (to be explained in this section), which is applied rst to an input instance (G, s, t, k, λ * ) and also to certain instances in recursive calls, and an inner loop, which is applied only to short sequences of bundles.e outer loop part uses a color-coding approach to guess weakly and strongly a ected stretches of bundles in G, and calls the inner-loop subroutine called S on the la er. is subroutine (to be described in detail in the following section) then seeks to recursively nd an output (A, P), using the assumption that whenever it is called on a stretch W a,b , then either Z is disjoint from the stretch W a,b or W a,b is precisely the unique strongly a ected stretch in G.
Each call to our algorithm will return a pair (A, P) for the instance in question, where (A, P) may or may not be compatible for an arbitrary (unknown) (s, t)-cut Z.A crucial observation for the correctness of our algorithm is that any ow-augmentation set guessed for an una ected stretch of bundles will always be compatible with Z.
is allows us to focus our a ention in the analysis on the guesses made while processing a ected bundles. is is essential in bounding the success probability purely in terms of k.
We will argue that for some su ciently large constants c 1 c 2 0, S (G, s, t, k, λ * ) returns an output (A, P) which is, with probability at least e −g(λ G (s,t),k) , compatible with an (unknown) eligible (s, t)-cut Z, where e main (outer loop) algorithm is shown in Figure 2.
Algorithm S (G, s, t, k, λ * ) 1.If it does not hold that λG(s, t) ≤ λ * ≤ k, then set A to be max(k + 1, λ * ) copies of {s, t}, P to be any λ * of these copies, and return (A, P).
2. Initialize A = ∅ and P to be a set of λ * zero-length paths starting in s.

Compute the partition
4. Go into single mode or multiple mode with probability 1/2 each.

5.
Randomly color each bundle blue or red; blue with probability p blue and red with probability p red .
6. Randomly sample an integer λ * ≤ k ≤ k as follows: set k = k with probability 1/2 and with remaining probability sample λ * ≤ k < k uniformly at random.

7.
For every maximal stretch W a,b of bundles colored with the same color, do the following in consecutive order starting with a = 0, and maintaining the property that at the begining of the loop P is a family of λ * edge-disjoint paths in G + A starting in s and ending in left(Wa): ii.Do a recursive call: • In single mode, let (A , P ) ← S (G , s , t , k , λ * ).
iii.Update A as follows: • Add to A all edges of A that are not incident with s or t .
• For every edge s v ∈ A , add to A a separate edge uv for each vertex u ∈ right(W ≤a−1 ).If a = 0 then ignore edges s s ∈ A and for each edge s v ∈ A add sv to A; • Analogously, for every edge vt ∈ A , add to A a separate edge vw for each vertex w ∈ left(W b+1 ).If b = q + 1 then ignore edges tt ∈ A and for each edge vt ∈ A add vt to A.
iv. Update P as follows: For every path P ∈ P , if the rst or last edge of P belongs to A , replace it with one of its corresponding edges in A, and then pick a distinct path P ∈ P and append P at the end of P , using a link edge to connect the endpoints of P and P if necessary.
ii. Prolong every path P ∈ P with a link edge (if a > 0) and an edge of A, so that P ends in left(W b+1 ), or in t if b = q + 1.

Figure 2: e outer loop algorithm
Interface of the inner loop algorithm.e inner-loop algorithm expects as input an instance (G , s , t , k , λ ) that has two additional properties and will return a pair (A , P ).A valid input (G , s , t , k , λ ) for the inner loop algorithm has the following properties: 1.
e graph G decomposes into bundles W 0 , . . ., W q+1 , with 1 ≤ q ≤ 2k , and such that W 0 = {s } and W q+1 = {t }.If q = 1, then we say that the instance is a single-bundle instance, otherwise if q > 1 it is a multiple-bundle instance.
2. We have λ G (s , t ) < λ ≤ k , i.e., the maximum (s , t )ow in G is lower than the target ow value λ a er augmentation.Furthermore, let Z be an (s , t )-cut in G .We say that Z is a valid cut for (G , s , t , k , λ ) if the following hold.
2. Z a ects precisely the bundles W 1 , . . ., W q in G In the following section we will describe a realization of this interface by two algorithms called S and S with the following success guarantee: • for a valid single-bundle instance (G , s , t , k , λ ), the algorithm S returns a ow-augmenting set A with λ G +A (s , t ) ≥ λ and an (s, t)ow P in G + A of size λ such that for every valid cut Z , (A , P ) is compatible with Z with probability at least 32 • e −g(λ G (s ,t ),k ) ; • for a valid multiple-bundle instance (G , s , t , k , λ ), the algorithm S returns a owaugmenting set A with λ G +A (s , t ) ≥ λ and an (s, t)ow P in G + A of size λ such that for every valid cut Z , (A , P ) is compatible with Z with probability at least 32(k ) 3 • e −g(λ G (s ,t ),k ) .
Correctness of the outer loop part.We are now ready to prove correctness of the outer loop algorithm S assuming a correct realization of the inner loop algorithm according to the interface stated above.It is straightforward to verify the invariant stated in the loop: at every step, P is a family of λ * edge-disjoint paths in G + A, starting in s and ending in left(W a ).It is also straightforward to verify the feasibility of the updates of P. Furthermore, observe that a er the last iteration of the loop, all paths of P end in t. us, at the end of the algorithm P is indeed a family of λ * edge-disjoint paths from s to t in G + A.
We now prove that, in a well-de ned sense, most edges in the returned set A are compatible with most minimal (s, t)-cuts Z. Lemma 3.17.Let W a,b be a stretch processed by S such that every bundle of the stretch is una ected by Z. en every edge added to A while processing W a,b is compatible with Z. Lemma 3.18.Assume that an algorithm S correctly realizes the above interface such that for every valid single-bundle (multiple-bundle) instance (G , s , t , k , λ ) with k ≤ k, the returned pair (A , P ) is compatible with a xed valid cut Z with probability 32e −g(λ G (s ,t ),k ) (32(k ) 3 e −g(λ G (s ,t ),k ) ). en for any (G, s, t, k, λ * ), S returns an (s, t)ow-augmenting set A such that λ G+A (s, t) ≥ λ * and for any eligible (s, t)-cut Z in G of size k and with |Z s,t | = λ * , the returned pair (A, P) is compatible with Z with probability at least e −g(λ G (s,t),k) . Proof.
e lemma holds essentially vacuously if S (G, s, t, k, λ * ) stops at step 1. Hence we assume λ ≤ We rst prove that all calls to S or S are made for valid instances (G , s , t , k, λ * ).Let (G , s , t , k, λ * ) be an instance on which S or S is called and let W a,b be the stretch that the call corresponds to.It can be veri ed that G , relative to minimum (s , t )-cuts, decomposes into bundles {s }, W a , . . ., W b , {t }.A key point here is that s and t are both incident with precisely λ edges in G , and λ G (s , t ) = λ.
is makes δ(s ) the unique closest minimum (s , t )-cut.From this point on, the sequence of closest minimum (s , t )-cuts that de ne blocks and bundles is identical to ones between the blocks that form bundles W a , . .
(canonically) so we arrive at the same decomposition into bundles.At the end, δ(t ) can be seen to be nal closest minimum (s , t )-cut that arises when computing blocks and bundles for (G , s , t ), using a symmetric argument to the one for δ(s ).Now, we show the compatibility property.Let Z be any λ * -eligible (s, t)-cut of size k.By Lemma 3.15, there is a unique strongly a ected stretch W a,b , and by Lemma 3.14 at most 2|Z| bundles are a ected in total.Let = b − a + 1 be the number of bundles in W a,b and let We are interested in the following success of the random choices made by the algorithm: the algorithm goes into mode single if a = b and into mode multiple otherwise, k = |Z |, and the coloring of bundles in the loop is such that every bundle of W a,b is red, while W a−1 , W b+1 , and every other a ected bundle is blue.Since there are at most 2(k − |Z ∩ W a,b |) a ected bundles that are not in W a,b , the above success happens with probability at least • if a < b: Henceforth we assume that the above success indeed happens.
If this is the case, then for every two consecutive bundles W i and W i+1 of di erent colors, either W i or W i+1 is una ected.In particular, all endpoints of the edges of E(W i , W i+1 ) are in the same connected component of G − Z. us, all link edges added to A are compatible with Z.
Let us now consider the processing of some maximal monochromatic stretch W c,d other than W a,b .If W c,d is red, then by assumption on the coloring it is a stretch of una ected bundles, and any edges added are compatible with Z by Lemma 3.17.Furthermore, any ow P does not intersect Z, so the edges appended in the paths of P are disjoint with Z.
If W c,d is red, then we claim that left(W c ) ∪ right(W d ) are contained in the same connected component in G − Z. Indeed, by assumption on the coloring, any a ected bundle in W c,d is contained in some weakly a ected stretch W c ,d where the stretch is contained in W c,d in its entirety.By Prop.3.16 the endpoints of such a stretch are contained in the same component of G − Z, as are the endpoints of any stretch of una ected bundles.e claim follows.us the edges added by S for W c,d are compatible with Z. Furthermore, in this case all edges appended to the paths of P are from A.
Now consider the strongly a ected stretch W a,b .Observe that S will make a recursive call to S or S for this stretch; let the resulting instance be (G , s , t , k , λ * ).Note that Z are the edges of Z contained in G and that Z is a valid cut for (G , s , t , k , λ * ).Furthermore, λ = λ G (s, t) = λ G (s , t ).Indeed, by Lemma 3.15 left(W a ) ⊆ R s (Z) and right(W b ) ⊆ R t (Z), and since W a−1 (if any) and W b+1 (if any) are una ected, these are entirely contained in R s (Z) respectively R t (Z) as well.Hence Z is an eligible (s , t )-cut in G .Finally, |Z | = k and |Z s ,t | = |Z s,t | = λ * , and by assumption Z a ects every bundle W i , 1 ≤ i ≤ q, of G .us, since S and S implement the inner-loop interface, with probability at least 32(k ) 3 e −g(λ,k ) in case of S and 32e −g(λ,k ) in case of S , it returns a pair (A , P ) that is compatible with Z in G .We verify that the edges added to A for A are compatible with Z. e connected components of G[W a−1,b+1 ]− Z are the same as those of G − Z except that the component of s has W a−1 in place of s , and the component of t contains W b+1 instead of t (respectively, are identical but are missing s and t if a = 0 and/or b = q + 1).
us, the only edges in A that could, in principle, be incompatible with Z are those that were added in place of edges in A that are incident with s or t .But in all cases, the endpoint replacing s respectively t is contained in R s (Z) respectively R t (Z), implying that they are compatible with Z in G if they are compatible with Z in G .
For the family of paths P, note that if (A , P ) is compatible with Z , then for every P ∈ P , the path P intersects Z in precisely one edge and that edge belongs to Z s,t = Z s,t .Hence, by appending P to a path P ∈ P we add one intersection of P with Z and that intersection belongs to Z s,t .Since there is only one strongly a ected stretch and in all other cases the edges appended to the paths of P are disjoint with Z, P is a witnessing ow for Z in G + A as desired.
Furthermore, the existence of P implies that λ G+A (s, t) ≥ | P| = λ * .In summary, S produces a pair (A, P) that is compatible with Z with probability at least (assuming c 1 ≥ 5): is nishes the proof of the lemma.
3.3 Cut splits and the inner loop is not a valid input, or it does not hold that λG(s, t) ≤ λ * ≤ k, then set A to be max(k + 1, λ * ) copies of {s, t}, P to be any λ * of these copies, and return (A, P).

Otherwise:
(a) Let W1 = W (1) 1 be the partition of G[W1] into connected components, and for each i ∈ [c] let λi be the amount of (s, t)ow routed through W 1 ∪ {s, t}] and compute (Ai, Pi) ←S (G (i) , s, t, ki, λ * i ).We will now describe an algorithm S that realizes the rst half of the inner-loop interface from the previous section.Given a valid single-bundle instance (G, s, t, k, λ * ) where G decomposes into bundles W 0 ∪ W 1 ∪ W 2 , W 0 = {s} and W 2 = {t}, it will run in (probabilistic) polynomial time and always return a λ * -ow augmenting set A. Moreover, for each (s, t)-cut Z that is valid for (G, s, t, k, λ * ), the set A is compatible with Z with probability at least 32e −g(λ G (s,t),k) .We call W 0 = {s} and W 2 = {t} trivial bundles, W 1 is the non-trivial bundle.e algorithm is given in Figure 3.
A few remarks are in place.First, if the algorithm exists at Step 1, then no valid cut Z exists and we can deterministically output a trivially correct answer.Second, sampling of values (λ * 1 , . . ., λ * c , k 1 , . . ., k c ) does not need to be uniform, but we require that each valid output (λ * 1 , . . ., λ * c , k 1 , . . ., k c ) is sampled with probability at least k −2c .Note that there are at most k 2c valid outputs. is can be achieved by, e.g., sampling each λ * i and k i uniformly at random from {1, 2, . . ., k} and, if the sampled values do not satisfy the requirements, return one xed partition instead.
Let us now analyse the case when W 1 is connected.
Proof.Let A = δ(s) ∪ δ(t).Since Z is a valid cut, Z ∩ A = ∅ and A is compatible with Z .Furthermore, if W 1 is a connected bundle, then it consists of a single block.Assume for a contradiction that G + A has an (s, t)-cut C of size λ G (s, t).en C ∩ A = ∅, and C is an (s, t)-min cut in G disjoint from δ(s) ∪ δ(t). is contradicts the assumption that W 1 a block.us every (s, t)-min cut in G intersects δ(s) ∪ δ(t) in at least one edge e.Since A contains a copy of e, C is no longer an (s, t)-cut in G + A. Hence G + A has no (s, t)-cuts of size λ G (s, t), and λ G+A (s, t) > λ G (s, t).
Lemma 3.20.Assume that S is correct for all inputs (G , s , t , k , λ ) where either k < k or k = k but λ G (s , t ) > λ G (s, t), with a success probability of at least e −g(λ G (s ,t ),k ) for any eligible (s, t)-cut Z. en S (G, s, t, k, λ * ) is correct, with a success probability of at least 32e −g(λ G (s,t),k) . Proof We note that the algorithm guesses the correct values of k i and λ * i with probability at least k −2c .Consider some i ∈ [c] and let ), and note that Z (i) is an (s, t)cut in G (i) , with endpoints in di erent connected components of G (i) − Z (i) , and with us Z (i) is eligible for G (i) .Furthermore by assumption will by assumption return a set A i such that λ G+Ai (s, t) ≥ λ * i ; since E(G) are partitioned across the instances G (i) , it follows that A = A 1 ∪ . . .∪ A c is a ow-augmenting set with λ G+A (s, t) ≥ λ * .Furthermore, for every i ∈ [c], with probability at least e −g(λi,ki) the set A i is compatible with Z (i) .Now (A, P) is compatible with Z if every pair (A i , P i ) is compatible with the respective set Z (i) .Hence, the success probability is lower bounded by: In the above we have used that c 1 > c 2 and, in the last inequality, that c ≥ 2, c 2 ≥ 4 > ln 32. is nishes the proof of the lemma.

Multiple-bundle case
We will now describe an algorithm S that realizes the inner-loop interface from the previous section.Given a valid multiple-bundle instance (G, s, t, k, λ * ) where G decomposes into bundles W 0 ∪. ..∪W q+1 , with 2 ≤ q ≤ 2k, and W 0 = {s} and W q+1 = {t}, and with λ := λ G (s, t) < λ * it will run in (probabilistic) polynomial time and always return an (s, t)ow augmenting set A. Moreover, for each (s, t)-cut Z that is valid for (G, s, t, k, λ * ), the set A is compatible with Z with probability at least 32k 3 e −g(λ G (s,t),k) .We call W 0 = {s} and W q+1 = {t} trivial bundles; all others are called non-trivial bundles.
Algorithm S (G, s, t, k, λ * ) 1.If (G, s, t, k, λ * ) is not a valid multiple-bundle input, then return k + 1 copies of the edge {s, t} and stop.
2. Let V = W0 ∪ . . .∪ Wq+1 be the partition of G into bundles.Let C be the min-cut between W1 and W2. 5. Let Ast contain k + 1 copies of each edge {u, v} with u, v ∈ {s} ∪ ϕ −1 (s) or with u, v ∈ {t} ∪ ϕ −1 (t) 6. Compute a set PC of size λ * C as follows: for every e ∈ C such that ϕ(e) ∈ {(s, t), (t, s)}, let e = uv be such that ϕ(u) = s and ϕ(v) = t,and add to PC a three-edge path Pe consisting of the edges su ∈ Ast, e, and tv ∈ Ast.
Hence with probability at least e −g(λ G 1 (s,t),k1) (or 1 if λ * 1 = 0) the pair (A 1 , P 1 ) is compatible with Z 1 .All these arguments can also be made symmetrically to argue that with probability at least e −g(λ G 2 (s,t),k2) (or 1 if λ * 2 = 0), (A 2 , P 2 ) is compatible with Z 2 .By assumption, A st is compatible with Z. Also, if ϕ = ϕ Z , then every path P ∈ P C intersects Z in exactly one edge and this edge belongs to Z s,t .
A symmetric argument holds if λ (t,t) = λ, that is, ϕ Z is constant at (t, t).
For the general case, observe that even if the recursive call on G i is not invoked due to λ * i = 0, then k i ≥ 1 and λ Gi (s, t) ≤ k i so e −g(λ G i (s,t),ki) ≤ 1. us, we can use e −g(λ G i (s,t),ki) as a lower bound on the success probability of the call regardless of whether it was actually invoked.

E cient implementation and nal proof
Finally, we show that the algorithms can be implemented to run in time k O(1) O(m), i.e., linear time up to factors of k.We rst show how to e ciently decompose G into bundles.
Lemma 3.23.Let G = (V, E) be an undirected graph, s, t ∈ V , and let λ * ∈ Z be given.In time O(λ * m) we can either show that λ G (s, t) > λ * or compute a max (s, t)ow, blocks, and bundles in G.
Proof.Since all edge capacities are unit we can compute a packing P of up to λ * + 1 (s, t)-paths in time O(λ * m) using Ford-Fulkerson, and if | P| = λ * + 1 then we are done.Otherwise, assume that P is a max-ow of value | P| = λ, and let G be the residual ow graph for P on G.We show how to decompose G into blocks and bundles.
Let the mass of a vertex set S be v∈S d(v).First, observe that the closest min-cut C 0 can be found using a simple reachability query in the residual ow graph.Speci cally, the rst block V 0 is precisely the set of vertices reachable from s in G .Hence V 0 can be computed in time linear in its mass and C 0 = δ(V 0 ).e sets V 1 , . . ., V p+1 can be computed as follows.Let i ∈ [p] and let V = V 0 ∪ . . .∪ V i−1 .Assume that all sets V i , i < i have been computed, in total time linear in the mass of V .Hence the cut C i−1 = δ(V ) is known as well.Contract V into a single vertex s and reorient the arcs of C i−1 out from s .en V i is precisely the set of vertices reachable from s , and can be computed in time linear in its mass.Hence we can decompose G into blocks.
To further group the blocks into bundles, we only need to be able to test connectivity.Recall that the rst bundle is just W 0 = V 0 .Assume that we are computing the bundle starting with block V a .Label the ow-paths P = {P 1 , . . ., P λ }, and initialize a partition Q of [λ] corresponding to the endpoints of C a−1 in V a (i.e., for every vertex v ∈ left(W a ) there is a part B ∈ Q where i ∈ B if and only if the edge E(P i ) ∩ C a−1 is incident with v).In time linear in the mass of V a , we can compute the connected components of V a , and the corresponding partition Q of right(W a ).en, as long as the current sequence of blocks is not yet connected (i.e., as long as Q = {[λ]}), repeat the process for every block a ≥ a: Let H = G[V a ]; for every block B ∈ Q, add a vertex s B to H, connected to the endpoints of P i in V a for every i ∈ B; and compute the connected components of H and the corresponding partition Q of right(W a ).Clearly this takes linear time and allows us to detect the rst block V b+1 such that V a ∪ . . .∪ V b is connected.en the next bundle contains blocks V a through V b−1 .
We can now prove eorem 3.7.We refrain from optimizing the exponent of k in the running time, since every plausible application of the theorem will have an overhead of 2 O(k log k) separate applications anyway.
Proof of eorem 3.7.To bound the running time, we make two notes.First, in every call to one of the algorithms S , S or S , recursive calls are only made on disjoint vertex sets of the respective graph G (excepting special vertices s, t).Furthermore, on each call into S we either have a decreased value of k or an increased value of λ G (s, t), and there are only O(k 2 ) possible combined values of (k, λ).us every vertex of G except s, t is processed in at most a polynomial number of process calls.
Second, we note that the density of the graph G + A does not increase too much beyond the density of G. Speci cally, it is easy to verify that for every vertex v ∈ V (G), at most k O(1) new edges are added incident with v. Hence it su ces that the local work in each procedure is linear-time in the size of the graph it is called on.For this, the only part that needs care is the computation of bundles, Lemma 3.23.Every other step is immediate.Hence the running time is bounded by some k O(1) O(m).
e rest of the statement -namely, the fact that in the output (A, P) we have λ G+A (s, t) ≥ λ * , P is an (s, t)ow of size λ * , and that with probability 2 −O(k log k) the pair (A, P) is compatible with Z, for any eligible (s, t)-cut Z of size at most k -now follows via joined induction from Lemma 3.18, Lemma 3.20 and Lemma 3.22.e function z → z ln z is decreasing on (1, 1/e) and increasing on (1/e, 1).We consider two cases.
Case 2. λ ≤ e−1 2e < 1 e .In this case if 0 < x ≤ λ, then x log x ≥ λ log λ and thus x 1 log(x 1 ) + 2x 0 log(x 0 ) ≥ 3λ log λ.Moreover, x 2 ≥ 1 − 2λ and therefore x 2 log(x 2 ) ≥ (1 − 2λ) log(1 − 2λ), since 1 − 2λ ≥ 1 e .A er applying theses bounds we have to show that In other words, we want to show that there exists c 2 such that is can be veri ed by checking that the limit λ → 0 + is nite and thus it is enough to take c 2 to be the supremum of the le hand side.

( a )
If a > 0, then add to A all edges uv for u, v ∈ right(Wa−1) ∪ left(Wa); (We henceforth refer to the edges added in this step as link edges.)(b) If the stretch is colored red and consists of one bundle in single mode, or at least two and at most 2k bundles in multiple mode, then perform the following: i.Let G be the graph G[N [W a,b ]] with vertices of W ≤a−1 contracted to a single vertex s and vertices of W ≥b+1 contracted to a single vertex t .If a = 0, and hence W ≤a−1 = ∅, then instead add a new vertex s and connect it to s ∈ Wa via λ parallel edges {s, s }.Similarly, if b = q + 1 then W ≥b+1 = ∅ and we instead add a new vertex t and connect it to t ∈ W b via λ parallel edges {t, t }.Observe that deg(s ) = deg(t ) = λ.

Proof.
Note that every vertex of N [W a,b ] is in the same connected component of G − Z. Hence it su ces to observe that every edge added to A in this phase has both endpoints in N [W a,b ].Now we are set to prove correctness of the outer loop algorithm assuming a correct realization of the inner-loop interface.

Figure 3 :
Figure 3: Inner loop: Algorithm for a single bundle

Figure 4 :
Figure 4: e inner loop algorithm for multiple-bundle case.