Cut-Equivalent Trees are Optimal for Min-Cut Queries
CCut-Equivalent Trees are Optimal for Min-Cut Queries
Amir Abboud , Robert Krauthgamer , and Ohad Trabelsi IBM Almaden Research Center. Email: [email protected] Weizmann Institute of Science. Email: [email protected] Weizmann Institute of Science. Email: [email protected]
September 15, 2020
Abstract
Min-Cut queries are fundamental: Preprocess an undirected edge-weighted graph, to quicklyreport a minimum-weight cut that separates a query pair of nodes s, t . The best data structureknown for this problem simply builds a cut-equivalent tree , discovered 60 years ago by Gomoryand Hu, who also showed how to construct it using n − minimum st -cut computations. Usingstate-of-the-art algorithms for minimum st -cut (Lee and Sidford, FOCS 2014), one can con-struct the tree in time ˜ O ( mn / ) , which is also the preprocessing time of the data structure.(Throughout, we focus on polynomially-bounded edge weights, noting that faster algorithms areknown for small/unit edge weights, and use n and m for the number of nodes and edges in thegraph.)Our main result shows the following equivalence: Cut-equivalent trees can be constructedin near-linear time if and only if there is a data structure for Min-Cut queries with near-linearpreprocessing time and polylogarithmic (amortized) query time, and even if the queries arerestricted to a fixed source. That is, equivalent trees are an essentially optimal solution forMin-Cut queries. This equivalence holds even for every minor-closed family of graphs, such asbounded-treewidth graphs, for which a two-decade old data structure (Arikati, Chaudhuri, andZaroliagis, J. Algorithms 1998) implies the first near-linear time construction of cut-equivalenttrees.Moreover, unlike all previous techniques for constructing cut-equivalent trees, ours is robustto relying on approximation algorithms . In particular, using the almost-linear time algorithmfor (1 + ε ) -approximate minimum st -cut (Kelner, Lee, Orecchia, and Sidford, SODA 2014), wecan construct a (1 + ε ) -approximate flow-equivalent tree (which is a slightly weaker notion) intime n o (1) . This leads to the first (1 + ε ) -approximation for All-Pairs Max-Flow that runs intime n o (1) , and matches the output size almost-optimally. a r X i v : . [ c s . D S ] S e p Introduction
Minimum st -cut queries, or Min-Cut queries for short, are ubiquitous: Given a pair of nodes s, t in agraph G we ask for the minimum cut that separates them. Countless papers study their algorithmiccomplexity from various angles and in multiple contexts. Unless stated otherwise, we are in thestandard setting of an undirected graph G = ( V, E, c ) with n = | V | nodes and m = | E | weightededges, where the weights (aka capacities) are polynomially bounded, i.e., c : E → { , . . . , U } for U = poly( n ) . While a Min-Cut query asks for the set of edges of the minimum cut, a
Max-Flowquery only asks for its weight. A single Min-Cut or Max-Flow query can be answered in time ˜ O ( m √ n ) [LS14], and there is optimism among the experts that near-linear time, meaning ˜ O ( m ) ,can be achieved.In the data structure (or online ) setting, we would like to preprocess the graph once and thenquickly answer queries. There are two naive strategies for this. We can either skip the preprocessingand use an offline algorithm for each query, making the query time at least Ω( m ) . Or we canprecompute the answers to all possible O ( n ) queries, making the query time O (1) , at the cost ofincreasing the time and space complexity to Ω( n ) or worse.Half a century ago, Gomory and Hu gave a remarkable solution [GH61]. By using an algorithmfor a single Min-Cut query n − times, they can compute a cut-equivalent tree (aka Gomory-Hutree) of the original graph G . This is a tree on the same set of nodes as G , with the strong propertythat for every pair of nodes s, t ∈ V , their minimum cut in the tree is also their minimum cut inthe graph. This essentially reduces the problem from arbitrary graphs to trees, for which queriesare much easier — the minimum st -cut is attained by cutting a single edge, the edge of minimumweight along the unique st -path, which can be reported in logarithmic time. Cut-equivalenttrees have other attractive properties beyond making queries faster, as they also provide a deepstructural understanding of the graph by compressing all its minimum cut information into O ( n ) machine words, and in particular they give a data structure which is space-optimal, as Ω( n ) wordsare clearly necessary. Let us clarify that a cut-equivalent tree guarantees that for all s, t ∈ V , everyedge e st that has minimum weight along the tree’s unique st -path, not only has the same weight asa minimum st -cut in G , but this edge also bipartitions the nodes into V = S (cid:116) T (the two connectedcomponents when e st is removed from the tree), such that ( S, T ) is a minimum cut in the graph G .Without this additional property we would only have a weaker notion called a flow-equivalent tree .Gomory and Hu’s solution ticks all the boxes, except for the preprocessing time. Using currentoffline algorithms for each query [LS14], the total time for computing the tree is ˜ O ( mn / ) , andno matter how much the offline upper bound is improved, this strategy has a barrier of Ω( mn ) .While this barrier was not attained (let alone broken) for general inputs, there has been substantialprogress on special cases of the problem. If the largest weight U is small, one can use offlinealgorithms [Mąd16, LS19] that run in time ˜ O (min { m / U / , m / U / } ) to get even closer tothe barrier. In the unweighted case (i.e., unit-capacity U = 1 ), Bhalgat, Hariharan, Kavitha, andPanigrahi [BHKP07] (see also [KL15]) achieved the bound ˜ O ( mn ) without relying on a fast offlinealgorithm, and this barrier was partially broken recently with a time bound of ˜ O ( m / n / ) [AKT20].Near-linear time algorithms were successfully designed for planar graphs [BSW15] and surface-embedded graphs [BENW16]. See also [GT01] for an experimental study, and the Encyclopedia ofAlgorithms [Pan16] for more background. This terminology is common in the literature, although some recent papers [BSW15, BENW16] use other names. The notation ˜ O ( · ) hides poly log n factors (and also poly log U factors in our case of U = poly( n ) ). If G has a unique minimum st -cut then the reverse direction clearly holds as well. This immediately answers Max-Flow queries in logarithmic time. For Min-Cut queries extra work is required tooutput the edges in amortized logarithmic time; one simple way for doing it is shown in Section 4. +
19] or undirected graphs with node weights[AKT20], where Gomory-Hu trees cannot even exist, because the Ω( n ) minimum cuts might all bedifferent [HL07]. However, no nontrivial lower bound, i.e., of time Ω( m ε ) , is known for computingcut-equivalent trees, and there is even a barrier for proving such a lower bound under the popularStrong Exponential-Time Hypothesis (SETH) at least in the case of unweighted graphs, due to theexistence of a near-linear time nondeterministic algorithm [AKT20]. Thus, the following centralquestion remains open. Open Question 1.
Can one compute a cut-equivalent tree of a graph in near-linear time?
A seemingly easier question is to design a data structure with near-linear time preprocessingthat can answer queries in near-constant (which means ˜ O (1) , i.e., polylogarithmic) time. We shouldclarify that we are interested in near-constant amortized time; that is, if the output minimum st -cuthas k s,t edges then it is reported in time ˜ O ( k s,t ) . Building cut-equivalent trees is one approach, butsince they are so structured they might be limiting the space of algorithms severely. Open Question 2.
Can one preprocess a graph in near-linear time to answer Min-Cut queries innear-constant amortized time?
An even simpler question is the single-source version, where the data structure answers onlyqueries s, t ∈ V where s is a fixed source (i.e., known at preprocessing stage) and t can be anytarget node. This restriction seems substantial, as the number of possible queries goes down from O ( n ) to O ( n ) , and in several contexts the known single-source algorithms are much faster thanthe all-pairs ones. One such context is shortest-path queries, where single-source is solved in near-linear time via Dijkstra’s algorithm, while the all-pairs problem is conjectured to be cubic. Anothercontext is Max-Flow queries in directed graphs(digraphs), where single-source is trivially solved by n − applications of Max-Flow , while based on some conjectures, all-pairs requires at least Ω( n / ) such applications [KT18, AGI + Max-Flow queries is currently faster than all-pairsalso in the special case of unit-capacity DAGs [CLL13]. However, this is still open for undirectedMin-Cut queries.
Open Question 3.
Can one preprocess a graph in near-linear time to answer Min-Cut queriesfrom a single source s to any target t ∈ V in near-constant amortized time? It is natural to suspect that each of these questions is strictly easier than the preceding one. Thecase of bounded-treewidth graphs gives one point of evidence since a positive solution to Question 2(and thus 3) was found over two decades ago [ACZ98], but Question 1 remained open to this day.
Our first main contribution is to prove that all three open questions above are equivalent . We canextract a cut-equivalent tree from any data structure, even if it only answers single-source queries,without increasing the construction time by more than logarithmic factors. Thus, the appealinglysimple trees are near-optimal as data structures for Min-Cut queries in all efficiency parameters; wefind this conclusion quite remarkable.
Informal Theorem 1.
Cut-equivalent trees can be constructed in near-linear time if and only if there is a data structure with near-linear time preprocessing and ˜ O (1) amortized time for Min-Cutqueries, and even if the queries are restricted to a fixed source. G are replaced byconstant-size mimicking networks [HKNR98]. Corollary 1.1 (see Corollary 3.2) . A cut-equivalent tree for a bounded-treewidth graph G can beconstructed in randomized time ˜ O ( m ) . In planar graphs, combining our reduction with the single-source algorithm of [LNSW12] givesan alternative to the all-pairs algorithm of [BSW15] that used a very different technique. To evaluate our results, consider how much other existing techniques for constructing cut-equivalent trees would benefit from a (hypothetical) data structure for Min-Cut queries. Theclassical Gomory-Hu algorithm would have two main issues. First, it modifies the graph (merg-ing some nodes) after each Min-Cut query, hence preprocessing a single graph (or a few ones)cannot answer all the n − queries. This issue was alleviated by Gusfield [Gus90], who modifiedthe Gomory-Hu algorithm so that all the n − queries are made on the original graph G . A secondissue is that the answer to each query might have Ω( m ) edges, hence the total time Ω( mn ) wouldfar exceed ˜ O ( m ) . Optimistically, a more careful analysis could give an upper bound of O ( φ ) , where φ is the total number of edges (in the original graph) in the n − cuts corresponding to the finaltree’s edges. Clearly, any such algorithm that does not merge edges must take Ω( φ ) time. Still,in weighted graphs φ could be Ω( mn ) , and even bounded-treewidth graphs could have φ = Ω( n ) even though m = O ( n ) (e.g., a path with an extra node connected to all others). Therefore, ourapproach, which is very different from Gusfield’s, shaves a factor of n . Notably, our result does notapply if the data structure is available only for unweighted graphs, because we need to perturb theedge weights to make all minimum cuts unique; but in this unweighted setting φ = O ( m ) [BHKP07,Lemma 5], hence it is plausible that other techniques, e.g. [Gus90, KL15], would be capable ofshowing the equivalence.It is worth mentioning in this context a somewhat restricted form of the equivalence in un-weighted graphs. In this case, the known ˜ O ( mn ) time algorithm [BHKP07] for constructing acut-equivalent tree actually runs in time ˜ O ( φ · c ) where c = max u,v ∈ V Max-Flow ( u, v ) is at most n in unweighted graphs, utilizes a tree-packing approach [Gab95, Edm70] to find minimal Min-Cutsbetween a single source and multiple targets, meaning that the side not containing the source isminimal with respect to containment. Their method crucially relies on this minimality property tobypass the well-known barrier of uncrossing multiple cuts found in the same graph (which could bean auxiliary graph or the input G ). This tree-packing approach is the basis of a few algorithms forcut-equivalent trees [CH03, HKP07, AKT20], and it does not seem useful for weighted graphs. The conference paper of [BSW15] appeared in FOCS 2010, before [LNSW12] appeared in FOCS 2012. While thelatter solves an easier task (single-source), it does so for the harder setting of directed planar graphs. ˜ O ( n ) Max-Flow queries are sufficient to construct aflow-equivalent tree. Currently, this relaxation (flow-equivalent instead of cut-equivalent tree) is notknown to make the problem easier in any setting, although Max-Flow queries could potentially becomputed faster than Min-Cut queries. Our proof follows from a lemma that an n -point ultrametriccan be reconstructed from ˜ O ( n ) distance queries, under the assumption that it contains at least(and thus exactly) n − distinct distances (see Theorem 5.3). Interestingly, it is easy to showthat without this extra assumption, Ω( n ) queries are needed. To our knowledge, this is the firstefficient construction of flow-equivalent trees only from Max-Flow queries (without looking at thecuts themselves). A well-known non-efficient construction (see [GH61]) is to make Max-Flow queriesfor all O ( n ) pairs, view it as a complete graph with edge weights, and take a maximum-weightspanning tree. Informal Theorem 2 (see Theorem 5.1) . Flow-equivalent trees can be constructed in near-lineartime if and only if there is a data structure with near-linear time preprocessing and ˜ O (1) time forMax-Flow queries. (1 + ε ) -Approximations Our first result offers a quantitative improvement over the Gomory-Hureduction from cut-equivalent trees to Min-Cut queries. It turns out that our technique also givesa qualitative improvement. A well-known open question among the experts, see e.g. [Pan16], is toutilize approximate
Min-Cut queries (to construct an approximate cut-equivalent tree). An obviouscandidate is an algorithm of Kelner et al. [KLOS14] for the offline setting (i.e., a single query),that achieves (1 + ε ) -approximation and runs in near-linear time. It beats the time-bound of allknown exact algorithms, however no one has managed to utilize it for the online setting, or forconstructing equivalent trees. It is not difficult to come up with counter-examples (see Section 2.1)that show that following the Gomory-Hu algorithm but using at each iteration a (1+ ε ) -approximate(instead of exact) minimum cut, results with a tree whose quality (approximation of the graph’s cutvalues) is arbitrarily large. Our second main contribution is an efficient reduction from approximate equivalent trees to approximate Min-Cut queries. Previously, no such reductions were known (theaforementioned maximum-weight spanning tree would again give a non-efficient solution).
Informal Theorem 3 (see Theorem 2.1) . Assume there is an oracle that can answer Min-Cutqueries within (1 + ε ) -approximation. Then one can compute, using ˜ O ( n ) queries to the oracle andan additional processing in time ˜ O ( n ) :1. a (1 + ε ) -approximate flow-equivalent tree; and2. a tree-like data structure that stores ˜ O ( n ) cuts and can answer a Min-Cut query in time ˜ O (1) and with approximation ε by reporting (a pointer to) one of these stored cuts. For unweighted graphs, we can improve the ˜ O ( n ) term to ˜ O ( m ) which could be significant.While it may not be obvious why our new data structure is better than the oracle we start with,there are a few benefits (see Section 2.2). Most importantly, since it only uses ˜ O ( n ) queries, we cancombine our reduction with the algorithm of Kelner et al. [KLOS14] (even though it is for the offlineproblem, we essentially plug it into our reduction), and obtain three new approximate algorithmsthat are faster than state-of-the-art exact algorithms! We discuss these results next. Corollary 1.2 (Section 2.2) . Given a capacitated graph G on n nodes, one can construct a (1 + ε ) -approximate flow equivalent tree of G in randomized time ε − · n o (1) .
5t follows that the All-Pairs Max-Flow problem in undirected graphs can be solved within (1+ ε ) -approximation in time n o (1) , which is optimal up to sub-polynomial factors since the outputsize is Ω( n ) . This problem is also well-studied in directed graphs [May62, Jel63, HL07, LNSW12,CLL13, GGI + + Corollary 1.3 (Section 2.2) . Given a capacitated graph G on n nodes, one can construct in ε − · n o (1) randomized time, a data structure of size ˜ O ( n ) , that stores a set C of ˜ O ( n ) cuts, and cananswer a Min-Cut query in time ˜ O (1) and with approximation ε by reporting a cut from C . Altogether, we provide for all three problems above (flow-equivalent tree, All-Pairs Max-Flow,and data structure for Max-Flow) randomized algorithms that run in time n o (1) . Previously, thebest approximation algorithm known for these three problems was to sparsify G into m (cid:48) = ˜ O ( ε − n ) edges in randomized time ˜ O ( m ) using [BK15b] (or its generalizations), and then execute on thesparsifier the Gomory-Hu algorithm, which takes time ˜ O ( n · m (cid:48) √ n ) = ˜ O ( ε − n . ) . The best exactalgorithms previously known for these problems was essentially to compute a cut-equivalent treeruns in time O ( mn . ) . An alternative way to approximate Max-Flow queries without the Gomory-Hu algorithm is to use Räcke’s approach of a cut-sparsifier tree [Räc02]. This is a much strongerrequirement (it approximates all cuts of G ) and can only give polylogarithmic approximation factors.Its fastest version runs in near-linear time m o (1) and achieves approximation factor O (log n ) [RST14].Unfortunately, we could not prove the same results for (1 + ε ) - cut -equivalent trees and morenew ideas are required; in Section 2.1 we show an example where our approach fails. Interestingly,this is the first setting where we see different time bounds showing that the extra requirements ofcuts indeed make the equivalent trees harder to construct.Besides the inherent interest in the equivalence result and its applications, we believe thatour results make progress towards the longstanding goal of designing optimal algorithms for cut-equivalent trees. It is likely that such algorithms will be achieved via a fast algorithm for onlinequeries, as was the case for bounded-treewidth graphs. A Min-Cut data structure for a graph family F is a data structure that after preprocessing of acapacitated graph G ∈ F in time t p ( m ) , can answer Min-Cut queries for any two nodes s, t ∈ V inamortized query time (or output sensitive time) t mc ( k st ) , where k st denotes the output size (numberof edges in this cut). This means that the actual query time is O ( k st · t mc ( k st )) . A (1+ ε ) -approximateMin-Cut data structure is defined similarly but for (1 + ε ) -approximate minimum st -cut whose totalcapacity is at most (1 + ε ) times that of the minimum st -cut in G . We denote by Max-Flow G ( s, t ) the value of the minimum-cut between s and t , and we might omit the graph G subscript when it isclear from the context. Throughout, we restrict our attention to connected graphs and thus assumethat m ≥ n − , and additionally we assume that the edge-capacities are integers (by scaling). In this section we present our approximation algorithms, but first we give a high level overview ofthem. 6 .1 Overview
Here we discuss the obstacles to speeding up Gomory-Hu’s approach, and why plugging in ap-proximate
Min-Cut queries fails to produce an approximate cut-equivalent tree. To explain howour approach overcomes these issues, we present the key ingredients in our approximation algo-rithm from Section 2.2. This overview also prepares the reader for Section 3, which is the mostcomplicated part of the paper and proves our main result (Theorem 3.1).
Overview of the Gomory-Hu method
Start with all nodes forming one super-node V . Then,pick an arbitrary pair of nodes s, t from the super-node, find a minimum st -cut ( S, V \ S ) , and splitthe super-node into two super-nodes S and V \ S . Then connect the two new super-nodes by anedge of weight w ( S, V \ S ) , and recurse on each of them. In each recursive call (which we also viewas an iteration), say on a super-node V (cid:48) , the Min-Cut query is performed on an auxiliary graph G V (cid:48) that is obtained from G by contracting every super-node other than V (cid:48) . These contractionsprevent the other super-nodes from being split by the cut, which is crucial for the consistency of theconstructed tree, and by a key lemma about uncrossing cuts (proved using submodularity of cuts),these contractions (viewed as imposing restrictions on the feasible cuts in G V (cid:48) ) do not increase thevalue of the minimum st -cut. The cut found in G V (cid:48) is then used to split V (cid:48) into two new super-nodes, and every edge that was incident to V (cid:48) is “rewired” to exactly one of the new super-nodes.The process stops when every super-node contains a single node, which takes exactly n − iterationsand results in a tree on n super-nodes, giving us a tree on V . Why Gomory-Hu fails when using approximations
There are two well-known issues (see[Pan16]) for employing this approach using approximate (rather than exact) Min-Cut queries, evenif the approximation factor is as good as ε . The first issue is that errors of this sort multiply,and thus a (1 + ε ) -factor at each iteration accumulates in the final tree to (1 + ε ) d , where d isthe depth of the recursion. The second issue is even more dramatic; without the uncrossing-cutsproperty, the error could increase faster than multiplying and might be unbounded even after a singleiteration. The reason is that when we find in super-node V (cid:48) a cut ( S, V (cid:48) \ S ) that is (approximately)optimal for a pair s, t ∈ V (cid:48) , we essentially assume that for all pairs s (cid:48) ∈ S, t (cid:48) ∈ V \ S there is an(approximately) optimal cut that splits at most one of S and V (cid:48) \ S (not both). While true forexact optimality, it completely fails in the approximate case, and there are simple examples, seee.g. Figure 1, where allowing (1 + ε ) -approximation in the very first iteration makes the error of thefinal tree unboundedly large. We will refer to this issue as the main issue. Our strategy
Our approach is different and simultaneously resolves both issues for flow-equivalenttrees; for cut-equivalent trees, as we show below, the first issue remains (but not the second).Our main insight is to identify a property of the cut ( S, V (cid:48) \ S ) , that is sufficient to resolve themain issue: This property is stronger than being a minimum st -cut, and requires that for all pairs s (cid:48) ∈ S, t (cid:48) ∈ V (cid:48) \ S , this same cut is an (approximate) minimum s (cid:48) t (cid:48) -cut, i.e., it works for them aswell. Thus, the error for every pair s (cid:48) , t (cid:48) from this split of V (cid:48) is bounded by (1+ ε ) -factor, and we canrecursively deal with pairs inside the same super-node. While this property may seem too strong,notice that it holds whenever ( S, V (cid:48) \ S ) is an (approximate) global minimum cut (i.e., achievesthe minimum over all pairs s (cid:48) , t (cid:48) ∈ V (cid:48) ). While our algorithm builds on this intuition, it does notcompute a global minimum cut at each iteration, but rather employs a more complicated strategythat it is substantially more efficient. For example, its recursion depth is bounded by O (log n ) ,which is important to bound the overall running time, and also to control the approximation factor.7 𝑏 𝑐 𝑑 𝑈 𝜀𝑈 𝑎 𝑏 𝑐 𝑑 𝑎 𝑏 𝑐 𝑑 𝑈 1 + 𝜀 𝑎 𝑏 𝑈 𝜀𝑈 𝑐 𝑑 𝑐 𝑑 𝑈 𝜀𝑈 𝑎 𝑏 𝑐 𝑑 𝑈 1 + 𝜀 𝑏 𝑎 𝜀𝑈 + 1 𝑈 1 + 𝜀 𝑏 𝑎 𝜀𝑈 + 1 𝑐 𝑑 𝜀𝑈 + 1 Figure 1: An example of the main issue with using (1 + ε ) -approximate minimum cuts in theGomory-Hu algorithm. The input graph G is at the top left; the intermediate trees are at thebottom, from left to right; and the auxiliary graphs G V (cid:48) are at the top. Each iteration uses a (1 + ε ) Min-Cut for the node pair shown in bold. In the input graph
Max-Flow ( b, c ) = 2 but in the tree itis Ω( U ) ; thus the error can be as bad as poly( n ) . Bounding the depth of the recursion
The foremost idea is that the recursion depth should bebounded by O (log n ) . This does not happen in the Gomory-Hu algorithm, nor in the aforementionedstrategy of using an (approximate) global minimum cut, where splits could be unbalanced andrecursion depth might be Ω( n ) . Assuming – by way of wishful thinking – that the total time spentin all recursive calls of the same level is ˜ O ( m ) , the challenge is to dictate how to (quickly) choosecuts so that the recursion depth is small.Instead of insisting on a balanced cut, we partition the super-node V (cid:48) into multiple sets at once,which can be viewed as performing a batch of consecutive Gomory-Hu iterations at the cost of oneiteration (up to logarithmic factors). This approach was previously used in a few other algorithmicsettings, however, none of their methods is applicable in our context. Before explaining how ouralgorithm computes a partition, let us explain which properties it needs to satisfy. A partition ofsuper-node V (cid:48) into r sets S , . . . , S r (that will be processed recursively) should satisfy the followingstrong property:(*) For every pair s (cid:48) ∈ S i , t (cid:48) ∈ S j for i (cid:54) = j , at least one of ( S i , V (cid:48) \ S i ) or ( S j , V (cid:48) \ S j ) correspondsin G V (cid:48) to a (1 + ε ) -approximate minimum s (cid:48) t (cid:48) -cut.(We will actually allow an exception of one set S that does not satisfy this property, and must One moral justification is that super-nodes V (cid:48) of the same recursion level are disjoint, as they form a partitionof V . However, the real challenge is to process their auxiliary graphs G V (cid:48) . This may be possible in the special casewhere G is unweighted, becuase the total size (number of edges) of these auxiliary graphs (from one level) is O ( m ) [BHKP07, BCH +
08, KL15, AKT20], but for a general graph G the total size of these auxiliary graphs might easilyexceed ˜ O ( m ) . This approach was used in three different algorithmic settings: (1) in the special case of an unweighted graph G [BHKP07, BCH + s (cid:48) , t (cid:48) ∈ V (cid:48) ) to find a partition; or (3) in non-deterministic algorithms [AKT20], which can “guess” a goodpartition but have to verify it quickly (achieved in [AKT20] for an unweighted graph G ).
8e handled in a special way; this is the set V (cid:48)(cid:48) big in Section 2.3.) In addition, the sizes of these setsshould be bounded by | V (cid:48) | / (with the exception of the set S , which is bounded by | V (cid:48) | ) whichguarantees recursion depth O (log n ) , unlike a global minimum cut.Our algorithm to partition V (cid:48) picks a pivot node p ∈ V (cid:48) and queries a data structure built for G V (cid:48) for an (approximate) minimum cut between p and every other node u ∈ V (cid:48) ; let S u ⊂ V (cid:48) be theside of u in the returned cut. To form a partition out of these | V (cid:48) | − sets S u , reassign each node u to a set S u (cid:48) that contains u , which naturally defines a partition (by grouping nodes reassignedto the same S u (cid:48) ). The reassignment process is elaborate and subtle (see Section 2.3), aiming topreserve property (*) while reassigning nodes only to sets S u (cid:48) of size at most | V (cid:48) | / . Choosing effective pivots
The above technique is not sufficient for bounding the depth of therecursion, because a poorly chosen pivot p might result in many unbalanced cuts (sets S u of sizelarger than | V (cid:48) | ), in which case this pivot is ineffective. Our next idea is that for a randomlychosen pivot p ∈ V (cid:48) this will not happen with high probability. We analyze the performance of arandom pivot using a simple lemma about tournaments that works as follows (see Lemma 2.4 andCorollary 2.5 for details). Assume for now that the Min-Cut data structure is deterministic (weshow how to lift this assumption in Section 2.5), then every query { x, y } (described as an unorderedpair) is answered with some cut ( S x , S y ) , and obviously | S x | ≤ | V (cid:48) | / or | S y | ≤ | V (cid:48) | / (or both). Itfollows by symmetry that a query for { u, p } has a chance of at least / of having | S u | ≤ | V (cid:48) | / ,in which case we say that node u is “good” (in Section 2.2 we call these V small ). But we need astronger property, that at least / of the nodes in V (cid:48) are good in this sense; we thus define on thenodes V (cid:48) a tournament, with an edge directed from x to y whenever | S x | ≤ | S y | , and prove thatmost nodes have a large out-degree, and will thus be effective pivots.With constant probability, such an effective pivot is chosen, hence the number of nodes that arenot good is bounded by | V (cid:48) | , and we must handle them with a separate recursive call (this is theproblematic set V (cid:48)(cid:48) big in Section 2.3). A related but different issue that arises in Section 3.5 is that wecannot afford a Min-Cut query from p to all other u ∈ V (cid:48) . To handle this we utilize the mentionedtournament properties by making Min-Cut queries from a random pivot p to only a small sampleof targets. Using dynamic-connectivity algorithms
Even if the recursion depth is bounded by O (log n ) ,it is not clear how to execute the entire algorithm in near-linear time, as each iteration computes | V (cid:48) | − cuts followed by a reassignment process. A straightforward implementation could requirequadratic time Ω( n ) even in the first iteration (on super-node V ), which appears to be necessarybecause in some instances the total size of all good sets S u (where | S u | ≤ n/ ) is indeed Ω( n ) .For unweighted graphs, however, the total number of edges in these cuts (all minimum cuts from afixed source to all targets) can be bounded by O ( m ) (see Lemma in [BHKP07], and Lemma 2.8ahead), and indeed in this case our entire algorithm can be executed in time ˜ O ( m ) . The key isto only spend time proportional to the number of edges in each cut, rather than to the number ofnodes | S u | . In unweighted graphs, and also in the “capacitated auxiliary graphs” that we constructin Section 3, the total number of nodes and edges our algorithm observes is bounded by ˜ O ( m ) .The reassignment process poses an additional challenge. For example, can one decide whether u ∈ S u (cid:48) in time that is proportional to the number of edges (rather than nodes) in the cut S u (cid:48) (moreprecisely, the reported cut between p and u (cid:48) in G V (cid:48) )? Our solution utilizes an efficient dynamic- A random pivot was previously used in [BCH +
08] in the special case of an unweighted graph G , and theirproof relies heavily on this restriction. Moreover, the cuts S u in their algorithm form a laminar family, hence theirreassignment process is straightforward. S v and then ask if u and u (cid:48) are connected. In this section we present our results for using approximate
Min-Cut queries that were presented inSection 1 and a technical overview for them was given in Section 2.1.We prove the following theorems, which formalize Informal Theorem 3 and give Corollaries 1.2and 1.3 from Section 1.
Theorem 2.1.
There is a randomized algorithm such that given a capacitated graph G = ( V, E, c ) on n nodes, m edges, and using ˜ O ( n ) queries to a deterministic (1 + ε ) -approximate Min-Cut datastructure for G with a running time t p and amortized time t mc , can with high probability: • construct in time O ( t p ( n )) + ˜ O ( n ) a (1 + ε ) -approximate flow-equivalent tree T of G , and • construct in time O ( t p ( n )) + ˜ O ( n ) a data structure D of size ˜ O ( n ) that stores a set C of ˜ O ( n ) cuts, such that given a queried pair s, t ∈ V returns in time ˜ O (1) a pointer to a cut in C that is a (1 + ε ) -approximate minimum st -cut. While the significance of the first item of the theorem is clear (the flow-equivalent tree) let us saya few words about why the second item is interesting compared to the assumption. The first benefitof our data structure is that it only stores ˜ O ( n ) cuts and therefore it will only have ˜ O ( n ) differentanswers to the (cid:0) n (cid:1) possible queries it can receive. This makes it more similar to a cut-equivalenttree. Second, the space complexity of our data structure is upper bounded by ˜ O ( n ) in weightedor ˜ O ( m ) in unweighted graphs (see Section 2.4), while the oracle could have used larger space; thuswe could save space without incurring loss to the preprocessing and query times by more than logfactors. The third benefit is that it only uses ˜ O ( n ) queries to the assumed oracle, which allows us toobtain consequences even from an oracle with larger query times and even from offline algorithms.If rather than a (1 + ε ) Min-Cut data structure we have an offline (1 + ε ) -approximate minimum st -cut algorithm such as [KLOS14], by simply computing it every time there is a query, we get thefollowing theorem. Theorem 2.2.
If in Theorem 2.1 instead of a (1 + ε ) -approximate Min-Cut data structure wehave an offline (1 + ε ) -approximation algorithm with running time t offline ( m ) , the time bounds forconstructing P and D become ˜ O ( n · t offline ( n )) . We also remark that the above theorems only deal with deterministic data structures and algo-rithms. The reason will be clarified during the proof. However, this restriction can be removed andwe explain how to generalize the theorem to randomized ones in Section 2.5.To conclude Corollaries 1.2 and 1.3 from Section 1, given a graph we begin by applying asparsification due to Benczur and Karger [BK15a], where a near-linear-time construction transformsany graph on n nodes into an O ( n log n/ε ) -edge graph on the same set of nodes whose cuts (1 + ε ) -approximate the values in the original graph. This incurs a (1+ ε ) approximation factor to the result.By utilizing a (1+ ε ) -approximate minimum st -cut algorithm for general capacities by [KLOS14] with t offline ( m ) = m o (1) /ε we get the n o (1) /ε upper bound for constructing (1 + ε ) -approximateflow-equivalent trees and the tree-like data structure. The main previously known method forconstructing a data structure that can answer (1+ ε ) -approximate minimum st -cuts is to construct anexact cut equivalent tree of a sparsification of the input graph using, e.g., Benczur-Karger [BK15b].10or general capacities, this gives a total running time of ˜ O ( n / ) . For unit-capacities, since thissparsification introduces edge weights, it is not clear how to do anything better for the approximationversion than the exact bounds.In the unit-capacity case, using the same techniques as in Theorem 2.1 (but with extra care),our bounds are better: we replace the ˜ O ( n ) term with ˜ O ( m ) . While we do not currently havean application for this improved bound, it will be significant in the likely event that a (1 + ε ) -approximate Min-Cut data structure can be designed for sparse unweighted graphs that will havenear-linear or even O ( n . − δ ) preprocessing time. Then, our improved theorem would give anapproximate flow-equivalent tree construction that improves on the n . barrier that currently existsfor exact [AKT20]. We remark that, since the results of this section do not use any edge contractionsand only ask queries about the original graph, they hold for any graph family even if it is not minor-closed. This is important since the family of sparse graphs is not minor closed. This is discussed inSection 2.4. We start by proving the second item in Theorem 2.1 and then show how it gives the constructionof approximate flow-equivalent tree in a simple way.Let G be the input graph with node set V , we will show how to construct a data structure D thatutilizes a tree structure T , and we will also construct a graph H which we will call flow-emulator on the same node set V that will only be used for our flow-equivalent tree construction. We assumewe are given an arbitrary data structure for answering (1 + ε ) -approximate Min-Cut queries, andgive a new data structure or flow-equivalent tree with error (1 + ε ) . Thus, to get the theorem wecould use a data structure with parameter ε (cid:48) = ε/ . Preprocessing
To construct our data structure we recursively perform expansion operations.Each such operation takes a subset V (cid:48) ⊂ V and partitions it into a few sets S i ⊆ V (cid:48) on which theoperation will be applied recursively until they have size ( V (cid:48) can be thought of as a super-nodeas in Gomory-Hu but here we do not have auxiliary graphs and contractions). The partition S i will(almost) satisfy the strong property (*) that we discussed in Section 2.1. In the beginning we applythe expansion on V (cid:48) := V . It will be helpful to maintain the recursion-tree T that has a node t V (cid:48) for each expansion operation that stores V (cid:48) as well as some auxiliary information such as cuts anda mapping from each node v ∈ V (cid:48) to a cut S f ( v ) . To perform a query on a pair u, v we will go tothe recursion-node in T that separated them, i.e. the last V (cid:48) that contains both of them, and wewill return one of the cuts stored in that node.We will prove that, because of how we build the partition, the depth of the recursion will be O (log n ) . For each level of the recursion, the expansion operations are performed on disjoint subsets V (cid:48) i . All the work that goes into the expansion operations in one level can be done in O ( n ) time ina straightforward way. In unweighted graphs, it can even be done in ˜ O ( m ) time by adapting knowndynamic connectivity algorithms; this will be discussed in Section 2.4.The expansion operation on a subset V (cid:48) ⊆ V (it is helpful to think of the case V (cid:48) = V ):1. Pick a pivot node p ∈ V (cid:48) uniformly at random.2. For every node u ∈ V (cid:48) \ { p } ask a (1 + ε ) -approximate Min-Cut query for the pair u, p to geta cut ( V \ S u , S u ) where u ∈ S u and p ∈ V \ S u . Compute the value of the cut and denote itby c ( S u ) . Moreover, compute the intersection of the side of u with V (cid:48) , that is S u ∩ V (cid:48) , anddenote this set by S (cid:48) u . 11. Treat the cut values as being all different by breaking ties arbitrarily and consistently. Oneway is to redefine the value c ( S ) of the cut S to be c ( S ) + i/n if S was the answer to the i th Min-Cut query we performed. From now on assume that all c ( S ) values are unique.4. We would like to use the sets S (cid:48) u for each u ∈ V (cid:48) to partition V (cid:48) , but these sets can beintersecting in arbitrary ways and moving nodes around could hurt our property (*). Thefollowing is a carefully designed reassignment process that makes it work. There are threemain criteria when reassigning nodes to cuts. First, we can only assign a node v to a cut S u whose value is within (1 + ε ) of the best cut separating v and p ; this is necessary to satisfyproperty (*). Second, we want to prioritize assigning v to a cut S u separating it from p withgood value that also has small cardinality S (cid:48) u ; this will make sure the sets are getting smallerwith each recursive step and upper bound the depth of the recursion by O (log n ) . And third,a subtle but crucial criterion for satisfying property (*) is that we may not assign two nodes u, v to two different sets unless we have evidence for doing so in the form of a cut S withgood value that separates one but not the other from p (and therefore separates them). Whileeach of these criteria is easy to satisfy on its own, getting all of them requires the followingcomplicated process.We define a reassignment function f : V (cid:48) → V (cid:48) ∪ {⊥} such that for every node u ∈ V (cid:48) \ { p } with cut ( V \ S u , S u ) , we reassign u to v , denoted f ( u ) = v with the cut ( V \ S f ( u ) , S f ( u ) ) asfollows. Denote by V small , V (cid:48) small two initially identical sets, each containing all nodes u suchthat | S (cid:48) u | ≤ n (cid:48) / , where | V (cid:48) | = n (cid:48) , and denote by V big , V (cid:48) big , V (cid:48)(cid:48) big three sets that are initially allequal to V (cid:48) \ V small . As a preparation for defining f we need another function g that reassignsnodes in V big to the best cut corresponding to another node in V big that separates them from p .Sort V big by c ( S u ) , and for all u ∈ V big from low c ( S u ) to high and for every node v ∈ S (cid:48) u ∩ V (cid:48) big ,set g ( v ) = u and then remove v from V (cid:48) big . Sort V small by c ( S u ) , and for all u ∈ V small fromlow c ( S u ) to high and for every node v ∈ S (cid:48) u ∩ V (cid:48) small , set f ( v ) = u and then remove v from V (cid:48) small . For every node v ∈ S (cid:48) u ∩ V (cid:48)(cid:48) big , if c ( S u ) ≤ (1 + ε ) c ( S g ( v ) ) then set f ( v ) = u and thenremove v from V (cid:48)(cid:48) big . Finally, set f ( v ) = ⊥ for every node v for which f was not assigned avalue (including p ).To get the partition, let IM ( f ) be the image of f (excluding ⊥ ) and for each i ∈ IM ( f ) let f − ( i ) be the set of all nodes u that were reassigned by f to the cut S f ( i ) . Notice that thenodes in V (cid:48)(cid:48) big , which includes p , were not assigned to any set. Thus, we get the partition of V (cid:48) into V (cid:48)(cid:48) big and each set in { f − ( i ) } i ∈ IM ( f ) . The latter sets satisfy the property (*) but V (cid:48)(cid:48) big may not (because it does not correspond to an approximate minimum cut) and therefore itwill be handled separately next.5. If | V small | < n (cid:48) / then p is a failed pivot. In this case, re-start the expansion operation at step1 and continue to choose new pivots until | V small | ≥ n (cid:48) / . We will prove that we will only do O (log n ) repetitions with high probability.6. Finally, we recursively compute the expansion operation on each of the sets of the partition.Let us describe what we store at the recursion node t V (cid:48) corresponding to the just-completedexpansion operation on V (cid:48) with (successful) pivot p . Simultaneously, we describe what weadd to the flow-emulator graph H (that will be used in for constructing a flow-equivalent treein unweighted graphs more efficiently in Section 2.4) which initially has no edges, but gets | V (cid:48) | − new weighted edges with each expansion operation. If | V (cid:48) | = 1 we do nothing, soassume that | V (cid:48) | ≥ . We store | V (cid:48) | − cuts in t V (cid:48) : For each node v ∈ V (cid:48)(cid:48) big that is not p we store the cut S g ( v ) and we also add an edge between p and v in the flow-emulator graph12 with weight (1 + ε ) c ( S g ( v ) ) . And for each node u in one of the other sets of the partition { f − ( i ) } i ∈ IM ( f ) we store the cut it was reassigned to S f ( u ) and we also add an edge { v, p } ofweight (1 + ε ) c ( S f ( u ) ) to H . If any of these edges already exists in H (which could happen forthe nodes v ∈ V (cid:48)(cid:48) big ) then we simply do nothing and keep the previous edge. We also keep anarray of pointers from each node to its corresponding cut and also the value of the cut, callthis array A . Moreover, we store for each node of V (cid:48) the name of the set in the partition thatit belongs to, in an array B . Queries
To answer a query for a pair u, v we go to the recursion level that separated them,corresponding to some node t V (cid:48) in T and output a pointer to one of the two corresponding cuts S u or S v ; choose the cut among the two that separates u and v (we prove that at least one of the twocuts does) and has smaller capacity. To find out which recursive node separates u and v we cansimply start from the root and continue going down (with the help of array B ) to the nodes thatcontain both of them until we reach V (cid:48) . The query time will depend on the depth of the recursionwhich we will show to be logarithmic. Correctness
The next claim proves that the cuts our data structure returns are approximatelyoptimal. The main idea is to prove that the partition we get at each expansion step satisfies theproperty (*) discussed in Section 2.1, except for the set V (cid:48)(cid:48) big which has to be treated separately;things work out because there is only one such problematic set. Claim 2.3.
The cut returned by D for any pair of nodes is a (1 + ε ) approximate minimum cut.Moreover, for any pair u, v ∈ V there exists a special node p uv ∈ V such that (1 + ε ) Max-Flow ( u, v ) ≥ min { c H ( u, p uv ) , c H ( v, p uv ) } ≥ Max-Flow ( u, v ) , where c H is the weight of the edge in our flow-emulator graph H .Proof. Let u, v be an arbitrary pair of nodes and let V (cid:48) ⊆ V be the set such that u, v ∈ V (cid:48) but u and v were sent to different sets in the expansion operation on V (cid:48) during the construction of D .There are a few cases, depending on whether any of them is in V (cid:48)(cid:48) big or not, and whether the cutsthey got assigned to had similar costs up to (1 + ε ) .1. The first case is when none of u, v are in V (cid:48)(cid:48) big . Assume without loss of generality that c ( S f ( u ) ) >c ( S f ( v ) ) where S f ( u ) and S f ( v ) are the corresponding cuts. There are two sub-cases, dependingon whether the values of the two cuts are close or not.(a) If c ( S f ( u ) ) > (1 + ε ) c ( S f ( v ) ) then Max-Flow ( u, p ) > Max-Flow ( v, p ) , and so Max-Flow ( v, u ) = Max-Flow ( v, p ) . As a result, it must be that u ∈ V (cid:48) \ S (cid:48) f ( v ) and S f ( v ) is indeed the cut returned, with (1 + ε ) approximation ratio.(b) Otherwise, if c ( S f ( u ) ) ≤ (1+ ε ) c ( S f ( v ) ) then it must be that u ∈ V (cid:48) \ S (cid:48) f ( v ) , since otherwisewhen the algorithm examined f ( v ) , it was the case that both u and v were in S (cid:48) f ( v ) , and as13hey are in V small they must had been sent to the same recursion instance, contradictingour assumption on the expansion operation on V (cid:48) , and so Max-Flow ( u, v ) ≤ c ( S f ( v ) ) . Furthermore,
Max-Flow ( u, v ) ≥ min( Max-Flow ( u, p ) , Max-Flow ( v, p )) and thus (1 + ε ) Max-Flow ( u, v ) ≥ min( c ( S f ( u ) ) , c ( S f ( v ) )) . By our assumption, c ( S f ( u ) ) > c ( S f ( v ) ) and so altogether (1 + ε ) Max-Flow ( u, v ) ≥ c ( S f ( v ) ) . Thus, the algorithm can output S f ( v ) with an approximation guarantee (1 + ε ) , as re-quired.2. The second case is when one of the nodes is in V (cid:48)(cid:48) big and its Max-Flow to p is larger. Morespecifically, let u big ∈ V (cid:48)(cid:48) big and v / ∈ V (cid:48)(cid:48) big be nodes such that c ( S g ( u big ) ) > c ( S f ( v ) ) , where S g ( u big ) is the cut corresponding to u big . Again, there are two sub-cases.(a) If c ( S g ( u big ) ) > (1 + ε ) c ( S f ( v ) ) then similar to before, S f ( v ) separates u big and v , providinga (1 + ε ) -approximation.(b) Otherwise, if c ( S g ( u big ) ) ≤ (1+ ε ) c ( S f ( v ) ) then it must be that u big ∈ V (cid:48) \ S (cid:48) f ( v ) , since if notthen as u big ∈ V big and when the algorithm examined f ( v ) it did not set f ( u big ) := f ( v ) ,it must have been the case for a node x that was either f ( v ) or before f ( v ) in theorder (i.e. such that c ( S x ) ≤ c ( S f ( v ) ) ) that u big was tested for the first time, with c ( S x ) > (1+ ε ) c ( S g ( u big ) ) , and so c ( S f ( v ) ) > (1+ ε ) c ( S g ( u big ) ) . However, by our assumptionit holds that c ( S f ( v ) ) < c ( S g ( u big ) ) , in contradiction. Thus, u big ∈ V (cid:48) \ S (cid:48) f ( v ) . Similar tobefore, (1 + ε ) Max-Flow ( u big , v ) ≥ c ( S f ( v ) ) , and thus the returned cut S f ( v ) is a (1 + ε ) approximation, as required.3. The third and last case is when one of the nodes is in V (cid:48)(cid:48) big and its Max-Flow to p is smaller.Let u big ∈ V (cid:48)(cid:48) big and v / ∈ V (cid:48)(cid:48) big be nodes such that c ( S f ( v ) ) > c ( S g ( u big ) ) . There are two sub-cases.(a) If c ( S f ( v ) ) > (1 + ε ) c ( S g ( u big ) ) then similar to before, S g ( u big ) separates u big and v , pro-viding a (1 + ε ) -approximation.(b) Otherwise, if c ( S f ( v ) ) ≤ (1+ ε ) c ( S g ( u big ) ) then it must be that u big ∈ V (cid:48) \ S (cid:48) f ( v ) . Otherwise,since u big ∈ V big and when the algorithm examined f ( v ) it did not set f ( u big ) := f ( v ) , itmust have been the case that c ( S f ( v ) ) > (1 + ε ) c ( S g ( u big ) ) . However, by our assumptionit holds that c ( S f ( v ) ) ≤ (1 + ε ) c ( S g ( u big ) ) , in contradiction. Thus, u big ∈ V (cid:48) \ S (cid:48) f ( v ) . Byprevious arguments, (1 + ε ) Max-Flow ( u big , v ) ≥ min { c ( S big ) , c ( S f ( v ) ) } , and since / (1 + ε ) c ( S f ( v ) ) ≤ c ( S g ( u big ) ) , it must be that (1 + ε ) Max-Flow ( u big , v ) ≥ / (1 + ε ) c ( S f ( v ) ) , (1 + ε ) · Max-Flow ( u big , v ) ≥ S f ( v ) providing an approximation ratio of (1 + ε ) , concluding the claim.To prove the statement about the weights in H simply observe that the weights in H correspondexactly to (1 + ε ) times the weights of the cuts that were considered in the proof above. Note thatwhen p uv is the pivot separating u and v , i.e., the pivot that sent u and v to different instancesin an expansion step, it might be the case that the returned cut’s capacity is the bigger out ofthe cuts of ( u, p uv ) and ( v, p uv ) , in particular it happens in case 3b in the above proof. However,in this case the smaller value is at least / (1 + ε ) times the bigger value, and so the fact that wemultiplied all values by (1 + ε ) when we added them to H on one hand ensures the lower boundof Max-Flow ( u, v ) and on the other hand increases the upper bound by a factor of (1 + ε ) to beconcluded as (1 + ε ) Max-Flow ( u, v ) . Running Time
Next we prove the upper bounds on the preprocessing time, by proving that withhigh probability, the algorithm terminates after ˜ O ( n ) time. The crux of the argument is to boundthe depth of the recursion by O (log n ) . Later, in Section 2.4 we build on this analysis to show thatour more efficient implementation for unweighted graphs gives an upper bound of ˜ O ( m ) . There, weshow that a single expansion step takes only ˜ O ( m ) rather than O ( n ) but the rest of the analysisis the same.Let us give a high-level explanation of the argument below. Our goal is to bound the size ofeach of the sets in the partition in an expansion operation by / | V (cid:48) | . This is immediate for the sets { f − ( i ) } i because they are subsets of cuts S u of nodes u in V small , and by definition they satisfy that | S u | ≤ | V (cid:48) | / . Therefore, we should only worry about V (cid:48)(cid:48) big . However, any node u that is initiallyin V small will end up reassigned to one of the sets { f − ( i ) } i and not to V (cid:48)(cid:48) big . Thus, it suffices toargue that there will be at least | V (cid:48) | / nodes in V small . To argue about this, let us recall where thecuts S u for each node u come from. They are the approximate Min-Cuts that our assumed datastructure returns when queried for pairs u, p for a randomly chosen pivot p . For simplicity, let usassume that this data structure is deterministic (we show how to lift this assumption in Section 2.5)which means that for any pair x, y the answer to the query will always be a certain cut ( S x , S y ) andin this cut it must be that either | S x | ≤ n/ or | S y | ≤ n/ or both. (More generally, if we take theintersection of each side of the cut with a subset V (cid:48) ⊆ V we can replace n/ by | V (cid:48) | / , as we willdo below.) Therefore, the u, p query has a chance of at least / of having | S u | ≤ | V (cid:48) | / meaningthat u is in V small . To complete the argument, we need a stronger property: we want that for arandomly chosen p , at least / of the nodes u ∈ V (cid:48) will have that the side of u is smaller than theside of p and they will end up in V small . This is argued more formally below.We start with a general lemma about tournaments. Lemma 2.4.
Let Y = ( V Y , E Y ) be a directed graph on n nodes and m edges that contains atournament on V Y . Then Y contains at least n/ nodes with out-degree at least n/ .Proof. Each edge contributes exactly to the total sum of the out-degrees and the in-degrees. Thus,these two sums are equal and so the average out-degree in Y equals (cid:80) v ∈ V Y outdeg Y ( v ) /n = m/n ≥ (cid:0) n (cid:1) /n = ( n − / . Using the probabilistic method, we get that there exists a node with out-degreethat is at least ( n − / . By removing this node and using similar arguments repeatedly, weconclude that there exist (cid:100) n/ (cid:101) nodes with degrees at least ( n − / , ( n − / , . . . , ( n − (cid:100) n/ (cid:101) ) / ,i.e. at least n/ . 15he following is a general corollary, and is a result of Lemma 2.4, about cuts between every pairof nodes. Corollary 2.5.
Let F = ( V F , E F ) be a graph where each pair of nodes u, v ∈ V F is associatedwith a cut ( S uv , S vu = V F \ S uv ) where u ∈ S uv , v ∈ S vu (possibly more than one pair of nodes areassociated with each cut), and let V (cid:48) F ⊆ V F . Then there exist | V (cid:48) F | / nodes p (cid:48) in V (cid:48) F such that atleast | V (cid:48) F | / of the other nodes w ∈ V (cid:48) F \{ p (cid:48) } satisfy | S p (cid:48) w ∩ V (cid:48) F | > | S wp (cid:48) ∩ V (cid:48) F | .Proof. Let H F ( V (cid:48) F ) denote the helper graph of F on V (cid:48) F , where there is a directed edge from u ∈ V (cid:48) F to v ∈ V (cid:48) F if and only if | S uv ∩ V (cid:48) F | > | S vu ∩ V (cid:48) F | . By Lemma 2.4, since H F ( V (cid:48) F ) contains a tournamenton V (cid:48) F , Corollary 2.5 holds.Next, apply Corollary 2.5 on G , and let H = H G ( V (cid:48) ) be the helper graph of G on V (cid:48) withthe reassigned cuts. As a result, with probability at least / , the pivot p is one of the nodeswith out-degree at least n (cid:48) / , and in that case, when the algorithm partitions V (cid:48) , it must be that max i | f − ( i ) | ≤ n (cid:48) / , and | f − ( ⊥ ) | ≤ n (cid:48) / , that is, the largest set created is of size at most n (cid:48) / .After O ( n log n ) successful choices of p , the algorithm finishes with the total depth of the recursionbeing O (log / n ) . Note that the algorithm verifies the choice of p and never proceeds with anunsuccessful one. Hence, it is enough to bound the running time of the algorithm given onlysuccessful choices of p by ˜ O ( n ) and ˜ O ( m ) in the general case and in the unit edge-capacities case,respectively, and then multiply by the maximal number of unsuccessful choices for any instance,which is bounded by n with high probability, as shown below.A straightforward implementation of an expansion step gives an upper bound of ˜ O ( n ) on thetotal running time for the algorithm given only successful choices of p . In Lemma 2.8 we prove thebetter upper bound of ˜ O ( m ) for unweighted graphs.Finally, the probability for failure of n consecutive trials in a single instance is at most (1 / n = 1 /n , and by the union bound over the ˜ O ( n ) instances in the recursion, the probabilitythat at least one instance takes more than n attempts to have a successful choice of p is boundedby /n . We conclude that with high probability, the running time of the algorithm is bounded by O ( t p ( n )) + ˜ O ( n ) for general capacities and O ( t p ( m )) + ˜ O ( m ) for unit edge-capacities, as required. Space Usage
In the general weighted case, the total space usage is ˜ O ( n ) : There are O (log n ) levels and in each level the expansion operations are performed disjoint sets V (cid:48) . Each operationstores arrays of size | V (cid:48) | , containing pointers, values, and cuts. Each cut can take O ( m ) bits, butsince we can apply the Benczur-Karger sparsification we can assume that m = ˜ O ( n ) (unless weare in the unweighted setting which we will discuss separately). Therefore, the total size at eachrecursive level is ˜ O ( n ) and we are done. In unweighted graphs, we will argue in Section 2.4 thatfor any partition of V and any choices of pivots in each of the parts, the total number of edges inall minimum cuts from the pivots to the nodes in their parts is upper bounded by O ( m ) . The factthat we are dealing with approximations only incurs a (1 + ε ) factor to this cost. Therefore, we canstore all the cuts in a single recursive level in O ( m ) space, and the other arrays only take O ( n log n ) space per level. In total, we get the ˜ O ( m ) bound. Flow-Equivalent Tree Construction
We apply a technique of Gomory and Hu [GH61]. Ourdata structure lets us to query for the approximate Max-Flow value for a pair of nodes in ˜ O (1) time.We have the following proposition, extending the technique of [GH61] to approximated values of aninput graph G . 16 roposition 2.6. Let G = ( V, E ) be an input graph and N = ( V, c ) a complete graph on V suchthat for every two nodes u, v ∈ V , (1 + ε ) Max-Flow ( u, v ) ≥ c N ( u, v ) ≥ Max-Flow ( u, v ) . Then amaximum spanning tree T of N is a (1 + ε ) -approximate flow-equivalent tree of G .Proof. To prove the claim about T , let u, v be any two nodes and consider any uv -path in Tu = u, . . . , u k = v , and we will show that (1 + ε ) Max-Flow ( u, v ) ≥ min { c N ( u , u ) , . . . , c N ( u k − , u k ) } ≥ Max-Flow ( u, v ) . For the first inequality, we follow the original proof for the exact case [GH61], where it is shownthat for any path u = u, . . . , u k = v in the complete network representing exact answers, it holdsthat Max-Flow ( u , u k ) ≥ min { Max-Flow ( u , u ) , . . . , Max-Flow ( u k − , u k ) } . This is proved by induction. By the strong triangle inequality
Max-Flow ( u , u k ) ≥ min { Max-Flow ( u , u k − ) , Max-Flow ( u k − , u k ) } , and by the inductive hypothesis Max-Flow ( u , u k − ) ≥ min { Max-Flow ( u , u ) , . . . , Max-Flow ( u k − , u k − ) } . Thus, in our approximate setting and by our construction, it must follow that
Max-Flow ( u, v ) ≥ / (1 + ε ) min { c N ( u , u ) , . . . , c N ( u k − , u k ) } . The second inequality relies on the properties of any path in a maximum-weight spanning tree,as follows. For any path u = u, . . . , u k = v between u and v in T it holds that min { c N ( u , u ) , . . . , c N ( u k − , u k ) } ≥ c N ( u, v ) . Indeed, otherwise the edge uv must not be in T , and it could thus replace the minimum-weight edgein the path u , . . . , u k in T while increasing the total weight of the edges in T , in contradiction.This allows us to construct, in ˜ O ( n ) time, a complete graph N on V that has an edge of weight c N ( s, t ) between any pair of nodes s, t such that (1+ ε ) Max-Flow ( s, t ) ≥ w ( s, t ) ≥ Max-Flow ( s, t ) . ByProposition 2.6, the maximum spanning tree (MST) of this complete graph is a (1+ ε ) -approximateflow-equivalent tree of G . In this section we explain how to improve the bounds of Theorem 2.1 in the case of unweightedgraphs.
Theorem 2.7.
For graphs G = ( V, E ) with unit edge-capacities, the time bounds in Theorem 2.1for constructing T and D become t p ( m ) + ˜ O ( m ) , and the space bound for D becomes ˜ O ( m ) . First, we show that an expansion step can be executed more efficiently in unweighted graphs byonly spending time proportional to the number of edges in all the cuts we process. In unweightedgraphs the total size is only O ( m ) . This is challenging because our reassignment needs to analyzewhich nodes are in each cut and what is the best value for each one. We have managed to do thisby adapting known data structures for dynamic graph connectivity.17 emma 2.8. The running time for the algorithm given only successful choices of p is bounded by ˜ O ( m ) for graphs with unit edge-capacities.Proof. For unit edge-capacities, we first show that the total space of all cuts examined by thealgorithm is bounded by ˜ O ( m ) , and then that the running time is linear in that measure. Indeed,the cuts computed in each recursion depth are between pivot-sink pairs such that a pivot in oneinstance is never a sink in another instance in the same depth. Let Q i ⊆ V × V denote the setcontaining all pairs of nodes queried in depth i . Denote by T a cut-equivalent tree of G , and by α T the (multi-)set of edges in T that are the answers to (exact) Min-Cut queries in T of the pairsin Q i . We assume that for every pair t, p in Q i , the edge in T answered is the one touching t .Note that our assumption could have only increased the total capacity of the edges in α T . Sinceno node can be both a pivot and a sink in the same depth, it must be that every edge in T isreturned and added to α T at most twice, and since the sum of all edge-capacities in T is m (seeLemma 5 in [BHKP07]), an O ( m ) bound for the total capacity of the edges in α T follows. Sincethe capacity of every edge in T is the number of edges in the cut it represents, and the cuts ouralgorithm uses are (1 + ε ) -approximated, they contain at most (1 + ε ) times the number of edges inthe cuts corresponding to the edges in α T , as claimed.Now, to see that the running time is bounded, first note that for every cut S u examined bythe algorithm throughout its execution, nodes v ∈ S (cid:48) u are examined and they either getting a valueunder g or f , or removed from the corresponding set it belonged to, V (cid:48) big , V small , or V (cid:48)(cid:48) big , so we areleft with showing that counting and reporting a set S (cid:48) u could be done in ˜ O (1) and O ( | S (cid:48) u | ) time,respectively. In fact, for each S u we will consider a subset of S u that is the connected componentin G \ δ ( S u ) containing u , where δ ( S u ) is the set of edges leaving S u , with additional running timeof O ( δ ( S u )) , and ˜ O ( m ) for all cuts S u ’s. We explain these steps below. Claim 2.9.
Let G = ( V, E ) be a graph and V T ⊆ V a subset of terminals. For every cut S ⊆ V given by the edges δ ( S ) and every node y ∈ S , it is possible to count the nodes in S ( y ) ∩ V T fora cut S ( y ) ⊆ S that is the connected component of G [ S ] that contains y , in time O ( | δ ( S ) | ) , andenumerate S ( y ) ∩ V T in additional time O ( | S ( y ) ∩ V T | ) .Proof. The idea is to slightly modify a known dynamic connectivity algorithm [HK95], as follows.In [HK95], by using Euler Tour Trees (ETTs) implemented by Binary Search Trees (BSTs) a dynamicforest is maintained, each of whose trees representing a connected component in the graph. Theimportant feature of ETTs we utilize here is that their BST implementation is well suited forstoring and answering aggregate information on its subtrees, in addition to supporting elementaryoperations such as finding the root of a tree containing a node, cutting and linking a subtree fromand to trees, and answering if two nodes are connected, all in ˜ O (1) time. Thus, the information wekeep for every subtree is the size of its intersection with V T . Next, using the dynamic algorithm,remove the edges δ ( S ) , denoting the resulting graph by G S and the connected component of y in G S by C y . Then enumerate every edge in the cut δ ( S ) and remove every edge that neither of its endslies in C y , resulting in a cut S ( y ) = C y containing y and such that c ( S ( y )) ≤ c ( S ) , as in the claim.In order to report S ( y ) ∩ V T , simply output the aggregated information in the root of the BSTcorresponding to S ( y ) . To enumerate the nodes in S ( y ) ∩ V T , traverse the BST of the connectedcomponent S ( y ) starting with the root, and follow a child whose intersection with V T is ≥ , untilarriving at a leaf which is then enumerated. The total time spent for removing the cut edges andreporting the intersection size is thus O ( | δ ( S ) | ) , and an additional time of O ( | S ( y ) ∩ V T | ) is spenton traversing the BST and enumerating the nodes in S ( y ) ∩ V T .We use claim 2.9 on our instance by first preprocessing the cuts S y the algorithm computed and18witch them with the corresponding cuts S y ( y ) in total time ˜ O ( m ) for the current depth (as shownin the beginning of this proof), and then setting V T to be either V (cid:48) , V (cid:48) big , V small , or V (cid:48)(cid:48) big , which incursan addition of O ( | V (cid:48) | + | V (cid:48) big | + | V small | + | V (cid:48)(cid:48) big | ) = O ( V (cid:48) ) to the running time, bringing the totalrunning time at a single depth to ˜ O ( m ) , as required. Multiplying by the height of the recursion,which is at most O (log / n ) , concludes the proof.As claimed before, there are at most ˜ O (1) unsuccessful choices of pivots per a successful one,thus the total time for constructing D is ˜ O ( m ) , as required. Flow-Equivalent Tree Construction for Unweighted Graphs
We use the flow-emulator H to compute a flow-equivalent tree without spending Ω( n ) time as in the general case. Lemma 2.10.
A flow equivalent tree T can be constructed from H in near linear time in the sizeof H , such that T represents a (1 + ε ) approximation of the correct Max-Flow values.Proof.
The algorithm is to simply pick a maximum spanning tree T H of the flow-emulator H . Inorder to prove that T H is an approximate flow-equivalent tree of the input graph G , consider acomplete graph H (cid:48) on V that is constructed from H by adding an edge between every pair of nodes u, v that did not have an edge in H , with capacity c ( uv ) = min { c H ( u, p uv ) , c H ( v, p uv ) } , for thespecial node p uv from Claim 2.3. This claim and the construction of H (cid:48) imply that for every pair uv in H (cid:48) , (1 + ε ) Max-Flow G ( u, v ) ≥ c H (cid:48) ( u, v ) ≥ Max-Flow G ( u, v ) . We show that there exists a maximum spanning tree of H (cid:48) that does not pick the newly addededges. It will follow that T H is also a maximum spanning tree of H (cid:48) and thus, by Proposition 2.6, T H is a (1 + ε ) -approximate flow-equivalent tree of G , as required.Now, let T H (cid:48) be any maximum spanning tree of H (cid:48) . In what follows we show that new edgescould always be replaced by edges from H in a way that does not decrease the weight of T H (cid:48) . Wecall an edge uv in T H (cid:48) a new edge if it does not exist in H . For every new edge uv in T H (cid:48) thatsatisfies, without loss of generality, that c H (cid:48) ( p uv , u ) ≥ c H (cid:48) ( p uv , v ) (the case c H (cid:48) ( p uv , u ) ≤ c H (cid:48) ( p uv , v ) is symmetric), replace uv with an edge in H according to the first of the following rules that applies(note that at least one must be true).1. If the edge p uv v is in T H (cid:48) , then replacing uv with p uv u ∈ E ( H ) could only increase the weightof T H (cid:48) .2. If the edge p uv u is in T H (cid:48) , then replacing uv with p uv v ∈ E ( H ) would keep the weight of T H (cid:48) the same.3. If neither of the edges p uv u and p uv v is in T H (cid:48) , then(a) If the path in T H (cid:48) between p uv and v , denoted P (cid:48) pv , does not contain the edge uv , thenwe replace uv with p uv u ∈ E ( H ) , which could only increase the total weight of the tree.(b) If P (cid:48) pv does contain the edge uv , then we replace uv with p uv v ∈ E ( H ) , keeping the totalweight of the tree the same.At the end, T H (cid:48) remains only with edges that are in H . Thus, we concluded Lemma 2.10.19 .5 Handling Randomized Data Structures To bound the depth of the recursion by O (log n ) we argued (using Lemma 2.4 about tournaments)that for a randomly chosen pivot p it will be the case that for at least a / of the targets u the sideof u in the cut returned by our hypothetical data structure is smaller. If the data structure we wishto use is randomized, there could be an issue because the returned cut could change each time weask this query (or if we ask the query as ( p, u ) or ( u, p ) ), and the notions we use in the argumentsare not well-defined. Here we show how to avoid these issues by a more careful analysis that fixesthe random bits used by the data structure.First, for Theorem 2.1 we assume that the preprocessing step is deterministic and the queriesare randomized, and note that it is enough to consider this case also for Theorem 2.2 that dealswith offline (1 + ε ) -approximate minimum st -cut algorithms, called henceforth (1 + ε ) M inCut ( s, t ) .Generate a sequence of O ( t offline ( m )) random coins, and use these coins for every application of (1 + ε ) M inCut ( s, t ) , keeping the results consistent in the following way. For a pair s, t queriedby the algorithm, apply (1 + ε ) M inCut ( s, t ) or (1 + ε ) M inCut ( t, s ) , according to increasing orderof s and t ’s binary representation. By standard amplification techniques and union bound, weassume that for all pairs s, t , (1 + ε ) M inCut ( s, t ) succeed. Thus, the tournament in Lemma 2.4 iswell-defined, and this case is concluded. Second, we assume the preprocessing step is randomized,and the queries are deterministic. In this case, by union bound over all (cid:0) n (cid:1) pairs of distances, (1 + ε ) M inCut ( s, t ) succeeds. Finally, if both preprocessing and queries are randomized, generatefirst all random coins as described in the previous two cases, then apply union bound over the twoof them. In this section we show a new algorithm for constructing a cut-equivalent tree for graphs from aminor-closed family F (for example all graphs), given a Min-Cut data structure for this family F . For ease of exposition, we first assume that the data structure supports also Max-Flow queries(reporting the value of the cut) in time t mf ( m ) ; we will later show that Min-Cut queries suffice. Theorem 3.1.
Given a capacitated graph G ∈ F on n nodes and m edges, and access to a deter-ministic Min-Cut data structure for F with preprocessing time t p ( · ) and output sensitive time t mc ( · ) ,one can construct, with high probability, a cut-equivalent tree for G in time ˜ O ( t p ( m ) + m · t mc ( m )) .Furthermore, it suffices that the data structure’s queries are restricted to a fixed source. By combining our algorithm with the Min-Cut data structure of Arikati, Chaudhuri, andZaroliagis [ACZ98] for graphs with treewidth bounded by (a parameter) t , which attains t p = n log n · O ( t ) and t mc = t mf = 2 O ( t ) , we immediately get the first near-linear time construction ofa cut-equivalent tree for graphs with bounded treewidth, as follows. Corollary 3.2 (Expanded Corollary 1.1) . Given a graph G with n nodes and treewidth at most t ,one can construct, with high probability, a cut-equivalent tree for G in time ˜ O (2 O ( t ) n ) . The rest of this section is devoted to proving Theorem 3.1. Our analysis relies on the classicalGomory-Hu algorithm [GH61], hence we start by briefly reviewing it (largely following [AKT20])with a bit more details than in Section 2.1.
The Gomory-Hu algorithm.
This algorithm constructs a cut-equivalent tree T in iterations.Initially, T is a single node associated with V (the node set of G ), and the execution maintains20he invariant that T is a tree; each tree node i is a super-node , which means that it is associatedwith a subset V i ⊆ V ; and these super-nodes form a partition V = V (cid:116) · · · (cid:116) V l . Each iterationworks as follows: pick arbitrarily two graph nodes s, t that lie in the same tree super-node i , i.e., s (cid:54) = t ∈ V i , then construct from G an auxiliary graph G (cid:48) by merging nodes that lie in the sameconnected component of T \ { i } , and invoke a Max-Flow algorithm to compute in G (cid:48) a minimum st -cut, denoted C (cid:48) . (For example, if the current tree is a path on super-nodes , . . . , l , then G (cid:48) isobtained from G by merging V ∪ · · · ∪ V i − into one node and V i +1 ∪ · · · ∪ V l into another node.)The submodularity of cuts ensures that this cut is also a minimum st -cut in the original graph G ,and it clearly induces a partition V i = S (cid:116) T with s ∈ S and t ∈ T . The algorithm then modifies T by splitting super-node i into two super-nodes, one associated with S and one with T , that areconnected by an edge whose weight is the value of the cut C (cid:48) , and further reconnecting each j whichwas a neighbor of i in T to either super-node S or T , depending on which side of the minimum st -cut C (cid:48) contains V j .The algorithm performs these iterations until all super-nodes are singletons, and then T is aweighted tree with effectively the same node set as G . It is proved in [GH61] that for every s, t ∈ V ,the minimum st -cut in T , viewed as a bipartition of V , is also a minimum st -cut in G , and of thesame cut value. We stress that this property holds regardless of the choices, made at each iteration,of two nodes s (cid:54) = t ∈ V i . We turn out attention to proving Theorem 3.1. Let G = ( V, E, c ) be the input graph. We shall makethe following assumption, justified by a standard random-perturbation argument that we providefor completeness in Section 3.6. Assumption 3.3.
The input graph G has a single cut-equivalent tree T ∗ , with n − distinct edgeweights. At a very high level, our algorithm accelerates the Gomory-Hu algorithm by performing every timea batch of Gomory-Hu steps instead of only one step. Similarly to the actual Gomory-Hu algorithm,our algorithm is iterative and maintains a tree T of super-nodes, which means that every tree node i is associated with V i ⊆ V , and these super-nodes form a partition V = V (cid:116) · · · (cid:116) V l . This tree T is initialized to have a single super-node corresponding to V , and since it is modified iteratively,we shall call T the intermediate tree . Eventually, every super-node is a singleton and the tree T corresponds to T ∗ .In a true Gomory-Hu execution, every iteration partitions some super-node i into exactly twosuper-nodes, say V i = S (cid:116) T , which are connected by an edge according to the minimum cut betweena pair s ∈ S, t ∈ T that is computed in an auxiliary graph. In contrast, our algorithm partitionsa super-node i into multiple super-nodes, say V i = U p (cid:116) V i, (cid:116) · · · (cid:116) V i,d , that are connected in atree topology where the last edge in the path from U p to each V i,j , j ∈ [ d ] , is set according tothe minimum cut between a pivot p ∈ U p and a corresponding u i,j ∈ V i,j , where all these cuts arecomputed in the same auxiliary graph. We call this an expansion step and super-node U p is calledthe expansion center ; see Figure 2 for illustration. Each iteration of our algorithm applies suchan expansion step to every super-node in the intermediate tree T . These iterations can also be Even though the perturbation algorithm is Monte Carlo, our algorithm can still be made Las Vegas since if arandom perturbation fails Assumption 3.3, then our algorithm could encounter two crossing cuts, but it can identifythis situation and restart the algorithm with another perturbation. ˜ O ( m ) , because in somescenarios the total size of all auxiliary graphs at a single depth is much bigger than m . For example,if T ∗ consists of two stars of size n/ connected by a path of length n/ , and G is similar but has inaddition all possible edges between the stars (with low weight), the total size of all auxiliary graphswould be Ω( n ) . We overcome this obstacle using a capacitated auxiliary graph ( CAG ), which is thesame auxiliary graph as in the Gomory-Hu algorithm, but with parallel edges merged into a singleedge with their total capacity. We will show (in Lemma 3.12) that the total size of all
CAG s at asingle depth is linear in m .Another challenge is to bound the recursion depth by O (log n ) . A partition in the Gomory-Hu algorithm might be unbalanced, where in our algorithm, this issue comes into play by a poorchoice of a pivot; for example, in a star graph with edge-capacities , . . . , n − , if the pivot p isthe leaf incident to the edge of capacity , then the minimum cut between p and any other nodeis the same ( { p } , V \ { p } ) , giving little information on how to partition V and make significantprogress. Observe however that a random pivot would work much better in this example; moreprecisely, a set of O (log n ) random pivots contains, with high probability, at least one pivot p forwhich the minimum cuts between p and each of the other nodes will partition V into super-nodesthat are all constant-factor smaller, thus our expansion step will decrease the super-node size bya constant factor. But notice that even if a pivot p is given, we still need to bound the time ittakes to partition the super-node. Our algorithm repeatedly computes a minimum cut between p and some other node, such that the time spent on computing this minimum cut is proportional toits progress in reducing | V i | , until Ω( | V i | ) nodes are separated away from V i . Altogether, all theseminimum cuts (from a single pivot p ) take time that is near-linear in the size of the corresponding CAG . It will then follow that the total time of all expansion steps at a single depth is near-linear inthe total size of their CAGs, which as mentioned above is linear in m , and finally since the depthis O (log n ) , the overall time bound is ˜ O ( m ) . To better illustrate our main ideas, we now present our algorithm with a slight technical simplifica-tion of employing both Min-Cut and Max-Flow queries. After analyzing its correctness and runningtime in Section 3.4, we will show that Max-Flow queries are not necessary, in Section 3.5.The algorithm initializes T as a single super-node associated with the entire node set V , andends when all super-nodes in T are singletons, supposedly corresponding to the cut-equivalent tree T ∗ . At every recursion depth in between, the algorithm performs an expansion step in every non-singleton super-node. The expansion of super-node i ∈ T of size n i = | V i | ≥ , whose CAG isdenoted G i , works as follows. Pick a pivot node p ∈ V i uniformly at random, and for every node u ∈ V i \ { p } let ( S u , V ( G i ) \ S u ) be the minimum up -cut in G i , and let S (cid:48) u = V i ∩ S u . In order tocompute | S (cid:48) u | , create in a preprocessing step a copy ˜ G i of G i , and assuming its edge-capacities areintegers (by scaling), connect (in ˜ G i ) the pivot p to all other nodes u ∈ V i \ { p } by new edges ofsmall capacity δ = 1 /n . Note that ˜ G depends on p but not on u , hence it is preprocessed once perpivot p then used for multiple nodes u . Then for every node u ∈ V i \ { p } compute h p ( u ) := [ Max-Flow ˜ G i ( u, p ) − Max-Flow G i ( u, p )] /δ, h p ( u ) = | S (cid:48) u | , and then compute the set V ≤ / i ( p ) := { u ∈ V i \ { p } : h p ( u ) ≤ n i / } . Now repeat picking random pivots until finding a pivot p for which | V ≤ / i ( p ) | ≥ n i / .Next, initialize U p := V i , pick uniformly at random a node u ∈ U p ∩ V ≤ / i ( p ) , and enumeratethe edges in the cut ( S u , V ( G i ) \ S u ) . Partition U p into two super-nodes, U p ∩ S u and U p \ S u ,connected by an edge of capacity Max-Flow ( u, p ) , then reconnect every edge previously connectedto U p in T to either U p ∩ S u or U p \ S u according to the cut ( V ( G i ) \ S u , S u ) . Repeat the above,i.e., pick another node u ∈ U p ∩ V ≤ / i ( p ) and so forth, as long as | U p | > n i / (we shall provethat such a node u always exists), calling these nodes u , . . . , u d in the order they are picked by thealgorithm; when | U p | ≤ n i / is reached, conclude the current expansion step.Recall that the algorithm performs such an expansion step to every non-singleton super-node(i.e., n i ≥ ) at the current depth, and only then proceeds to the next depth. The base case n i = 1 can be viewed as returning a trivial tree on V i . 𝑈 𝑈 𝑈 𝑈 𝑈 𝑝 𝑈 𝑉 𝑖 𝑈 𝑈 Figure 2: The changes to T by our algorithm. Left: before expansion step of V i . Middle: afterexpansion step with expansion center U p (dashed), and the subtree of T corresponds to partition V i = (cid:70) j =1 U j (cid:116) U p . Right: when the algorithm terminates. We start by showing that whenever our algorithm reports a tree, there exists a Gomory-Hu executionthat produces the same tree. Notice that super-nodes at the same depth are disjoint, hence anexpansion of one of them does not affect the other super-nodes, and the result of these expansionsteps is the same regardless of whether they are executed in parallel or sequentially in any order.
Lemma 3.4 (Simulation by Gomory-Hu Steps) . Suppose there is a sequence of Gomory-Hu stepsproducing tree T ( j ) , and that an expansion step performed to V i ∈ T ( j ) produces T ( j +1) . Then thereis a sequence of Gomory-Hu steps that simulates also this expansion step and produces T ( j +1) .Proof. Assume there is a truncated execution of the Gomory-Hu algorithm that produces T ( j ) , wedescribe next a sequence of Gomory-Hu algorithm’s steps starting with T ( j ) that produces T ( j +1) .Recall that to produce T ( j +1) , our algorithm partitions a super-node V i ∈ T ( j ) into U p (cid:116) V i, (cid:116)· · ·(cid:116) V i,d ,where the last edge in the path from super-node U p ∈ T ( j +1) to each super-node V i,k ∈ T ( j +1) for23 ∈ [ d ] was set according to the minimum cut between a pivot p ∈ U p and a corresponding u i,k ∈ U i,k ,at the time of the partition, and these minimum cuts are computed in the same auxiliary graph G i . Let u i, , . . . , u i,d be in the order they are picked by the algorithm, thus if the path between U p and u i,a in T ( j +1) contains U i,b , then a ≤ b (We may omit the subscript i when it is clear from thecontext.)The Gomory-Hu steps are as follows. Starting with T ( j ) , for each k = 1 , . . . , d , execute aGomory-Hu step with the pair u k , p from super-node U p in T (we will shortly show that indeed u k , p ∈ U p at that stage), and denote the resulting tree by T ( j ) ,k . By convention, T ( j ) , := T ( j ) .Informally, one may ask why can we carry out multiple Gomory-Hu steps using the same auxiliarygraph and circumvent the sequential nature of the Gomory-Hu algorithm? The answer stems fromthe Gomory-Hu analysis, that for every s, t ∈ V i the minimum st -cut in G i is also a minimum st -cutin G , and from Assumption 3.3, which guarantees that the minimum st -cuts in G are unique, andthus do not cross each other. Therefore these cuts may be found all in the same auxiliary graph,and we only need to verify the corresponding Gomory-Hu steps.More formally, we prove by induction that for every k ∈ [0 , .., d ] , there is a sequence of Gomory-Hu steps that produces T ( j ) ,k . The base case k = 0 holds because of our initial assumption that T ( j ) can be produced by a sequence of Gomory-Hu steps. For the inductive step, assume that T ( j ) ,k can be produced by a sequence of Gomory-Hu steps. By the analysis of the Gomory-Hualgorithm, for every pair of nodes s, t ∈ U p in T ( j ) ,k , the minimum st -cut in the auxiliary graph of U p in T ( j ) ,k is a minimum st -cut in G , and this is correct in particular for the pair our algorithmpicks, u k +1 , p . By the same reasoning, the minimum u k +1 p -cut in G i is also a minimum pu k +1 -cutin G . By Assumption 3.3, these two cuts are identical, and hence the partition of U p in T ( j ) ,k thatour algorithm performs and the reconnection of the subtrees that it does (based on the minimum u k +1 p -cut in G i ) is exactly the same as the Gomory-Hu execution would do (based on the minimum u k +1 p -cut in the auxiliary graph of U p in T ( j ) ,k ), resulting in T ( j ) ,k +1 . Lemma 3.4 now follows fromthe case k = d .The next corollary follows from Lemma 3.4 immediately by induction. Corollary 3.5.
There is a Gomory-Hu execution that outputs the same tree as our algorithm, whichby the correctness of the Gomory-Hu algorithm and Assumption 3.3, is the cut-equivalent tree T ∗ . We proceed to prove the time bound stated in Theorem 3.1. Our strategy is to bound therunning time of a single expansion step in proportion to the size of the corresponding
CAG , andthen bound the total size, as well as the construction time, of all
CAG s at a single depth of therecursion. Finally, we will bound the recursion depth by O (log n ) , to conclude the overall timebound stated in Theorem 3.1. Lemma 3.6.
Assuming t p ( m ) = ˜ O ( m ) and t mc ( m ) = ˜ O (1) , the (randomized) running time ofa single expansion step on V i , including constructing the children CAG s, and preprocessing it forqueries, is near-linear in the size of G i with probability at least − /n .Proof. We start with bounding the number of pivot choices. To do that, we use Corollary 2.5 with V F = V ( G i ) , V (cid:48) F = V i , and H G i ( V i ) as the helper graph of G i on V i , where the correspondingcuts are the minimum cuts between pairs in V i . By Corollary 2.5, the probability that at least n random pivots p all satisfy | V ≤ / i ( p ) | < n i / , which we call an unsuccessful choice of pivot p , is bounded by /n . The number of expansion steps is at most n − , because the final tree T contains n − edges, and each expansion step creates at least one such edge. By a union boundwe conclude that with probability at least − /n , every expansion step picks a successful pivotwithin n trials. Observe that for every choice of p we compute h p ( u ) for all u ∈ V i , which takes24ime ˜ O ( | V i | + | G i | ) for all pivots. We can thus focus henceforth on the execution with a successfulpivot p .We now turn to bound the total time spent on queries in G i . Let T ∗ i be the subgraph of T ∗ induced on V i . Observe that T ∗ i must be connected, because V i is a super-node in an intermediatetree of the Gomory-Hu algorithm (see Lemma 3.4). Define a function (cid:96) : V ( T ∗ i ) \ { p } → E ( T ∗ i ) ,where (cid:96) ( u ) is the lightest edge in the path between u and p in T ∗ i , and (cid:96) ( p ) = ∅ (see Figure 3 forillustration); it is well-defined because Assumption 3.3 guarantees there are no ties. For an edge e ∈ T ∗ i , we say that e is hit if the targets u i, , . . . , u i,d picked by the expansion step include a node u such that (cid:96) ( u ) = e . Let H e be an indicator for the event that edge e is hit. In order to bound thetotal number of nodes and edges in the CAG that participate in minimum-cut queries performed bythe expansion step, we first bound the number of edges that are hit along any single path.
Claim 3.7.
With high probability, for every path P between a leaf and p in T ∗ i , the number of edgesin P that are hit is (cid:80) e ∈ P H e ≤ O (log n ) .Proof. Let T ∗ i,(cid:96) be the graph constructed from T ∗ i by merging nodes whose image under (cid:96) is thesame. Observe that nodes that are merged together, namely, (cid:96) − ( e ) for e ∈ E ( T ∗ i ) , are connectedin T ∗ i , and therefore the resulting T ∗ i,(cid:96) is a tree. See Figure 3 for illustration. We shall refer to nodesof T ∗ i,(cid:96) as vertices to distinguish them from nodes in the other graphs. For example, p is not mergedwith any other node, and thus forms its own vertex. 𝑝 𝑎 𝑐 𝑏 𝑑 ℓ −1 𝑒 𝑒 𝑒 𝑒 ℓ −1 𝑒 ℓ −1 𝑒 Figure 3: An illustration showing T ∗ i with solid blue lines, while the corresponding graph T ∗ i,(cid:96) withdashed gray lines. For example, e = (cid:96) ( a ) = (cid:96) ( b ) = (cid:96) ( c ) = (cid:96) ( d ) . The nodes in (cid:96) − ( e ) are not in V ≤ / i ( p ) , and so the expansion step never picks any of them as a sink. After picking any node from (cid:96) − ( e ) , a new super-node containing (cid:96) ( e ) (and possibly the vertex below as well) is formed.For sake of analysis, fix a leaf in T ∗ i,(cid:96) , which determines a path to the root p , denoted P (cid:96) , and letus now bound the number of nodes picked (by the expansion step) from vertices in P (cid:96) .25 laim 3.8. With high probability, the total number of nodes u picked by the algorithm from verticesin P (cid:96) is at most O (log n ) .Proof. We will need the following two observations regarding T ∗ i,(cid:96) . Observation 3.9.
No vertex in T ∗ i,(cid:96) contains nodes from both V ≤ / i ( p ) and V i \ V ≤ / i ( p ) . This is true because all nodes u in the same vertex (cid:96) − ( e ) have the same minimum up -cut in G ,which is a basic property of the cut-equivalent tree T ∗ , and thus all these nodes will have the same S u and the same S (cid:48) u computed in the CAG G i . Observation 3.10.
The vertices that contain nodes in V ≤ / i ( p ) form a prefix of the path P (cid:96) . This is true by monotonicity of | S x | as a function of the hop-distance of x from p in P (cid:96) , denoted P (cid:48) (cid:96) . The algorithm only picks nodes from V ≤ / i ( p ) , thus it suffices to bound the nodes picked from(the vertices along) the prefix P (cid:48) (cid:96) . Fix a list π of the nodes in (vertices in) P (cid:48) (cid:96) in increasing orderof their hop-distance from p in P (cid:96) , Now recall that the targets u i, , . . . , u i,d are chosen sequentially,each time uniformly at random from U p ∩ V ≤ / i ( p ) for the current U p . Initially, U p contains allthe nodes in π (but may contain also nodes outside the path P (cid:96) ). Now each time a target u ischosen, some nodes are separated away from U p . Define the list π (cid:48) to be the restriction of π tonodes currently in U p ; notice that U p and π (cid:48) change during the random target choices, but π isfixed. We can classify the randomly chosen target u into three types.1. u is not from the current list π (cid:48) : In this case π (cid:48) does not change. We call this a “don’t care”event, because we shall ignore this choice.2. u is from the current list π (cid:48) : In this case π (cid:48) is shortened into a prefix of π (cid:48) that does not contain u . We now have two subcases:2.a. u is from the first half of π (cid:48) : Then π (cid:48) is shortened by factor at least . We call this event“big progress”.2.b. u is from the second half of π (cid:48) : We call this event “small progress”.Now to complete the proof of Claim 3.8, consider the random process of choosing the targets u .To count the number of targets u from P (cid:96) , we can ignore targets of type 1 and focus on targets oftype 2, in which case type 2a occurs with probability at least / . As the initial list π has length atmost n , with high probability the random process terminates within
16 log n steps (counting onlytargets of type 2). Proceeding with the proof of Claim 3.7, suppose the path P consists of nodes v , . . . , v k = p where v is the leaf. Then the path P (cid:96) consists of (cid:96) − ( (cid:96) ( v )) , . . . , (cid:96) − ( (cid:96) ( v k )) restricted to distinctvertices. Note that whenever an edge e in P that is hit, some target u is picked from (cid:96) − ( e ) and inparticular from P (cid:96) . By Claim 3.8, with high probability the number of target nodes picked from P (cid:96) is bounded by O (log n ) , implying that also the number of hit edges in P is bounded by O (log n ) .Finally, Claim 3.7 follows by applying a union bound over all (at most n ) leaves.Next, we use Claim 3.7 to bound the total running time of an expansion step. The similar but different idea that the minimum cuts from a uniformly random node p partition the auxiliarygraph in a balanced way with high probability, which allows bounding the recursion depth by analyzing the maximallength of paths in the recursion tree, appears in Lemma and Theorem in [BCH + laim 3.11. An internal iteration in the expansion step, that partitions a super-node U p into U p \ S u and U p ∩ S u , takes time ˜ O ( | S u | + k iup ) , where k iup is the number of edges in the minimum up -cut ( V ( G i ) \ S u , S u ) .Proof. Using the Min-Cut data structure, the algorithm spends ˜ O ( k iup ) time for finding the edgesin the minimum up -cut ( S u , V ( G i ) \ S u ) , where we denote their number by k iup . When partitioninga super-node U p , the algorithm does not explicitly list the nodes in U p \ S u as this would take toomuch time. Instead, it only lists the nodes in U p ∩ S u , i.e., those that are separated from U p , asfollows. We first find S u by using Claim 2.9 on G i , with terminals initialized to V T := V ( G i ) , andqueries to S := S u . Observe that in our case S u is connected (i.e., S ( u ) = S u ) as otherwise therewould have been a subset ˜ S u ⊂ S u such that c ( S (cid:48) u ) < c ( S u ) , contradicting the minimality of c ( S u ) .Second, we enumerate the nodes in S u and test for membership in U p , to find U p ∩ S u . Recallthat updating the intermediate tree T requires reconnecting each edge that was initially incidentto super-node U p , to one of the two new super-nodes U p \ S u and U p ∩ S u . Thus, we discuss thisreconnection process next.Throughout the expansion step, we maintain a list L of all super-nodes that are adjacent to U p , starting with the super-nodes G i \ V i . Technically, for each super-node V j adjacent to U p it isstored by a representative node from V j and a pointer to V j . In order to reconnect subtrees afterpartitioning U p ∩ S u out of U p , the algorithm finds which super-nodes in L are in S u . This is doneby enumerating the nodes in S u ∩ V ( G i ) and testing for membership in L . Then, connect thosesuper-nodes to the new super-node U p ∩ S u in T , and finally update L to reflect the reconnection.At the end, U p \ S u is connected to the remaining subtrees. This proves Claim 3.11.We continue with the proof of Lemma 3.6, that the total time for an expansion step is bounded.We may assume henceforth that the O (log n ) bound in Claim 3.7 holds, as it occurs with highprobability. The number of times a node u ∈ V ( G i ) is queried (when it belongs to some S v ) is equalto the number of hit edges in its path to the pivot p in T ∗ i , which we just assumed to be boundedby O (log n ) . The number of times an edge e ∈ E ( G i ) is queried is equal to the number of hit edgesin T ∗ i along the two paths from e ’s ends to the pivot p , which we just assumed to be boundedby O (log n ) . Altogether, the time it takes to scan the cuts S u i, , . . . , S u i,d and the correspondingsuper-nodes V i, , . . . , V i,d that are separated away from V i is bounded, by Claim 3.11, by ˜ O (cid:16) d (cid:88) j =1 | S u i,j | + k iu i,j p (cid:17) ≤ ˜ O (cid:16) | V ( G i ) | + | E ( G i ) | (cid:17) . Finally, observe that the total time it takes to construct the
CAG s of any super-node V i ’s children ina single expansion step is linear in the size of V i ’s CAG . This completes the proof of Lemma 3.6.Next, we show that the total size of all
CAG s at a certain depth is bounded by O ( m ) . In fact,we show it for partition trees, which generalize the intermediate trees produced by our algorithm.A partition tree T of a graph G = ( V, E ) is a tree whose nodes V , . . . , V l are super-nodes of G andform a partition V = V (cid:116) · · · (cid:116) V l . Clearly, our intermediate tree T is a partition tree, and so weare left with proving the following lemma. Lemma 3.12.
Let G = ( V, E ) be an input graph, and let T be a partition tree on super-nodes V , . . . , V l . Then the total size of the corresponding CAG s G , . . . , G l is at most n + 3 m = O ( m ) .Proof. Root T at an arbitrary node r and direct all edges away from r . Now charge each edge e ina CAG G i to some graph edge uv ∈ E ( G ) that contributes to its capacity, picking one arbitrarily27f there are multiple such edges. Let P uv be the path in T between the two super-nodes V u and V v that contain u and v , respectively, and observe that super-node V i must lie on this path, seeFigure 4 for illustration. 𝑟 𝑉 𝑢 𝑉 𝑣 𝐿𝐶𝐴 𝑉 𝑢 , 𝑉 𝑣 𝑢 𝑣 𝑃 𝑢𝑣 Figure 4: An illustration of the partition tree T rooted at r . The thick red line depicts a graphedge uv ∈ E ( G ) that is being charged. The dashed red curve depicts P uv , the path in T betweensuper-nodes V u and V v .To bound the total charge for a single graph edge uv ∈ E ( G ) , observe that it cannot be chargedby two edges e (cid:48) , e (cid:48)(cid:48) in the same CAG G i , it thus suffices to count how many different CAGs contributeto the charge of uv . We split this into three cases.1. V i is an endpoint of P uv (i.e., V i = V u or V i = V v ): An edge uv ∈ E ( G ) can be charged in thismanner at most twice (over all CAG s), namely, by one edge in G u and one in G v . Thus, thetotal charge over all uv ∈ E ( G ) is at most m .2. V i is the least common ancestor, abbreviated LCA , of V u and V v in T : An edge uv ∈ E ( G ) can be charged in this manner at most once (over all CAG s). Thus, the total charge over all uv ∈ E ( G ) is at most m .3. V i is not an endpoint of P uv nor it is the LCA of V u and V v : In this case, exactly one of V u and V v is a descendant of V i . We bound the number of such edges e (over all CAG s) directly,i.e., without charging to uv , as follows.Let d i be the degree of V i in the tree T . Recall that the CAG G i is obtained from G bymerging the nodes in V \ V i into exactly d i nodes, one for each neighbor of V i in T , and oneof these d i nodes in G i , denote it ˆ x i , is the merger of all the nodes from all the super-nodes V j that are non-descendants of V i . (see section 3.2). It follows that an edge e in G i (in thiscase) connects this ˆ x i to one of the other d i − nodes mentioned above, and clearly there areat most d i − such edges. By summing over all the CAGs G , . . . , G l , the total number ofsuch edges e is at most (cid:80) i ( d i − ≤ n . 28ltogether, the total size of all the CAG s is at most m + m + 2 n = O ( m ) , as claimed.We are now ready to prove the main Theorem. Proof of Theorem 3.1 under the assumption on
Max-Flow queries.
To simplify matters, let us as-sume henceforth that t p ( m ) = ˜ O ( m ) and t mc ( m ) = ˜ O (1) . The general case is analyzed similarlyand results in the time bound ˜ O ( t p ( m )+ m · t mc ( m )) stated in Theorem 3.1 for the following reasons.The preprocessing time is performed ˜ O (1) times per CAG , hence the total preprocessing time overall
CAG s that the algorithm constructs is at most ˜ O ( t p ( m )) , the first summand above. The totalsize of all answers to all queries at a single depth is near-linear in the total size of all CAGs at thisdepth; hence over all depths it is bounded by ˜ O ( m · t mc ( m )) , the second summand above.First, assume the perturbation attempt from Section 3.6 is successful. By Lemma 3.6 the totaltime spent at each super-node V i is near-linear in the size of G i , and thus by Lemma 3.12, thetotal time spent at each recursion depth is bounded by O ( m ) . By the definition of the algorithm,at each super-node V i during the recursion, Θ( | V i | ) nodes are partitioned away from V i , and so byLemma 3.12, Θ( n ) nodes are partitioned away from all CAG s at this depth, thus after the O (log n ) depth, each super-node V i is a singleton, concluding Theorem 3.1 in this case.Second, if the perturbation attempt from Section 3.6 is unsuccessful, which happens with prob-ability at most /n , and two cuts are crossing each other, then we would identify that and restartthe algorithm. By Lemma 3.6, with probability at most /n the number of incorrect pivots exceeds O (log n ) , and by a union bound with the probability of a failed perturbation attempt, the runningtime of the algorithm is bounded by ˜ O ( m ) with high probability. Recall that our goal is to construct a cut-equivalent tree using access to Min-Cut queries. So farwe have assumed that we also have access to Max-Flow queries. In this subsection we show how tolift this additional assumption. We will change the algorithm and the analysis slightly, as follows.First, at each expansion step, run the algorithm on n preprocessed copies of G i , each onone of the randomly picked pivots. Similar to our calculation from the original proof, with highprobability, for every expansion step throughout the execution, at least one of the correspondinggraphs will have a successful pivot. We will make sure that an unsuccessful pivot will never outputa wrong tree; it may only keep running indefinitely (until we halt it). Since with high probabilityat least one of the graphs is of a successful pivot, this only incurs a factor of ˜ O (1) to the runningtime.Second, instead of picking a node u ∈ U p ∩ V ≤ / i ( p ) at random as in the original algorithm, pick / n nodes from U p and use Claim 2.9 on / n copies of G i , simultaneously, each for oneof the chosen nodes u , to test if | S (cid:48) u | ≤ n i / . If all nodes were unsuccessful choices, draw anotherset of / n nodes. Continue to draw batches until at least one node is successful. Then, for anarbitrary successful node u , use Claim 2.9 to find the k iup edges in the minimum up -cut, and thenodes in S (cid:48) u .Since the probability for a single node u chosen at random to satisfy | S (cid:48) u | ≤ n i / is always at least / , and as we pick / n nodes uniformly at random each time, we get that: with probabilityat least − (7 / / n = 1 − /n , at least one of the / n chosen nodes is successful. By aunion bound over the maximal number of partitions in expansion steps throughout the execution,i.e. internal iterations of expansion steps (at most n ), we get that with probability at least − /n each one of the batches results in at least one of the / n nodes in the batch is successful.29ence, the only part of the proof that needs to be further addressed is Claim 3.7. In particular, weprove the following variant of the claim. Claim 3.13.
With high probability, for every path P between a leaf and p in T ∗ i , the total numberof edges in P that are hit is at most O (log n ) .Proof. We mention the differences from the proof of the original Claim 3.7. The classification ofthe choice of a random target u into three types is as follows.1. (Similar to before) u is not from the current list π (cid:48) : In this case π (cid:48) does not change. We callthis a “don’t care” event, because we shall ignore this choice.2. u is from the current list π (cid:48) : In this case π (cid:48) is shortened into a prefix of π (cid:48) that does not contain u . We now have two subcases:2.a. u is from the first − / (3 log / n ) fraction of π (cid:48) : Then π (cid:48) is shortened by factor at least / (3 log / n ) . We call this event “big progress”.2.b. u is from the complement part of π (cid:48) : We call this event “small progress”.Here, we have a random process in which type 2a occurs with probability at least − / (3 log / n ) ,and therefore with high probability it terminates within
64 log / n ln n steps (these steps countonly targets of type 2). We conclude that with high probability, every such path has at most
64 log / n ln n = O (log n ) nodes chosen from its vertices.We proceed to the proof of Theorem 3.1, highlighting the differences. Proof of Theorem 3.1.
With high probability, at each expansion step at most O (log n ) unsuccessfulpivots are chosen before picking a successful one. At each level, we spend at most t p ( m ) time forthe preprocessing of the min-cut data structures for fixed sources, and so unsuccessful pivots onlyincur a factor ˜ O (1) on the running time. Thus, the proof of Theorem 3.1 is concluded. The following proposition shows that by adding small capacities to the edges, we can assume that G has one cut-equivalent tree T ∗ (see also [BENW16, Preliminaries]). Proposition 3.14.
One can add random polynomially-bounded values to the edge-capacities in G ,such that with high probability, the resulting graph G (cid:48) has a single cut-equivalent tree T ∗ with n − distinct edge weights, and moreover the same T ∗ (with edge weights rounded back) is a valid cut-equivalent tree also for G .Proof. We use the following well known lemma.
Lemma 3.15 (The Isolation Lemma [MVV87]) . Let h and H be positive integers, and let F be anarbitrary family of subsets of the universe [ h ] . Suppose each element x ∈ [ h ] in the universe receivesan integer weight w ( x ) , each of which is chosen independently and uniformly at random from [ H ] .The weight of a set S in F is defined as w ( S ) := (cid:80) x ∈ S w ( x ) . Then, there is probability at most h/H that more than one set in F will attain the minimum weight among them. Consider s, t ∈ V . Using the lemma above with F the set of all minimum st -cuts in G , h := m ,and H := n , we would get that there is probability at most /n that more than one cut separating s and t will attain the minimum capacity among them (i.e. will be a minimum st -cut). Howeverthis might drastically change the capacity of the edges (and cuts), so we divide all added weights30y n . In other words, we add a number from { /n , . . . , n /n } uniformly at random to thecapacity of every edge in G to get that with probability at most /n , the pair s, t have more thanone minimum st -cut, and also the capacity of the cut remains close to its original value. By a unionbound over all pairs in V there is a probability of at most /n for at least one pair to have morethan one minimum cut. Next, the probability for two minimum-cuts ( S u , V \ S u ) and ( S w , V \ S w ) separating two different pairs of nodes u, u (cid:48) and w, w (cid:48) , respectively, to have the same value afterthe perturbation is small. Without loss of generality, let e be an edge in the cut ( S u , V \ S u ) butnot in ( S w , V \ S w ) . Conditioning on the values of all other edges, e could have at most one valuethat makes the cuts’ values equal. Since each value is drawn with probability /n , by a unionbound on all pairs of pairs of node in V , the probability that two different pairs of nodes that havedifferent minimum cuts but had the same value in G will have also the same value in G (cid:48) (i.e., afterthe perturbation) is at most /n . Finally, by applying a union bound again, with probability atleast − /n none of the events happen, that is every pair has a unique minimum cut, and no twopairs of nodes have two different minimum-cuts with the same value.Since the value of every cut in G (cid:48) is bigger by at most m · /n ≤ /n than its original value,and assuming the edge-capacities in G are integers (by scaling), the minimum st -cut in G (cid:48) is smallerthan any non-minimum st -cut, that is a cut separating s and t that is not the minimum one in G ,and also the value of any non-minimum st -cut in G (cid:48) is bigger by at least − /n than the minimum st cut in G . Hence, T ∗ is a valid cut-equivalent tree for G , and by removing the added weights from T ∗ we have also the original cut values. This completes the proof of Proposition 3.14. For completeness, we show here that designing an output sensitive data structure for minimum-cuts can be reduced to the construction of cut-equivalent trees, i.e. the opposite direction than inSection 3.
Theorem 4.1.
Given a capacitated graph G = ( V, E, c ) on n nodes, m edges, and a cut-equivalenttree T of G , there is a deterministic data structure that after preprocessing in time ˜ O ( m ) , can reportfor a query pair s, t ∈ V , the edges in a minimum st -cut in time ˜ O ( output ) . We first give an overview of the reduction. Consider a tour t , . . . , t n − = t on (the nodes of)the tree T , starting at an arbitrary node t and following a DFS (i.e., going “around” the tree andtraversing each edge twice). Now assign each graph edge e = ( w, w (cid:48) ) ∈ E two points p , p in atwo-dimensional grid of size (2 n − × (2 n − , as follows. One point p has x and y coordinatesaccording to the first time the tour visits w and w (cid:48) , respectively; the other point p has the samecoordinates but in the opposite order. See Figure 5 for illustration.Given a query pair s, t ∈ V , the algorithm first finds the lightest edge ( s (cid:48) , t (cid:48) ) ∈ E ( T ) in theunique st -path in T . It then reports all the graph edges in the cut corresponding to removing ( s (cid:48) , t (cid:48) ) from T , using the following observation. View T as rooted at t (where the tour begins), and assumewithout loss of generality that s (cid:48) = parent( t (cid:48) ) . Then the subtree under t (cid:48) is visited exactly in theinterval I s (cid:48) t (cid:48) := [FirstVisit( t (cid:48) ) , LastVisit( t (cid:48) )] where for a node q ∈ V , FirstVisit( q ) := min { k ∈ [2 n −
1] : t k = q } , LastVisit( q ) := max { k ∈ [2 n −
1] : t k = q } . As a result, every graph edge e that crosses the cut corresponding to ( s (cid:48) , t (cid:48) ) has exactly one endpointinside the interval I s (cid:48) t (cid:48) (more precisely, all its visits are inside that interval) and one endpoint outsidethat interval (actually, all its visits are outside). Finally, we define two rectangles in the grid that31 ′ 𝑡 𝑡 𝑡 𝑤 𝑤 ′ 𝑡 ′ 𝑧 𝑧 ′ 𝑡 Figure 5: An illustration of the tour on T and how the edges E are mapped to grid points P . Therooted tree T is depicted by black arrows, and the tour by a solid blue line except for one tree edge ( s (cid:48) , t (cid:48) ) that is dashed. We also show two edges of the graph G that have exactly one endpoint inthe subtree under t (cid:48) , depicted by dashed red lines. They are mapped to grid points p ( w, w (cid:48) ) insiderectangle (4.1), and p ( z, z (cid:48) ) inside rectangle (4.2).contain exactly the points corresponding to edges of this cut, and employ a known algorithm toreport all the points (edges of G ) inside these rectangles. Proof of Theorem 4.1.
The preprocessing algorithm works as follows. Given G and its cut-equivalenttree T , construct a tour t , . . . , t n − on T as described in the overview. Then, for every graph edge ( w, w (cid:48) ) ∈ E , create two points p ( w, w (cid:48) ) := (FirstVisit( w ) , FirstVisit( w (cid:48) )) ,p ( w, w (cid:48) ) := (FirstVisit( w (cid:48) ) , FirstVisit( w )) . Store the set P of the m points created in this manner in a data structure that supports rangequeries (as explained below).Given a pair of nodes s, t ∈ V as a query for minimum st -cut, the algorithm first finds thelightest edge in the unique st -path between in T in ˜ O (1) time, denoted ( s (cid:48) , t (cid:48) ) where we assumewithout loss of generality that s (cid:48) = parent( t (cid:48) ) (recall we view t as the root of T ). The algorithmthen reports all the points in P that lie inside the two rectangles [FirstVisit( t (cid:48) ) , LastVisit( t (cid:48) )] × [1 , FirstVisit( t (cid:48) ) − , (4.1) [FirstVisit( t (cid:48) ) , LastVisit( t (cid:48) )] × [LastVisit( t (cid:48) ) + 1 , n − . (4.2)To see why this output is correct, observe that these two rectangles are disjoint, and that theirunion is exactly I s (cid:48) t (cid:48) × I s (cid:48) t (cid:48) (using the notation from the overview). Thus, points of P inside theirunion correspond precisely to edges in E with exactly one endpoint visited in the interval I s (cid:48) t (cid:48) , i.e.,32xactly one endpoint in the subtree under t (cid:48) . Moreover, an edge e can be reported at most once,because it cannot be that both p , p ∈ I s (cid:48) t (cid:48) × I s (cid:48) t (cid:48) .Reporting all the points inside these two rectangles could be done by textbook approach throughrange trees in time O ( k +log n ) [PS85], where k is the output size which for us is the number of edgesin the cut. The preprocessing time of [PS85] for p points is O ( p log p ) , and so the preprocessing timeof our data structure is O ( m log m ) , and the query time is ˜ O ( output ) , where output is the numberof edges in the output cut. In this section we prove that O ( n log n ) queries to a Max-Flow oracle are enough to construct aflow-equivalent tree with high probability. This is analogous to the Gomory-Hu algorithm, whichconstructs a cut-equivalent tree using minimum-cut queries. Let F be a graph family that is closedunder perturbation of edge-capacities, and suppose that for every graph in F with m edges, after t p ( m ) preprocessing time, Max-Flow queries could be answered in time t mf ( m ) . The following is themain result of this section, which is a consequence of Theorem 5.3 below. We use the term Min-Cutdata structure as in Section 3, although we only need here queries for the value (not an actual cut). Theorem 5.1.
Given a capacitated graph G = ( V, E ) ∈ F with n nodes and m edges, as wellas access to a deterministic Min-Cut data structure for F with running times t p ( m ) , t mf ( m ) , onecan construct a flow-equivalent tree for G in time O ( t p ( m ) + n log n · t mf ( m ) + n log n ) with highprobability. Similar to Section 2.5, Theorem 5.1 could be adjusted to handle randomized Min-Cut datastructures as well.One application of the above theorem is to graphs with treewidth bounded by (a parameter) t ,for which Arikati, Chaudhuri, and Zaroliagis [ACZ98] obtain t p = n log n · O ( t ) and t mf = 2 O ( t ) ,and thus our algorithm constructs a flow-equivalent tree on such graphs in time ˜ O t ( n ) , which wasnot known before. Corollary 5.2.
There is a randomized algorithm that given a capacitated graph G with n nodes andtreewidth at most t , constructs with high probability a flow-equivalent tree for G in time O ( n log n · O ( t ) ) . Our main tool can be described as a theorem about recovering ultrametrics. This is statedformally in Theorem 5.3, whose proof appears in Section 5.1. But we first recall some standardterminology (see also [GV12]). Let ( V, dist) be a finite metric space. (which means that distancesare non-negative, symmetric, satisfy the triangle inequality, and are zero between, and only between,every point and itself). It is called an ultrametric space if in addition ∀ u, v, w ∈ V, dist( u, w ) ≤ max { dist( u, v ) , dist( v, w ) } . (5.1)It is easy to see that (5.1) is equivalent to saying that the two largest distances in every “triangle” u, v, w are equal.A representing tree for an ultrametric ( V, dist ) is a rooted tree T = ( V T , E T ) in which the setof leaves L ⊆ V T is (a copy of) V , and every internal node (non-leaf) z ∈ V T \ L has a label label T ( z ) ∈ R + . Moreover, the labels along every root-to-leaf path are monotonically decreasing.For two leaves u, v ∈ L , let T ( u, v ) denote the label of their LCA in T . It is easy to see that33 ist( u, v ) = label T ( u, v ) is an ultrametric on L , and in particular satisfies (5.1). Without loss ofgenerality, we further assume throughout that that every internal node v ∈ V T \ L has at least twochildren. Theorem 5.3.
There is a randomized algorithm that, given oracle access to distances in an ultra-metric on a set of n points where the (cid:0) n (cid:1) distances have exactly n − distinct labels, constructs a rep-resenting tree of the ultrametric, and with high probability it runs in time O ( n log n · Q ( n ) + n log n ) using O ( n log n ) distance queries, where Q ( n ) is the time to answer a query.Proof of Theorem 5.1. Given a graph G = ( V, E ) , we use Proposition 3.14 (proved in Section 3) toperturb the edge-capacities, and thus we assume henceforth that G has a single cut-equivalent treewith n − distinct capacities on its edges. Let N = ( V, E (cid:48) ) be a complete graph, where the weight ofevery edge ( u, v ) is Max-Flow ( u, v ) . It is well-known that N with each edge weight inverted, denoted N (cid:48) , is an ultrametric (see [GH61] or Proposition in [GV12]). Since the cut-equivalent tree of G has n − distinct capacities on its edges, it must be that for the constructed ultrametric, the (cid:0) n (cid:1) distances have exactly n − labels, and so we can apply Theorem 5.3 to recover a representing tree T N (cid:48) of N (cid:48) in total time O ( t p ( m ) + n log n · t mf ( m ) + n log n ) with high probability of success.Finally, construct a path P that is a flow-equivalent tree for G , by the following recursive process,resembling a post-order traversal of the tree T N (cid:48) . Given a node r of T N (cid:48) (initially r is the root), let u, v be its two children, and let T u , T v be the subtrees rooted at u, v , respectively. By applying thisprocedure recursively on u , compute a path P u that is a flow-equivalent tree for the leaves of T u ,and similarly compute a path P v for T v . Now chose arbitrarily one endpoint of P u and one endpointof P v , and connect them by an edge whose capacity is the label of r in T N (cid:48) , and return the resultingpath P .The proof that this process computes a flow-equivalent tree of T N (cid:48) follows easily by induction.The main observation is that for every two leaves a ∈ T u , b ∈ T v , their LCA in T N (cid:48) is r and thus Max-Flow ( u, v ) is the smallest among all pairs of leaves under r , and it follows by induction thatthe new edge connecting P u and P v will have minimum weight among all the edges between a and b in P . The time to construct the path is linear in the size of T N (cid:48) , and this concludes the proof ofTheorem 5.1. Proof of Theorem 5.3.
Denote the input ultrametric by ( V, dist) . The algorithm works recursivelyas follows, starting with V (cid:48) = V . Given a subset V (cid:48) ⊆ V of size n (cid:48) ≥ of points in an ultrametric,pick a pivot point p ∈ V (cid:48) uniformly at random, query the distance from p to all other points in V (cid:48) ,and enumerate V (cid:48) as p = q , q , . . . , q n (cid:48) in order of non-decreasing distance from p . Repeat pickingpivots until finding a pivot p for which dist( q (cid:100) n (cid:48) / (cid:101) , p ) < dist( q (cid:100) n (cid:48) / (cid:101) +1 , p ) . (5.2)We assumed n (cid:48) ≥ , as in the base case n (cid:48) = 1 the algorithm returns a trivial tree on V (cid:48) . Next, find s ∈ [ (cid:100) n (cid:48) / (cid:101) , (cid:100) n (cid:48) / (cid:101) ] such that dist( q s , p ) < dist( q s +1 , p ) , partition V (cid:48) into V (cid:48)≤ s = { q , . . . , q s } and V (cid:48) >s = { q s +1 , . . . , q n (cid:48) } (see Figure 6). Now recursively construct trees T (cid:48)≤ s and T (cid:48) >s representing theultrametrics induced on V (cid:48)≤ s and V (cid:48) >s . By Claim 5.4 below, each of the constructed trees T (cid:48)≤ s and T (cid:48) >s is binary, and its internal nodes have distinct labels.Finally, connect the tree T (cid:48)≤ s “into” T (cid:48) >s as follows. Scan in T (cid:48) >s the path from the leaf q s +1 tothe root, and create a new node u s +1 with label dist( q s +1 , p ) immediately after the last node with asmaller label on this path (by subdividing an existing edge, or adding a parent to the root to form34 𝑖𝑠𝑡 𝑝, 𝑞 𝑠 𝑞 = 𝑝 𝑞 𝑠 𝑻 ≤𝒔′ 𝑻 >𝒔′ > 𝑑𝑖𝑠𝑡 𝑝, 𝑞 𝑠+1 𝑑𝑖𝑠𝑡 𝑝, 𝑞 𝑠+1 𝑉′ ≤𝑠 𝑉′ >𝑠 𝑞 𝑠+1 𝑞 𝑡 < 𝑑𝑖𝑠𝑡 𝑝, 𝑞 𝑠+1 𝑉′ 𝑠+1,𝑡 𝑉′ >𝑡 𝑢 𝑠+1 Figure 6: An illustration of the algorithm. Bold lines represent edges in T (cid:48) >s , and dashed linesrepresent edges affected by connecting T (cid:48)≤ s into this tree.a new root). Then connect T (cid:48)≤ s under this new node u s +1 , and return the combined tree, denoted T (cid:48) V (cid:48) , as the output. Claim 5.4.
For every V (cid:48) ⊆ V , every representing tree T V (cid:48) of the ultrametric ( V (cid:48) , dist) is binary,and each of its internal nodes has a distinct distance label.Proof. We first claim that the number of distinct distances in the ultrametric induced on V (cid:48) isat least n (cid:48) − . Indeed, consider starting with the entire ultrametric ( V, dist) , which has exactly n − distances, and removing the points in V \ V (cid:48) one by one. Each removed point can decreasethe number of distinct distances by at most , because if removing point z eliminates two distinctdistances, say to points x and x , then the “triangle” z, x , x has three distinct distances, incontradiction with (5.1). Since ( V, dist) has exactly n − distances, the induced metric on V (cid:48) musthave at least n − − ( n − n (cid:48) ) = n (cid:48) − distances.Now denote by k the number of internal nodes in T V (cid:48) , and let us show that k = n (cid:48) − . In onedirection, k ≥ n (cid:48) − because by the above claim, the tree T V (cid:48) must have at least n (cid:48) − distinctlabels. For the other direction we count degrees. Every internal node in T V (cid:48) has at least twochildren, every internal node has degree at least , except for the root which has at least , hencethe sum of degrees in T V (cid:48) is at least n (cid:48) + 3 k − . At the same time, T V (cid:48) is a tree and has exactly n (cid:48) + k − edges, hence this sum of degrees is n (cid:48) + k − ≥ n (cid:48) + 3 k − , i.e., k ≤ n (cid:48) − . Weconclude that both inequalities above hold with equality, which implies that all k = n (cid:48) − internalnodes have distinct labels, and none of them can have three or more children.Continuing with the proof of Theorem 5.3, let us now prove that the tree T (cid:48) V (cid:48) constructed by35he algorithm represents all the distances correctly. It suffices to consider u ∈ T (cid:48)≤ s and v ∈ T (cid:48) >s , andshow that in the combined tree label T (cid:48) V (cid:48) ( u, v ) = dist( u, v ) . By the ordering of V (cid:48) , we have dist( u, p ) ≤ dist( q s , p ) < dist( q s +1 , p ) ≤ dist( v, p ) , and thus by (5.1), dist( u, v ) = dist( v, p ) . Since both u, p ∈ T (cid:48)≤ s , we have label T V (cid:48) ( v, p ) = label T V (cid:48) ( u, v ) , and thus itsuffices to show that label T V (cid:48) ( v, p ) = dist( v, p ) . We now have two case, as follows. Let t ≥ s + 1 be the largest such that dist( q t , p ) = dist( q s +1 , p ) ,and partition V (cid:48) >s into V (cid:48) [ s +1 ,t ] = { q s +1 , . . . , q t } and (possibly empty) V (cid:48) >t = { q t +1 , . . . , q n (cid:48) } . Supposefirst that v ∈ V (cid:48) [ s +1 ,t ] . In this case, by the way we connected the two trees, the LCA of p and v is thesame as of p and q s +1 (i.e., the new node u s +1 ), and thus label T (cid:48) V (cid:48) ( v, p ) = dist( q s +1 , p ) = dist( v, p ) ,as required. Suppose next that v ∈ V (cid:48) >t . In this case, we shall show label T (cid:48) V (cid:48) ( v, p ) = dist( v, q s +1 ) =dist( v, p ) . The first equality is because by the way we connected the two trees, the LCA of p and v is the same as of q s +1 and v . For the second equality, observe that dist( q s +1 , p ) < dist( q s +1 , v ) byinspecting at the LCA of each pair, and now use (5.1) on the “triangle” p, q s +1 , v to identify its twolargest distances as dist( v, q s +1 ) = dist( v, p ) . We conclude that indeed in all cases label T V (cid:48) ( v, p ) =dist( v, p ) .We proceed to show that with high probability, the algorithm makes only O ( n log n ) distancequeries. We first claim that for every V (cid:48) ⊆ V (and thus every instance throughout the recursion),every representing tree T V (cid:48) has a centroid-like node c ∗ , where the number of leaves under it in thetree T V (cid:48) is in the range [ (cid:100) n (cid:48) / (cid:101) , (cid:100) n (cid:48) / (cid:101) ] . To see this, start with the root of T V (cid:48) , and follow the childwith more leaves under it, until that number is no larger than (cid:100) n (cid:48) / (cid:101) . Because the tree is binary byClaim 5.4, this stops at a node c ∗ where the number of leaves under it is some s ∗ ∈ [ (cid:100) n (cid:48) / (cid:101) , (cid:100) n (cid:48) / (cid:101) ] ,as claimed. Now, a uniformly random pivot p has probability s ∗ /n (cid:48) ≥ / to be a descendant of c ∗ ,in which case (5.2) holds. Thus (5.2) occurs with probability at least / .Consider now an execution of the algorithm, and describe it using a recursion tree defined asfollows (note the difference from a representing tree of V (cid:48) ). In this tree, a vertex (we use this term todistinguish from the nodes in the trees discussed above) corresponds to an instance of the recursionand has two children corresponding to the two new instances if a successful pivot is picked, and hasone child if an unsuccessful pivot is picked. Thus, this recursion tree has a vertex for every pivotthat is picked. The total number of distance queries performed at each depth i in the recursion treeis bounded by n , because instances at the same depth i have pairwise-disjoint node sets, and everyinstance performs exactly one query for every non-pivot node (for its distance to the pivot in thesame instance). It thus suffice to show that with high probability, the depth of the recursion treeis at most / n , and this would imply that the total number of queries is O ( n log n ) . To seeend, fix a node j ∈ V ; its root-to-leaf path in the recursion tree contains at most log / n successfulpivots, as these already reduce the instance size to at most . Now imagine these random pivots aninfinite sequence of coins with probability of success (heads) at least / , even when conditionedon the outcomes of earlier coins. With probability at least − /n , the prefix of
16 log / n firstrandom coins already contains at least log / n heads. If this high-probability event occurs, thereare enough successful pivots (heads) to guarantee that the recursion terminates before that coinsprefix is exhausted, which means that node j goes through at most
16 log / n pivots. By unionbound over all n nodes, we conclude that with high probability the depth of the recursion tree isat most
16 log / n , in which case the total number of distance queries is O ( n log n ) . Finally, webound the sorting of the distances the algorithm does for each instance from the pivot in order tocheck if (5.2) holds. This takes c · n (cid:48) log n (cid:48) for some constanct c by a standard sorting algorithm,36nd by using the recursion tree as before, the sorting for all instances at a single depth j takestime (cid:80) V (cid:48) i ∈ depthj c · n i log n i ≤ O ( n log n ) , where | V (cid:48) i | = n i , and the inequality is by the convexity of n i log n i . Then, multiply by the height of the recursion tree O (log n ) to get the term O ( n log n ) .Note that connecting the trees that came back from the recursion takes O (log n (cid:48) ) time, which ismuch smaller than the sorting and thus is bounded as well. Altogether, we get a total running timeof O ( n log nQ ( n ) + n log n ) , as required. This concludes Theorem 5.3. References [ACZ98] S. R. Arikati, S. Chaudhuri, and C. D. Zaroliagis. All-pairs min-cut in sparse networks.
J.Algorithms , 29(1):82–110, 1998.[AGI +
19] A. Abboud, L. Georgiadis, G. F. Italiano, R. Krauthgamer, N. Parotsidis, O. Trabelsi, P. Uz-nanski, and D. Wolleb-Graf. Faster Algorithms for All-Pairs Bounded Min-Cuts. In , volume 132,pages 7:1–7:15, 2019. doi:10.4230/LIPIcs.ICALP.2019.7 .[AKT20] A. Abboud, R. Krauthgamer, and O. Trabelsi. New algorithms and lower bounds for all-pairs max-flow in undirected graphs. In
Proceedings of the Thirty-First Annual ACM-SIAMSymposium on Discrete Algorithms , SODA ’20, page 48–61, USA, 2020. doi:10.1137/1.9781611975994.4 .[AV18] N. Anari and V. V. Vazirani. Planar graph perfect matching is in NC. In , FOCS ’18, pages 650–661. IEEE ComputerSociety, 2018. doi:10.1109/FOCS.2018.00068 .[AVY15] A. Abboud, V. Vassilevska Williams, and H. Yu. Matching triangles and basing hardness on anextremely popular conjecture. In
Proc. of 47th STOC , pages 41–50, 2015.[BCH +
08] A. Bhalgat, R. Cole, R. Hariharan, T. Kavitha, and D. Panigrahi. Efficient algorithms forSteiner edge connectivity computationand Gomory-Hu tree construction for unweighted graphs.Unpublished full version of [BHKP07], 2008. Available from: http://hariharan-ramesh.com/papers/gohu.pdf .[BENW16] G. Borradaile, D. Eppstein, A. Nayyeri, and C. Wulff-Nilsen. All-pairs minimum cuts in near-linear time for surface-embedded graphs. In , volume 51 of
SoCG ’16 , pages 22:1–22:16. Schloss Dagstuhl–Leibniz-Zentrum fuerInformatik, 2016. doi:10.4230/LIPIcs.SoCG.2016.22 .[BHKP07] A. Bhalgat, R. Hariharan, T. Kavitha, and D. Panigrahi. An O ( mn ) Gomory-Hu tree construc-tion algorithm for unweighted graphs. In ,STOC’07, pages 605–614. ACM, 2007. doi:10.1145/1250790.1250879 .[BK15a] A. A. Benczúr and D. R. Karger. Randomized approximation schemes for cuts and flows incapacitated graphs.
SIAM J. Comput. , 44(2):290–319, 2015. doi:10.1137/070705970 .[BK15b] K. Bringmann and M. Kunnemann. Quadratic Conditional Lower Bounds for String Problemsand Dynamic Time Warping. In
Proc. of 56th FOCS , pages 79–97, 2015.[BSW15] G. Borradaile, P. Sankowski, and C. Wulff-Nilsen. Min st -cut oracle for planar graphs withnear-linear preprocessing time. ACM Trans. Algorithms , 11(3), 2015. doi:10.1145/2684068 .[CH03] R. Cole and R. Hariharan. A fast algorithm for computing steiner edge connectivity. In
Pro-ceedings of the Thirty-fifth Annual ACM Symposium on Theory of Computing , STOC ’03, pages167–176. ACM, 2003. doi:10.1145/780542.780568 .[CLL13] H. Y. Cheung, L. C. Lau, and K. M. Leung. Graph connectivities, network coding, and expandergraphs.
SIAM Journal on Computing , 42(3):733–751, 2013. doi:10.1137/110844970 . Edm70] J. Edmonds. Submodular functions, matroids, and certain polyhedra.
Combinatorial structuresand their applications , pages 69–87, 1970.[Gab95] H. N. Gabow. A matroid approach to finding edge connectivity and packing arborescences.
J.Comput. Syst. Sci. , 50(2):259–273, 1995.[GGI +
17] L. Georgiadis, D. Graf, G. F. Italiano, N. Parotsidis, and P. Uznanski. All-Pairs 2-Reachability in O ( n ω log n ) Time. In , volume 80 of
Leibniz International Proceedings in Informatics (LIPIcs) , pages74:1–74:14. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik, 2017. doi:10.4230/LIPIcs.ICALP.2017.74 .[GH61] R. E. Gomory and T. C. Hu. Multi-terminal network flows.
Journal of the Society for Industrialand Applied Mathematics , 9:551–570, 1961. Available from: .[GT01] A. V. Goldberg and K. Tsioutsiouliklis. Cut tree algorithms: an experimental study.
Journal ofAlgorithms , 38(1):51–83, 2001.[Gus90] D. Gusfield. Very simple methods for all pairs network flow analysis.
SIAM Journal on Com-puting , 19(1):143–155, 1990.[GV12] V. Gurvich and M. N. Vyalyi. Characterizing (quasi-)ultrametric finite spaces in terms of (di-rected) graphs.
Discret. Appl. Math. , 160(12):1742–1756, 2012. doi:10.1016/j.dam.2012.03.034 .[HK95] M. R. Henzinger and V. King. Randomized dynamic graph algorithms with polylogarithmictime per operation. In
Proceedings of the Twenty-Seventh Annual ACM Symposium on Theoryof Computing , page 519–527, 1995. doi:10.1145/225058.225269 .[HKNR98] T. Hagerup, J. Katajainen, N. Nishimura, and P. Ragde. Characterizing multiterminal flownetworks and computing flows in networks of small treewidth.
J. Comput. Syst. Sci. , 57:366–375, 1998. doi:10.1006/jcss.1998.1592 .[HKP07] R. Hariharan, T. Kavitha, and D. Panigrahi. Efficient algorithms for computing all low s − t edgeconnectivities and related problems. In Proceedings of the 18th Annual ACM-SIAM Symposiumon Discrete Algorithms , pages 127–136. SIAM, 2007. Available from: http://dl.acm.org/citation.cfm?id=1283383.1283398 .[HL07] R. Hassin and A. Levin. Flow trees for vertex-capacitated networks.
Discrete Appl. Math. ,155(4):572–578, 2007. doi:10.1016/j.dam.2006.08.012 .[Jel63] F. Jelinek. On the maximum number of different entries in the terminal capacity matrix oforiented communication nets.
IEEE Transactions on Circuit Theory , 10(2):307–308, 1963. doi:10.1109/TCT.1963.1082149 .[KL15] D. R. Karger and M. S. Levine. Fast augmenting paths by random sampling from residualgraphs.
SIAM J. Comput. , 44(2):320–339, 2015. doi:10.1137/070705994 .[KLOS14] J. A. Kelner, Y. T. Lee, L. Orecchia, and A. Sidford. An almost-linear-time algorithm for approx-imate max flow in undirected graphs, and its multicommodity generalizations. In
Proceedings ofthe Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2014 , pages217–226, 2014. doi:10.1137/1.9781611973402.16 .[KT18] R. Krauthgamer and O. Trabelsi. Conditional lower bounds for all-pairs max-flow.
ACM Trans.Algorithms , 14(4):42:1–42:15, 2018. doi:10.1145/3212510 .[LNSW12] J. Lacki, Y. Nussbaum, P. Sankowski, and C. Wulff-Nilsen. Single source - all sinks Max Flowsin planar digraphs. In
Proc. of the 53rd FOCS , pages 599–608, 2012. LS14] Y. T. Lee and A. Sidford. Path finding methods for linear programming: Solving linear programsin ˜ o ( √ rank ) iterations and faster algorithms for Maximum Flow. In , FOCS ’14, pages 424–433. IEEE Computer Society, 2014. doi:10.1109/FOCS.2014.52 .[LS19] Y. P. Liu and A. Sidford. Faster energy maximization for faster maximum flow. CoRR , 2019.Available from: http://arxiv.org/abs/1910.14276 .[Mąd16] A. Mądry. Computing maximum flow with augmenting electrical flows. In
Proceedings of the57th IEEE Annual Symposium on Foundations of Computer Science , FOCS ’16, pages 593–602.IEEE Computer Society, 2016. doi:10.1109/FOCS.2016.70 .[May62] W. Mayeda. On oriented communication nets.
IRE Transactions on Circuit Theory , 9(3):261–267, 1962. doi:10.1109/TCT.1962.1086912 .[MVV87] K. Mulmuley, U. V. Vazirani, and V. V. Vazirani. Matching is as easy as matrix inversion.
Combinatorica , 7(1):105–113, 1987. doi:10.1007/BF02579206 .[Pan16] D. Panigrahi. Gomory-Hu trees. In M.-Y. Kao, editor,
Encyclopedia of Algorithms , pages 858–861. Springer New York, 2016. doi:10.1007/978-1-4939-2864-4_168 .[PS85] F. P. Preparata and M. I. Shamos.
Computational Geometry: An Introduction . Springer-Verlag,1985.[Räc02] H. Räcke. Minimizing congestion in general networks. In
Proceedings of the 43rd Symposiumon Foundations of Computer Science , FOCS ’02, page 43–52. IEEE Computer Society, 2002. doi:10.1109/SFCS.2002.1181881 .[RST14] H. Räcke, C. Shah, and H. Täubig. Computing cut-based hierarchical decompositions in almostlinear time. In
Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on DiscreteAlgorithms , SODA ’14, page 227–238. SIAM, 2014. doi:10.1137/1.9781611973402.17 ..