Minimum Cuts in Directed Graphs via Max-Flows
Abstract
We give an algorithm to find a mincut in an -vertex, -edge weighted directed graph using calls to any maxflow subroutine. Using state of the art maxflow algorithms, this yields a directed mincut algorithm that runs in time. This improves on the 30 year old bound of obtained by Hao and Orlin for this problem.
1 Introduction
The minimum cut (or mincut) problem is one of the most widely studied problems in graph algorithms. In directed graphs (or digraphs), the goal of this problem is to find a minimum weight set of edges whose removal creates multiple strongly connected components in the graph. Equivalently, a minimum cut of a digraph is a bipartition of the vertices into two non-empty sets such that the weight of edges from to is minimized. This problem can be solved by using maxflow calls by finding the minimum among all the mincuts and mincuts for all vertices . In a beautiful result, Hao and Orlin [HO94] showed that these maxflow calls can be amortized to match the running time of only polylog() calls to the push-relabel maxflow algorithm [GT88]. This leads to an overall running time of on an -edge, -vertex graph. Since their work, better maxflow algorithms have been designed (e.g., Goldberg and Rao [GR98]), but the amortization does not work for these algorithms. Using a different technique of duality between rooted mincuts and arborescences, Gabow [Gab95] obtained a running time of for this problem, where is the weight of a mincut (assuming integer weights). This is at least as good as the Hao-Orlin running time for unweighted simple graphs, but can be much worse for weighted graphs. Indeed, the Hao-Orlin bound of remains the state of the art for the directed mincut problem on arbitrary weighted graphs.
In this paper, we give an algorithm for the directed mincut problem that has a time complexity of maxflow calls. Importantly, and unlike the Hao-Orlin algorithm, our algorithm can use any maxflow algorithm; in fact, it treats the maxflow algorithm as a black box. Using state of the art max flow algorithms that run in time [vdBLL+21], this yields a directed mincut algorithm in time, thereby improving on the Hao-Orlin bound. Moreover, if one were to believe the widely held conjecture that maxflow would eventually be solved in time, then the running time of our algorithm would automatically become .
Theorem 1.
There is a randomized Monte Carlo algorithm that finds a minimum cut whp in time on an -vertex, -edge directed graph.
Our Techniques.
At a high level, our paper is inspired by Karger’s celebrated near-linear time mincut algorithm in undirected graphs [Kar00]. Karger’s algorithm has three main steps: (a) sparsify the graph by random sampling of edges to reduce the mincut value to , (b) use a semi-duality between mincuts and spanning trees to pack edge-disjoint spanning trees in the sparsifier, and (c) find the minimum weight cut among those that have only one or two edges in each such spanning tree using a dynamic program. But, directed graphs are substantially different from undirected graphs. In particular, steps (a) and (c) are not valid in a directed graph. We cannot hope to sparsify a directed graph since many directed graphs do not have sparsifiers even in an existential sense. Moreover, even if a mincut had just a single edge in a spanning tree, Karger’s dynamic program to recover this cut cannot be used in a directed graph.
To overcome these challenges, we adopt several ingredients that we outline below:
-
•
We consider two possibilities: either the mincut has vertices on the smaller side or fewer (let us call these balanced and unbalanced cuts respectively). If the mincut is a balanced cut, we use two random samples of and vertices each, and find mincuts for all pairs of vertices from the two samples. It is easy to see that whp, the two samples would respectively hit the smaller and larger sides of the mincut, and hence, one of these mincuts will reveal the overall mincut of the graph.
-
•
The main task, then, is to find the mincut when it is unbalanced. In this case, we use a sequence of steps. The first step is to use cut sparsification of the graph by random sampling of edges. This scales down the size of the mincut, but unlike in an undirected graph, all the cuts of a digraph do not necessarily converge to their expected values in the sample. However, crucially, the mincut can be scaled to while ensuring that all the unbalanced cuts converge to their expected values.
-
•
Since only the unbalanced cuts converge to their expected values, it is possible that some balanced cut is the new mincut of the sampled graph, having been scaled down disproportionately by the random sampling. Our next step is to overlay this sampled graph with an expander graph, a technique inspired by recent work of Li [Li21]. Note that an expander has a larger weight for balanced cuts than for unbalanced cuts. We choose the expansion of the graph carefully so that the balanced cuts get sufficiently large weight of edges that they are no longer candidates for the mincut of the sample, while the unbalanced cuts are only distorted by a small multiplicative factor.
-
•
At this point, we have obtained a graph where the original mincut (which was unbalanced) is a near-mincut of the new graph. Next, we create a (fractional) packing of edge-disjoint arborescences111An arborescence is a spanning tree in a directed graph where all the edges are directed away from the root. in this graph using a multiplicative weights update procedure (e.g., [You95]). By duality, these arborescenes have the following property: if we sample random arborescences from this packing, then there will be at least one arborescence whp such that the original mincut -respects the arborescence. (A cut -respects an arborescence if the latter contains just one edge from the cut.)
-
•
Thus, our task reduces to the following: given an arborescence, find the minimum weight cut in the original graph among all those that -respect the arborescence. Our final technical contribution is to give an algorithm that solves this problem using maxflow computations. For this purpose, we use a centroid-based recursive decomposition of the arborescence, where in each step, we use a set of maxflow calls that can be amortized on the original graph. The minimum cut returned by all these maxflow calls is eventually returned as the mincut of the graph.
We note that unlike both the Hao-Orlin algorithm and Gabow’s algorithm that are both deterministic algorithms, our algorithm is randomized (Monte Carlo) and might yield the wrong answer with a small (inverse polynomial) probability. Derandomizing our algorithm, or matching our running time bound using a different deterministic algorithm, remains an interesting open problem.
Previous Work.
The mincut problem has been studied in directed graphs over several decades. For unweighted graphs, Even and Tarjan [ET75] gave an algorithm for this problem that runs in time. This was improved by Schnorr [Sch79] improved by this bound for certain graphs to , where is the value of the directed mincut. This was further improved by Mansour and Schieber [MS89] to after almost a decade of Schnorr’s work. Mansour and Schieber’s bound of was matched up to logarithmic factors for the more general case of weighted digraphs by Hao and Orlin [HO94]. Finally, Gabow [Gab95] gave an algorithm that runs in which further refines this bound for graphs with small . These remained the fastest directed mincut algorithms for almost 30 years before our work.
Concurrent Work.
Two recent results on algorithms for finding mincuts in directed graphs were obtained concurrently and independently of our work. First, Chekuri and Quanrud [CQ21] showed an exact algorithm with running time if edge weights are integers between and .222We note that we can use the degree reduction technique in [CQ21] to speed up our algorithm from time to , but we omit details of this improvement in this manuscript to avoid interdependence on concurrent, unpublished research. Second, Quanrud [Qua21] has obtained an -approximate algorithm that runs in time.333Quanrud can also obtain -time algorithms using the currently fastest maxflow algorithm on sparse graphs by Gao, Liu, and Peng [GLP21]. We can also obtain the same time but for exact mincuts. Both papers also extend their ideas to obtain approximation results for other problems as well, such as the vertex mincut problem.
2 The Directed Min-Cut Algorithm
Given a directed graph with non-negative edge weights , we consider the problem of finding a (global) minimum directed cut in this graph. For simplicity, we assume that all edge weights are integers and are polynomially bounded. We denote . Let be the set of edges in the cut , and let be the weight of the cut, i.e., . Our goal is to find . Let denote the time complexity of - maximum flow on a digraph with vertices and edges. The current record for this bound is [vdBLL+21]. We emphasize that our directed mincut algorithm uses maxflow subroutines in a black box manner and therefore, any maxflow algorithm suffices. Correspondingly, we express our running times in terms of .
Next we describe the algorithm. Let be the source side of a minimum cut. The algorithm considers the following two cases, computes a cut for each case and takes the smaller of the two cuts as its final output.
-
1.
The first case aims to compute the correct mincut in the event that . In this case, we randomly sample two vertices , then with reasonable probability, they will lie on opposite sides of the mincut. In that case, we can simply compute the maxflow from to . Repeating the sampling times, we obtain the mincut whp. The total running time for this case is and is formalized in Lemma 2 below:
Lemma 2.
If , then whp a mincut can be calculated in time .
Proof.
Uniformly sample a list of vertices , where is a large constant. Wlog, assume , and let . With probability at least , the list contains at least one vertex from each of and . Hence, there exists such that and are on different sides of the cut. By calculating maxflows for all (, ) and (, ) pairs, and reporting the smallest mincut in these calls, we return a global mincut whp. ∎
-
2.
The second case takes care of the event that . In this case, we select an arbitrary vertex , and give an algorithm for finding an -mincut defined as:
Definition 3.
An -mincut is a minimum weight cut among all those that have on the source side of the cut, i.e., .
Repeating this process with all edge directions reversed, and returning the smaller of the -mincuts in the original and the reversed graphs, yields the overall mincut.
We now describe the -mincut algorithm, where we overload notation to denote the value of the -mincut by . Here, we first guess potential values of , which is our estimate of , as the powers of , one of which lies in the range , and then for each , sparsifies the graph using Lemma 7 from Section 3. For each such sparsifier , the algorithm then applies Lemma 8 from Section 4 to pack -arborescences in in time, one of which will -respect the -mincut in (for the correct value of ):
Definition 4.
An -arborescence is a directed spanning tree rooted at such that all edges are directed away from . A directed -cut -respects an -arborescence if there are at most cut edges in the arborescence.
Finally, for each of the -arborescences, the algorithm computes the minimum -cut that -respects each arborescence; this algorithm is described in Algorithm 1 and proved in Theorem 12 from Section 5. It runs in time for each of the arborescences.
Combining both cases, the total running time becomes , which establishes Theorem 1.
3 Sparsification
This section aims to reduce mincut value to while keeping a -approximate mincut for a constant that we will fix later. Our algorithm in this stage has two steps. First, we use random sampling to scale down the expected value of all cuts such that the expected value of the mincut becomes . We also claim that remains an approximate mincut among all unbalanced cuts by using standard concentration inequalities. However, since the number of balanced cuts far exceeds that of unbalanced cuts, it might be the case that some balanced cut has now become much smaller in weight than all the unbalanced cuts. This would violate the requirement that should be an approximate mincut in this new graph. This is where we need our second step, where we overlay an expander on the sampled graph to raise the values of all balanced cuts above the expected value of while only increasing the value of by a small factor. This last technique is inspired by recent work of Li [Li21] for a deterministic mincut algorithm in undirected graphs.
We start with the specific expansion properties that we need, and a pointer to an existing construction of such an expander.
Definition 5 (Expander).
A -expander is an undirected graph such that for any , .
Lemma 6 (Theorem 2.4 of [CGL+19]).
Given integer , we can construct in linear time an -expander for some constant , such that every vertex in has degree at most 9.
Now, we prove the main property of this section:
Lemma 7.
Given a digraph , a parameter , and a constant , we can construct in time a value and a digraph with edges such that the following holds whp for the value .
-
1.
There is a constant (depending on ) such that for any set with , we have
-
2.
For any set , .
Proof.
If , then as well, so we set to be itself, which satisfies all the properties for . For the rest of the proof, we assume that , so that , and we set . Throughout the proof, define , , , and , where is the constant from Lemma 6.
We first construct digraph by reweighting the edges of as follows. For each edge in , assign it a random new weight chosen according to binomial distribution . (If , then remove from .) For each set with , we have , and by Chernoff bound, the probability that falls outside is upper-bounded by . There are sets with , so by a union bound, whp all such sets satisfy .
Construct graph according to Lemma 6 and split each undirected edge into two directed edges. Let be the “union” of and , so that each edge in has weight , where we say if does not exist in the corresponding graph.
We now show that satisfies the two desired properties.
-
1.
For any set with , we have from before, so as well. For the upper bound, we have
-
2.
For any set with , we have as required by property (2). When , we have for all .
Finally, has edges because is a subset of and . ∎
4 Finding a 1-respecting Arborescence
In this section, we assume that there is an unbalanced mincut and show how to obtain an -arborescence that 1-respects the mincut. More formally, we prove the following:
Lemma 8.
Given weighted digraph and a fixed vertex such that is in the source side of a minimum cut and where is defined in Lemma 7, in time we can find -arborescences, such that whp a minimum cut 1-respects one of them.
The idea of this lemma is as follows. First, we apply Lemma 7 to our graph and obtain graph . Whp, a mincut in corresponds to a cut in of size and no cut in has size less than . That is, is a -approximate mincut in . It remains to find an arborescence in that 1-respects . To do this, we employ a multiplicative weight update (MWU) framework. The algorithm begins by setting all edge weights to be uniform (say, weight ). Then, we repeat for rounds. For each round, we find in near-linear time a minimum weight arborescence and multiplicatively increase the weight of every edge in the arborescence.
Using the fact that there is no duality gap between arborescence packing and mincut [Edm73, Gab95], a standard MWU analysis implies that these arborescences that we found, after some scaling, form a -approximately optimal fractional arborescence packing. So our arborescence crosses at most times on average. Thus, if we sample arborescences from our collections, whp, one of them will 1-respect .444This should be compared with Karger’s mincut algorithm in the undirected case, where there is a factor gap, and hence Karger can only guarantee a -respecting tree in the undirected case. Below, we formalize this high level description.
Definition 9 (Packing problem [You95]).
For convex set and nonnegative linear function , let be the solution in that minimizes the maximum value of over all , and define the width of the packing problem as .
The fractional arborescence packing problem conforms to this definition. Enumerate all the -arborescences as . We represent a fractional packing of arborescences as a vector in , where coordinate represents the fractional contribution of in the packing. Let be the convex hull of all single arborescences. For each edge with capacity , is the relative load of arborescence packing on edge . It is easy to see that for tree packing. The objective function is to minimize the maximum load: .
For any fractional arborescence packing with value where for all edges , we have . In particular, the maximum arborescence packing, once scaled down by its value, is exactly the vector in that minimizes the maximum load. Therefore, it suffices to look for the vector achieving the optimal value , and then scale the vector up by to obtain the maximum arborescence packing.
Next we describe the packing algorithm (Figure 2 of [You95]). Maintain a vector , initially set to . In each iteration, find , and then add to set and replace by the vector defined by . After a number of iterations, return , the average of all the vectors over the course of the algorithm. The lemma below upper bounds the number of iterations that suffice:
Lemma 10 (Corollary 6.3 of [You95]).
After iterations of the packing algorithm, .
We will also make use of the (exact) duality between -arborescence packing and minimum -cut:
Lemma 11 (Corollary 2.1 of [Gab95]).
The value of maximum -arborescence packing is equal to the value of minimum -cut.
Proof of Lemma 8.
First, construct according to Theorem 7. By the duality above, the minimum -cut on has value . Since , we have .
Run the aforementioned arborescence packing algorithm up to iterations, after which Lemma 10 guarantees that . Then is a vector in with value .
Consider sampling a random arborescence from the distribution specified by , so we choose arborescence with probability . Since , the expected number of edges in is at most for small enough . Since we always have , by Markov’s inequality for small enough . Therefore, if we uniformly sampling arborescences from the distribution , at least one of the arborescences is 1-respecting whp.
It remains to compute on each iteration. Since is linear in , the minimum must be achieved by a single arborescence. So the task reduces to computing the minimum cost spanning -arborescence, which can be done in [GGST86]. The total time complexity, over all iterations, becomes . ∎
5 Mincut Given 1-respecting Arborescence
We propose an algorithm (Algorithm 1) that uses maxflow subroutines to find the minimum -cut that -respects a given -arborescence. The result is formally stated in Theorem 12.
Theorem 12.
Consider a directed graph with vertices, edges, and polynomially bounded edge weights . Fix a global (directed) mincut of . Given an arborescence rooted at with , Algorithm 1 outputs a global minimum cut of in time .
We first give some intuition for Algorithm 1. Because , if we could find a vertex , then computing the - mincut using one maxflow call would yield a global mincut of . However, we cannot afford to run one maxflow between and every other vertex in . Instead, we carefully partition the vertices into sets . We show that for each , we can modify the graph appropriately so that it allows us to (roughly speaking) compute the maximum flow between and every vertex using one maxflow call.
More specifically, Algorithm 1 has two stages. In the first stage, we compute a centroid decomposition of . Recall that a centroid of is a vertex whose removal disconnects into subtrees with at most vertices. This process is done recursively, starting with the root of . We let denote the subtrees resulting from the removal of from . In each subsequent step , we compute the set of the centroids of the subtrees in . We then remove the centroids and add the resulting subtrees to . This process continues until no vertices remain.
In the second stage, for each layer , we construct a directed graph and perform one maxflow computation on . The maxflow computation on would yield candidate cuts for every vertex in , and after computing the appropriate maximum flow across every layer, we output the minimum candidate cut as the minimum cut of . The details are presented in Algorithm 1.

We first state two technical lemmas that we will use to prove Theorem 12.
Lemma 13.
Recall that is the set of subtrees in layer and contains the centroid of each subtree in . If for every , then is contained in exactly one subtree in , and consequently, at most one vertex can be in .
Lemma 14.
Proof of Theorem 12.
We first prove the correctness of Algorithm 1.
Because and , and the ’s form a disjoint partition of , there must be a layer such that for the first time, we have a centroid that belongs to . By Lemma 13, we know that must be contained in exactly one subtree , and hence must be the centroid of . In summary, we have and .
Consider the graph constructed for layer . By Lemma 14, based on the flow puts on the edge , we can recover the value of the minimum (directed) cut between and . Because (or equivalently ) and , the cut is one possible cut that separates and . Therefore, the flow that puts on the edge is equal to the global mincut value in .
In addition, the candidate cut value for any other centroid of a subtree must be at least the mincut value between and . This is because the additional restriction that the cut has to separate from can only make the mincut value larger, and the value of this cut in is equal to the value of the same cut in . Therefore, the minimum candidate cut value in all layers must be equal to the global mincut value of .
Now we analyze the running time of Algorithm 1. We can find the centroid of an -node tree in time (see e.g., [MTZC81]). The total number of layers because removing the centroids reduces the size of the subtrees by at least a factor of . Thus, the running time of Stage I of Algorithm 1 is . In Stage II, we can construct each in time and every has edges. Since there are layers and the maximum flow computations take a total of time, the overall runtime is . ∎
Lemma 15.
If and are vertices in , then every vertex on the (undirected) path from to in the arborescence also belongs to .
Proof.
Consider the lowest common ancestor of and . Because there is a directed path from to and a directed path from to , we must have . Otherwise, there are at least two edges in that go from to .
Because and , there is already an edge in (on the path from to ) that goes from to . Consequently, all other edges in cannot go from to , which means the entire path from to (and similarly to ) must be in . ∎
Recall that Lemma 13 states that if all the centroids in previous layers are in , then is contained in exactly one subtree in the current layer .
Proof of Lemma 13.
For contradiction, suppose that there exist distinct subtrees and in and vertices such that and .
By Lemma 15, any vertex on the (undirected) path from to also belongs to . Consider the first time that and are separated into different subtrees. This must have happened because some vertex on the path from to is removed. However, the set of vertices removed at this point of the algorithm is precisely , but our hypothesis assumes that none of them are in . This leads to a contradiction and therefore is contained in exactly one subtree of .
It follows immediately that at most one centroid can be in . ∎
Next we prove Lemma 14, which states that the maximum flow between and in the modified graph allows one to simultaneously compute a candidate mincut value for each vertex .
Proof of Lemma 14.
First observe that the maxflow computation from to in can be viewed as multiple independent maxflow computations. The reason is that, for any two subtrees , there are only edges that go from into and from to in (similarly for ), but there are no edges that go between and .
The above observation allows us to focus on one subtree . Consider the procedure that we produce from in Steps 1 to 1 of Algorithm 1. The edges with both ends in are intact (the edge set ). If we contract all vertices out of into , then all edges that enter would start from , which is precisely the effect of removing cross-subtree edges and adding the edges in . One final infinity-capacity edge connects the centroid of to the super sink .
Therefore, the maximum - flow computes the maximum flow between and simultaneously for all , whose value is reflected on the edge . It follows from the maxflow mincut theorem that the flow on edge is equal to the mincut value between and in (i.e., the minimum value among all with and ). ∎
References
- [CGL+19] Julia Chuzhoy, Yu Gao, Jason Li, Danupon Nanongkai, Richard Peng, and Thatchaphol Saranurak. A deterministic algorithm for balanced cut with applications to dynamic connectivity, flows, and beyond. CoRR, abs/1910.08025, 2019.
- [CQ21] Chandra Chekuri and Kent Quanrud. Faster algorithms for rooted connectivity in directed graphs, 2021.
- [Edm73] Jack Edmonds. Edge-disjoint branchings. Combinatorial algorithms, 1973.
- [ET75] Shimon Even and Robert Endre Tarjan. Network flow and testing graph connectivity. SIAM J. Comput., 4(4):507–518, 1975.
- [Gab95] H.N. Gabow. A matroid approach to finding edge connectivity and packing arborescences. Journal of Computer and System Sciences, 50(2):259–273, 1995.
- [GGST86] Harold Gabow, Zvi Galil, Thomas Spencer, and Robert Tarjan. Efficient algorithms for finding minimum spanning tree in undirected and directed graphs. Combinatorica, 6:109–122, 06 1986.
- [GLP21] Yu Gao, Yang P. Liu, and Richard Peng. Fully dynamic electrical flows: Sparse maxflow faster than goldberg-rao. CoRR, abs/2101.07233, 2021.
- [GR98] Andrew V. Goldberg and Satish Rao. Beyond the flow decomposition barrier. J. ACM, 45(5):783–797, 1998.
- [GT88] Andrew V. Goldberg and Robert Endre Tarjan. A new approach to the maximum-flow problem. J. ACM, 35(4):921–940, 1988.
- [HO94] Jianxiu Hao and James B. Orlin. A faster algorithm for finding the minimum cut in a directed graph. J. Algorithms, 17(3):424–446, 1994.
- [Kar00] David R Karger. Minimum cuts in near-linear time. Journal of the ACM (JACM), 47(1):46–76, 2000.
- [Li21] Jason Li. Deterministic mincut in almost-linear time. STOC, 2021.
- [MS89] Yishay Mansour and Baruch Schieber. Finding the edge connectivity of directed graphs. Journal of Algorithms, 10(1):76–85, 1989.
- [MTZC81] N. Megiddo, Arie Tamir, Eitan Zemel, and Ramaswamy Chandrasekaran. An algorithm for the k th longest path in a tree with applications to location problems. SIAM Journal on Computing, 10, 05 1981.
- [Qua21] Kent Quanrud. Fast approximations for rooted connectivity in weighted directed graphs, 2021.
- [Sch79] Claus-Peter Schnorr. Bottlenecks and edge connectivity in unsymmetrical networks. SIAM Journal on Computing, 8(2):265–274, 1979.
- [vdBLL+21] Jan van den Brand, Yin Tat Lee, Yang P. Liu, Thatchaphol Saranurak, Aaron Sidford, Zhao Song, and Di Wang. Minimum cost flows, mdps, and -regression in nearly linear time for dense instances. CoRR, abs/2101.05719, 2021.
- [You95] Neal E. Young. Randomized rounding without solving the linear program. In Proceedings of the Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’95, page 170–178, USA, 1995.