All-Pairs Mincuts: Theory and Techniques
- All-Pairs Mincuts is defined as computing the minimum s-t cut for every vertex pair, often using compact representations like Gomory–Hu trees.
- Static algorithms include nearly quadratic randomized and almost-linear deterministic approaches to construct full cut structures in undirected graphs.
- Advanced methods extend to sensitivity oracles, bounded formulations in directed graphs, and exact sparsification in dynamic models, broadening the problem's applications.
The all-pairs mincuts problem asks for the minimum - cut, or at least its value, for every pair of vertices in a graph. In undirected graphs, the problem is classically identified with constructing a Gomory–Hu tree, which preserves all pairwise mincut values and corresponding cut partitions in a compact tree representation (Abboud et al., 27 Jul 2025). Modern work has separated the topic into several distinct regimes: static exact computation in undirected graphs, sensitivity under single-edge updates, bounded-threshold formulations in directed graphs, and restricted-access models such as cut queries, streaming, and fully dynamic maintenance (Li et al., 2021, Baswana et al., 2020, Akmal et al., 2023, Kenneth-Mordoch et al., 13 Nov 2025).
1. Formal definitions and problem variants
For an undirected weighted graph , the edge connectivity between two vertices is
where is the set of edges with exactly one endpoint in (Abboud et al., 27 Jul 2025). In the unweighted setting, the same quantity is the size of a minimum - edge cut; one notation used for this value is 0, with
1
where 2 denotes the set of edges with exactly one endpoint in 3 (Baswana et al., 2020).
The classical all-pairs mincuts problem asks to determine 4 or 5 for every unordered pair 6. In directed graphs, the same task is often phrased as all-pairs connectivity or all-pairs max-flow, since by Menger’s theorem the maximum number of edge-disjoint 7-to-8 paths equals the size of a minimum 9-cut in the unweighted case (Akmal et al., 2023). For vertex connectivity, one analogously studies the maximum number of internally vertex-disjoint 0-to-1 paths, denoted 2 in the directed bounded literature (Akmal et al., 2023).
A major distinction is between the unrestricted and bounded forms. In the 3-bounded formulation, the task is to compute 4 or 5 for all pairs, so values below 6 must be exact, जबकि pairs of connectivity at least 7 may simply be reported as “large” (Abboud et al., 2018, Akmal et al., 2023). Another orthogonal distinction is sensitivity: instead of answering only in the original graph, one preprocesses 8 so that for any pair 9 and any single-edge deletion or insertion, the updated 0-mincut can be reported efficiently (Baswana et al., 2020).
2. Gomory–Hu trees as the canonical undirected representation
In undirected graphs, a Gomory–Hu tree is the canonical compact representation of all-pairs mincuts. It is a weighted tree 1 on the same vertex set such that for every pair 2,
3
where 4 is the unique 5-to-6 path in 7 (Abboud et al., 27 Jul 2025). Deleting a minimum-weight edge on that path yields a partition whose preimage in 8 is an actual 9-minimum cut (Abboud et al., 27 Jul 2025).
This representation is already enough to solve the static all-pairs mincuts problem outright: once the tree is built, every pairwise mincut value is a path-minimum query, and a corresponding cut partition is obtained from the bottleneck tree edge (Li et al., 2021). In this sense, static all-pairs mincut values admit an 0-size representation, even though there are 1 terminal pairs (Baswana et al., 2020).
Several later algorithms work with partial forms of this representation. A partial Gomory–Hu tree maintains a partition of the vertex set together with a tree on supervertices, and the algorithm proceeds by refinement until the full tree is obtained (Li et al., 2021). A more general terminal-set formulation is the Gomory–Hu 2-Steiner tree, which preserves all mincuts among a specified terminal set 3 and is central to the recursive structure of recent weighted algorithms (Abboud et al., 27 Jul 2025).
3. Static exact algorithms in undirected graphs
The recent algorithmic picture for static undirected all-pairs mincuts is split between a nearly quadratic result for simple unweighted graphs and an almost-linear deterministic result for weighted graphs.
| Setting | Best result stated in the cited work |
|---|---|
| Simple, undirected, unweighted graphs | Randomized exact Gomory–Hu tree in 4 time with high probability (Li et al., 2021) |
| Undirected weighted graphs with polynomially bounded weights | Deterministic exact Gomory–Hu tree in 5 time (Abboud et al., 27 Jul 2025) |
For simple, undirected, unweighted graphs, an 6-time algorithm constructs a Gomory–Hu tree with high probability, improving on the 7 bound of Abboud et al. and described as nearly optimal as a function of 8 because both input reading and explicit output can already be quadratic (Li et al., 2021). The algorithm refines a partial tree in connectivity scales, uses 9-connectivity certificates, partitions high-degree vertices into 0 well-linked sets, and refines many terminals in bulk rather than by 1 sequential max-flow calls (Li et al., 2021).
For undirected weighted graphs, a later result gives the first deterministic 2-time algorithm for constructing a Gomory–Hu tree, assuming polynomially bounded weights (Abboud et al., 27 Jul 2025). Its two principal components are a deterministic reduction from all-pairs mincuts to the single-source mincuts problem with only subpolynomial overhead, and a deterministic almost-linear-time algorithm for single-source mincuts (Abboud et al., 27 Jul 2025). The reduction depends on a balanced decomposition around a pivot 3, extraction of many disjoint minimal 4-mincuts, and the laminarity of minimal 5-mincuts for fixed 6 (Abboud et al., 27 Jul 2025).
The two results illuminate different structural points. The simple-graph 7 algorithm uses simplicity in an essential way inside its well-linked partition lemma; extending that result to weighted graphs or even unweighted multigraphs is explicitly identified as open in that work (Li et al., 2021). By contrast, the deterministic 8 algorithm already handles weighted undirected graphs, but its hidden 9 factors arise from technically heavy dynamic shortest-path and expander-decomposition machinery (Abboud et al., 27 Jul 2025).
4. Sensitivity under single-edge updates
The sensitivity-oracle version of all-pairs mincuts is strictly stronger than the static problem. Here the input is an undirected unweighted graph 0, and after preprocessing the oracle must answer, for any terminals 1 and any single-edge deletion 2 or insertion 3, the updated mincut value in 4 or 5 (Baswana et al., 2020). The task is qualitatively different from either static all-pairs mincut or recomputing a fresh maxflow after each update, because it asks for every pair under every single-edge perturbation while remaining compact (Baswana et al., 2020).
A central observation is that a single unweighted edge update changes the 6-mincut value by at most one. Deletion can only leave the value unchanged or increase it by 7; insertion can only leave it unchanged or decrease it by 8 (Baswana et al., 2020). The decisive issue is therefore not the magnitude of change but the combinatorial predicate determining whether a change occurs. For deletion, the value increases iff every minimum 9-cut of the original graph uses the failed edge; for insertion, the value decreases iff there exists a minimum 0-cut of the original graph that separates the endpoints of the inserted edge (Baswana et al., 2020).
The first compact sensitivity oracle in this setting uses 1 space and answers the updated 2-mincut value in 3 time for any single-edge failure or insertion (Baswana et al., 2020). It can also output the set of vertices defining a resulting minimum cut in 4 time, which is stated to be worst-case optimal because one side of the cut may itself contain 5 vertices (Baswana et al., 2020). A second oracle uses only 6 space and answers in 7 time, where 8 is the original 9-mincut value; the paper compares this with deterministic recomputation bounds and states a speedup by a factor of 0 (Baswana et al., 2020).
The same work also gives a distributed interpretation of the quadratic-space oracle. If the goal is only to decide whether a single-edge update changes the 1-mincut value, the 2-space structure can be partitioned evenly among the 3 vertices, and for an updated edge 4 only the data stored at 5 and 6 is required to determine whether the value changes for any pair 7 (Baswana et al., 2020). The endpoint information can also output a compact encoding of all affected terminal pairs, although not every changed cut itself (Baswana et al., 2020).
5. Directed and bounded formulations
In directed graphs, the unrestricted all-pairs min-cut problem remains substantially less understood than the undirected case, and much of the progress has come through bounded-threshold formulations. The 8-bounded problem asks for exact values only when the minimum cut is below 9, or equivalently for the truncated quantity 0 for edge connectivity and 1 for vertex connectivity (Abboud et al., 2018, Akmal et al., 2023).
An earlier line of work on directed bounded min-cuts established three kinds of results. First, for unit vertex capacities in general digraphs, there is a randomized algebraic algorithm running in 2 time (Abboud et al., 2018). Second, for DAGs with unit edge capacities, there are deterministic witness-reporting algorithms running in 3 and 4, both capable of returning explicit minimum cuts for every pair whose mincut value is at most 5 (Abboud et al., 2018). Third, the same paper proves 4-Clique-based lower bounds of 6 and, for combinatorial algorithms, 7, already in DAGs with unit vertex capacities (Abboud et al., 2018). The structural machinery behind the DAG algorithms is built from earliest and latest cuts, arc replacement, arc splits, the Witness set-family problem, and tensor-product superimposed codes (Abboud et al., 2018).
A later result sharpened the algebraic picture for directed unweighted graphs. For edge connectivity, 8-bounded all-pairs connectivity can be solved in 9 time, and for vertex connectivity, 00-bounded all-pairs vertex connectivity can be solved in 01 time (Akmal et al., 2023). The main technical idea is a low-rank compression of the classical flow-vector framework of Cheung, Lau, and Leung: instead of inverting an 02 transfer matrix, the algorithm factors the relevant matrix as 03 with rank at most 04, so the expensive inversion is reduced to dimension 05 via
06
(Akmal et al., 2023). For edge connectivity, the bounded-rank characterization becomes
07
with high probability (Akmal et al., 2023).
These bounded results make clear that thresholding changes the complexity class of the problem. For constant or polylogarithmic 08, the runtime approaches transitive-closure complexity, while the lower bounds show that once 09 is moderately large one should not expect the problem to remain as easy as transitive closure under standard fine-grained conjectures (Abboud et al., 2018, Akmal et al., 2023).
6. Cut-query, streaming, and fully dynamic models
Restricted-access models have produced a separate strand of all-pairs mincut research. In the cut-query model, the graph is accessed only through queries returning
10
for chosen subsets 11 (Kenneth-Mordoch et al., 19 Oct 2025). In this model, the first nontrivial exact all-pairs algorithm constructs a Gomory–Hu tree of an unweighted undirected graph using 12 cut queries (Kenneth-Mordoch et al., 19 Oct 2025).
That 13 result relies on two new ideas tailored to the query model. The first is weak isolating cuts: for a terminal set 14, the algorithm only needs the true minimum 15-cut when it is also a minimum 16-cut for some other 17, rather than the full isolating-cut object (Kenneth-Mordoch et al., 19 Oct 2025). The second is a split between friendly and unfriendly minimum cuts. Friendly cuts are preserved by a contraction-based friendly cut sparsifier, while unfriendly cuts are preserved with constant probability by a 18-star contraction that excludes a forbidden terminal set 19 from contraction (Kenneth-Mordoch et al., 19 Oct 2025). The resulting single-source subroutine uses 20 cut queries, and a reduction from all-pairs mincut to batched single-source computations then yields the Gomory–Hu tree (Kenneth-Mordoch et al., 19 Oct 2025).
A subsequent improvement introduced an all-pairs minimum cut sparsifier for unweighted undirected graphs and reduced the cut-query complexity to 21 (Kenneth-Mordoch et al., 13 Nov 2025). The sparsifier guarantee is existential but exact: for every pair 22, there exists a minimum 23-cut in the sparsifier whose restriction to the original vertex set is a minimum 24-cut in the original graph, and the cut value is preserved exactly (Kenneth-Mordoch et al., 13 Nov 2025). The construction begins with a friendly cut sparsifier, then applies a star transform that splits each super-vertex back into its constituent vertices, adds a proxy vertex, and encodes internal adjacency through weighted star edges (Kenneth-Mordoch et al., 13 Nov 2025). This is combined with the structural fact that every exact mincut is either already friendly or differs from a friendly cut by one endpoint (Kenneth-Mordoch et al., 13 Nov 2025).
The same sparsification framework yields results beyond cut queries. It gives a deterministic fully dynamic algorithm that maintains a Gomory–Hu tree of a dynamic unweighted graph with 25 worst-case update time, and a randomized two-pass streaming algorithm using 26 space (Kenneth-Mordoch et al., 13 Nov 2025). The central conceptual point is that these algorithms bypass exact max-flow in models where exact max-flow is too expensive or unavailable: the paper constructs the exact-preserving sparsifier using approximate-max-flow-powered expander-decomposition machinery, and performs exact all-pairs mincut computation only on the smaller sparsifier (Kenneth-Mordoch et al., 13 Nov 2025).
7. Scope, structural themes, and current boundaries
Across these results, the dominant structural theme is that all-pairs mincuts are tractable only after an appropriate compression of the family of minimum cuts. In static undirected graphs, the compression is exact and global through a Gomory–Hu tree (Abboud et al., 27 Jul 2025). In sensitivity, it is a compact encoding of how each edge interacts with the family of minimum 27-cuts under a single update (Baswana et al., 2020). In directed bounded problems, it is either algebraic rank compression or a compact extremal-cut description via earliest/latest cuts (Akmal et al., 2023, Abboud et al., 2018). In cut-query and dynamic models, it is an exact-preserving sparsifier that retains at least one optimal cut per pair (Kenneth-Mordoch et al., 13 Nov 2025).
The current boundaries are sharply model-dependent. Static exact all-pairs mincuts in undirected weighted graphs admit a deterministic 28-time solution (Abboud et al., 27 Jul 2025), whereas the simple-graph nearly quadratic algorithm explicitly does not extend its main theorem to weighted graphs, directed graphs, or general multigraphs (Li et al., 2021). The sensitivity-oracle results are restricted to undirected unweighted graphs and single-edge failure or insertion (Baswana et al., 2020). The strongest directed results are still bounded-threshold rather than unrestricted (Akmal et al., 2023). The unweighted sparsifier framework in cut-query, streaming, and fully dynamic models does not seem to extend to weighted graphs and makes no claim for directed graphs (Kenneth-Mordoch et al., 13 Nov 2025).
These contrasts show that “the” all-pairs mincuts problem is no longer a single algorithmic question. In the undirected static setting, the problem is essentially the construction of a cut-equivalent tree. In sensitivity, it becomes an oracle-design problem over a family of perturbed graphs. In directed graphs, bounded variants currently supply the clearest positive results. In restricted-access models, exact sparsification has emerged as the substitute for direct max-flow computation.