Deterministic Mincut in Almost-Linear Time
Abstract
We present a deterministic (global) mincut algorithm for weighted, undirected graphs that runs in time, answering an open question of Karger from the 1990s. To obtain our result, we de-randomize the construction of the skeleton graph in Karger’s near-linear time mincut algorithm, which is its only randomized component. In particular, we partially de-randomize the well-known Benczur-Karger graph sparsification technique by random sampling, which we accomplish by the method of pessimistic estimators. Our main technical component is designing an efficient pessimistic estimator to capture the cuts of a graph, which involves harnessing the expander decomposition framework introduced in recent work by Goranci et al. (SODA 2021). As a side-effect, we obtain a structural representation of all approximate mincuts in a graph, which may have future applications.
1 Introduction
The minimum cut of an undirected, weighted graph is a minimum weight subset of edges whose removal disconnects the graph. Finding the mincut of a graph is one of the central problems in combinatorial optimization, dating back to the work of Gomory and Hu [GH61] in 1961 who gave an algorithm to compute the mincut of an -vertex graph using max-flow computations. Since then, a large body of research has been devoted to obtaining faster algorithms for this problem. In 1992, Hao and Orlin [HO92] gave a clever amortization of the max-flow computations to match the running time of a single max-flow computation. Using the “push-relabel” max-flow algorithm of Goldberg and Tarjan [GT88], they obtained an overall running time of on an -vertex, -edge graph. Around the same time, Nagamochi and Ibaraki [NI92a] (see also [NI92b]) designed an algorithm that bypasses max-flow computations altogether, a technique that was further refined by Stoer and Wagner [SW97] (and independently by Frank in unpublished work). This alternative method yields a running time of . Before 2020, these works yielding a running time bound of were the fastest deterministic mincut algorithms for weighted graphs.
Starting with Karger’s contraction algorithm in 1993 [Kar93], a parallel body of work started to emerge in randomized algorithms for the mincut problem. This line of work (see also Karger and Stein [KS96]) eventually culminated in a breakthrough paper by Karger [Kar00] in 1996 that gave an time Monte Carlo algorithm for the mincut problem. Note that this algorithm comes to within poly-logarithmic factors of the optimal running time for this problem. In that paper, Karger asks whether we can also achieve near-linear running time using a deterministic algorithm. Even before Karger’s work, Gabow [Gab95] showed that the mincut can be computed in (deterministic) time, where is the value of the mincut (assuming integer weights). Note that this result obtains a near-linear running time if is a constant, but in general, the running time can be exponential. Indeed, for general graphs, Karger’s question remains open after more than 20 years. However, some exciting progress has been reported in recent years for special cases of this problem. In a recent breakthrough, Kawarabayashi and Thorup [KT18] gave the first near-linear time deterministic algorithm for this problem for simple graphs. They obtained a running time of , which was later improved by Henzinger, Rao, and Wang [HRW17] to , and then simplified by Saranurak [Sar21] at the cost of running time. From a technical perspective, Kawarabayashi and Thorup’s work introduced the idea of using low conductance cuts to find the mincut of the graph, a very powerful idea that we also exploit in this paper.
In 2020, the author, together with Debmalya Panigrahi [LP20], obtained the first improvement to deterministic mincut for weighted graphs since the 1990s, obtaining a running time of plus polylogarithmic calls to a deterministic exact – max-flow algorithm. Using the fastest deterministic algorithm for weighted graphs of Goldberg and Rao [GR98], their running time becomes .111In this paper, notation hides polylogarithmic factors in , the number of vertices of the graph. Their algorithm was inspired by the conductance-based ideas of Kawarabayashi and Thorup and introduced expander decompositions into the scene. While it is believed that a near-linear time algorithm exists for – max-flow—which, if deterministic, would imply a near-linear time algorithm for deterministic mincut—the best max-flow algorithms, even for unweighted graphs, is still [LS20]. For the deterministic, weighted case, no improvement since Goldberg-Rao [GR98] is known.
The main result of this paper is a new deterministic algorithm for mincut that does not rely on – max-flow computations and achieves a running time of , answering Karger’s open question.
Theorem 1.1.
There is a deterministic mincut algorithm for weighted, undirected graphs that runs in time.
1.1 Our Techniques
Our approach differs fundamentally from the one in [LP20] that relies on – max-flow computations. At a high level, we follow Karger’s approach and essentially de-randomize the single randomized procedure in Karger’s near-linear time mincut algorithm [Kar00], namely the construction of the skeleton graph, which Karger accomplishes through the Benczur-Karger graph sparsification technique by random sampling. We remark that our de-randomization does not recover a full -approximate graph sparsifier, but the skeleton graph that we obtain is sufficient to solve the mincut problem.
Let us first briefly review the Benczur-Karger graph sparsification technique, and discuss the difficulties one encounters when trying to de-randomize it. Given a weighted, undirected graph, the sparsification algorithm samples each edge independently with a probability depending on the weight of the edge and the global mincut of the graph, and then re-weights the sampled edge accordingly. In traditional graph sparsification, we require that every cut in the graph has its weight preserved up to a factor. There are exponentially many cuts in a graph, so a naive union bound over all cuts does not work. Benczur and Karger’s main insight is to set up a more refined union bound, layering the (exponentially many) cuts in a graph by their weight. They show that for all , there are only many cuts in a graph whose weight is roughly times the mincut, and each one is preserved up to a factor with probability , for some constants . In other words, they establish a union bound layered by the -approximate mincuts of a graph, for each .
One popular method to de-randomize random sampling algorithms is through pessimistic estimators, which is a generalization of the well-known method of conditional probabilities. For the graph sparsification problem, the method of pessimistic estimators can be implemented as follows. The algorithm considers each edge one by one in some arbitrary order, and decides on the spot whether to keep or discard each edge for the sparsifier. To make this decision, the algorithm maintains a pessimistic estimator, which is a real number in the range that represents an upper bound on the probability of failure should the remaining undecided edges each be sampled independently at random. In many cases, the pessimistic estimator is exactly the probability upper bound that one derives from analyzing the random sampling algorithm, except conditioned on the edges kept and discarded so far. The algorithm makes the choice—whether to keep or discard the current edge—based on whichever outcome does not increase the pessimistic estimator; such a choice must always exist for the pessimistic estimator to be valid. Once all edges are processed, the pessimistic estimator must still be a real number less than . But now, since there are no more undecided edges, the probability of failure is either or . Since the pessimistic estimator is an upper bound which is less than , the probability of failure must be ; in other words, the set of chosen edges is indeed a sparsifier of the graph.
In order for this de-randomization procedure to be efficient, the pessimistic estimator must be quickly evaluated and updated after considering each edge. Unfortunately, the probability union bound in the Benczur-Karger analysis involves all cuts in the graph, and is therefore an expression of exponential size and too expensive to serve as our pessimistic estimator. To design a more efficient pessimistic estimator, we need a more compact, easy-to-compute union bound over all cuts of the graph. We accomplish this by grouping all cuts of the graph into two types: small cuts and large cuts.
Small cuts.
Recall that our goal is to preserve cuts in the graph up to a factor. Let us first restrict ourselves to all -approximate mincuts of the graph for some . There can be many such cuts, so the naive union bound is still too slow. Here, our main strategy is to establish a structural representation of all -approximate mincuts of a graph, with the goal of deriving a more compact “union bound” over all -approximate cuts. This structure is built from an expander hierarchy of the graph, which is a hierarchical partitioning of the graph into disjoint expanders introduced by Goranci et al. [GRST20]. The connection between expanders and the mincut problem has been observed before [KT18, LP20]: in an expander with conductance , all -approximate mincuts must have at most vertices on one side, so a compact representation is simply all cuts with at most vertices on one side. Motivated by this connection, we show that if the original graph is itself an expander, then it is enough to preserve all vertex degrees and all edge weights up to an additive factor, where is the mincut of the graph and depends on . We present the unweighted expander case in Section 2 as a warm-up, which features all of our ideas except for the final expander decomposition step. To handle general graphs, we exploit the full machinery of the expander hierarchy [GRST20].
Large cuts.
For the large cuts—those that are not -approximate mincuts—our strategy differs from the pessimistic estimator approach. Here, our aim is not to preserve each of them up to a -factor, but a -factor for a different parameter . This relaxation prevents us from obtaining a full -approximate sparsification of the graph, but it still works for the mincut problem as long as the large cuts do not fall below the original mincut value. While a deterministic -approximate sparsification algorithm in near-linear time is unknown, one exists for -approximation sparsification for some [CGL+19]. In our case, we actually need the sparsifier to be uniformly weighted, so we construct our own sparsifier in Section 3.2.2, again via the expander hierarchy. Note that if the original graph is an expander, then we can take any expander whose degrees are roughly the same; in particular, the sparsifier does not need to be a subgraph of the original graph. To summarize, for the large cuts case, we simply construct an -approximate sparsifier deterministically, bypassing the need to de-randomize the Benczur-Karger random sampling technique.
Combining them together.
Of course, this -approximate sparsifier destroys the guarantee of the small cuts, which need to be preserved -approximately. Our strategy is to combine the small cut sparsifier and the large cut sparsifier together in the following way. We take the union of the small cut sparsifier with a “lightly” weighted version of the large cut sparsifier, where each edge in it is weighted by times its normal weight. This way, each small cut of weight suffers at most an additive weight from the “light” large cut sparsifier, so we do not destroy the small cuts guarantee (up to replacing with ). Moreover, each large cut of weight is weighted by at least , where is the mincut of the original graph. Hence, as long as , the large cuts have weight at least the mincut, and the property for large cuts is preserved.
Unbalanced vs. balanced.
We remark that our actual separation between small cuts and large cuts is somewhat different; we use unbalanced and balanced instead to emphasize this distinction. Nevertheless, we should intuitively think of unbalanced cuts as having small weight and balanced as having large weight; rather, the line is not drawn precisely at a weight threshold of . The actual separation is more technical, so we omit it in this overview section.
1.2 Preliminaries
In this paper, all graphs are undirected, and and denote the number of vertices and edges of the input graph in question. All graphs are either unweighted or weighted multigraphs with polynomially bounded edge weights, i.e., in the range . We emphasize that even weighted graphs are multigraphs, which we find more convenient to work with.
We begin with more standard notation. For an unweighted graph and vertices , let be the number of edges with endpoints and . For a weighted graph and edge , let be the weight of the edge, and for vertices , let be the sum of the weights of all (parallel) edges between and . For disjoint sets of vertices , define as the set of edges with one endpoint in and the other in , and define . For a set of edges, denote its cardinality by if is unweighted, and its total weight by if is weighted. Define the degree of vertex to be if is unweighted, and if is weighted. For a set , define . A cut of is the set of edges for some , and the mincut of is the cut in that minimizes or depending on if is unweighted or weighted. When the graph is ambiguous, we may add a subscript of in our notation, such as .
1.2.1 Karger’s Approach
In this section, we outline Karger’s approach to his near-linear time randomized mincut algorithm and set up the necessary theorems for our deterministic result. Karger’s algorithm has two main steps. First, it computes a small set of (unweighted) trees on vertex set such that the mincut -respects one of the trees , defined as follows:
Definition 1.2.
Given a weighted graph and an unweighted tree on the same set of vertices, a cut -respects the tree if .
Karger accomplishes this goal by first sparsifying the graph into an unweighted skeleton graph using the well-known Benzcur-Karger sparsification by random sampling, and then running a tree packing algorithm of Gabow [Gab95] on the skeleton graph.
Theorem 1.3 (Karger [Kar00]).
Let be a weighted graph, let and be parameters, and let be an unweighted graph on the same vertices, called the skeleton graph, with the following properties:
-
(a)
has edges,
-
(b)
The mincut of is , and
-
(c)
The mincut in corresponds (under the same vertex partition) to a -approximate mincut in .
Given graphs and , there is a deterministic algorithm in time that constructs trees on the same vertices such that one of them -respects the mincut in .
The second main step of Karger’s algorithm is to compute the mincut of given a tree that -respects the mincut. This step is deterministic and is based on dynamic programming.
Theorem 1.4 (Karger [Kar00]).
Given a weighted, undirected graph and a (not necessarily spanning) tree on the same vertices, there is a deterministic algorithm in time that computes the minimum-weight cut in that -respects the tree .
Our main technical contribution is a deterministic construction of the skeleton graph used in Theorem 1.3. Instead of designing an algorithm to produce the skeleton graph directly, it is more convenient to prove the following, which implies a skeleton graph by the following claim.
Theorem 1.5.
For any , we can compute, in deterministic time, an unweighted graph and some weight such that
-
1.
For any mincut of , we have , and
-
2.
For any cut of , we have .
Claim 1.6.
For , the graph in Theorem 1.5 fulfills the conditions of Theorem 1.3 with and .
Proof.
Since the algorithm of Theorem 1.5 takes time, the output graph must have edges, fulfilling condition (a) of Theorem 1.3. For any mincut of , by property (1) of Theorem 1.5, we have , fulfilling condition (b). For any cut , by property (2), we have . In other words, is a -approximate mincut, which is a -approximate mincut for , fulfilling condition (c). ∎
With the above three statements in hand, we now prove Theorem 1.1 following Karger’s approach. Run the algorithm of Theorem 1.5 to produce a graph which, by Claim 1.6, satisfies the conditions of Theorem 1.3. Apply Theorem 1.3 on and the skeleton graph , producing many trees such that one of them -respects the mincut in . Finally, run Theorem 1.4 on each tree separately and output the minimum -respecting cut found among all the trees, which must be the mincut in . Each step requires deterministic time, proving Theorem 1.1.
Thus, the main focus for the rest of the paper is proving Theorem 1.5.
1.2.2 Spectral Graph Theory
Central to our approach are the well-known concepts of conductance, expanders, and the graph Laplacian from spectral graph theory.
Definition 1.7 (Conductance, expander).
The conductance of a weighted graph is
For the conductance of an unweighted graph, replace by . We say that is a -expander if .
Definition 1.8 (Laplacian).
The Laplacian of a weighted graph is the matrix, indexed by , where
-
(a)
Each diagonal entry has entry , and
-
(b)
Each off-diagonal entry () has weight if and otherwise.
The only fact we will use about Laplacians is the following well-known fact, that cuts in graphs have the following nice form:
Fact 1.9.
For any weighted graph with Laplacian , and for any subset , we have
where is the vector with value at vertex if , and value otherwise. For unweighted graph , replace with .
2 Expander Case
In this section, we prove Theorem 1.5 restricted to the case when is an unweighted expander. Our aim is to present an informal, intuitive exposition that highlights our main ideas in a relatively simple setting. Since this section is not technically required for the main result, we do not attempt to formalize our arguments, deferring the rigorous proofs to the general case in Section 3.
Theorem 2.1.
Let be an unweighted -expander multigraph. For any , we can compute, in deterministic time, an unweighted graph and some weight such that
-
(a)
For any mincut of , we have , and
-
(b)
For any cut of , we have .
For the rest of this section, we prove Theorem 2.1.
Consider an arbitrary cut . By Fact 1.9, we have
(1) |
Suppose we can approximate each to an additive error of for some small (depending on ); that is, suppose that our graph and weight satisfy
for all . Then, by (1), we can approximate up to an additive , or a multiplicative , which is good if is small. Similarly, if is small, then we can replace with in (1) and approximate to the same factor. Motivated by this observation, we define a set to be unbalanced if for some to be set later. Similarly, define a cut to be unbalanced if the set is unbalanced. Note that an unbalanced set must have either or , since if we assume without loss of generality that , then
(2) |
where the first inequality uses that each degree cut has weight . Moreover, since is a -expander, the mincut is unbalanced because, assuming without loss of generality that , we obtain
To approximate all unbalanced cuts, it suffices by (1) and (2) to approximate each up to additive error . When , the expression is simply the negative of the number of parallel edges in . So, approximating up to additive error simply amounts to approximating the number of parallel edges. When , the expression is simply the degree of , so approximating it amounts to approximating the degree of .
Consider what happens if we randomly sample each edge with probability and weight the sampled edges by to form the sampled graph . For the terms (), we have . Let us assume for simplicity that , which turns out to be the worst case. By Chernoff bounds, for ,
(3) | ||||
which we can set to be much less than . We then have the implication
Similarly, for the terms , we have , and the same calculation can be made.
From this random sampling analysis, we can derive the following pessimistic estimator. Initially, it is the sum of the quantities (3) for all satisfying either or . This sum has terms which sum to less than , so it can be efficiently computed and satisfies the initial condition of a pessimistic estimator. After some edges have been considered, the probability upper bounds (3) are modified to be conditional to the choices of edges so far, which can still be efficiently computed. At the end, for each unbalanced set , the graph will satisfy
Since any mincut is unbalanced, we fulfill condition (a) of Theorem 2.1. We also fulfill condition (b) for any cut with a side that is unbalanced. This concludes the unbalanced case; we omit the rest of the details, deferring the pessimistic estimator and its efficient computation to the general case, specifically Section 3.2.1.
Define a cut to be balanced if it is not unbalanced. For the balanced cuts, it remains to fulfill condition (b), which may not hold for the graph . Our solution is to “overlay” a fixed expander onto the graph , weighted small enough to barely affect the mincut (in order to preserve condition (a)), but large enough to force all balanced cuts to have weight at least . In particular, let be an unweighted -expander on the same vertex set where each vertex has degree , and let . We should think of as a “lossy” sparsifier of , in that it approximates cuts up to factor , not .
Consider taking the “union” of the graph weighted by and the graph weighted by . More formally, consider a weighted graph where each edge is weighted by . We now show two properties: (1) the mincut gains relatively little weight from in the union , and (2) any balanced cut automatically has at least total weight from .
-
1.
For a mincut in with , the cut crosses
edges in , for a total cost of at most .
-
2.
For a balanced cut , it satisfies , so it crosses
many edges in , for a total cost of at least . Setting , the cost becomes at least .
Therefore, in the weighted graph , the mincut has weight at most , and any cut has weight at least . We can reset to be a constant factor smaller so that the factor becomes .
To finish the proof of Theorem 2.1, it remains to extract an unweighted graph and a weight from the weighted graph . Since and , we can make an integer multiple of , so that each edge in is an integer multiple of . We can therefore set and define the unweighted graph so that for all .
3 General Case
This section is dedicated to proving Theorem 1.5. For simplicity, we instead prove the following restricted version first, which has the additional assumption that the maximum edge weight in is bounded. At the end of this section, we show why this assumption can be removed to obtain the full Theorem 1.5.
Theorem 3.1.
There exists a function such that the following holds. Let be a graph with mincut and maximum edge weight at most . For any , we can compute, in deterministic time, an unweighted graph and some weight such that the two properties of Theorem 1.5 hold, i.e.,
-
1.
For any mincut of , we have , and
-
2.
For any cut of , we have .
3.1 Expander Decomposition Preliminaries
Our main tool in generalizing the expander case is expander decompositions, which was popularized by Spielman and Teng [ST04] and is quickly gaining traction in the area of fast graph algorithms. The general approach to utilizing expander decompositions is as follows. First, solve the case when the input graph is an expander, which we have done in Section 2 for the problem described in Theorem 1.5. Then, for a general graph, decompose it into a collection of expanders with few edges between the expanders, solve the problem each expander separately, and combine the solutions together, which often involves a recursive call on a graph that is a constant-factor smaller. For our purposes, we use a slightly stronger variant than the usual expander decomposition that ensures boundary-linkedness, which will be important in our analysis. The following definition is inspired by [GRST20]; note that our variant is weaker than the one in Definition 4.2 of [GRST20] in that we only guarantee their property (2). For completeness, we include a full proof in Appendix A that is similar to the one in [GRST20], and assuming a subroutine called WeightedBalCutPrune from [LS21].
Theorem 3.2 (Boundary-linked expander decomposition).
Let be a graph and let be a parameter. There is a deterministic algorithm in time that, for any parameters and , partitions such that
-
1.
Each vertex set satisfies
(4) Informally, we call the graph together with its boundary edges a -boundary-linked -expander.222For unweighted graphs, [GRST20] uses the notation to represent a graph where each (boundary) edge in is replaced with many self-loops at the endpoint in . With this definition, (4) is equivalent to saying that is a -expander. We will use this definition when proving Theorem 3.2 in Appendix A. In particular, for any satisfying
we simultaneously obtain
The right-most inequality is where the name “boundary-linked” comes from.
-
2.
The total weight of “inter-cluster” edges, , is at most .
Note that for our applications, it’s important that the boundary-linked parameter is much larger than . This is because in our recursive algorithm, the approximation factor will blow up by roughly per recursion level, while the instance size shrinks by roughly .
In order to capture recursion via expander decompositions, we now define a boundary-linked expander decomposition sequence on the graph in a similar way to [GRST20]. Compute a boundary-linked expander decomposition for and to be determined later, contract each expander,333Since we are working with weighted multigraphs, we do not collapse parallel edges obtained from contraction into single edges. and recursively decompose the contracted graph until the graph consists of a single vertex. Let be the original graph and be the recursive contracted graphs. Note that each graph has minimum degree at least , since any degree cut in any induces a cut in the original graph . Each time we contract, we will keep edge identities for the edges that survive, so that . Let be the vertices of .
For the rest of Section 3.1, fix an expander decomposition sequence of . For any subset , we now define an decomposition sequence of as follows. Let , and for each , construct as a subset of the vertices of , as follows. Take the expander decomposition of , which partitions the vertices of into, say, . Each of the gets contracted to a single vertex in . For each , we have a choice whether to add to or not. This completes the construction of . Define the “difference” if , and otherwise. The sets , , and define the decomposition sequence of .
We now prove some key properties of the boundary-linked expander decomposition sequence in the context of graph cuts, which we will use later on. First, regardless of the choice whether to add each to , we have the following lemma relating the sets to the original set .
Lemma 3.3.
For any decomposition sequence of ,
Proof.
Observe that
(5) |
In particular,
Iterating this over all ,
∎
We now define a specific decomposition sequence of , by setting up the rule whether or not to include each in . For each , if
then add to ; otherwise, do not add to . This ensures that
(6) |
Since is a -boundary-linked -expander, by our construction, we have, for all ,
(7) |
and
(8) |
For this specific construction of , called the canonical decomposition sequence of , we have the following lemma, which complements Lemma 3.3.
Lemma 3.4.
Let be any decomposition sequence of satisfying (8) for all . Then,
3.2 Unbalanced Case
In this section, we generalize the notion of unbalanced from Section 2 to the general case, and then prove a -approximate sparsifier of the unbalanced cuts.
Fix an expander decomposition sequence of for the Section 3.2. For a given set , let be the canonical decomposition sequence of , and define as before, so that they satisfy (7) and (8) for all . We generalize our definition of unbalanced from the expander case as follows, for some to be specified later.
Definition 3.5.
The set is -unbalanced if for each level , . A cut is -unbalanced if the set is -unbalanced.
Note that if is originally an expander, then in the first expander decomposition of the sequence, we can declare the entire graph as a single expander; in this case, the expander decomposition sequence stops immediately, and the definition of -unbalanced becomes equivalent to that from the expander case. We now claim that for an appropriate value of , any mincut is -unbalanced.
Claim 3.6.
For , any mincut of is -unbalanced.
Proof.
Consider the canonical decomposition sequence of , and define as usual. For each level and index ,
Summing over all and applying Lemma 3.4,
so is -unbalanced. ∎
Let us now introduce some notation exclusive to this section. For each vertex , let be its “pullback” on the original set , defined as all vertices in that get contracted into in graph in the expander sequence. For each set , let be the pullback of , defined as . We can then write
where the sign depends on whether or . Then,
(9) |
Claim 3.7.
For an -unbalanced set , there are at most nonzero terms in the summation (9).
Proof.
Each vertex has degree at least in , since it induces a cut (specifically, its pullback ) in the original graph . Therefore,
so there are at most many choices for and given a level . There are at most many choices for , giving at most many combinations of . The same holds for combinations of , hence the claim. ∎
The main goal of this section is to prove the following lemma.
Lemma 3.8.
There exists a constant such that given any weight , we can compute, in deterministic time,444outside of computing the boundary-linked expander decomposition sequence an unweighted graph such that for all levels and vertices satisfying and ,
(10) |
Before we prove Lemma 3.8, we show that it implies a sparsifier of -unbalanced cuts, which is the lemma we will eventually use to prove Theorem 3.1:
Lemma 3.9.
There exists a constant such that given any weight , we can compute, in deterministic time, an unweighted graph such that for each -unbalanced cut ,
Proof.
Let be the same constant as the one in Lemma 3.8. Applying (9) to as well, we have
so that
By Claim 3.7, there are at most nonzero terms in the summation above. In order to apply Lemma 3.8 to each such term, we need to show that and . Since is an -unbalanced cut, we have
and similarly for . Therefore, by Lemma 3.8,
as desired. ∎
The rest of Section 3.2 is dedicated to proving Lemma 3.8.
Expand out , where is the Laplacian of the graph consisting of the single edge of the same weight, so that if exactly one endpoint of is in and exactly one endpoint of is in , and otherwise. Let denote the edges with , and denote those with .
3.2.1 Random Sampling Procedure
Consider the Benzcur-Karger random sampling procedure, which we will de-randomize in this section. Let be a subgraph of with each edge sampled independently with probability , which is at most by the assumption of Theorem 3.1. Intuitively, the parameter is selected so that with probability close to , (10) holds over all .
We now introduce our concentration bounds for the random sampling procedure, namely the classical multiplicative Chernoff bound. We state a form that includes bounds on the moment-generating function obtained in the standard proof.
Lemma 3.10 (Multiplicative Chernoff bound).
Let be independent random variables that take values in , and let and . Fix a parameter , and define
(11) |
Then, we have the following upper and lower tail bounds:
(12) | ||||
(13) |
We now describe our de-randomization by pessimistic estimators. Let be the set of edges for which a value has already been set, so that is initially . For each , vertices , and sign such that , we first define a “local” pessimistic estimator , which is a function on the set of pairs over all . The algorithm computes a -approximation to the mincut with the -time -approximation algorithm of Matula [Mat93], and sets
(14) |
Following (11), we define
(15) |
and following the middle expressions (the moment-generating functions) in (12) and (13), we define
Observe that if we are setting the value of for a new edge , then by linearity of expectation, there is an assignment for which does not decrease:
Since the terms are independent, we have that for any and ,
By the independence above and the second inequalities in (12) and (13), the initial “local” pessimistic estimator satisfies
We would like the above expression to be less than . To upper bound , note first that every edge must, under the contraction from all the way to , map to an edge incident to in , which gives . Moreover, since by assumption, we have
(16) |
so that
Assume that
(17) |
which satisfies the bounds in Lemma 3.8, so that
Our actual, “global” pessimistic estimator is simply the sum of the “local” pessimistic estimators:
The initial pessimistic estimator satisfies
Again, if we are setting the value of for a new edge , then by linearity of expectation, there is an assignment for which does not decrease:
Therefore, if we always select such an assignment , then once we have iterated over all , we have
(18) |
This means that for each , and sign ,
In particular, each of the two terms is at most . Recalling from definition (14) that and , we have
and
Therefore,
fulfilling (10).
It remains to consider the running time. We first bound the number of such that either or ; the others are irrelevant since .
Claim 3.11.
For each pair of vertices , there are at most many selections of and such that and .
Proof.
For each level , there is exactly one vertex with , and for each level , there is exactly one vertex with . This makes many choices of total, and unique choices for given . ∎
Claim 3.12.
For each edge , there are at most many selections of and such that .
Proof.
If , then exactly one endpoint of is in and exactly one endpoint of is in . There are four possibilities as to which endpoint is in and which is in , and for each, Claim 3.11 gives at most choices. ∎
Claim 3.13.
There are at most many choices of such that either or .
Proof.
For each such choice, charge it to an arbitrary edge . Each edge is charged at most times by Claim 3.12, giving at most total charges. ∎
By Claim 3.12, each new edge is in at most many sets , and therefore affects at most many terms . The algorithm only needs to re-evaluate these terms with the new variable set to and with it set to , and take the one with the smaller new . This takes arithmetic operations.
How long do the arithmetic operations take? We compute each exponential in with bits of precision after the decimal point for some constant , which takes time. Each one introduces an additive error of , and there are exponential computations overall, for a total of error for a large enough . Factoring in this error, the inequality (18) instead becomes
so the rest of the bounds still hold.
This concludes the proof of Lemma 3.8.
3.2.2 Balanced Case
Similar to the expander case, we treat balanced cuts by “overlaying” a “lossy”, -approximate sparsifier of top of the graph obtained from Lemma 3.9. In the expander case, this sparsifier was just another expander, but for general graphs, we need to do more work. At a high level, we compute an expander decomposition sequence, and on each level, we replace each of the expanders with a fixed expander (like in the expander case). Due to the technical proof and lack of novel ideas, we defer the proof to Appendix B.
Theorem 3.14.
Let be an weighted multigraph with mincut whose edges have weight at most . For any parameters and , we can compute, in deterministic time, an unweighted multigraph such that is a -approximate cut sparsifier of , where and . (The graph does not need to be a subgraph of .) Moreover, the algorithm does not need to know the mincut value .
3.2.3 Combining Them Together
We now combine the unbalanced and balanced cases to prove Theorem 3.1, restated below.
See 3.1
Our high-level procedure is similar to the one from the expander case. For the -unbalanced cuts, we use Lemma 3.9. For the balanced cuts, we show that their size must be much larger than , so that even on a -approximate weighted sparsifier guaranteed by Theorem 3.14, their weight is still much larger than . We then “overlay” the -approximate weighted sparsifier with a “light” enough weight onto the sparsifier of -unbalanced cuts. The weight is light enough to barely affect the mincuts, but still large enough to force any balanced cut to increase by at least in weight.
Claim 3.15.
If a cut is balanced, then .
Proof.
Consider the level for which . For each , we have
so summing over all ,
By Lemma 3.4, it follows that
∎
Par. | Value |
---|---|
Mincut of | |
-approximation of | |
Given as input | |
from Theorem 3.2 | |
from Theorem 3.14 | |
from Theorem 3.14 | |
for large enough constant | |
where is the constant from Lemma 3.9 | |
We now set some of our parameters; see Figure 1 for a complete table of the parameters in our proof. For , let and , so that by Theorem 3.2, the total weight of inter-cluster edges, and therefore the total weight of the next graph in the expander decomposition sequence, shrinks by factor . Since edge weights are assumed to be polynomially bounded, this shrinking can only happen times, so .
Let be a -approximation to the mincut, computable in time [Mat93], Let for parameter that we set later, and let be the sparsifier of -unbalanced cuts from Lemma 3.9 for this value of (instead of ) and the following value of (taking the place of ):
Let be the unweighted graph from Theorem 3.14 applied to and , so that is a -approximate cut sparsifier for . Define , and let be the “union” of the graph weighted by and the graph weighted by . More formally, consider a weighted graph where each edge is weighted by .
For an -unbalanced cut , the addition of the graph weighted by increases its weight by
so that
In particular, any -unbalanced cut satisfies
(19) |
Next, we show that all balanced cuts have weight at least in the graph weighted by . This is where we finally set for large enough constant . For a balanced cut ,
Moreover, by Claim 3.6 for this value of , the mincut is -unbalanced, and therefore has weight at least in by (19).
Therefore, preserves the mincut up to factor and has mincut at least . It remains to make all edge weights the same on this sparsifier. Since and the only requirement for from Theorem 3.14 is that , we can increase or decrease by a constant factor until either or is an integer. Then, we can let and define the unweighted graph so that for all . Therefore, our final weight is
so we can set , as desired.
Finally, we bound the running time. The expander decomposition sequence (Theorem 3.2) takes time , the unbalanced case (Theorem 3.2) takes time , and the balanced case takes time . Altogether, the total is , which concludes the proof of Theorem 3.1.
3.3 Removing the Maximum Weight Assumption
Let be the function from Theorem 3.1. In this section, we show how to use Theorem 3.1, which assumes that the maximum edge weight in is at most , to prove Theorem 1.5, which makes no assumption on edge weights.
First, we show that we can assume without loss of generality that the maximum edge weight in is at most . To see why, the algorithm can first compute a -approximation to the mincut with the -time -approximation algorithm of Matula [Mat93], and for each edge in with weight more than , reduce its weight to . Let the resulting graph be . We now claim the following:
Claim 3.16.
Suppose an unweighted graph and some weight satisfy the two properties of Theorem 1.5 for . Then, they also satisfy the two properties of Theorem 1.5 for .
Proof.
The only cuts that change value between and are those with an edge of weight more than , which means their value must be greater than . In particular, since and have the same mincuts and the same mincut values, both properties of Theorem 1.5 also hold when the input graph is . ∎
For the rest of the proof, we work with instead of . Define , which satisfies . For each edge in , split it into parallel edges of weight at most each, whose sum of weights equals ; let the resulting graph be . Apply Theorem 3.1 on , which returns an unweighted graph and weight such that the two properties of Theorem 1.5 hold for . Clearly, the cuts are the same in and : we have for all . Therefore, the two properties also hold for , as desired.
We now bound the size of and the running time. Since , we have , so each edge splits into at most edges and the total number of edges is . Therefore, Theorem 3.1 takes time , concluding the proof of Theorem 1.5.
Acknowledgements
I am indebted to Sivakanth Gopi, Janardhan Kulkarni, Jakub Tarnawski, and Sam Wong for their supervision and encouragement on this project while I was a research intern at Microsoft Research, as well as providing valuable feedback on the manuscript. I also thank Thatchaphol Saranurak for introducing me to the boundary-linked expander decomposition framework [GRST20].
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. arXiv preprint arXiv:1910.08025, 2019.
- [Gab95] Harold N Gabow. A matroid approach to finding edge connectivity and packing arborescences. Journal of Computer and System Sciences, 50(2):259–273, 1995.
- [GH61] Ralph E Gomory and Tien Chung Hu. Multi-terminal network flows. Journal of the Society for Industrial and Applied Mathematics, 9(4):551–570, 1961.
- [GR98] Andrew V Goldberg and Satish Rao. Beyond the flow decomposition barrier. Journal of the ACM (JACM), 45(5):783–797, 1998.
- [GRST20] Gramoz Goranci, Harald Räcke, Thatchaphol Saranurak, and Zihan Tan. The expander hierarchy and its applications to dynamic graph algorithms. arXiv preprint arXiv:2005.02369, 2020.
- [GT88] Andrew V. Goldberg and Robert Endre Tarjan. A new approach to the maximum-flow problem. J. ACM, 35(4):921–940, 1988.
- [HO92] Jianxiu Hao and James B Orlin. A faster algorithm for finding the minimum cut in a graph. In Proceedings of the third annual ACM-SIAM symposium on Discrete algorithms, pages 165–174. Society for Industrial and Applied Mathematics, 1992.
- [HRW17] Monika Henzinger, Satish Rao, and Di Wang. Local flow partitioning for faster edge connectivity. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16-19, pages 1919–1938, 2017.
- [Kar93] David R Karger. Global min-cuts in rnc, and other ramifications of a simple min-cut algorithm. In SODA, volume 93, pages 21–30, 1993.
- [Kar00] David R. Karger. Minimum cuts in near-linear time. J. ACM, 47(1):46–76, 2000.
- [KS96] David R Karger and Clifford Stein. A new approach to the minimum cut problem. Journal of the ACM (JACM), 43(4):601–640, 1996.
- [KT18] Ken-ichi Kawarabayashi and Mikkel Thorup. Deterministic edge connectivity in near-linear time. Journal of the ACM (JACM), 66(1):1–50, 2018.
- [LP20] Jason Li and Debmalya Panigrahi. Deterministic min-cut in poly-logarithmic max-flows. In FOCS, 2020.
- [LS20] Yang P Liu and Aaron Sidford. Faster divergence maximization for faster maximum flow. arXiv preprint arXiv:2003.08929, 2020.
- [LS21] Jason Li and Thatchaphol Saranurak. Deterministic weighted expander decomposition in almost-linear time, 2021.
- [Mat93] David W Matula. A linear time 2+ approximation algorithm for edge connectivity. In Proceedings of the fourth annual ACM-SIAM Symposium on Discrete algorithms, pages 500–504, 1993.
- [NI92a] Hiroshi Nagamochi and Toshihide Ibaraki. Computing edge-connectivity in multigraphs and capacitated graphs. SIAM Journal on Discrete Mathematics, 5(1):54–66, 1992.
- [NI92b] Hiroshi Nagamochi and Toshihide Ibaraki. A linear-time algorithm for finding a sparse k-connected spanning subgraph of a k-connected graph. Algorithmica, 7(5&6):583–596, 1992.
- [Sar21] Thatchaphol Saranurak. A simple deterministic algorithm for edge connectivity. In Symposium on Simplicity in Algorithms (SOSA), pages 80–85. SIAM, 2021.
- [ST04] Daniel A. Spielman and Shang-Hua Teng. Nearly-linear time algorithms for graph partitioning, graph sparsification, and solving linear systems. In STOC, pages 81–90. ACM, 2004.
- [SW97] Mechthild Stoer and Frank Wagner. A simple min-cut algorithm. Journal of the ACM (JACM), 44(4):585–591, 1997.
- [SW19] Thatchaphol Saranurak and Di Wang. Expander decomposition and pruning: Faster, stronger, and simpler. In SODA, pages 2616–2635. SIAM, 2019.
Appendix A Boundary-Linked Expander Decomposition
In this section, we prove Theorem 3.2 assuming the subroutine WeightedBalCutPrune from [LS21]. Our proof is directly modeled off of the proof of Corollary 6.1 of [CGL+19] and the proof of Theorem 4.5 of [GRST20], so we claim no novelty in this section.
We will work with weighted multigraphs with self-loops, and we re-define the degree to mean plus the total weight of all self-loops at vertex . All other definitions that depend on , such as and , are also affected.
Given a weighted graph , a parameter , and a subset , define as the graph with the following self-loops attached: for each edge with endpoint , add a self-loop at of weight . The following observation is immediate by definition:
Observation A.1.
For any graph and subset , Property (1) of Theorem 3.2 holds for iff is a -expander.
We now define the WeightedBalCutPrune problem from [LS21]555 Their definition is more general and takes in a demand vector on the vertices; we are simply restricting ourselves to for all , which gives our definition. and their algorithm.
Definition A.2 (WeightedBalCutPrune problem, Definition 2.3 of [LS21]).
The input to the -approximate WeightedBalCutPrune problem is a graph , a conductance parameter , and an approximation factor . The goal is to compute a cut in , with , such that one of the following holds: either
-
1.
(Cut) ; or
-
2.
(Prune) , and .
Theorem A.3 (WeightedBalCutPrune algorithm, Theorem 2.4 of [LS21]).
There is a deterministic algorithm that, given a graph with edges and polynomially bounded edge weights, and parameters and , solves the -approximate WeightedBalCutPrune problem in time .
The (Prune) case requires the additional trimming step described in the lemma below. While [GRST20] prove it for unweighted graphs only, the algorithm translates directly to the weighted case;666In particular, the core subroutine, called Unit-Flow in [SW19], is based on the push-relabel max-flow algorithm, which works on both unweighted and weighted graphs. see, for example, Theorem 4.2 of [SW19].
Lemma A.4 (Trimming, Lemmas 4.9 and 4.10 of [GRST20]).
Given a weighted graph and subset such that is an -expander and , we can compute a “pruned” set in deterministic time with the following properties:
-
1.
,
-
2.
where , and
-
3.
is a -expander.
We now prove Theorem 3.2 assuming Theorem A.3. Our proof is copied almost ad verbatim from the proof of Corollary 6.1 of [CGL+19] on expander decompositions, with the necessary changes to prove the additional boundary-linked property.
We maintain a collection of vertex-disjoint graphs that we call clusters, which are subgraphs of with some additional self-loops. The set of clusters is partitioned into two subsets, set of active clusters, and set of inactive clusters. We ensure that each inactive cluster is a -expander. We also maintain a set of “deleted” edges, that are not contained in any cluster in . At the beginning of the algorithm, we let , , and . The algorithm proceeds as long as , and consists of iterations. Let be the approximation factor from Theorem A.3.
In every iteration, we apply the algorithm from Theorem A.3 to every graph , with the same parameters , , and . Let be the vertices of . Consider the cut in that the algorithm returns, with
(20) |
We add the edges of to set .
If , then we replace with and in and in . Note that the self-loops add a total volume of
(21) |
Otherwise, if , then we must be in the (Prune) case, which means that and graph has conductance at least . Since
we can call Lemma A.4 on to obtain a pruned set such that
and
for , and is a -expander. Add the edges of to , remove from and , add to and , and add to and . Observe that
When the algorithm terminates, , and so every graph in has conductance at least . Notice that in every iteration, the maximum volume of a graph in is at most a factor of what it was before. Since edge weights are polynomially bounded, the number of iterations is at most . On each iteration, the total volume of graphs in increases by at most factor factor due to the self-loops added in (21), so the total volume of all at the end is at most a constant factor of the initial volume .
The output of the algorithm is the partition of induced by the vertex sets of , so the inter-cluster edges is a subset of . It is easy to verify by (20) that the total weight of edges added to set in every iteration is at most times the total volume of graphs in at the beginning of that iteration, which is . Over all iterations, the total weight of is , fulfilling property (2) of a boundary-linked expander decomposition.
It remains to show that for each graph , its vertex set satisfies the boundary-linked -expander property (1) of Theorem 3.2. For each boundary edge , it was created at some iteration where we either added self-loops or self-loops, so is a subgraph of . Since is a -expander, so is , and property (1) for follows by Observation A.1.
It remains to analyze the running time of the algorithm. The running time of a single iteration is bounded by . Since the total number of iterations is bounded by , the total running time is the same, asymptotically.
Appendix B Lossy Unweighted Sparsifier
In this section, we prove Theorem 3.14, restated below.
See 3.14
We will work with weighted multigraphs with self-loops, and we re-define the degree to mean plus the total weight of all self-loops at vertex . All other definitions that depend on , such as and , are also affected.
The construction of the sparsifier is recursive. The original input is graph , and let the input graph on level of the recursion be , with as its vertex set. Let be an expander decomposition of , and let be the graph with each set contracted to a single vertex . If has more than one vertex, recursively compute a sparsifier on , which still has mincut at least , and let the sparsifier be . For each edge in , we select a vertex and and add edge to an initially empty graph on . We do this in a way that each vertex is incident to at most many edges. Since , this is always possible by an averaging argument. Next, for each cluster , we compute an -expander multigraph (possibly with self-loops) on the vertices such that for all ,
(22) |
This can be done by using the lemma below with . The running time is at most , which is since by assumption, all edges in have weight at most , and .
Lemma B.1.
Given a vertex set and real numbers , there exists a universal constant such that we can construct, in time, an -expander multigraph on (possibly with self-loops) such that for all ,
Proof.
We use the following theorem of [CGL+19]:
Theorem B.2.
There is a constant and a deterministic algorithm that, given an integer , in time constructs a graph with , such that is an -expander, and every vertex in has degree at most .
Let , and let be the constructed graph on vertex set . Partition arbitrarily into subsets such that for each . Let be the graph with each set contracted to a single vertex , keeping self-loops, so that . It is not hard to see that expansion does not decrease upon contraction, so is still an -expander. We can bound the degrees as
∎
The final sparsifier is . This concludes the construction of sparsifier . (We keep the self-loops, even though they serve no purpose for the sparsifier’s guarantees, because we find that including them simplifies the analysis.) Note that this recursive algorithm implicitly constructs an expander sequence of over its recursive calls.
Fix a subset , let be the canonical decomposition sequence of , and let be constructed as before, so that they satisfy (7) and (8) for all .
Claim B.3.
For all and all ,
Proof.
We prove the stronger statement
by induction from down to . For , since it is the last level, the entire graph is a single cluster. By construction, consists only of a single constant-expander that satisfies , which completes the base case of the induction.
For , by induction, we have . Fix a cluster that gets contracted to vertex in , and fix a vertex . For the graph , we have
(23) | ||||
For the graph , by construction (22), we have
Therefore,
and
We can assume that , so that , and the above is at most
which completes the induction. ∎
Claim B.4 (Analogue of (7) for ).
For all ,
Proof.
Note that is exactly by construction. We begin by bounding volumes in .
We now translate this volume bound to . By the construction of (22),
(24) |
Since is an -expander,
as desired. ∎
Claim B.5 (Analogue of (8) for ).
For all and ,
Proof.
Let be the vertex that the cluster contracts to in . Again, note that is exactly by construction.
The only edges of belong to , so
We upper bound the term in two ways:
Therefore,
We now bound as follows. By construction (22), for all ,
which means that
as long as we impose the condition
(25) |
Therefore,
and
Since is an -expander,
as desired. ∎
Lemma B.6.
For all ,
Proof.
For the lower bound, we have
For the upper bound,
∎
Lemma B.7.
is a -approximate sparsifier with .
Proof.
Since Claim B.5 is an analogue of (8) for graph with the parameter replaced by , we can apply Lemmas 3.3 and 3.4 to , obtaining
Combining this with Lemma B.6,
and
∎
Finally, we set the parameters . For , let and , so that by Theorem 3.2, the total weight of inter-cluster edges, and therefore the total weight of the next graph in the expander decomposition sequence, shrinks by factor . Since edge weights are assumed to be polynomially bounded, this shrinking can only happen times, so . Therefore, our approximation factor is
and the running time, which is dominated by the output size and the calls to Theorem 3.2 and Lemma A.4, is
Finally, the condition from (25) becomes , concluding the proof of Theorem 3.14.