Skip to main content
Log in

Mincut Sensitivity Data Structures for the Insertion of an Edge

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

Let \(G=(V,E)\) be an undirected graph on n vertices with non-negative capacities on its edges. The mincut sensitivity problem for the insertion of an edge is defined as follows. Build a compact data structure for G and a given set \(S\subseteq V\) of vertices that, on receiving any edge \((x,y)\in S\times S\) of positive capacity as query input, can efficiently report the set of all pairs from \(S\times S\) whose mincut value increases upon insertion of the edge (xy) to G. The only result that exists for this problem is for a single pair of vertices (Picard and Queyranne, in: Rayward-Smith (ed) Combinatorial optimization II. Mathematical programming Studies, vol 13, no 1. Springer, Berlin, pp 8–16, 1980. https://doi.org/10.1007/BFb0120902, and dates back to 1980. We present the following results for the single source and the all-pairs versions of this problem.

  1. 1.

    Single source  Given any designated source vertex s, there exists a data structure of size \({\mathcal {O}}(|S|)\) (Data structure sizes are in words unless specified otherwise, where a word occupies \(\Theta (\log n)\) bits.) that can output all those vertices from S whose mincut value to s increases upon insertion of any given edge. The time taken by the data structure to answer any query is \({\mathcal {O}}(|S|)\).

  2. 2.

    All-pairs There exists an \({\mathcal {O}}(|S|^2)\) size data structure that can output all those pairs of vertices from \(S\times S\) whose mincut value increases upon insertion of any given edge. The time taken by the data structure to answer any query is \({\mathcal {O}}(k)\), where k is the number of pairs of vertices whose mincut value increases.

For both these versions, we also address the problem of reporting the values of the mincuts upon insertion of any given edge. To derive our results, we use interesting insights into the nearest and the farthest mincuts for a pair of vertices. In addition, a crucial result, that we establish and use in our data structures, is that there exists a directed acyclic graph of \({\mathcal {O}}(n)\) size that compactly stores the farthest mincuts from all vertices of V to a designated vertex s in the graph. We believe that this result is of independent interest, especially, because it also complements a previously existing result (Hariharan et al., in: Proceedings of the 39th annual ACM symposium on theory of computing, San Diego, California, USA, June 11–13, 2007, pp 605–614, 2007. https://doi.org/10.1145/1250790) that the nearest mincuts from all vertices of V to s is a laminar family, and hence, can be stored compactly in the form of a rooted tree of \({\mathcal {O}}(n)\) size.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

References

  1. Abboud, A., Krauthgamer, R., Trabelsi, O.: Subcubic algorithms for Gomory–Hu tree in unweighted graphs. In: Khuller, S., Williams, V.V. (eds.) STOC ’21: 53rd Annual ACM SIGACT Symposium on Theory of Computing, Virtual Event, Italy, June 21–25, 2021, pp. 1725–1737. ACM (2021). https://doi.org/10.1145/3406325.3451073

  2. Aho, A.V., Garey, M.R., Ullman, J.D.: The transitive reduction of a directed graph. SIAM J. Comput. 1(2), 131–137 (1972). https://doi.org/10.1137/0201008

    Article  MathSciNet  MATH  Google Scholar 

  3. Ahuja, R.K., Magnanti, T.L., Orlin, J.B.: Network Flows–Theory, Algorithms and Applications. Prentice Hall, Hoboken (1993)

    MATH  Google Scholar 

  4. Baswana, S., Choudhary, K., Roditty, L.: An efficient strongly connected components algorithm in the fault tolerant model. Algorithmica 81(3), 967–985 (2019). https://doi.org/10.1007/s00453-018-0452-3

    Article  MathSciNet  MATH  Google Scholar 

  5. Baswana, S., Gupta, S.K., Tulsyan, A.: Fault tolerant and fully dynamic DFS in undirected graphs: simple yet efficient. In: Rossmanith, P., Heggernes, P., Katoen, J. (eds.) 44th International Symposium on Mathematical Foundations of Computer Science, MFCS 2019, August 26–30, 2019, Aachen, Germany, LIPIcs, vol. 138, p. 65:1-65:16. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2019). https://doi.org/10.4230/LIPIcs.MFCS.2019.65

  6. Baswana, S., Pandey, A.: Sensitivity oracles for all-pairs mincuts. In: Proceedings of the 2022 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 581–609. SIAM (2022)

  7. Bender, M.A., Farach-Colton, M.: The level ancestor problem simplified. Theor. Comput. Sci. 321(1), 5–12 (2004). https://doi.org/10.1016/j.tcs.2003.05.002

    Article  MathSciNet  MATH  Google Scholar 

  8. Bernstein, A., Karger, D.R.: A nearly optimal oracle for avoiding failed vertices and edges. In: Mitzenmacher, M. (ed.) Proceedings of the 41st Annual ACM Symposium on Theory of Computing, STOC 2009, Bethesda, MD, USA, May 31–June 2, 2009, pp. 101–110. ACM (2009). https://doi.org/10.1145/1536414.1536431

  9. Braunschvig, G., Chechik, S., Peleg, D., Sealfon, A.: Fault tolerant additive and (\(\mu \), \(\alpha \))-spanners. Theor. Comput. Sci. 580, 94–100 (2015). https://doi.org/10.1016/j.tcs.2015.02.036

    Article  MathSciNet  MATH  Google Scholar 

  10. Chan, T.M., Patrascu, M., Roditty, L.: Dynamic connectivity: connecting to networks and geometry. SIAM J. Comput. 40(2), 333–349 (2011). https://doi.org/10.1137/090751670

    Article  MathSciNet  MATH  Google Scholar 

  11. Chechik, S., Cohen, S.: Distance sensitivity oracles with subcubic preprocessing time and fast query time. In: Makarychev, K., Makarychev, Y., Tulsiani, M., Kamath, G., Chuzhoy, J. (eds.) Proccedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing, STOC 2020, Chicago, IL, USA, June 22–26, 2020, pp. 1375–1388. ACM (2020). https://doi.org/10.1145/3357713.3384253

  12. Chechik, S., Langberg, M., Peleg, D., Roditty, L.: Fault tolerant spanners for general graphs. SIAM J. Comput. 39(7), 3403–3423 (2010). https://doi.org/10.1137/090758039

    Article  MathSciNet  MATH  Google Scholar 

  13. Chen, L., Goranci, G., Henzinger, M., Peng, R., Saranurak, T.: Fast dynamic cuts, distances and effective resistances via vertex sparsifiers. In: 61st IEEE Annual Symposium on Foundations of Computer Science, FOCS 2020, Durham, NC, USA, November 16–19, 2020, pp. 1135–1146. IEEE (2020). https://doi.org/10.1109/FOCS46700.2020.00109

  14. Chitnis, R., Kamma, L., Krauthgamer, R.: Tight bounds for Gomory–Hu-like cut counting. In: Graph-Theoretic Concepts in Computer Science—42nd International Workshop, WG 2016, Istanbul, Turkey, June 22–24, 2016, Revised Selected Papers, pp. 133–144 (2016). https://doi.org/10.1007/978-3-662-53536-3_12

  15. Demetrescu, C., Thorup, M., Chowdhury, R.A., Ramachandran, V.: Oracles for distances avoiding a failed node or link. SIAM J. Comput. 37(5), 1299–1318 (2008). https://doi.org/10.1137/S0097539705429847

    Article  MathSciNet  MATH  Google Scholar 

  16. Dinitz, Y., Vainshtein, A.: 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). https://doi.org/10.1137/S0097539797330045

    Article  MathSciNet  MATH  Google Scholar 

  17. Duan, R., Pettie, S.: Connectivity oracles for graphs subject to vertex failures. In: Klein, P.N. (ed.) Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16–19, pp. 490–509. SIAM (2017). https://doi.org/10.1137/1.9781611974782.31

  18. Dinits, E.A, Lomonosov, M.: On the structure of a family of minimum weighted cuts in a graph. In: Studies in Discrete Optimizations (1976). http://alexander-karzanov.net/ScannedOld/76_cactus_transl.pdf

  19. Ford, L.R., Fulkerson, D.R.: Maximal flow through a network. Can. J. Math. 8, 399–404 (1956). https://doi.org/10.4153/CJM-1956-045-5

    Article  MathSciNet  MATH  Google Scholar 

  20. Frigioni, D., Italiano, G.F.: Dynamically switching vertices in planar graphs. Algorithmica 28(1), 76–103 (2000). https://doi.org/10.1007/s004530010032

    Article  MathSciNet  MATH  Google Scholar 

  21. Gomory, R.E., Hu, T.C.: Multi-terminal network flows. J. Soc. Ind. Appl. Math. 9(4), 551–570 (1961)

    Article  MathSciNet  Google Scholar 

  22. Goranci, G., Henzinger, M., Thorup, M.: Incremental exact min-cut in polylogarithmic amortized update time. ACM Trans. Algorithms 14(2), 17:1-17:21 (2018). https://doi.org/10.1145/3174803

    Article  MathSciNet  MATH  Google Scholar 

  23. Goranci, G., Räcke, H., Saranurak, T., Tan, Z.: The expander hierarchy and its applications to dynamic graph algorithms. In: Marx, D. (ed.) Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms, SODA 2021, Virtual Conference, January 10–13, 2021, pp. 2212–2228. SIAM (2021). https://doi.org/10.1137/1.9781611976465.132

  24. Greig, D.M., Porteous, B.T., Seheult, A.H.: Exact maximum a posteriori estimation for binary images. J. R. Stat. Soc. Ser. B (Methodol.) 51(2), 271–279 (1989)

    Google Scholar 

  25. Gusfield, D.: Very simple methods for all pairs network flow analysis. SIAM J. Comput. 19(1), 143–155 (1990). https://doi.org/10.1137/0219009

    Article  MathSciNet  MATH  Google Scholar 

  26. Hariharan, R., Kavitha, T., Panigrahi, D., Bhalgat, A.: An \(\tilde{O}\)(mn) Gomory–Hu tree construction algorithm for unweighted graphs. In: Proceedings of the 39th Annual ACM Symposium on Theory of Computing, San Diego, California, USA, June 11–13, 2007, pp. 605–614 (2007). https://doi.org/10.1145/1250790.1250879. See also the extended version at http://hariharan-ramesh.com/papers/gohu.pdf

  27. Hartmann, T., Wagner, D.: Fast and simple fully-dynamic cut tree construction. In: Algorithms and Computation—23rd International Symposium, ISAAC 2012, Taipei, Taiwan, December 19–21, 2012. Proceedings, pp. 95–105 (2012). https://doi.org/10.1007/978-3-642-35261-4_13

  28. Kolmogorov, V., Zabih, R.: What energy functions can be minimized via graph cuts? IEEE Trans. Pattern Anal. Mach. Intell. 26(2), 147–159 (2004). https://doi.org/10.1109/TPAMI.2004.1262177

    Article  MATH  Google Scholar 

  29. Li, J., Panigrahi, D., Saranurak, T.: A nearly optimal all-pairs min-cuts algorithm in simple graphs. In: 62nd IEEE Annual Symposium on Foundations of Computer Science, FOCS 2021, Denver, CO, USA, February 7–10, 2022, pp. 1124–1134. IEEE (2021). https://doi.org/10.1109/FOCS52979.2021.00111

  30. Padberg, M., Rinaldi, G.: Facet identification for the symmetric traveling salesman polytope. Math. Program. 47, 219–257 (1990). https://doi.org/10.1007/BF01580861

    Article  MathSciNet  MATH  Google Scholar 

  31. Parter, M., Peleg, D.: Sparse fault-tolerant BFS structures. ACM Trans. Algorithms 13(1), 11:1-11"24 (2016). https://doi.org/10.1145/2976741

    Article  MathSciNet  MATH  Google Scholar 

  32. Parter, M., Peleg, D.: Fault-tolerant approximate BFS structures. ACM Trans. Algorithms 14(1), 10:1-10:15 (2018). https://doi.org/10.1145/3022730

    Article  MathSciNet  MATH  Google Scholar 

  33. Picard, J., Queyranne, M.: On the structure of all minimum cuts in a network and applications. In: Rayward-Smith V.J. (ed.) Combinatorial Optimization II. Mathematical Programming Studies, vol. 13(1), pp. 8–16 (1980). https://doi.org/10.1007/BFb0120902

  34. Sleator, D.D., Tarjan, R.E.: A data structure for dynamic trees. J. Comput. Syst. Sci. 26(3), 362–391 (1983). https://doi.org/10.1016/0022-0000(83)90006-5

    Article  MathSciNet  MATH  Google Scholar 

  35. Thorup, M.: Fully-dynamic min-cut. Combinatorica 27(1), 91–127 (2007). https://doi.org/10.1007/s00493-007-0045-2

    Article  MathSciNet  MATH  Google Scholar 

Download references

Acknowledgements

We are grateful to the anonymous reviewers for providing valuable comments and suggestions on an earlier version of this article. We would like to convey special thanks to Jannik Castenow from the Heinz Nixdorf Institute and the Paderborn University for many valuable discussions. Additionally, we would like to thank Rajesh Chitnis and Robert Krauthgamer for promptly answering a few of our queries related to their paper [14]. The first author is extremely grateful to Friedhelm Meyer auf der Heide who, as a host for the Humboldt Fellowhsip, provided him a highly supportive, encouraging, and free atmosphere conducive for this research work.

Funding

Surender Baswana: This research work was carried out while the author was at the Heinz Nixdorf Institute, University of Paderborn. The research was supported by a fellowship from Alexander von Humboldt Foundation. Till Knollmann: This work was partially supported by the German Research Foundation (DFG) within the Collaborative Research Centre On-The-Fly Computing (GZ: SFB 901/3) under the project number 160364472.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Surender Baswana.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This article is a refined and expanded version (with proofs of all lemmas and theorems) of the results that appeared in the Proceedings of European Symposium Algorithms (ESA), September 7–9, 2020.

Appendices

Appendix A

We present the details of a dynamic programming based algorithm based on Eq. 12 that uses only \({{{\mathcal {O}}}}(n)\) space to retrieve M[ij] for any \(1\le i,j\le n\). We first define a term A(ij) for any \(1\le i, j \le n\) as follows.

$$\begin{aligned} A(i,j)=\sum _{1 \le k \le i, 1 \le \ell \le j} M[k,\ell ] \end{aligned}$$

We define \(A(i,j)=0\) if \(i\le 0\) or \(j\le 0\). Using the term A(ij) thus defined, we can rephrase Eq. 12 as follows.

$$\begin{aligned} M[i,j] =&\, \frac{1}{2} \left( Q(u_i,u_i) + Q(u_j',u_j') - Q(u_i,u_j')\right) \nonumber \\&- \left( A(i,j-1)+A(i-1,j)-A(i-1,j-1) \right) \end{aligned}$$
(13)

We shall now use the above equation to enumerate all values of the matrix M. In this algorithm, we shall also build and use the matrix A. However, as will soon become clear, we need not keep all of A at any time. In particular, we shall need only two of its diagonals at any stage of time.

Let S(t) and R(t) be the (multi-)sets defined as follows: \(S(t) = \{M[i,j]~ |~i+j=t\}\) and \(R(t)=\{A(i,j)~|~i+j=t\}\). We shall enumerate S(2), S(3), and so on. For S(2), we compute M[1, 1] as described in Eq. 10. Let \(t>2\) be any integer. We now present the algorithm for enumerating the elements of S(t). Let ij be any two integers with \(i+j=t\). Our algorithm makes use of Eq. 13. It makes three queries to \(D(G_M)\). In addition, it retrieves \(A(i,j-1),A(i-1,j), A(i-1,j-1)\). Plugging these values in Eq. 13, it computes M[ij]. The only extra space required is for retrieving the three values of A. These values vary depending upon i and j. But the key observation is that for computing any element from S(t), we need only those values of A that belong to the set \(\{A(k,\ell ) ~|~ t-2\le k+\ell \le t-1\}\). This set is precisely \(R(t-2)\cup R(t-1)\). So for computing elements of S(t), we need only \(R(t-2)\) and \(R(t-1)\). So the extra space needed consists of only \(2t-3={\mathcal {O}}(n)\) elements. While we compute S(t), we also compute the corresponding entries of A for the set R(t) (to be used for computing \(S(t+1)\) in future) using the following equation.

$$\begin{aligned} A(i,j)=A(i-1,j)+A(i,j-1)-A(i-1,j-1) +M[i,j]\end{aligned}$$

We discard the set \(R(t-2)\) after we have enumerated S(t). So the extra space used in the enumeration of all elements of M is \({\mathcal {O}}(n)\) only.

Appendix B

In Sect. 5.2, we presented the algorithm for computing all pairs of vertices whose mincut increases upon insertion of any query edge. The time complexity of the algorithm is \({\mathcal {O}}(k)\), where k is the number of pairs of vertices whose mincut increases upon insertion of a query edge. We now address a variant of this problem—the objective is to report the number k. For this variant, we shall design an algorithm that achieves \({\mathcal {O}}(\min (k,n\log n))\) time to answer a query. The algorithm is a slight modification of the algorithm presented in Sect. 5.2. However, to execute it and achieve the desired query time, we need to suitably augment each nearest-mincut tree \({{{\mathcal {T}}}}(z)\). First we present this augmentation, and then we present our algorithm.

1.1 Augmentation of \({{{\mathcal {T}}}}(z)\)

We augment \({{{\mathcal {T}}}}(z)\) so that given any node \(\nu \) and integer i, we can report the ancestor of \(\nu \) at depth i in \(\mathcal{T}(z)\) efficiently. For this, we employ the Level-Ancestor data structure of Bender and Colton [7]. So we can state the following theorem.

Theorem 11

We can augment \({{{\mathcal {T}}}}(z)\) so that given any node \(\mu \in \mathcal{T}(z)\) and integer i, the ancestor of \(\mu \) at depth i can be reported in \({\mathcal {O}}(1)\) time.

We now augment \({{{\mathcal {T}}}}(z)\) so that given any node \(\mu _1\) and another node \(\mu _2\) which is ancestor of \(\mu _1\), we can efficiently compute the number of vertices of G that belong to the nodes lying on the path from \(\mu _1\) to \(\mu _2\). It is possible to accomplish this objective with \({\mathcal {O}}(\log n)\) query time without any asymptotic blow up in the size of \({{{\mathcal {T}}}}(z)\) as follows. First we introduce some notations. For a node \(\mu \in \mathcal{T}(z)\), let \(p(\mu )\) denote the parent of \(\mu \) and let size\((\mu )\) denote the number of vertices assigned to \(\mu \) (it is the same as the number of elements in list \(L(\mu )\)). We augment \({{{\mathcal {T}}}}(z)\) as follows.

We decompose \({{{\mathcal {T}}}}(z)\) into a collection \({{{\mathcal {H}}}}\) of vertex disjoint paths using heavy-light decomposition [34]. This decomposition ensures that for any node \(\mu _1\) and another node \(\mu _2\) which is an ancestor of \(\mu _1\), the path from \(\mu _1\) to \(\mu _2\) can be expressed as a union of \({\mathcal {O}}(\log n)\) paths from \({{{\mathcal {H}}}}\). Each path in \({{{\mathcal {H}}}}\) originates from a node of \({{{\mathcal {T}}}}(z)\), called its root, and terminates at a node which is a leaf node in \({{{\mathcal {T}}}}(z)\). Furthermore, we augment each path \(p\in {{{\mathcal {H}}}}\) as follows.

  • For each node \(\nu \in p\), we keep a field sum\((\nu )\) that stores the sum of size\((\mu )\) for each \(\mu \) which is descendant of \(\nu \) on path p  (in our terminology, a node is also a descendant of itself).

  • For each node \(\nu \in p\), we keep a field labeled jump\((\nu )\) which stores the pointer to the root of the path p.

  • The root node of path p also stores a field labeled next(p) that stores the pointer to its parent in \({{{\mathcal {T}}}}(z)\).

With the above augmentation, it is an easy exercise to extract the sum of the number of vertices belonging to the nodes of path from \(\mu _1\) to ancestor \(\mu _2\) in \({{{\mathcal {T}}}}(z)\)—we start from \(\mu _1\), and traverse to \(\mu _2\) using jump() and next() fields. We extract the number of vertices lying on this path using the sum() field stored at the roots of various paths and the corresponding next pointer. The total time complexity will be \({\mathcal {O}}(\min (t,\log n))\) where t is the number of nodes on the path from \(u_1\) to \(\mu _2\). So we can state the following theorem.

Theorem 12

We can augment \({{{\mathcal {T}}}}(z)\) so that given any node \(\mu _1\) and another node \(\mu _2\) which is ancestor of \(\mu _1\), it takes \({\mathcal {O}}(\min (t,\log n))\) time to compute the total number of vertices present in the nodes of the path from \(\mu _1\) to \(\mu _2\). Here t is the number of nodes on the path from \(\mu _1\) to \(\mu _2\) in \({{{\mathcal {T}}}}(z)\).

1.2 The Algorithm

Interestingly, we need to just slightly modify the algorithm presented in Sect. 5.2. Suppose (xy) is the query edge to be inserted. Recall that first we compute all vertices whose mincut to y or x increases due to insertion of (xy). Let \(Z_y\) and \(Z_x\) be the set of all these vertices whose mincut to y increased. We process \(Z_y\) as follows (\(Z_x\) is processed in a similar manner).

Let \(z\in Z_y\). Let \(\mu \) be the node in \({{{\mathcal {T}}}}(z)\) to which y belongs. Recall that, exploiting Lemma 15, we perform a sequential search from \(\mu \) till we reach the first ancestor of \(\mu \) that has a vertex whose mincut to z does not increases. This sequential search was necessary to enumerate all vertices whose mincut to z increases upon insertion of the edge (xy). However, if our objective is to count all vertices in \(\mu \) and its ancestors whose mincut to z increases upon insertion of (xy), there is a faster way—we do a binary search over the ancestors of \(\mu \) to find the highest ancestor of \(\mu \), say \(\mu '\), having a vertex whose mincut to z increases upon insertion of (xy). For carrying out the binary search efficiently, we use Theorem 11. This ensures that we take \({\mathcal {O}}(\min (t,\log n))\) time for the search of \(\mu '\) where t is the number of nodes on the path from \(\mu \) to \(\mu '\). Once we have computed \(\mu '\), we use Theorem 12 to compute the total number of vertices present in the path from \(\mu \) to \(\mu '\). So we spend only \({\mathcal {O}}(\min (t,\log n))\) time for tree \({{{\mathcal {T}}}}(z)\). Adding this cost for each z in \(Z_y\) and \(Z_x\), the total time complexity for reporting the number of pairs of vertices whose mincut increases upon insertion of edge (xy) is thus always bounded by \({\mathcal {O}}(\min (k,n \log n))\).

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Baswana, S., Gupta, S. & Knollmann, T. Mincut Sensitivity Data Structures for the Insertion of an Edge. Algorithmica 84, 2702–2734 (2022). https://doi.org/10.1007/s00453-022-00978-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-022-00978-0

Keywords

Navigation