Faster Algorithm for Second (s,t)-Mincut and Breaking Quadratic Barrier for Dual Edge Sensitivity for (s,t)-Mincut
Abstract
Let be a directed graph on vertices and edges. In this article, we study -cuts of second minimum capacity and present the following algorithmic and graph-theoretic results.
-
1.
Second (s,t)-mincut: Vazirani and Yannakakis [ICALP 1992] designed the first algorithm for computing an -cut of second minimum capacity using maximum -flow computations. We present the following algorithm that improves the running time significantly. For directed integer-weighted graphs, there is an algorithm that can compute an -cut of second minimum capacity using maximum -flow computations with high probability.111 hides poly-logarithmic factors. To achieve this result, a close relationship of independent interest is established between -cuts of second minimum capacity and global mincuts in directed weighted graphs.
-
2.
Minimum+1 (s,t)-cuts: Minimum+1 -cuts have been studied quite well recently [Baswana, Bhanja, and Pandey, ICALP 2022 & TALG 2023], which is a special case of second -mincut. We present the following structural result and the first nontrivial algorithm for minimum+1 -cuts.
-
(a)
Algorithm: For directed multi-graphs, we design an algorithm that, given any maximum -flow, computes a minimum+1 -cut, if it exists, in time.
-
(b)
Structure: The existing structures for storing and characterizing all minimum+1 -cuts occupy space [Baswana, Bhanja, and Pandey, TALG 2023]. For undirected multi-graphs, we design a directed acyclic graph (DAG) occupying only space that stores and characterizes all minimum+1 -cuts. This matches the space bound of the widely-known DAG structure for all -mincuts [Picard and Queyranne, Math. Prog. Studies 1980].
-
(a)
-
3.
Dual Edge Sensitivity Oracle: The study of minimum+1 (s,t)-cuts often turns out to be useful in designing dual edge sensitivity oracles – a compact data structure for efficiently reporting an -mincut after insertion/failure of any given pair of query edges. It has been shown recently [Bhanja, ICALP 2025] that any dual edge sensitivity oracle for -mincut in undirected multi-graphs must occupy space in the worst-case irrespective of the query time. Interestingly, for undirected unweighted simple graphs, we break this quadratic barrier while achieving a non-trivial query time as follows. There is an space data structure that can report an -mincut in time after the insertion/failure of any given pair of query edges.
To arrive at our results, as one of our key techniques, we establish interesting relationships between -cuts of capacity minimum, , and maximum -flow. We believe that these techniques and the graph-theoretic result in 2.(b) are of independent interest.
Keywords and phrases:
mincut, second mincut, compact structure, fault tolerant, sensitivity oracle, dual edges, st mincut, global mincut, characterizationCopyright and License:
2012 ACM Subject Classification:
Theory of computation Data structures design and analysis ; Theory of computation Dynamic graph algorithms ; Theory of computation Network flowsAcknowledgements:
This research work was partially carried out while Koustav Bhanja was pursuing his doctoral studies at the Department of CSE, IIT Kanpur, India.Funding:
The research work of Surender Baswana is partially supported by Tapas Mishra Memorial Chair at IIT Kanpur, India. The research work of Koustav Bhanja is partially supported by Merav Parter’s European Research Council (ERC) grant under the European Union’s Horizon 2020 research and innovation programme, grant agreement No. 949083.Editors:
Anne Benoit, Haim Kaplan, Sebastian Wild, and Grzegorz HermanSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
The concept of cut is fundamental in graph theory and has numerous real-world applications [1]. Let be a directed weighted graph on vertices and edges with a designated source vertex and a designated sink vertex . Every edge of is assigned with a non-negative real value as the capacity of the edge, denoted by . There are mainly two types of well-studied cuts in a graph – global cuts and -cuts. A global cut, or simply a cut, of is defined as a nonempty proper subset of . A cut is said to be an -cut if and ). Every cut of is associated with a capacity defined as follows. The capacity of a cut , denoted by , is the sum of the capacities of every edge satisfying and . A global cut (likewise -cut) of the least capacity is called a global mincut (likewise -mincut). Henceforth denotes the capacity of -mincut.
The study of cuts from both structural and algorithmic perspectives has been an important field of research for the past six decades [21, 19, 14, 25, 36]. In this article, we provide the following two main results for -cuts. (1) We present efficient algorithms for computing an -cut of second minimum capacity in directed weighted graphs. After more than 30 years, our algorithms provide the first improvement by a polynomial factor over the existing result of Vazirani and Yannakakis [37]. To arrive at this result, we establish that computing an -cut of second minimum capacity has the same time complexity as computing a global mincut. (2) We present a dual edge sensitivity oracle for -mincut – a compact data structure that efficiently reports an -mincut after the insertion or failure of any pair of edges. This is the first dual edge sensitivity oracle for -mincut that occupies subquadratic space while achieving nontrivial query time in undirected unweighted simple graphs111A simple graph refers to a graph having no parallel edges.. This breaks the existing quadratic lower bounds [3, 6] on the space for any dual edge sensitivity oracle for -mincut in undirected multi-graphs222A multi-graph refers to an unweighted graph having parallel edges.. We arrive at this result by designing a compact structure for storing and characterizing all minimum+1 -cuts (a special case of second minimum -cut). This structure improves the space occupied by the existing best-known structure [3] by a linear factor.
We now present the problems addressed in this article, their state-of-the-art, and our results.
1.1 Faster Algorithm for Second Minimum (s,t)-cuts
An algorithmic graph problem aims at computing a structure that optimizes a given function. Examples of such classical problems are Minimum Spanning Tree, Shortest Path, Minimum Cut. Having designed (near) optimal algorithm for such problems, the next immediate objective is the following. Design an efficient algorithm that, given a structure achieving optimal function value, computes a structure that differs from and achieves the optimal or next optimal function value. There has been an extensive study on computing the second minimum spanning tree [8, 26, 29], the second shortest path [38, 18, 34], and second -mincut [37]. The algorithms for these problems are so fundamental that they appear in textbooks on algorithms [13, 1]. In addition, they act as the foundation for generalizing the problem to compute optimal structure, such as computing minimum spanning tree, shortest path, -mincut.
The problem of designing efficient algorithms for computing -mincut (or equivalently, maximum -flow) has been studied for more than six decades. This problem is now almost settled with the recent breakthrough result on almost linear time algorithm for maximum -flow by Van et al. [36]. Interestingly, given an algorithm for maximum -flow, we can compute all -mincuts implicitly with an additional time, as shown by Picard and Queyranne [33]. It is, therefore, natural to redefine the second -mincut problem as follows. Design an algorithm that computes an -cut of second minimum capacity. For brevity, henceforth we call -cut of second minimum capacity by second -mincut.
Vazirani and Yannakakis [37] addressed the problem of computing an -cut having minimum capacity in 1992. For computing any minimum capacity -cut, they gave an algorithm that uses maximum -flow computations. Conversely, they also argued, using NP-hardness of computing a maximum cut, that exponential dependence on is unavoidable assuming . To arrive at their result, the key problem they addressed is the design of an algorithm that computes a second -mincut using maximum -flow computations. They further improve the running time by designing a faster algorithm that computes a second -mincut using only maximum -flow computations. We show that this faster algorithm is incorrect due to a serious error in its analysis. As a result, the existing best-known algorithm for computing a second -mincut uses maximum -flow computations [37]. We design an algorithm for the second -mincut with a significantly improved running time as shown in the following theorem.
Theorem 1 (Second -mincut algorithm).
For any directed graph on vertices with integer edge capacities, there is an algorithm that computes a second -mincut in using maximum -flow computations with high probability.
The two well-known minimum cuts in a graph are -mincut and global mincut. Recently, there has been a growing interest in understanding the difference in the complexity of computing an -mincut and computing a global mincut. For undirected weighted graphs, Li and Panigrahi [28] established that the running time of computing a global mincut differs by only poly-logarithmic factors from the running time of computing an -mincut. In particular, the authors showed that there is an algorithm that can compute a global mincut using maximum -flow computations with additional time. However, for directed weighted graphs, there is a large gap between the running time of computing an -mincut and computing a global mincut as follows. Cen et al. [9] designed an algorithm that can compute a global mincut using maximum -flow computations with additional time. Interestingly, to arrive at our result in Theorem 1, we show that the complexity of computing a global mincut is the same as the complexity of computing a second -mincut modulo a single maximum -flow computation as follows, which might find many other important applications.
Theorem 2 (Equivalence between global mincut and second -mincut).
For any directed weighted graph on vertices and edges, the following two assertions hold.
-
1.
The problem of computing a second -mincut is reducible to the problem of computing a global mincut in time, where denotes the time complexity for computing a maximum -flow in .
-
2.
The problem of computing a global mincut is reducible to the problem of computing a second -mincut in time.
1.2 Minimum+1 (s,t)-cuts: Efficient Algorithm & Compact Structure
The cuts of capacity minimum+1, known as minimum+1 cuts, have been studied quite extensively in the past [3, 15, 6]. For (un)directed multi-graphs, a minimum+1 -cut is a special case of second -mincut. We present the following structural result and the first nontrivial algorithm for minimum+1 -cuts.
Algorithm.
For both minimum+1 global cuts [15] and minimum+1 -cuts [3], there exist compact data structures. These data structures have important applications in maintaining minimum+2 edge connected components [15] and designing dual edge sensitivity oracle for -mincut [3]. Moreover, there exist efficient algorithms [24, 4, 30] that can compute a global cut of capacity minimum+1. Unfortunately, the existing best-known algorithm for computing an -cut of capacity minimum+1 is nothing but the algorithm for computing a second -mincut by [37], which uses maximum -flow computations. We present the following result as the first efficient algorithm for computing an -cut of capacity minimum+1.
Theorem 4 (Minimum+1 -cut algorithm).
For any directed multi-graph on vertices and edges, there is an algorithm that, given any maximum -flow, computes a minimum+1 -cut, if exists in , in time.
Remark 5.
The best-known algorithm for computing an -mincut uses one maximum -flow computation. It follows from Theorem 4 that the running time of computing a minimum+1 -cut differs from the running time of computing an -mincut only by additional time.
Structure.
There are several algorithmic applications on cuts, namely, fault-tolerance [33, 14], dynamic algorithms [22, 23], edge-connectivity augmentation [31, 10] that require an efficient way to distinguish a set of cuts, say minimum cuts or minimum+1 cuts, from the rest of the cuts. A trivial way to accomplish this objective is to store each cut of the required set explicitly. However, this is totally impractical since the set of these cuts is usually quite huge. For example, the number of -mincuts are exponential [33], and the number of global mincuts are [14]. This has led the researchers to invent the following concept. A structure is said to characterize a set of cuts using a property if the following condition holds. A cut if and only if satisfies property in . It is desirable that is as compact as possible. Moreover, verifying if a given cut satisfies in has to be as time-efficient as possible.
The design of compact structures for characterizing minimum cuts started with the seminal work of Dinitz, Karzanov, and Lomonosov [14] in 1976. In this work, the well-known cactus graph occupying space was invented for storing and characterizing all global mincuts. Several compact structures have been designed subsequently for storing and characterizing cuts of capacity both minimum and near minimum [33, 4, 15, 16, 3]. Quite expectedly, they are playing crucial roles in establishing many important algorithmic results [37, 4, 15, 23, 27, 3]. In particular, compact structures for storing and characterizing all minimum+1 cuts of a graph have been well-studied. For all minimum+1 global cuts in undirected multi-graphs, Dinitz and Nutov [15] constructed an space 2-level cactus model that stores and characterizes them. For all minimum+1 -cuts in directed multi-graphs, the existing structure that provides a characterization occupies space [3]. Unfortunately, the space occupied by this structure of [3] is significantly inferior to the following widely-known structure designed by Picard and Queyranne [33] for -mincut. There is an space directed acyclic graph (DAG) that stores and characterizes all -mincuts of any graph using -transversal cuts of this DAG. An -cut is said to be -transversal if its edge-set333The edge-set of a cut is the set of edges with exactly one endpoint in . intersects any path at most once. Interestingly, we are able to achieve the bound on space for storing and characterizing all minimum+1 -cuts.
An edge is said to contribute to a cut if and . We first establish that for any maximum -flow , there exists a set containing at most edges, called the anchor edges, such that for any minimum+1 -cut , exactly one anchor edge contributes to . By exploiting this result, we design the following structure for storing and characterizing all minimum+1 -cuts.
Theorem 6 (Structure for minimum+1 (s,t)-cuts).
Let be an undirected multi-graph on vertices and edges with a maximum -flow . There is an space structure, consisting of a directed acyclic graph and the set of anchor edges, that stores and characterizes all -mincuts and all minimum+1 -cuts of as follows.
-
1.
An -cut is an -mincut in if and only if is a -transversal cut in and no anchor edge corresponding to contributes to .
-
2.
An -cut is a minimum+1 -cut in if and only if is a -transversal cut in and exactly one anchor edge corresponding to contributes.
For undirected graphs, the best-known structure for storing and characterizing all -mincuts is the DAG of Picard and Queyranne [33] that occupies space, which is tight as well (refer to [20] and Lemma 12 in [22]). Interestingly, not only our structure in Theorem 6 matches the bound on space with the DAG for -mincuts [33] but also it stores and characterizes both -mincuts and minimum+1 -cuts.
1.3 Dual Edge Sensitivity Oracle: Breaking the Quadratic Barrier
The study of minimum+1 -cuts often turns out to be useful in designing elegant dual edge sensitivity oracles [3, 15, 6], which is defined as follows.
Definition 7 (Dual edge sensitivity oracle).
A dual edge sensitivity oracle for minimum cuts is a compact data structure that can efficiently report a minimum cut in the graph after the insertion or failure of any given pair of query edges.
Designing sensitivity oracles for various minimum cuts of a graph has been an emerging field of research [33, 15, 16, 3, 2]. For -mincut in multi-graphs, the DAG structure of Picard and Queyranne [33], as shown in [3], can be used to design an space sensitivity oracle that can report an -mincut in time after the failure/insertion of any single edge. It is now interesting to design a sensitivity oracle that can handle multiple failures/insertions of edges. To solve this generic problem, as argued in [3], the natural approach is to first design a dual edge sensitivity oracle for -mincut. This approach has also been taken for various other classical graph problems, including distance and connectivity [17], traversals [32], reachability [12, 11]. Moreover, it has been observed that handling two edge failures/insertions is significantly more nontrivial than handling a single one. It also provides important insights that either expose the hardness or help in generalizing the problem for multiple failures. To extend the result of [33] from single to multiple edge failures/insertions, Baswana, Bhanja, and Pandey [3] designed the first dual edge sensitivity oracle for -mincut occupying space in directed multi-graphs. It can report a resulting -mincut in time.
Note that quadratic space data structures often pose practical challenges as can be quite large for the real world networks/graphs. It thus raises the need to design sensitivity oracles for various fundamental graph problems that occupy subquadratic space [7, 35, 5]. Unfortunately, it has been shown [3, 6] that any dual edge sensitivity oracle for -mincut in undirected multi-graphs must occupy bits of space in the worst case, irrespective of the query time. However, for undirected unweighted simple graphs, we break this quadratic barrier on the space of any dual edge sensitivity oracle while achieving nontrivial query time as follows.
Theorem 8 (Dual edge sensitivity oracle for -mincut).
Let be an undirected unweighted simple graph on vertices and edges. There exists a data structure occupying space that can report an -mincut (including the contributing edges of ) in time after failure/insertion of any given pair of query edges in .
For the existing dual edge sensitivity oracles for -mincut [3, 6], no nontrivial preprocessing time is known till date. We establish the following almost linear preprocessing time for our dual edge sensitivity oracle stated in Theorem 8.
Theorem 9 (Preprocessing time).
For undirected unweighted simple graphs on vertices and edges, there is an algorithm that, given any maximum -flow, can construct the dual edge sensitivity oracle in Theorem 8 in time.
2 Organization of this article
This article is organized as follows. Basic preliminaries and notations are stated in Section 3. A limitation of an existing algorithm in [37] for computing second -mincut is provided in Section 4. In Section 5, we design two algorithms for computing a second (s,t)-mincut in directed weighted graphs. For undirected multi-graphs, in Section 6, we establish close relationships between maximum -flow and -cuts of capacity beyond -mincut, which are used as tools to arrive at the results in the following sections. For undirected multi-graphs, Section 7 contains the design of our linear space structure for storing and characterizing all -cuts. In Section 8, we design the subquadratic space dual edge sensitivity oracle for -mincut in undirected unweighted simple graphs. Finally, we conclude in Section 9. All the omitted proofs are provided in the full version.
3 Preliminaries
By integrality of maximum -flow [19], for integer-weighted graphs, we consider any given maximum -flow to be integral. The following notations to be used throughout the article.
-
(likewise ): Graph obtained after adding (likewise removing) a set of edges in .
-
-cut: An -cut of capacity where .
-
-path : A simple directed path from vertex to vertex .
-
denotes a maximum -flow in graph .
-
: Capacity of a cut in a graph .
-
A cut subdivides a set of vertices if and .
-
A cut separates a pair of vertices if and or vice-versa.
-
The edge-set of a cut , denoted by , is the set of all edges whose endpoints are separated by .
Let be any -flow in .
-
denotes the residual graph for any graph corresponding to an -flow .
-
denotes the value of flow assigned to an edge .
-
and : For any -cut , (likewise ) is the sum of flow assigned to all edges with (likewise ).
Lemma 10 (Conservation of flow).
For any -cut ,
Definition 11 (Quotient Graph).
A graph is said to be a quotient graph of if is obtained from by contracting disjoint subsets of vertices into single nodes.
Definition 12 (Quotient Path).
A path is said to be a quotient path of a path if is obtained from by contracting a set of edges in .
Residual graph for undirected multi-graphs.
Although the residual graph is defined for directed graphs [19], for undirected graphs, we define the residual graph in the following way. Let be any edge in an undirected multi-graph with an -flow . There exist two edges (likewise ) in if carries flow in the direction to (likewise to ); otherwise, there is a pair of edges and in .
3.1 A DAG structure for storing and characterizing all (s,t)-mincuts
In a seminal work, Picard and Queyranne [33] designed a DAG, denoted by , that stores all -mincuts in and characterizes them as -transversal cuts. We now briefly describe the construction of .
Construction of .
Let be the graph obtained by contracting each Strongly Connected Component (SCC) of into a single node. Let denote the node containing and denote the node containing in . If is an undirected graph, is the graph . For directed graphs, is obtained by suitably modifying as follows. For each node reachable from in , is contracted into node . Likewise, each node that has a path to , is contracted into the node . Given any maximum -flow , can be obtained in time and has the following property. Without causing ambiguity, we refer to -cut in by -cut.
Theorem 13 ([33]).
Let be any directed weighted graph on edges with a designated source vertex and designated sink vertex . There is an space DAG that stores and characterizes each -mincut in as follows. An -cut is an -mincut in if and only if is a -transversal cut in .
4 Limitation of the Existing Algorithm for Second (s,t)-mincut
We state here a limitation of the existing algorithm given by Vazirani and Yannakakis [37] to compute a second -mincut. The algorithm for computing an -cut of minimum capacity by [37] uses maximum -flows. So, for , the algorithm uses maximum -flow computations. In the same article [37], they stated the following property.
Lemma 14 (Lemma 3.2(1) in [37]).
Let be the residual graph corresponding to a maximum -flow in . Let be an SCC in and be a pair of vertices in . If the capacity of the least capacity cut separating and is in , then the least capacity cut separating and has capacity in .
Vazirani and Yannakakis [37] used Lemma 14 to design an algorithm that computes second -mincut using maximum -flow computations (the algorithm preceding Theorem 3.3 in [37]). Unfortunately, Lemma 14 (or Lemma 3.2(1) in [37]) is not correct as shown in Figure 1. is the SCC in containing vertices and . The least capacity cut separating and has capacity in . By Lemma 14, the least capacity cut separating and must have capacity in . However, as it can be verified easily using Figure 1, is a least capacity cut separating and in and its capacity is . Therefore, the algorithm stated above Theorem 3.3 in [37], fails to correctly output a second -mincut.
5 Faster Algorithm for Second (s,t)-mincut
We design two efficient algorithms for computing a second -mincut. Our first algorithm computes a second -mincut for directed weighted graphs using maximum -flow computations, which achieves the aim of Vazirani and Yannakakis [37]. This algorithm can be seen as an immediate application of the recently invented covering technique of [3]. We refer to the full version for the details of this algorithm. Our second algorithm takes a totally different approach. This approach is based on a relationship between the second -mincuts and the global mincuts in directed weighted graphs. So, as our main result, we design an algorithm for computing a second -mincut that uses maximum -flow computations and works for directed graphs with integer edge capacities. We now provide an overview of this result.
Observe that a global mincut is not necessarily an -cut in . On the other hand, any second -mincut can never be a global mincut in . So apparently there does not seem to be any relationship between the global mincuts and the second -mincuts of .
Let us first work with a special case when graph has exactly two -mincuts – and . Suppose there exists a second -mincut in graph such that separates all the neighbors of from all the neighbors of . It is easy to compute a second -mincut in this graph as follows. Compute a maximum -flow after contracting all neighbors of with and all neighbors of with . The challenge arises when every second -mincut has at least one contributing edge that is incident on and/or . We now show that the residual graph plays a crucial role in overcoming this hurdle. Moreover, turns out to establish the bridge between second -mincuts and global mincuts.
In a seminal work in 1956, Ford and Fulkerson [19] established a strong duality between -mincut and maximum -flow, which is widely known as the Maxflow-Mincut Theorem. We begin by stating the following property, which is immediate from Maxflow-Mincut Theorem.
Fact 15.
For any graph with maximum -flow , every -mincut in is an -cut of capacity zero in .
It follows from Fact 15 that there is a bijective mapping between the set of all -mincuts in and the set of global mincuts containing and not in . However, Fact 15 does not reveal any information on how a second -mincut in appears in residual graph . To explore the structure of second -mincuts in , using only the conservation of flow and the construction of the residual graph, we provide a generalization of Fact 15 as follows.
Theorem 16 (Maxflow (Min+)-cut Theorem).
Let be a directed weighted graph with a designated source vertex and a designated sink vertex . Let be any maximum -flow in and be the corresponding residual graph. Let be an -cut in . The capacity of in is if and only if the capacity of in is , where .
Proof.
Let (likewise ) denote the set of outgoing edges (likewise the set of incoming edges) of a cut in a graph . For any edge in , let be the residual capacity, that is, . For any edge in graph , let denote the capacity of edge . By construction of , for each edge with , there exists a forward edge with . Similarly, for each edge with , there exists a backward edge with . This provides us with the following equality.
| (1) | ||||
Equation 1 completes the proof. It follows from Theorem 16 that every second -mincut in is a second -mincut in . Let the capacity of second -mincut in be , where . Recall that our aim is to establish a relationship between second -mincuts and global mincuts using . So, by Theorem 16, we need to focus on global cuts of capacity exactly in . However, observe that a global cut of capacity can never be a global mincut in since . Moreover, there may exist many global cuts of capacity that cannot be a second -mincut in .
It is observed that a directed graph has global mincut capacity strictly greater than zero if it is an SCC. It turns out that there is exactly one nontrivial SCC, say , in the residual graph since has exactly two trivial -mincuts. Let us consider any global mincut in . Observe that is not a second -mincut in since . In fact, the capacity of any global cut in might be strictly less than the capacity of in . This is because of the existence of edges that are incident on and/or , which may contribute to in . Interestingly, exploiting the structure of , the properties of SCC , and Fact 15, we establish the following bijective mapping between the set of all second -mincuts in and the set of all global mincuts in .
Lemma 17.
Let be a global mincut in and be a second -mincut in . Then,
-
1.
,
-
2.
is a second -mincut in and is a global mincut in .
Proof.
Let us consider global mincut in graph , and let . Since is an SCC, it is easy to show that . It follows from the construction of that is an -cut in . Observe that the edge-set of in and the edge-set of in differ only on the set of edges, say , that are incident on and in . Since is maximum -flow, by Fact 15, has outdegree zero; likewise, has indegree zero in . So, every edge in is an incoming edge to -cut in . This implies that the contributing edges of -cut in are the same as the contributing edges of cut in . Hence, we arrive at the following equation.
| (2) |
It is given that is a second -mincut in . Let , where . It follows from Fact 15 that and are the only -mincuts in . So, any -cut in except and has capacity at least . Since is a cut in , is neither nor . Moreover, since is an -cut in , we get . So, it follows from Equation 2 that . Therefore, we arrive at the following inequality.
| (3) |
Observe that second -mincut must separate a pair of vertices in since and are -mincuts in . Thus, the cut appears as a global cut in graph . Thus, we can arrive at the following equation using similar arguments as in the case of Equation 2.
| (4) |
Since is a global mincut in and is a global cut in , . Therefore, by Equation 4, we get the following inequality.
| (5) |
It follows from Equations 3 and 5 that . Evidently, and it completes the proof of (1). Now, by Equation 2, and by Equation 4, . Therefore, -cut is a second -mincut in and is a global mincut in . This completes the proof of (2). The following lemma is immediate from Lemma 17 and Theorem 16.
Lemma 18.
Suppose has exactly two -mincuts – and . There is an algorithm that, given any maximum -flow in , can compute a second -mincut in using one global mincut computation.
It turns out that Lemma 18 does not immediately hold for graphs with one or more than two -mincuts. For graphs with exactly one -mincut, we suitably modify the SCC in . Finally, to extend our result for graphs having more than two -mincuts, we partition the graph into a set of roughly disjoint subgraphs, each having at most two -mincuts. This is obtained by applying a graph decomposition technique using DAG (Theorem 13), which was originally introduced in [3] for -cuts of capacity (Section 5.4 in [3]). This leads to Theorem 2(1). The proof of Theorem 2(2) is straightforward using standard techniques.
6 Characterization of Minimum+1 (s,t)-cuts using Maximum flow
The widely known Maxflow-Mincut Theorem [19] provides a characterization of all -mincuts using a maximum -flow. However, it seems that any extension of this result might not exist for characterizing -cuts of capacity . This is because no equivalent -flow is known corresponding to a -cut, as stated in [3]. Interestingly, we show that, in fact, there exist close relationships between maximum -flow and -cuts as follows.
For undirected multi-graphs, we first establish the following property for -cuts, where is an integer, based on a maximum -flow.
Lemma 19.
Let be a -cut in , where is an integer. Let be any maximum -flow in and let be the set of edges such that for every edge . Then, and is odd if and only if is odd.
Proof.
Suppose is a -cut in . It follows from conservation of flow (Lemma 10), , since is a maximum -flow and . Let , for any integer . Again by Lemma 10, . Therefore, . It follows that there are exactly edges belonging to that are carrying flow. Let be the set of remaining edges such that, for every edge , . In undirected graphs, every edge belonging to the edge-set of a cut is a contributing edge of the cut. Therefore, using , we arrive at the following equality.
| (6) |
It follows from Equation 6 that . In addition, since is always an even number, this implies that is odd if is odd; otherwise is even. By crucially exploiting Lemma 19, we now establish an interesting flow-based characterization of all the -cuts, which is of independent interest.
Theorem 20 (Maxflow (Min+1)-cut Theorem).
Let be an undirected multi-graph with a designated source and a designated sink . Let be any maximum -flow in . Then, an -cut in is a -cut if and only if there exists exactly one edge such that
-
1.
and
-
2.
for every edge , and carries flow in the direction to .
Proof.
Suppose is a -cut. Let be the set of edges such that for each edge . By assigning the value of in Lemma 19, we have and is odd. Since is odd, therefore, . Since is a maximum -flow, by Lemma 10, . Moreover, we have . Therefore, for every edge , and carries flow in the direction to .
We now prove the converse part. Suppose is an -cut satisfying properties (1) and (2). It follows that there is no edge such that and carries flow in the direction to . So, . By using Lemma 10, we have . So, in , there are exactly edges that are carrying flow and exactly one edge that is carrying no flow. Therefore, . We are thankful to an anonymous reviewer for pointing out that the forward direction of Theorem 20 can also be established using the concept of edge-disjoint paths instead of using conservation of flow.
Remark 21.
An immediate generalization of Theorem 20 would be the following. An -cut is a -cut if and only if there are exactly edges in that carry zero flow and every other edge carries flow in the direction to . However, Figure 2 shows that for , -cut has capacity but there are edges in carrying zero flow. Hence, this generalization of Theorem 20 is not possible for any .
7 Compact Structure for All Minimum+1 (s,t)-cuts
We address the following problem for undirected multi-graphs in this section.
Problem 22.
Design a compact structure for storing and characterizing all -cuts.
The problem of designing a compact structure for storing and characterizing all -mincuts immediately reduces to Problem 22 by modifying the given graph as follows. Add a dummy source (likewise a dummy sink ) with edges from to (likewise to ). Interestingly, for directed multi-graphs, Baswana, Bhanja, and Pandey [3] provide a solution to Problem 22 by essentially reducing it to the problem of designing a compact structure for storing and characterizing all -mincuts. However, their structure occupies space. For undirected multi-graphs, we present a structure for storing and characterizing all -cuts that occupies space as follows.
We construct a graph such that every -cut of appears as an -mincut in . This will help us store and characterize all -cuts of using a structure that stores and characterizes all -mincuts in . To achieve this objective, we pursue the following simple idea – remove one edge from every -cut. A naive implementation of this idea might not work as follows. There may be a pair of edges contributing to the cut defined by the intersection of two -cuts . Even if none of the edges contribute to both and , their removal will reduce the -mincut capacity if is or (refer to Figure 3()). In order to materialize the idea, we exploit Theorem 20, which motivates us to define a set of edges with respect to -cuts in the following way.
Definition 23 (Anchor edge).
For any given maximum -flow , an edge is said to be an anchor edge if contributes to a -cut and .
By Maxflow-Mincut Theorem, the removal of a set of edges carrying no flow in does not reduce the capacity of -mincut. Moreover, by Theorem 20, for every -cut in , exactly one anchor edge contributes to . Hence, every -cut, as well as -mincut in , appears as an -mincut of capacity in . It is also easy to observe that there may exist -cuts with capacity more than appearing as -mincuts in . However, using anchor edges , we can distinguish the -cuts as follows.
Lemma 24.
An -cut is a -cut in if and only if is an -mincut in and exactly one edge from contributes to .
By Lemma 24, our compact structure consists of set of edges and a structure that stores and characterizes all -mincuts in . It follows that the space occupied by our structure exceeds that of any structure for storing and characterizing all -mincuts only by the size of . Therefore, we need to show that the set is small.
7.1 Bounding the Cardinality of The Set of Anchor Edges
We now provide a tight bound on the cardinality of the set of all anchor edges . We present an efficient algorithm that, exploiting the properties of anchor edges, computes a set of edges such that the following two properties hold.
-
1.
The set of all anchor edges is a subset of .
-
2.
The number of edges belonging to is at most .
By Definition 23, every anchor edge belongs to the set, say NoFlow, of all edges carrying zero flow in . However, there exist graphs such that, for any maximum -flow in , the cardinality of set NoFlow can be , yet the number of anchor edges is only (refer to Figure 3()). So, NoFlow provides a loose upper bound on the number of anchor edges. Naturally, the question arises whether it is possible to eliminate a large number of edges from NoFlow while still keeping the set of all anchor edges intact. We answer this question in the affirmative by exploiting the following lemma.
Lemma 25.
Let be a cycle formed using a subset of edges in NoFlow. Then, no edge in can be an anchor edge.
Proof.
Consider any edge and be any -cut in such that . Since is a cut, must intersect cycle at least twice. Hence, contains at least two edges that carry no flow. Therefore, it follows from Theorem 20 that cannot be a -cut. Hence, by Definition 23, cannot be an anchor edge. We now use Lemma 25 to construct a spanning forest to provide an upper bound on the cardinality of set .
Construction of Spanning Forest .
The vertex set of is the same as . Initially, there is no edge in . We construct graph incrementally by executing the following step for each edge in NoFlow. If a cycle is formed in , then by Lemma 25, cannot be an anchor edge. Hence, we ignore edge . Otherwise, if there is no cycle in , then insert edge to .
It follows from the construction of that . Moreover, is at most since is a spanning forest. We now show a tight bound on , as well as , in the following lemma.
Lemma 26.
Set , as well as set , contains at most edges.
Proof.
Let us assume to the contrary that contains exactly edges. It follows that is a spanning tree. Hence, contains at least one edge from the edge-set of every -cut in . It implies that there exists an -mincut in such that contains at least one edge from the edge-set of . By Maxflow-Mincut Theorem, for every edge , . Thus, contains an edge such that , which is a contradiction since NoFlow. Since , it follows that the cardinality of is at most . We show that there also exist graphs where contains exactly edges (refer to Figure 3). Therefore, the bound on the set given in Lemma 26 is tight.
8 Dual Edge Sensitivity Oracle: Breaking the Quadratic Barrier
In this section, for undirected unweighted simple graphs, we design a subquadratic space data structure that can efficiently answer the query: report an -mincut after the failure/insertion of any pair of edges. We assume to be an undirected unweighted simple graph in this section. We provide an overview for handling the failure of edges in . Note that handling the insertion of a pair of edges is along a similar line and is provided in the full version. Henceforth, let and be the two failed edges in .
There is a folklore result that the residual graph acts as an space dual edge sensitivity oracle for -mincut that achieves query time. The query algorithm is derived from the augmenting path based algorithm for computing maximum -flow by Ford and Fulkerson [19] (briefly explained as a warm-up below). However, it is known that the residual graph occupies quadratic space if . To design a subquadratic space dual edge sensitivity oracle for undirected unweighted simple graphs, instead of the residual graph , we work with our compact structure, consisting of and the set of anchor edges, from Theorem 6. Recall that is the graph , which is just a quotient graph of . Hence, may fail to preserve the complete information of every path in . However, we show that is still sufficient to answer dual edge failure queries using the same algorithm used for the folklore result using residual graph .
Warm-up with residual graph.
Observe that if none of the failed edges carry flow in maximum -flow , then the capacity of -mincut remains unchanged in . Henceforth, we assume that edge always carries flow in the direction from to . It follows from the construction of residual graph that there must exist a -path in containing edge . We first reduce the flow in using in , and then remove the edges and from . Finally, using the concept of augmenting paths [19] in residual graph, we can verify in time whether the value of maximum -flow becomes or remains in . In the residual graph corresponding to the obtained maximum -flow in , repeat the same procedure for edge to verify whether failure of edge reduces the capacity of -mincut in . This helps in reporting an -mincut in the graph in time.
Our solution using .
We now use the structure from Theorem 6 as a subquadratic space dual edge sensitivity oracle. (Theorem 13) can be used to design a single edge sensitivity oracle that occupies space [33, 3]. As observed by Baswana, Bhanja, and Pandey [3], can also handle dual edge failures for the special case when both failed edges contribute to only -mincuts, using its reachability information. However, for handling any dual edge failures, the main difficulty arises when endpoints of both edges are mapped to the same node in [3]. Our structure addresses this difficulty seamlessly by first ensuring the following condition. The capacity of -mincut changes only if the endpoints of at least one failed edge appear in different nodes of . This is achieved using the following property of .
Lemma 27.
Any -cut separating a pair of vertices mapped to the same node in must have capacity at least .
Henceforth, we assume without loss of generality that endpoints of edge appear in different nodes in . Let us first handle the failure of edge . It turns out that can easily report an -mincut in . This exploits the following mapping of paths between and .
Lemma 28.
Let be any pair of vertices mapped to different nodes and in . There exists an -path in if and only if there exists a -path in . Moreover, path is a quotient path of .
We establish Lemma 28 by using the fact that graph is a quotient graph of by construction. Let be the graph obtained from after applying the query algorithm (described above) on for the failure of edge . By following the mapping of paths in Lemma 28, let be the corresponding maximum -flow in and denote the corresponding residual graph. On a high level, our technical contribution lies in showing that even after handling failure of , still preserves enough information about augmenting paths in that facilitates the handling of the failure of edge in . We now provide the overview.
To handle the failure of edge , the obtained graph must satisfy the following property, which actually holds between graphs and (refer to Lemma 27).
Lemma 29.
is a quotient graph of and for every path in , there is a path in such that is a quotient path of .
In order to establish Lemma 29, the challenging case appears when the -mincut remains unchanged after the failure of . In this case, let us first observe the change in the residual graph after reducing the flow that was passing through edge . In the resulting residual graph, the query algorithm finds a path from to , and flips the direction of every edge belonging to it. A similar update is executed by the query algorithm using a path in graph , where is a quotient path of . This could lead to the following scenario for the resulting graph . There is a path in , but there is no path in such that is a quotient path of . In other words, Lemma 29 may fail to hold. So, we might report an incorrect -mincut in . Interestingly, exploiting the SCC structure of , the structure of , and Lemma 27, we ensure that such a scenario never occurs. This allows us to handle the failure of using exactly in the same way as handling the failure of using . This leads to Theorem 8.
9 Conclusion
In this article, we have mainly solved the following two problems, achieving significant improvements over the existing bounds.
Firstly, we have addressed the problem of designing an efficient algorithm for computing a second -mincut in directed integer-weighted graphs. Our algorithm achieves a running time that is times faster than the existing best-known algorithm [37]. Most importantly, to arrive at the solution, a close relationship between global mincut and second ()-mincut is exposed for the first time here. We believe that this connection between global cuts and -cuts (via residual graph) should be quite useful for addressing future research problems, including the problem of designing an algorithm for computing an -cut of minimum capacity, for any , that breaks the existing bound [37].
Finally, we have addressed the problem of designing a dual edge sensitivity oracle for -mincut in undirected unweighted simple graphs. This problem is shown to be closely related to the study of -cuts of capacity minimum+1, which is a special case of the second -mincut in unweighted graphs. Our dual edge sensitivity oracle breaks the recently established quadratic lower bound on space in multi-graphs [6] by a factor of . The foundation of this result lies in our newly designed structure for storing and characterizing all minimum+1 -cuts, which also improves the existing best-known structure [3] by factor. Now, it is interesting to see whether the query time of our dual edge sensitivity oracle can be improved and whether our approach can help us in designing a sensitivity oracle for handling more than two edge insertions/failures.
References
- [1] Ravindra K. Ahuja, Thomas L. Magnanti, and James B. Orlin. Network flows - theory, algorithms and applications. Prentice Hall, 1993.
- [2] Surender Baswana and Koustav Bhanja. Vital edges for (s, t)-mincut: Efficient algorithms, compact structures, & optimal sensitivity oracles. In 51st International Colloquium on Automata, Languages, and Programming (ICALP 2024). Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.ICALP.2024.17.
- [3] Surender Baswana, Koustav Bhanja, and Abhyuday Pandey. Minimum+ 1 (s, t)-cuts and dual-edge sensitivity oracle. ACM Transactions on Algorithms, 19(4):1–41, 2023. doi:10.1145/3623271.
- [4] András A. Benczúr. A representation of cuts within 6/5 times the edge connectivity with applications. In 36th Annual Symposium on Foundations of Computer Science, Milwaukee, Wisconsin, USA, 23-25 October 1995, pages 92–102. IEEE Computer Society, 1995. doi:10.1109/SFCS.1995.492466.
- [5] Koustav Bhanja. Optimal sensitivity oracle for steiner mincut. In 35th International Symposium on Algorithms and Computation (ISAAC 2024), pages 10:1–10:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPICS.ISAAC.2024.10.
- [6] Koustav Bhanja. Minimum+1 steiner cut and dual edge sensitivity oracle: Bridging gap between global and (s, t)-cut. In 52nd International Colloquium on Automata, Languages, and Programming, ICALP 2025, July 8-11, 2025, Aarhus, Denmark, volume 334 of LIPIcs, pages 27:1–27:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025. doi:10.4230/LIPICS.ICALP.2025.27.
- [7] Davide Bilò, Shiri Chechik, Keerti Choudhary, Sarel Cohen, Tobias Friedrich, Simon Krogmann, and Martin Schirneck. Approximate distance sensitivity oracles in subquadratic space. TheoretiCS, 3, 2024. doi:10.46298/THEORETICS.24.15.
- [8] PM Camerini, L Fratta, and F Maffioli. The k shortest spanning trees of a graph. Int. Rep, pages 73–10, 1974.
- [9] Ruoxu Cen, Jason Li, Danupon Nanongkai, Debmalya Panigrahi, Thatchaphol Saranurak, and Kent Quanrud. Minimum cuts in directed graphs via partial sparsification. In 62nd IEEE Annual Symposium on Foundations of Computer Science, FOCS 2021, Denver, CO, USA, February 7-10, 2022, pages 1147–1158. IEEE, 2021. doi:10.1109/FOCS52979.2021.00113.
- [10] Ruoxu Cen, Jason Li, and Debmalya Panigrahi. Augmenting edge connectivity via isolating cuts. In Proceedings of the 2022 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 3237–3252. SIAM, 2022. doi:10.1137/1.9781611977073.127.
- [11] Diptarka Chakraborty, Kushagra Chatterjee, and Keerti Choudhary. Pairwise reachability oracles and preservers under failures. In 49th International Colloquium on Automata, Languages, and Programming, ICALP 2022, July 4-8, 2022, Paris, France, volume 229 of LIPIcs, pages 35:1–35:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ICALP.2022.35.
- [12] Keerti Choudhary. An optimal dual fault tolerant reachability oracle. In 43rd International Colloquium on Automata, Languages, and Programming, ICALP 2016, July 11-15, 2016, Rome, Italy, volume 55 of LIPIcs, pages 130:1–130:13. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2016. doi:10.4230/LIPIcs.ICALP.2016.130.
- [13] Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. Introduction to algorithms. MIT press, 2022.
- [14] Efim A Dinitz, Alexander V Karzanov, and Michael V Lomonosov. On the structure of the system of minimum edge cuts of a graph. Studies in discrete optimization, pages 290–306, 1976.
- [15] Yefim Dinitz and Zeev Nutov. A 2-level cactus model for the system of minimum and minimum+ 1 edge-cuts in a graph and its incremental maintenance. In Proceedings of the twenty-seventh annual ACM symposium on Theory of computing, pages 509–518, 1995. doi:10.1145/225058.225268.
- [16] Yefim Dinitz and Alek Vainshtein. The general structure of edge-connectivity of a vertex subset in a graph and its incremental maintenance. odd case. SIAM J. Comput., 30(3):753–808, 2000. doi:10.1137/S0097539797330045.
- [17] Ran Duan and Seth Pettie. Dual-failure distance and connectivity oracles. In Claire Mathieu, editor, Proceedings of the Twentieth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2009, New York, NY, USA, January 4-6, 2009, pages 506–515. SIAM, 2009. doi:10.1137/1.9781611973068.56.
- [18] David Eppstein. Finding the k shortest paths. SIAM Journal on Computing, 28(2):652–673, 1998. doi:10.1137/S0097539795290477.
- [19] L. R. Ford and D. R. Fulkerson. Maximal flow through a network. Canadian Journal of Mathematics, 8:399–404, 1956. doi:10.4153/CJM-1956-045-5.
- [20] Zvi Galil and Xiangdong Yu. Short length versions of menger’s theorem. In Proceedings of the Twenty-Seventh Annual ACM Symposium on Theory of Computing, STOC ’95, pages 499–508, New York, NY, USA, 1995. Association for Computing Machinery. doi:10.1145/225058.225267.
- [21] 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.
- [22] Gramoz Goranci and Monika Henzinger. Efficient data structures for incremental exact and approximate maximum flow. In 50th International Colloquium on Automata, Languages, and Programming, ICALP 2023, July 10-14, 2023, Paderborn, Germany, volume 261 of LIPIcs, pages 69:1–69:14. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPICS.ICALP.2023.69.
- [23] Gramoz Goranci, Monika Henzinger, and Mikkel Thorup. Incremental exact min-cut in polylogarithmic amortized update time. ACM Trans. Algorithms, 14(2):17:1–17:21, 2018. doi:10.1145/3174803.
- [24] David R. Karger. Global min-cuts in rnc, and other ramifications of a simple min-cut algorithm. In Proceedings of the Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’93, pages 21–30, USA, 1993. Society for Industrial and Applied Mathematics. URL: http://dl.acm.org/citation.cfm?id=313559.313605.
- [25] David R. Karger and Clifford Stein. A new approach to the minimum cut problem. J. ACM, 43(4):601–640, 1996. doi:10.1145/234533.234534.
- [26] N. Katoh, T. Ibaraki, and H. Mine. An algorithm for finding k minimum spanning trees. SIAM Journal on Computing, 10(2):247–255, 1981. doi:10.1137/0210017.
- [27] Ken-ichi Kawarabayashi and Mikkel Thorup. Deterministic edge connectivity in near-linear time. J. ACM, 66(1):4:1–4:50, 2019. doi:10.1145/3274663.
- [28] Jason Li and Debmalya Panigrahi. Deterministic min-cut in poly-logarithmic max-flows. In 61st IEEE Annual Symposium on Foundations of Computer Science, FOCS 2020, Durham, NC, USA, November 16-19, 2020, pages 85–92. IEEE, 2020. doi:10.1109/FOCS46700.2020.00017.
- [29] Ernst W Mayr and C Greg Plaxton. On the spanning trees of weighted graphs. Combinatorica, 12(4):433–447, 1992. doi:10.1007/BF01305236.
- [30] Hiroshi Nagamochi, Kazuhiro Nishimura, and Toshihide Ibaraki. Computing all small cuts in an undirected network. SIAM Journal on Discrete Mathematics, 10(3):469–481, 1997. doi:10.1137/S0895480194271323.
- [31] Dalit Naor, Dan Gusfield, and Charles Martel. A fast algorithm for optimally increasing the edge connectivity. SIAM Journal on Computing, 26(4):1139–1165, 1997. doi:10.1137/S0097539792234226.
- [32] Merav Parter. Dual failure resilient BFS structure. In Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing, PODC 2015, Donostia-San Sebastián, Spain, July 21 - 23, 2015, pages 481–490. ACM, 2015. doi:10.1145/2767386.2767408.
- [33] Jean-Claude Picard and Maurice Queyranne. On the structure of all minimum cuts in a network and applications. In Rayward-Smith V.J. (eds) Combinatorial Optimization II. Mathematical Programming Studies, 13(1):8–16, 1980. doi:10.1007/BFb0120902.
- [34] Liam Roditty. On the k shortest simple paths problem in weighted directed graphs. SIAM Journal on Computing, 39(6):2363–2376, 2010. doi:10.1137/080730950.
- [35] Mikkel Thorup and Uri Zwick. Approximate distance oracles. J. ACM, 52(1):1–24, 2005. doi:10.1145/1044731.1044732.
- [36] Jan Van Den Brand, Li Chen, Richard Peng, Rasmus Kyng, Yang P Liu, Maximilian Probst Gutenberg, Sushant Sachdeva, and Aaron Sidford. A deterministic almost-linear time algorithm for minimum-cost flow. In 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS), pages 503–514. IEEE, 2023. doi:10.1109/FOCS57990.2023.00037.
- [37] Vijay V Vazirani and Mihalis Yannakakis. Suboptimal cuts: Their enumeration, weight and number. In International Colloquium on Automata, Languages, and Programming, pages 366–377. Springer, 1992. doi:10.1007/3-540-55719-9_88.
- [38] Jin Y Yen. Finding the k shortest loopless paths in a network. management Science, 17(11):712–716, 1971.
