Fixed-parameter tractability of counting small minimum (S,T) -cuts
Pierre Bergé, Benjamin Mouscadet, Arpad Rimmel, Joanna Tomasik
aa r X i v : . [ c s . CC ] J u l Fixed-parameter tractability of counting smallminimum (
S, T )-cuts
Pierre Berg´e , Benjamin Mouscadet , Arpad Rimmel and Joanna Tomasik LRI, Universit´e Paris-Sud, Universit´e Paris-Saclay, Orsay France
[email protected] LRI, CentraleSup´elec, Universit´e Paris-Saclay, Orsay France,
[email protected] , [email protected] , [email protected]
Abstract.
The parameterized complexity of counting minimum cutsstands as a natural question because Ball and Provan showed its G = ( V, E ) and two disjointsets of its vertices
S, T , we design a fixed-parameter tractable algorithmwhich counts minimum edge (
S, T )-cuts parameterized by their size p .Our algorithm operates on a transformed graph instance. This transfor-mation, called drainage, reveals a collection of at most n = | V | succes-sive minimum ( S, T )-cuts Z i . We prove that any minimum ( S, T )-cut X contains edges of at least one cut Z i . This observation, together withMenger’s theorem, allows us to build the algorithm counting all mini-mum ( S, T )-cuts with running time 2 O ( p ) n O (1) . Initially dedicated tocounting minimum cuts, it can be modified to obtain an FPT samplingof minimum edge ( S, T )-cuts.
The issue of counting minimum cuts in graphs has been drawing attention overthe years due to its practical applications. Indeed, the number of minimum cutsis an important factor for the network reliability analysis [2,3,4,24]. Thereby, theprobability that a stochastic graph is connected may be computed [3]. Further-more, cuts on planar graphs are used for image segmentation [8]. An image isseen as a planar graph where vertices represent pixels and edges connect twoneighboring pixels if they are similar. Counting minimum cuts provides an esti-mation of the number of segmentations.We focus on the problem of counting minimum edge (
S, T )-cuts in undi-rected graphs G = ( V, E ), S, T ⊆ V . We call it counting mincuts (Def. 1)as it is the counting variant of the classical problem mincut , which asks for aminimum ( S, T )-cut in graph G . Ball and Provan showed in [26] that count-ing mincuts is unlikely solvable in polynomial time as it is counting mincuts on planargraphs [3]. Bez´akov´a and Friedlander [6] generalized it with an O ( nµ + n log n )-time algorithm on weighted planar graphs, where µ is the length of the shortest( s, t )-paths. For general graphs, some upper bounds on the number of mini-mum cuts have been given [10] in function of parameters such as the radius, the Pierre Berg´e, Benjamin Mouscadet, Arpad Rimmel and Joanna Tomasik maximum degree, etc. Two fixed-parameter tractable (FPT) algorithms havebeen proposed for counting mincuts . Bez´akov´a et al. [5] built an algorithmfor both directed and undirected graphs with small treewidth λ ; its time com-plexity is O (2 λ λn ). Moreover, Chambers et al. [9] designed an algorithm fordirected graphs embedded on orientable surfaces of genus g : its execution timeis O (2 g n ). We study the fixed-parameter tractability of counting mincuts ,parameterized by the size p of the minimum ( S, T )-cuts.
Definition 1 (Counting mincuts).
Input:
Undirected graph G = ( V, E ) , sets of vertices S, T ( V , S ∩ T = ∅ . Output:
The number of minimum edge ( S, T ) -cuts. The minimum (
S, T )-cut size for a counting mincuts instance I = ( G, S, T )is obtained in polynomial time [17]. A brute force XP algorithm computes thenumber C ( I ) of minimum ( S, T )-cuts in time n O ( p ) by enumerating all edge setsof size p and picking up those which are ( S, T )-cuts. More efficient exponen-tial algorithms exist, as the one of Nagamochi et al. , in time O (cid:0) pn + pnC ( I ) (cid:1) ,in [24]. Our contribution, summarized in the theorem below, is an algorithmefficient for small values of p . Theorem 1.
The counting of minimum edge ( S, T ) -cuts can be solved in time O (2 p ( p +2) pmn ) on undirected graphs G = ( V, E ) , where n = | V | and m = | E | . An FPT h p i algorithm can be deduced from the results in two articles [5,21]and its execution time is O ∗ (cid:0) H ( p ) (cid:1) where H ( p ) = Ω (cid:16) p √ p (cid:17) . The treewidthreduction theorem established by Marx et al. in [21] says that there is a linear-time reduction transforming graph G into another graph G ′ which conserves the( s, t )-cuts of size p and such that the treewidth of G ′ , τ ( G ′ ), verifies τ ( G ′ ) =2 O ( p ) . After this transformation, the number of minimum ( S, T )-cuts of G ′ isobtained thanks to the algorithm given in [5]. The overall time taken with thismethod is O ∗ (cid:0) p (cid:1) . Our result, Theorem 1, improves this exponential factor.This result highlights a complexity gap between the counting and the enumer-ation, as the latter cannot be FPT parameterized by p . Indeed, certain instancescontain a number C ( I ) = ( n − p ) p of minimum cuts, as in case of graph G madeof p vertex-disjoint ( S, T )-paths with S = { s } and T = { t } .Our algorithm is based on a cut-decomposition Z ( I ) = ( Z , . . . , Z k ) of in-stance I , 1 ≤ k < n , called the drainage where for every 1 ≤ i ≤ k , edge set Z i is a minimum ( S, T )-cut. Set R ( Z i , S ) denotes the vertices which are reachablefrom S after the removal of edges in Z i . The reachable sets of Z i are includedone into another: R ( Z , S ) ( R ( Z , S ) ( . . . ( R ( Z k , S ). The drainage fulfilsthe following property: if X is a minimum ( S, T )-cut, some edges B i of a certain Z i belong to X , B i = X ∩ Z i = ∅ , and no other edge of X has one endpointin R ( Z i , S ). The set B i is called the front dam of cut X . The key idea of therecursive counting we propose is that any minimum cut X is the union of itsfront dam with a minimum cut of a sub-instance, called dry instance , of I . Thesetechniques work as well on multigraphs, i.e. on graphs with multiple edges. Aftermodifications, our algorithm also samples minimum edge ( S, T )-cuts. ixed-parameter tractability of counting small minimum (
S, T )-cuts 3
To design the drainage Z ( I ), we use the concept of important cuts [20] whichis the key ingredient of many FPT algorithms to solve cuts problems [7,12,14,20,22].An ( S, T )-cut Y is important if there is no other ( S, T )-cut Y ′ such that | Y ′ | ≤| Y | and R ( Y, S ) ( R ( Y ′ , S ). There is a unique minimum important ( S, T )-cutand it can be identified in polynomial time [20].The second concept used in our algorithm is Menger’s theorem [23]. It statesthat the size of minimum edge (
S, T )-cuts in an undirected graph is equal tothe maximum number of edge-disjoint (
S, T )-paths. As the max-flow min-cuttheorem [17] generalizes Menger’s theorem, one of the largest sets of edge-disjoint(
S, T )-paths is found in polynomial time.To close this introductory chapter, we give a “table of contents” of our article.Section 2 introduces the notations used. Section 3 explains the construction ofthe drainage Z ( I ) = ( Z , . . . , Z k ). In Section 4, we propose our algorithm andcompute its time complexity. Finally, we conclude and give ideas about futureresearch. We summarize basic concepts of parameterized and counting complexity but alsointroduce the notation we will use.
Fixed-parameter tractability.
NP-hard problems are unlikely to be solv-able with polynomial time algorithms. However, solving them efficiently maybecome possible when parameters are associated to problem instances and thevalues of these parameters are small.Referring to Downey and Fellows [15] and Niedermeier [25], a parameterizedproblem is said fixed-parameter tractable (FPT) if there is an algorithm solvingit in time O ( f ( p ) P ( n )) = O ∗ ( f ( p )), where p is a parameter, n is the instancesize, P is a polynomial function, and f is an arbitrary computable function.As a problem may be studied for different parameters p , p , . . . , the notation“FPT” becomes ambiguous. If there is an algorithm solving a problem in time O ( f ( p ) P ( n )), then it is FPT h p i . In this study, the parameter p of countingmincuts is the size of the minimum ( S, T )-cut.
Counting problems.
The study of cnf-2sat [19] which are solvable in polynomial timebut their associated counting problem is G and H as input, FPT algorithms counting the number of occurrences of H as a subgraphof G have been intensively studied [1,18,28]. Pierre Berg´e, Benjamin Mouscadet, Arpad Rimmel and Joanna Tomasik
Cuts in undirected graphs.
We study undirected graphs G = ( V, E ),where n = | V | and m = | E | . For any set of vertices U ⊆ V , we denote by E [ U ]the set of edges of G with two endpoints in U and G [ U ] the subgraph of G induced by U : G [ U ] = ( U, E [ U ]). Notation G \ U refers to the graph deprived ofvertices in U . For any set of edges E ′ ⊆ E , the graph G deprived of edges E ′ isdenoted by G \ E ′ : G \ U = G [ V \ U ] and G \ E ′ = ( V, E \ E ′ ) . A path is a sequence of pairwise different vertices v · v · v · · · v i · v i +1 · · · , wheretwo successive vertices ( v i , v i +1 ) are adjacent in G . To improve readability, weabuse notations: v ∈ Q and ( v , v ) ∈ Q mean that vertex v and edge ( v , v )are on path Q , respectively.Cut problems usually consist in finding the smallest set of edges X ⊆ E whichsplits the graph G \ X into connected components meeting certain criteria. Giventwo sets of vertices S (sources) and T (targets), set X ⊆ E is an ( S, T )-cut ifthere is no path connecting a vertex from S with a vertex from T in G \ X .An ( S, T )-cut X is said to be minimum if there is no ( S, T )-cut X ′ such that | X ′ | < | X | . For any ( S, T )-cut X , its source side R ( X, S ) is the set of verticesthat are reachable from S in G \ X . Its target side R ( X, T ) contains the verticesreachable from T in G \ X . We define two sets V S ( X ) and V T ( X ): – set V S ( X ) = { u ∈ R ( X, S ); ( u, v ) ∈ X } , i.e. the vertices of R ( X, S ) incidentto cut X , – set V T ( X ) = { u ∈ R ( X, T ); ( u, v ) ∈ X } , i.e. the vertices of R ( X, T ) incidentto cut X . Important and closest cuts.
As defined in [20], an (
S, T )-cut X is im-portant if there is no other ( S, T )-cut X ′ such that | X ′ | ≤ | X | and R ( X, S ) ( R ( X ′ , S ). Intuitively, an important ( S, T )-cut is such that there is no other cutsmaller in size which is closer to T . The number of important ( S, T )-cuts ofsize at most p depends only on p [11] and there is no more than one minimumimportant ( S, T )-cut [20]. Although the proofs in [20] handle vertex cuts, anedge-to-vertex reduction preserves these properties on edge cuts [7,20].
Lemma 1 (Unicity of minimum important cuts [20]).
For disjoint sets ofvertices S and T , there is a unique minimum important ( S, T ) -cut and it maybe found in polynomial time. On undirected graphs, we say that an important (
T, S )-cut is a closest ( S, T )- cut . Fig. 1 gives an example of graph G with two ( S, T )-cuts X and X , where S = { s , s } and T = { t } . Cut X is not closest as the edges incident to S form a cut Z smaller than X and R ( Z , S ) ⊆ R ( X , S ). Cut X is closestbecause there is no cut with at most three edges whose reachable set of verticesis contained in R ( X , S ). Definition 2. An ( S, T ) -cut X is closest if there is no other ( S, T ) -cut X ′ suchthat | X ′ | ≤ | X | and R ( X ′ , S ) ⊆ R ( X, S ) . ixed-parameter tractability of counting small minimum ( S, T )-cuts 5 s s tZ X X Fig. 1.
Illustration of Def. 2 for closest (
S, T )-cuts: X is closest whereas X is not. As a minimum closest (
S, T )-cut is also a minimum important (
T, S )-cut onundirected graphs, there is a unique minimum closest (
S, T )-cut according toLemma 1. Since the graph is uncapacitated, computing the minimum closest(
S, T )-cut is made in time O ( mp ), using p iterations of Ford-Fulkerson’s algo-rithm [17]. We introduce tools needed to design an algorithm solving counting mincuts in FPT h p i time, where p is the size of any minimum ( S, T )-cut. We build the drainage , a collection of minimum cuts Z i , i ∈ { , . . . , k } , where k < n , suchthat at least one edge of any minimum ( S, T )-cut X belongs to S ki =1 Z i . Then,we highlight properties coming from Menger’s theorem. The drainage Z ( I ) = ( Z , . . . , Z k ) of an instance I = ( G, S, T ) is a collection ofminimum (
S, T )-cuts Z i , | Z i | = p , satisfying the following properties: – there are less than n cuts Z i , i.e. ≤ k < n , – the reachable sets of cuts Z i fulfil R ( Z i , S ) ( R ( Z i +1 , S ) for i ∈ { , . . . , k − } , – for any minimum ( S, T )-cut X , there is at least one cut Z i which has edgeswith X in common: X ∩ Z i = ∅ .We construct the drainage iteratively. Let S = S and Z be the minimumclosest ( S , T )-cut. We fix R = R ( Z , S ). Let S be the set of vertices incidentto edges of Z inside R ( Z , T ): S = V T ( Z ) = { v / ∈ R , ( u, v ) ∈ Z } .Next, we construct Z which is the minimum closest ( S , T )-cut in G \ R ( Z , S ).If | Z | > p , the drainage construction stops. Otherwise, if | Z | = p , set R followsthe same scheme as R , R = R ( Z , S ) in graph G \ R ( Z , S ). We repeat theprocess until no more minimum ( S i , T )-cut Z i of size p can be found. We denoteby k the number of cuts Z i produced and fix R k +1 = R ( Z k , T ). Cuts Z i formthe minimum drainage cuts of I .Fig. 2 provides us with an example of graph G with S = { s , s , s } and T = { t , t } and indicates its drainage. The size of minimum ( S, T )-cuts is p = 4. Blue, red, and green edges represent minimum drainage cuts Z , Z , and Pierre Berg´e, Benjamin Mouscadet, Arpad Rimmel and Joanna Tomasik R R R R s s s t t Z Z Z Fig. 2.
The drainage (cuts Z i , sets R i and S i ) for an instance containing graph G ,sources S = { s , s , s } and targets T = { t , t } . Here, R = S (in general, R ⊇ S ). Z , respectively. Similarly, blue, red, green, and yellow vertices represent sets S = S , S , S , and S . Reachable sets R , R , R , and R are also appropriatelycolored. As the size of the minimum cut between S (yellow vertices) and T ingraph G \ R ( Z , S ) is greater than p , we have k = 3.We emphasize that set R i , which is R ( Z i , S i ) taken in G \ R ( Z i − , S ), andset R ( Z i , S ) are different for i = 1. On the one hand, set R ( Z i , S ) = S iℓ =1 R ℓ contains the vertices reachable from S in graph G deprived of Z i . On the otherhand, set R i can be written R i = R ( Z i , S ) \ R ( Z i − , S ). Sets R i and R i +1 aredisjoint and nonempty, as S i ⊆ R i and S i +1 ⊆ R i +1 . Moreover, the minimumdrainage cuts are disjoint: Z i ∩ Z j = ∅ . The number k of minimum drainagecuts is less than n and the running time needed to construct the drainage isin O ( mnp ). The reachable vertex sets of cuts Z i are included one into another: R ( Z i , S ) ( R ( Z i +1 , S ). The following theorem shows that, for any minimum( S, T )-cut X , there is a cut Z i containing edges of X . Among cuts Z i sharingedges with X , we are interested in the one with the smallest index. Definition 3 (Front of X ). Front of X , i ( X ) , ≤ i ( X ) ≤ k is the smallestindex i such that Z i ∩ X = ∅ . The next theorem states the properties of i ( X ) for any minimum ( S, T )-cut.
Theorem 2.
Any minimum ( S, T ) -cut X admits a front i ( X ) and X ∩ E (cid:2) R ( Z i ( X ) , S ) (cid:3) = ∅ .Proof. First, cut X cannot be entirely included in E [ R k +1 ]. If it was, it wouldbe a minimum ( S k +1 , T )-cut of size p , which contradicts the drainage definition.So, some edges of X are incident to R ( Z k , S ).Second, no edge of X belongs to E [ R ( Z , S )] as cut Z is the minimumclosest ( S, T )-cut. Therefore, there is an index i ≥ X belongs to E [ R ( Z i , S )] but at least one has an endpoint in R i +1 .Obviously, if an edge of X belongs to Z i , the theorem holds: i = i ( X ).We study the case where no edge of X belongs to Z i and there is an edge e ixed-parameter tractability of counting small minimum ( S, T )-cuts 7 of X , e ∈ E [ R i +1 ]. According to the definition of index i , no edge of X be-longs to E [ R ( Z i , S )], and therefore all edges of X have to be on the target side E [ R ( Z i , T )]. Therefore, X is a minimum ( S i +1 , T )-cut in graph G \ R ( Z i , S ). Ei-ther cut X is a minimum closest ( S i +1 , T )-cut (and then we fix Z = X ) or theminimum closest ( S i +1 , T )-cut Z is different than X and it fulfils R ( Z, S i +1 ) ( R ( X, S i +1 ). Since there is an edge e ∈ X ∩ E [ R i +1 ], then one of its end-point v ∈ R i +1 belongs to R ( X, T ). Consequently, v / ∈ R ( Z, S i +1 ). This bringsa contradiction: cutset Z i +1 is the unique minimum closest ( S i +1 , T )-cut and R ( Z i +1 , S i +1 ) = R i +1 . As vertex v can be reached from S i +1 after the removalof Z i +1 but not after the removal of Z , cuts Z and Z i +1 differ. Thus, cut Z cannot be the minimum closest ( S i +1 , T )-cut.In summary, there is an index i such that no edge of X belongs to E [ R ( Z i , S )]and, moreover, X ∩ Z i = ∅ . This means that there is no index ℓ < i such that X ∩ Z ℓ = ∅ . Consequently, index i is the front of X : i = i ( X ).The reader can verify that any minimum ( S, T )-cut of G contains some edgesof at least one cut Z , Z , or Z in Fig. 2. Menger’s theorem states that the size of the minimum edge (
S, T )-cuts is equalto the maximum number of edge-disjoint (
S, T )-paths [23]. One of these largestsets of edge-disjoint (
S, T )-paths can be found in polynomial time using flowtechniques [17]. We denote by Q = { Q , . . . , Q p } such a set of p edge-disjoint( S, T )-paths, taken arbitrarily. We call paths from Q Menger’s paths , to distin-guish them from other paths in graph G .Set Q is used to identify minimum ( S, T )-cuts. It is fixed throughout thecourse of the proofs in this article. The observation that edges of all minimum(
S, T )-cuts belong to the paths from Q is formulated in: Lemma 2.
For any minimum ( S, T ) -cut X , each Menger’s path Q j containsone edge of X . If Q j : v ( j )1 · v ( j )2 · · · v ( j ) ℓ · v ( j ) ℓ +1 · · · and ( v ( j ) ℓ , v ( j ) ℓ +1 ) ∈ X , then v ( j ) ℓ ∈ R ( X, S ) and v ( j ) ℓ +1 ∈ R ( X, T ) .Proof of Lemma 2. If a Menger’s path Q j did not contain any edge of cut X ,then set X would not be a ( S, T )-cut. Similarly, if path Q j contained at leasttwo edges of cut X , then another Menger’s path would not contain any edge of X as |Q| = | X | .We suppose that ( v ( j ) ℓ , v ( j ) ℓ +1 ) is the edge of X in path Q j . To prove that v ( j ) ℓ ∈ R ( X, S ) and v ( j ) ℓ +1 ∈ R ( X, T ), we admit the contrary. As Q j contains oneedge of X , the segment v ( j )1 · v ( j )2 · . . . · v ( j ) ℓ is open in G \ X between v ( j )1 ∈ S and v ( j ) ℓ ∈ R ( X, T ). Therefore, X is not an ( S, T )-cut as at least one vertex of R ( X, S ) is connected to R ( X, T ), a contradiction.Its consequence is that each edge of a cut Z i belongs to a Menger’s path.Fig. 3 illustrates the Menger’s paths on the instance ( G, S, T ) already introduced
Pierre Berg´e, Benjamin Mouscadet, Arpad Rimmel and Joanna Tomasik R R R R s s s t t Fig. 3.
Menger’s paths in graph G with sources S = { s , s , s } , targets T = { t , t } . in Fig. 2. As the minimum ( S, T )-cut size is four, there are four edge-disjoint(
S, T )-paths distinguished with colors. Menger’s paths are naturally orientedfrom sources to targets.
S, T )-cuts in undirectedgraphs
We describe our algorithm which counts all minimum (
S, T )-cuts in an undi-rected graph G . Based on the concepts introduced in Section 3, we prove notonly that it achieves its objective but also that its time complexity is FPT. We begin by the definition of dams which are subsets of cuts Z i of the drainageof G . Definition 4 (Dam).
A dam B i is a nonempty subset of a minimum drainagecut Z i , i.e. B i ⊆ Z i , B i = ∅ . Thanks to this definition, Theorem 2 together with the concept of the frontmakes us observe that any minimum (
S, T )-cut X contains a front dam : Definition 5 (Front dam).
The front dam of a minimum ( S, T ) -cut X is B i ( X ) = X ∩ Z i ( X ) . We know that all edges in X \ B i ( X ) belong to the target side of Z i ( X ) , E (cid:2) R ( Z i ( X ) , T ) (cid:3) , and the source side of Z i ( X ) is empty, X ∩ E (cid:2) R ( Z i ( X ) , S ) (cid:3) = ∅ .If X \ B i ( X ) = ∅ , then X = Z i ( X ) . A dam B i is characterized by: – its level , i.e. the index i of the cut Z i it belongs to, – its signature σ ( B i ) = { Q j : B i ∩ Q j = ∅} , i.e. the set of Menger’s pathspassing through it. ixed-parameter tractability of counting small minimum ( S, T )-cuts 9
Choking graph G with dam B i ( X ) puts in evidence a subgraph which stillconnects S and T through X \ B i ( X ) . Our idea is to dam a graph gradually inorder to dry it completely.The description of the method we devised to reach this goal requires a trans-formation of G into G D which is actually G with certain edges directed ( G D is amixed graph). If edge e does not belong to a Menger’s path, it stays undirected.For path Q j : v ( j )1 · v ( j )2 · v ( j )3 · · · , edges ( v ( j ) i , v ( j ) i +1 ) become arcs ( v ( j ) i , v ( j ) i +1 ),respecting the natural flow from sources to targets.Fig. 3 illustrates graph G D . Arrows indicate the arcs while bare segmentsrepresent its edges. According to Lemma 2, any minimum ( S, T )-cut of G ismade up of arcs in G D . Minimum drainage cuts Z i are thus composed of arcs,directed from R i to R i +1 . We insist on the fact that graph G D is only used todefine the notion of dry area, we do not count minimum cuts in it. Definition 6 (Dry area).
The dry area of B i is the set A ∗ ( B i ) which containsthe vertices of G which are not reachable from S in graph G D deprived of B i , i.e. G D \ B i . In a less formal way, set A ∗ ( B i ) keeps vertices which are dried as B i is theonly means to irrigate them. The definition of the dry instance follows. R R R R s s s t t B S ∗ ( B ) A ∗ ( B ) T ∗ ( B ) Fig. 4.
An example of dam B and its dry instance D ( I , B ) =( G ∗ ( B ) , S ∗ ( B ) , T ∗ ( B )) Definition 7 (Dry instance).
The dry instance induced by a dam B i is an in-stance D ( I , B i ) = ( G ∗ ( B i ) , S ∗ ( B i ) , T ∗ ( B i )) with graph G ∗ ( B i ) = ( V ∗ ( B i ) , E ∗ ( B i )) .In particular, – set S ∗ ( B i ) keeps vertices reachable from S “just before” dam B i . Formally,it contains the tails of arcs in B i : S ∗ ( B i ) = { u : ( u, v ) ∈ B i } , – set T ∗ ( B i ) keeps vertices placed “after” dam B i which become irrigatedin G D \ B i . Formally, it contains the heads of arcs which have their taileither inside S ∗ ( B i ) or inside A ∗ ( B i ) and their head outside: T ∗ ( B i ) = { v / ∈ A ∗ ( B i ) : ( u, v ) ∈ E, u ∈ S ∗ ( B i ) ∪ A ∗ ( B i ) } , – set V ∗ ( B i ) is the union: V ∗ ( B i ) = S ∗ ( B i ) ∪ A ∗ ( B i ) ∪ T ∗ ( B i ) , – set E ∗ ( B i ) stores edges of G which lie inside the dry area of B i or on itsborder (one endpoint is outside) in G D . Formally, it is composed of edgeswith two endpoints in V ∗ ( B i ) and at least one of them in A ∗ ( B i ) : E ∗ ( B i ) = { ( u, v ) ∈ E : u ∈ A ∗ ( B i ) , v ∈ V ∗ ( B i ) } . Fig. 4 gives an example of dam B ⊆ Z and the dry instance it induces in G . Its arcs are drawn in red, arcs of Z \ B are red and dashed. Blue verticesrepresent the vertices unreachable from S in G D \ B , i.e. set A ∗ ( B ). Sets S ∗ ( B )and T ∗ ( B ) are drawn in green and purple, respectively. Set E ∗ ( B ) is composedof dam B (red arcs) and blue edges/arcs.An important property of dry areas is that there is no arc ( u, v ) of G D “entering” in the dry area A ∗ ( B i ), except for arcs in B i . Lemma 3.
For any dam B i , there is no arc ( u, v ) in G D such that u / ∈ A ∗ ( B i ) and v ∈ A ∗ ( B i ) , except for arcs in B i . Moreover, there is no undirected edgewith exactly one endpoint in A ∗ ( B i ) .Proof. Suppose that such an arc ( u, v ) / ∈ B i exists. As u / ∈ A ∗ ( B i ), it is reachablefrom S in G D \ B i . Therefore, v can be reached too: this contradicts v ∈ A ∗ ( B i ).For the same reason, there is no undirected edge ( u, v ) with only endpoint in A ∗ ( B i ) as the existence of this edge makes both its endpoints be reachable from S in G D \ B i .In Theorem 3, we provide a characterization of any minimum ( S, T )-cut whichis based on dry instances and on closest dams . We start by:
Definition 8.
A dam B h is closer than dam B i if (i) h < i , (ii) σ ( B h ) = σ ( B i ) ,and (iii) edges in B i are the only edges of level i inside the dry instance of B h : E ∗ ( B h ) ∩ Z i = B i . As a consequence, the dry area of B i is included in the dry area of B h when B h is closer than B i : A ∗ ( B i ) ( A ∗ ( B h ). Indeed, if a vertex is unreachable from S in G D \ B i , then it also is unreachable from S in G D \ B h as arcs of B i cannotbe attained from S in G D \ B h according to Def. 8. Definition 9 (Closest dam).
Dam B i is a closest dam if no dam B h , h < i is closer than B i . For any dam B i , either B i is a closest dam or there is a closest dam B h = B i ,closer than B i . Each dam B i admits a closest dam (itself or B h ) which is unique. Lemma 4.
Any dam B i has a unique closest dam.Proof. If B i is already a closest dam, then it is its own unique closest dam.Now, we suppose that there are two closest dams of B i , denoted by B h and B h . Necessarily, h = h , otherwise B h = B h as, according to Def. 8, theyhave the same signature. ixed-parameter tractability of counting small minimum ( S, T )-cuts 11
We prove that under the hypothesis h < h , dam B h is closer than B h .Suppose, towards a contradiction, that there is an arc e = ( u , v ) ∈ B h which does not belong to set E ∗ ( B h ). As e / ∈ E ∗ ( B h ), vertex u is not inside A ∗ ( B h ), otherwise, according to Def. 8, e would belong to E ∗ ( B h ). So, thereis a path b Q connecting sources from S with u , which avoids arcs in B h . Arc e belongs to a Menger’s path Q j . A section of this path, denoted by b Q ′ j , connects u with a tail u of an arc ( u , v ) in B i , because Q j passes through B i : σ ( B i ) = σ ( B h ). The concatenated path b Q · b Q ′ j connects S with B i while avoiding B h :this is a contradiction as B i ⊆ E ∗ ( B h ). Consequently, B h ⊆ E ∗ ( B h ) ∩ Z h .The equality B h = E ∗ ( B h ) ∩ Z h comes from the fact that B h and B h have the same signature σ ( B i ). Arcs in dam E ∗ ( B h ) ∩ Z h belong to dif-ferent Menger’s paths. If B h = E ∗ ( B h ) ∩ Z h , then we have: | σ ( B h ) | < | σ ( E ∗ ( B h ) ∩ Z h ) | ≤ | σ ( B h ) | . Therefore, B h = E ∗ ( B h ) ∩ Z h , so B h iscloser than B h which is contradictory to our assumption that B h is a closestdam.Moreover, if B h is a closest dam then its complement B h = Z h \ B h is also aclosest dam. This property will be used to prove the fixed-parameter tractabilityof our algorithm. Lemma 5. If B h is a closest dam, then B h = Z h \ B h is also a closest dam.Proof. Suppose that B h is closest and B h is not: let B α denote the closest damof B h , α < h .First, we focus on the dry instance of dam B α between levels α and h . Weprove that no edge/arc ( u, v ), with the exception of arcs from dam B α , has oneendpoint inside the dry instance of B α before level h ( i.e. in the source side ofcut Z h ) and one outside. We distinguish two cases: – Case 1: If arc ( u, v ) is such that u / ∈ A ∗ (cid:0) B α (cid:1) and v ∈ A ∗ (cid:0) B α (cid:1) , then Lemma 3brings the contradiction. This argument also holds when ( u, v ) is undirected. – Case 2: If arc ( u, v ) is such that u ∈ A ∗ (cid:0) B α (cid:1) is before level h and v / ∈ A ∗ (cid:0) B α (cid:1) , then a Menger’s path Q j leaves the dry instance of B α throughthis arc. However, dams B α and B h have the same signature, so path Q j alsocontains an arc of B h placed after arc ( u, v ). Consequently, there exists anarc ( u ′ , v ′ ), u ′ / ∈ A ∗ (cid:0) B α (cid:1) and v ′ ∈ A ∗ (cid:0) B α (cid:1) , to make path Q j go back inside D ( I , B α ). This contradicts Case 1. Fig. 5 illustrates the explanations givenin Case 2 on a graph G with dams B h , B h , B α , and B α . In this example,vertices u ′ and v are identical.Second, we show that any vertex of V S ( B h ) is unreachable from S in G D \ B α ,where B α = Z α \ B α . We suppose that a path Q inside graph G D \ B α connectsa source s ∈ S with a vertex w ∈ V S ( B h ). Path Q necessarily traverses level α , so it contains an arc ( u, v ) of B α , as the complement dam B α has beenremoved. As dam B α is closer than B h , vertices of V T ( B α ) form a subset of A ∗ (cid:0) B α (cid:1) , otherwise one vertex of V T ( B α ) is reachable in G D \ B α and Menger’spaths make a vertex in V S ( B h ) be reachable too, which is impossible. For this s s s u v = u ′ v ′ t t B α B h B α Q j B h E ∗ ( B h ) E ∗ ( B α )) R ( Z α , S ) Fig. 5.
Illustration of the contradiction we arose for Case 2 in the proof of Lemma 5. reason, path Q must contain a vertex v ∈ A ∗ (cid:0) B α (cid:1) . Therefore, it connects avertex v inside the dry instance of B α with vertex w which is outside. As aconsequence, there is an edge/arc leaving the dry instance of B α on path Q ,which is a contradiction with our reasoning in Case 2.Eventually, all vertices of V S ( B h ) are unreachable from S in G D \ B α , so arcsof B h belong to the dry instance of B α . Conversely, arcs of B h does not belong to E ∗ ( B α ), as the Menger’s paths containing arcs of B α connect S with B h despitethe removal of B α . Therefore, E ∗ ( B α ) ∩ Z h = B h . Moreover, σ (cid:0) B α (cid:1) = σ (cid:0) B h (cid:1) as B α is closer than B h , so their complement dams have also the same signature: σ ( B α ) = σ ( B h ). Dam B α is thus closer than B h , which is a contradictionbecause B h is supposed to be a closest dam.Observe that the dry areas of a dam B i and its complement, A ∗ ( B i ) and A ∗ ( B i ) respectively, are disjoint because any vertex is reachable from S eitherin G \ B i or in G \ B i or in both of them. Theorem 3 provides us with the keystone to build our FPT h p i algorithm. Itcombines the concepts of dry instance and closest dam: given a minimum ( S, T )-cut X and its front dam B i ( X ) , either X \ B i ( X ) = ∅ and X = Z i ( X ) or edgesin X \ B i ( X ) = ∅ belong to the dry instance of the dam B h ( X ) = Z h ( X ) \ B h ( X ) ,where B h ( X ) is the closest dam of B i ( X ) . Theorem 3. If X = Z i ( X ) is a minimum cut for I , B i ( X ) its front dam, and B h ( X ) the closest dam of B i ( X ) , then set X \ B i ( X ) is a minimum cut for the dryinstance of B h ( X ) = Z h ( X ) \ B h ( X ) , i.e. D (cid:0) I , B h ( X ) (cid:1) .Proof. We prove that all edges in X \ B i ( X ) belong to the dry instance of B h ( X ) .Let us suppose ad absurdum that an edge e = ( u, v ) ∈ X \ B i ( X ) is reachablefrom S in graph G D deprived of the dam B h ( X ) . Edge e is an arc ( u, v ) in G D . ixed-parameter tractability of counting small minimum ( S, T )-cuts 13
We denote by P e a path in G D starting from a source s ∈ S and terminatingwith ( u, v ), deprived of arcs of B h ( X ) , P e : s · · · u · v .Due to the iterative construction of cuts Z i , path P e necessarily contains oneedge e h = ( u h , v h ) of level h ( X ) when it arrives at a level greater than i ( X ) ≥ h ( X ). We know that this edge e h does not belong to B h ( X ) , so e h ∈ B h ( X ) and P e : s · · · u h · v h · · · u · v . From now on, we focus on the segment of path P e , denotedby P ( h ) e , which contains all edges between e h and e , i.e. P ( h ) e : u h · v h · · · u · v .The proof goes in two steps:Step 1: Path P ( h ) e contains an arc of B i ( X ) .Step 2: The existence of a path in G D containing both an arc of B i ( X ) (provenin Step 1) and arc e contradicts the definition of cut X .For Step 1, let us suppose that the path P ( h ) e does not contain arcs of B i ( X ) .This means that path P ( h ) e passes by the dry instance of B h ( X ) between levels h ( X ) and i ( X ), otherwise it would necessarily contain an arc of B i ( X ) . So, thereis an edge/arc of this path, ˜ e = (˜ u, ˜ v ), where ˜ u is in the dry area of B h ( X ) but not in the dry area of B i ( X ) , and ˜ v lies outside the dry area of B h ( X ) . Inbrief, ˜ u ∈ A ∗ ( B h ( X ) ) \ A ∗ ( B i ( X ) ) and ˜ v / ∈ A ∗ ( B h ( X ) ). Edge ˜ e must be an arc(˜ u, ˜ v ) in G D according to Lemma 3. Arc ˜ e belongs to a Menger’s path Q j (˜ e ) passing through B h ( X ) , i.e. Q j (˜ e ) ∈ σ ( B h ( X ) ). Path Q j (˜ e ) must traverse an arcof B i ( X ) as σ ( B i ( X ) ) = σ ( B h ( X ) ). As a consequence, path Q j (˜ e ) connects a vertex˜ v outside the dry area of B h ( X ) with the tail u ′ i of an arc e ′ i = ( u ′ i , v ′ i ) of B i ( X ) .This is a contradiction, as vertex u ′ i is supposed not to be reachable from S in G D deprived of cut B h ( X ) . Path P ( h ) e thus contains an arc of B i ( X ) denoted by e i = ( u i , v i ).For Step 2, let b e = ( b u, b v ) = e i be the first arc of cut X in path P ( h ) e whicharrives after e i on this path (Fig. 6). By this way, we ensure that no edge of X lies on path P ( h ) e between vertices v i and b u . Arc b e exists as e is a potentialcandidate to be one.As vertex v i is the head of e i in graph G D , v i ∈ R ( X, T ) according toLemma 2. For the same reason, vertex b u ∈ R ( X, S ) as it is the tail of arc b e ∈ X .We know that path P ( h ) e in G D connects these two vertices and there is no arcof X on the segment of P ( h ) e connecting them. Let us go back now to the initialundirected graph G . In graph G \ X , vertices v i ∈ R ( X, T ) and b u ∈ R ( X, S ) areconnected whereas they must be separated by X . The presence of an edge ( u, v )of X outside E ∗ ( B h ( X ) ) yields a contradiction.In summary, all edges in X \ B i ( X ) belong to the dry instance of B h ( X ) . Theynecessarily form a cut in instance D (cid:0) I , B h ( X ) (cid:1) , otherwise X would not separate S and T in I . The p − (cid:12)(cid:12) B h ( X ) (cid:12)(cid:12) Menger’s paths in signature σ ( B h ( X ) ) are edge-disjoint inside D (cid:0) I , B h ( X ) (cid:1) , so the minimum cut size of this instance is greaterthan p − (cid:12)(cid:12) B h ( X ) (cid:12)(cid:12) . As X \ B i ( X ) contains p − (cid:12)(cid:12) B i ( X ) (cid:12)(cid:12) = p − (cid:12)(cid:12) B h ( X ) (cid:12)(cid:12) edges, weconclude that it is a minimum cut of D (cid:0) I , B h ( X ) (cid:1) .Therefore, any minimum ( S, T )-cut X , which is not a minimum drainage cut Z i ( X ) itself, can be partitioned into two sets, B i ( X ) and X \ B i ( X ) , such that: s s s b u b vu h v h u i v i e i b e t t B h ( X ) B h ( X ) B i ( X ) E ∗ ( B h ( X ) ) E ∗ ( B i ( X ) ) E ∗ ( B h ( X ) )) R ( Z h ( X ) , S ) Fig. 6.
Illustration of the segment of path P e between S and b e , traversing dams B h and B i . – B i ( X ) is a minimum cut of instance D (cid:0) I , B h ( X ) (cid:1) and a dam of I , – X \ B i ( X ) is a minimum cut of instance D (cid:0) I , B h ( X ) (cid:1) and all its edges belongto the target side of Z i ( X ) , E (cid:2) R ( Z i ( X ) , T ) (cid:3) .Conversely, given a closest dam B h and its complement B h = Z h \ B h , theunion B i ∪ X B h , where the closest dam of B i is B h and X B h is a minimum cutof D (cid:0) I , B h (cid:1) , separates S from T . Theorem 4.
Let B h be a closest dam of Z ( I ) and B h = Z h \ B h . Let B i bea dam such that B h is closer than B i and X B h a minimum cut of D (cid:0) I , B h (cid:1) .Then, B i ∪ X B h is a minimum ( S, T ) -cut for instance I .Proof. As dam B h is closer than B i , the edges of B i form a minimum cut of D ( I , B h ). Indeed, they are the edges of level i inside D ( I , B h ), so they separate S ∗ ( B h ) from T ∗ ( B h ). Moreover, we know there is a set of | σ ( B h ) | edge-disjointpaths from S ∗ ( B h ) to T ∗ ( B h ) in D ( I , B h ). As | σ ( B h ) | = | σ ( B i ) | = | B i | , set B i is a minimum cut of instance D ( I , B h ).We suppose that there is an open ( S, T )-path Q in undirected graph G de-prived of edges B i ∪ X B h . Path Q cannot avoid level h of the drainage and passesthrough one edge of Z h . As B h ∪ B h = Z h , some edges of path Q belong eitherto the dry instance of B h or to the dry instance of B h , or to both of them.First, from Lemma 3 we know that no edge of graph G has one endpoint inthe dry area A ∗ ( B h ) of B h and the another one in the dry area A ∗ ( B h ) of B h .Second, we show that the existence of path Q yields a contradiction with thedefinition of the dry instance. As sets A ∗ ( B h ) and A ∗ ( B h ) cannot be connectedby an edge of G , path Q “traverses” completely at least one of the dry instances D ( I , B h ) or D (cid:0) I , B h (cid:1) , with no loss of generality we say D ( I , B h ). In otherwords, a segment of Q connects S ∗ ( B h ) and T ∗ ( B h ). This is not possible becausedam B i separates these two sets of vertices. With the dry instance D (cid:0) I , B h (cid:1) , we ixed-parameter tractability of counting small minimum ( S, T )-cuts 15 obtain the same contradiction as X B h separates S ∗ ( B h ) and T ∗ ( B h ). Therefore, B i ∪ X B h separates S from T with p edges, as (cid:12)(cid:12) X B h (cid:12)(cid:12) = (cid:12)(cid:12) σ ( B h ) (cid:12)(cid:12) = p − | B i | .We now prove a stronger result for set X \ B i ( X ) . In fact, edges of set X \ B i ( X ) lie in the target side of level i ( X ) − h ( X ) + 1 in the drainage of instance D (cid:0) I , B h ( X ) (cid:1) . This statement is formulated in the theorem below. Theorem 5.
Let X be a minimum ( S, T ) -cut of G and let ( Z ′ , . . . , Z ′ k ′ ) be thedrainage of instance D (cid:0) I , B h ( X ) (cid:1) . Then, set Z ′ i ( X ) − h ( X )+1 is equal to B i ( X ) = Z i ( X ) \ B i ( X ) and edges X \ B i ( X ) belong to the target side of Z ′ i ( X ) − h ( X )+1 insideinstance D (cid:0) I , B h ( X ) (cid:1) .Proof. According to Theorem 3, we know that edges of X \ B i ( X ) belong to thedry instance of B h ( X ) , i.e. E ∗ ( B h ( X ) ). Moreover, they are also in the targetside of Z i ( X ) , as B i ( X ) ( Z i ( X ) is the front dam of X . We denote by B i ( X ) thecomplement of B i ( X ) in Z i ( X ) , B i ( X ) = Z i ( X ) \ B i ( X ) . We want to prove thatdam B i ( X ) is the minimum drainage cut of level i ( X ) − h ( X ) + 1 in instance D (cid:0) I , B h ( X ) (cid:1) . For this purpose, we first prove that B h ( X ) is closer than B i ( X ) .Dam B i ( X ) has the same signature as B h ( X ) because their respective com-plement fulfil σ ( B i ( X ) ) = σ ( B h ( X ) ). Moreover, we prove that arcs of B i ( X ) arein the dry instance of B h ( X ) . Suppose an arc e i = ( u i , v i ) of B i ( X ) does notbelong to E ∗ (cid:0) B h ( X ) (cid:1) . Let Q j be the Menger’s path containing arc e i . Then,no arc of Q j after e i is inside instance D (cid:0) I , B h ( X ) (cid:1) . This is a contradiction aspath Q j must contain an edge of cut X . Indeed, path Q j contains neither anarc of B i ( X ) as σ ( B i ( X ) ) ∩ σ ( B i ( X ) ) = ∅ nor an arc of X \ B i ( X ) as all its arcsafter level i ( X ) do not belong to D (cid:0) I , B h ( X ) (cid:1) (contradiction with Theorem 3).In summary, dam B h ( X ) is closer than B i ( X ) .All dams B ℓ such that σ ( B h ( X ) ) = σ ( B ℓ ) and h ( X ) < ℓ < i ( X ) have acommon closest dam: B h ( X ) . Indeed, if it is not the case for a dam B ℓ , there isan arc ( u ℓ , v ℓ ) ∈ B ℓ where u ℓ / ∈ A ∗ (cid:0) B h ( X ) (cid:1) . As a consequence, dam B i ( X ) is notcontained in E ∗ ( B h ( X ) ), as arc ( u ℓ , v ℓ ) belongs to a Menger’s path containingan arc of B i ( X ) .We focus now on the drainage of instance D (cid:0) I , B h ( X ) (cid:1) . The minimum drainagecut of level one in this instance is B h ( X ) itself, as it is the minimum closest (cid:0) S ∗ ( B h ( X ) ) , T ∗ ( B h ( X ) ) (cid:1) -cut.Let B h ( X )+1 be the dam of level h ( X )+1 in I fulfilling σ ( B h ( X ) ) = σ ( B h ( X )+1 )and B h ( X )+1 its complement. We prove that B h ( X )+1 is the minimum drainagecut of level two in D (cid:0) I , B h ( X ) (cid:1) , i.e. it is the minimum closest cut between V T ( B h ( X ) ) and T ∗ ( B h ( X ) ) in graph G ∗ ( B h ( X ) ) deprived of R (cid:0) B h ( X ) , S ∗ ( B h ( X ) ) (cid:1) .Suppose that there is another minimum closest cut Z B h ( X ) = B h ( X )+1 . Set X B h ( X ) = Z B h ( X ) ∪ B h ( X )+1 is a minimum ( S, T )-cut of instance I accordingto Theorem 4. As its edges belong to the target side of Z h ( X ) , it is a minimum( S h ( X )+1 , T )-cut. Based on the definition of Z B h ( X ) , the reachable set of X B h ( X ) S S ∗ ( B h ) S ∗ ( B h ) A ∗ ( B h ) A ∗ ( B h ) A ∗ ( B i ) Levels of D ( I , B h ) i − h + 11 TT ∗ ( B h ) T ∗ ( B h ) B h B h B i B i Fig. 7.
Illustration of Theorem 5: for any minimum cut with the front dam B i , thetails of arcs in X \ B i belong to the yellow zone. is necessarily included into the reachable set of Z h ( X )+1 = B h ( X )+1 ∪ B h ( X )+1 in graph G \ R ( Z h ( X ) , S ). This is a contradiction to the construction of thedrainage, as Z h ( X )+1 is the unique minimum closest ( S h ( X )+1 , T )-cut in graph G \ R ( Z h ( X ) , S ). Consequently, B h ( X )+1 is the minimum drainage cut of level twoinside D (cid:0) I , B h ( X ) (cid:1) .We can iterate these arguments on dams B h ( X )+2 , B h ( X )+3 , etc. For example,dam B h ( X )+2 , σ ( B h ( X )+2 ) = σ ( B h ( X ) ), is the minimum closest (cid:0) V T ( B h ( X )+1 ) , T (cid:1) -cut when graph G ∗ ( B h ( X ) ) is deprived of R (cid:0) B h ( X )+1 , S ∗ ( B h ( X ) ) (cid:1) . Otherwise, itwould imply that Z h ( X )+2 is not the minimum closest ( S h ( X )+2 , T )-cut in graph G \ R ( Z h ( X )+1 , S ), which contradicts the construction of the drainage. Eventu-ally, dam B h ( X )+2 is the minimum drainage cut of level three inside D (cid:0) I , B h ( X ) (cid:1) ,dam B h ( X )+3 of level four, etc. Then, dam B i ( X ) is the minimum drainage cutof level i ( X ) − h ( X ) + 1 in instance D (cid:0) I , B h ( X ) (cid:1) .Coming back to Theorem 3, the edges of X \ B i ( X ) belong to both E ∗ ( B h ( X ) )and E (cid:2) R ( Z i ( X ) , T ) (cid:3) . So, they are in the target side of dam B i ( X ) inside instance D (cid:0) I , B h ( X ) (cid:1) . Our algorithm starts by computing the drainage Z ( I ) and the Menger’s pathsof input instance I . For all dams B i , it counts the minimum cuts of size p in I which admit the front dam B i . If B i = Z i , it does this recursively by countingthe minimum cuts in instance D (cid:0) I , B h (cid:1) which only contains edges from thetarget side of the internal level i − h + 1 of D (cid:0) I , B h (cid:1) , where B h is the closestdam of B i . The minimum cut size in D ( I , B h ) is at most p − ixed-parameter tractability of counting small minimum ( S, T )-cuts 17
We denote by C ( I ) = C ( I ) the total number of minimum ( S, T )-cuts ofinstance I . We define C ℓ ( I ) as the number of minimum cuts of instance I whichare composed of edges from E [ R ( Z ℓ , T )] only. For example, C ( I ) gives thenumber of minimum ( S, T )-cuts in instance I without edges of Z ∪ Z . Value C ℓ ( I ), 0 ≤ ℓ ≤ k −
1, can be written: C ℓ ( I ) = k − ℓ + X Closestdam B h ( Z h X i : i>ℓ, ∃ B i : B h closer than B i C i − h +1 (cid:0) D (cid:0) I , B h (cid:1)(cid:1) . (1)The first k − ℓ cuts are the minimum drainage cuts of I with level greaterthan ℓ , i.e. cuts Z ℓ +1 , . . . , Z k . The second term counts cuts taking edges onlyfrom E [ R ( Z ℓ , T )] and admitting a front dam B i ( X ) = Z i ( X ) . Theorems 3 and 5guarantee that any of these minimum ( S, T )-cuts is counted at least once. Indeed,for any front dam B i and its closest dam B h , we compute the number of cutsin instance D (cid:0) I , B h (cid:1) such that all their edges belong to the target side of B i ,which is the internal level i − h + 1 in D (cid:0) I , B h (cid:1) . In the event that the drainageof D (cid:0) I , B h (cid:1) has less than i − h + 1 levels, then C i − h +1 (cid:0) D (cid:0) I , B h (cid:1)(cid:1) = 0, as itmeans no minimum cut of I has the front dam B i .Conversely, the unicity of a closest dam ensures us that each minimum cutis counted exactly once. A minimum ( S, T )-cut X = Z i ( X ) has a unique frontdam B i ( X ) and the closest dam B h ( X ) of B i ( X ) is unique (Lemma 4). Finally,Theorem 4 secures that all cuts counted with Eq. (1) are minimum ( S, T )-cuts.Value C ( I ) is computed thanks to recursive calls on multiple instances D (cid:0) I , B h (cid:1) . From now on, we distinguish the input instance I (for which wewant to compute C ( I )) with other instances (denoted by J later on) of therecursive tree. The base cases of the recursion, i.e. the leaves of the recursivetree, are the computation of values C ℓ ( J ) either in instances J where the min-imum cut size is one or in instances where no minimum cut admits a front dam B i = Z i , i > ℓ . In both cases, the only minimum cuts of J are its minimumdrainage cuts. Each recursive call of the algorithm makes the minimum cut sizedecrease: for example, if the minimum cut size of J is q , then it is (cid:12)(cid:12) B h (cid:12)(cid:12) < q foran instance D (cid:0) J , B h (cid:1) . Therefore, the recursive tree is not deeper than p − I , J , and J ′ of therecursive tree are represented. For example, instance J = D (cid:0) I , B h (cid:1) is the sonof instance I in the tree as it is one of its dry instances.In parallel, another graph (black dashed arcs in Fig. 8) contains arcs withendpoints C ℓ ( J ). An arc connects two “compartments” C ℓ ( J ) and C ℓ ′ ( J ′ )when the computation of C ℓ ( J ) depends on C ℓ ′ ( J ′ ). The minimum ( S, T )-cutsize of J ′ is smaller than the one of J . This is why the graph made of arcsbetween compartments is a DAG.Then, we present the proof of Theorem 6 which allows us to declare thefixed-parameter tractability of counting mincuts . Theorem 6.
There are at most p m instances in the recursive tree.
87 81 · · · · · ·
216 15 · · · · · ·
14 2 · · · · · · C ( I ) C ( I ) C ℓ ( I ) C k − ( I ) C ( J ) C ( J ) C ℓ ( J ) C k − ( J ) C ( J ′ ) C ( J ′ ) C ℓ ( J ′ ) C k − ( J ′ ) Instance I Instance J = D (cid:0) I , B h (cid:1) Instance J ′ = D (cid:0) J , B h ′ (cid:1) Depth 0Depth 1Depth 2 · · ·· · ·
Fig. 8.
Recursive calls used to compute values C ℓ ( I ). Proof of Theorem 6.
The depth of instance I in the recursive tree is zero, wesay ∆ ( I ) = 0. For any closest dam B h of Z ( I ), the depth of the dry instance of B h is one: ∆ (cid:0) D (cid:0) I , B h (cid:1)(cid:1) = 1. More generally, if J is an instance of depth d ≥ B h a closest dam of Z ( J ), then instance D ( J , B h ) is at depth d + 1.We prove that, for any edge e in graph G , there are at most 2 pd instances J of depth d such that edge e belongs to the graph of J . This fact makes the totalnumber of instances in the recursive tree be upper-bounded by 2 p m .We proceed by induction. There is one instance defined for depth d = 0: itis I and it obviously contains edge e , so the number of instances with depth d = 0 containing e is thus 2 pd = 1. Let d ≥ J ′ be an instance of depth d containing edge e : there is an instance J of depth d − B h such that J ′ = D (cid:0) J , B h (cid:1) . As the graph of instance J ′ is a subgraphof those of J , the latter contains edge e .Using the induction hypothesis, there are at most 2 p ( d − instances J ofdepth d − e . Now, given an instance J with ∆ ( J ) = d −
1, webound the number of dams B h (they are closest dams according to Lemma 5)of J such that D (cid:0) J , B h (cid:1) contains edge e . We distinguish two cases: – Case 1: edge e belongs to a minimum drainage cut Z i of instance J . Wefocus on the dams B i of level i containing edge e . Their cardinality isbounded by 2 p . The edges of level i belonging to the dry instance of B h , D (cid:0) J , B h (cid:1) , form one of these dams B i . As each dam B i admits a uniqueclosest dam (Lemma 4), there cannot be more than 2 p closest dams B h suchthat D (cid:0) J , B h (cid:1) contains edge e . – Case 2: edge e is located between two minimum drainage cuts Z i and Z i +1 , e ∈ R i +1 . Consequently, the level of any closest dam B h such that D (cid:0) J , B h (cid:1) contains e is less than i : i ≥ h . Therefore, the edges of level i belonging to ixed-parameter tractability of counting small minimum ( S, T )-cuts 19 the dry instance of B h form a dam B i . Thus, the argument used in Case 1arises the same conclusion: there cannot be more than 2 p closest dams suchthat D (cid:0) J , B h (cid:1) contains edge e .Finally, the number of instances written as J ′ = D (cid:0) J , B h (cid:1) where ∆ ( J ) = d − J ′ contains e , is upper-bounded by 2 p ( d − p = 2 pd . We conclude that thereare less than 2 pd instances of depth d containing edge e . The total number ofinstances is thus smaller than P p − d =0 pd m ≤ p m .For any instance J of the recursive tree, the algorithm computes its drainage Z ( J ), its Menger’s paths and all instances D ( J , B h ) where B h is a closestdam of Z ( J ). This third operation is done by enumerating all dams B i of Z ( J ), verifying whether there is another dam B h which is closer than B i , and(if B i is a closest dam) identifying the vertices/edges of D ( J , B i ) thanks toa depth-first search in G D \ B i . As there are at most 2 p n dams in Z ( J ), itsexecution time is O (2 p n ). The overall complexity is O (cid:16) p m ( mnp + 2 p n ) (cid:17) = O (cid:0) p ( p +2) pmn (cid:1) . S, T )-cuts in undirectedgraphs
We sketch the algorithm which produces one of the minimum (
S, T )-cuts ac-cording to the uniform distribution over all minimum (
S, T )-cuts. We run ourcounting algorithm (Section 4.3) and execute a post-processing, described below.As in Section 4.3, we distinguish the input instance I from the other in-stances J of the recursive tree. Our method to sample minimum cuts consists insearching in the recursive tree, already filled out with values C ℓ ( J ) during thecounting. A minimum cut of I is extracted thanks to a randomly driven descentin the recursive tree.We start at root C ( I ). With probability kC ( I ) , the sampling algorithm re-turns one of the minimum drainage cuts of Z ( I ) taken uniformly over them. Saiddifferently, each cut Z i has probability C ( I ) to be produced. With probability1 − kC ( I ) , we will go one step down the tree. Concretely, for any dam B i of Z ( I )and its closest dam B h , we visit node C i − h +1 (cid:0) D ( I , B h ) (cid:1) of depth 1 with proba-bility C i − h +1 ( D ( I ,B h ) ) C ( I ) . The sampling algorithm returns the union of B i with thecut obtained by a recursive call on C i − h +1 ( D ( I , B h )). The algorithm applied on C i − h +1 ( D ( I , B h )) either selects a minimum drainage cut of level greater than i − h + 1 in D ( I , B h ) (uniform selection among these cuts) or visits a node atdepth 2, etc.In this way, we ensure that the minimum ( S, T )-cuts are sampled uniformly.Indeed, a cut with front dam B i is chosen with probability C i − h +1 ( D ( I ,B h ) ) C ( I ) whichis the ratio of the number C i − h +1 (cid:0) D ( I , B h ) (cid:1) of minimum cuts with front dam B i by the total number C ( I ) of minimum cuts in instance I . In this study, we were interested in the parameterized complexity of counting theminimum (
S, T )-cuts in undirected graphs. The conclusion is that an algorithmrunning in O (2 p ( p +2) pmn ) was devised. Our algorithm starts by “draining” thegraph: the drainage is made of k < n minimum cuts Z i . For any minimum cutof the instance, at least one of the minimum drainage cuts Z i contains edgesof X . For this reason, we believe that the drainage could be used on other cutproblems. We already used it to sample minimum edge ( S, T )-cuts.Our work gives rise to questions concerning the counting of minimum edge(
S, T )-cuts in undirected graphs. These questions are:1. Is there an FPT h p i algorithm solving counting mincuts with smaller poly-nomial factors? In particular, for dense graphs, our algorithm complexity is O ( n ) if we neglect the function of p . At first sight, it seems difficult to avoidthe use of a maximum flow algorithm [17], which is O ( mp ). Is it possible toidentify an algorithm with running time O ( f ( p ) n ), O ( f ( p ) n ), O ( f ( p ) n )?2. Is there an algorithm solving counting mincuts in time 2 o ( p ) n O (1) ? Inother words, we wonder whether it is possible to lower the factor O ( p ) inthe exponential and to find an algorithm with running time 2 O ( p ) n O (1) or2 O ( p log p ) n O (1) , for example.Our algorithm can be generalized to undirected graphs with positive integerweights. The idea is to transform these undirected weighted graphs into undi-rected multigraphs: if the weight of edge e = ( u, v ) is larger than p + 1, then wereplace e by p + 1 edges ( u, v ) in parallel. Otherwise, if its weight is w ≤ p , wereplace it by w edges ( u, v ). By this method, the number of edges in the trans-formed graph is upper-bounded by m ( p + 1) and it preserves the minimum cutsof the input graph. Moreover, the techniques used in this article to compute thenumber of minimum ( S, T )-cuts, such as flow algorithms or closest cuts, workon multigraphs.We can modify slightly our algorithm to enumerate minimum (
S, T )-cuts.This simply consists in stacking in the recursive tree the set of cuts countedwith C ℓ ( I ) instead of value C ℓ ( I ) itself. The number of instances stays FPT h p i but the sets of cuts put inside the recursive tree may contain a number Ω ( n p )of elements.We believe that the techniques proposed in this study could be used to countminimum vertex ( S, T )-cuts in undirected graphs and minimum (
S, T )-cuts indirected graphs. However, we explain below why major changes of our algorithmare needed to make it work on these applications.Let us focus on minimum vertex (
S, T )-cuts. The drainage can be extendedto vertex cuts, as the unicity of the minimum closest cut is preserved. Fig. 9illustrates how the drainage could be defined for minimum vertex (
S, T )-cuts:cut Z is the minimum closest ( S, T )-cut, set R is equal to R ( Z , S ) with S = S . Then, S = Z , cut Z is the minimum closest ( S , T )-cut in graph G \ R ( Z , S ), and so on. ixed-parameter tractability of counting small minimum ( S, T )-cuts 21 R R R R s s s t t t Z Z Z Fig. 9.
An example of drainage when cuts are composed of vertices.
With this definition, the drainage fulfils the properties given in Section 3 forthe edge version, the most important of them being that any minimum vertex(
S, T )-cut X admits a front dam B i ( X ) . Moreover, there is a vertex version of theMenger’s theorem, stating that the size of the minimum ( S, T )-cut is equal to themaximum number of vertex-disjoint (
S, T )-paths. The largest set of maximumvertex-disjoint (
S, T )-paths is computed in polynomial time and, consequently,the definitions of the dry area and the dry instance can be naturally extended. Z s s s t t t v v u Fig. 10.
Illustration of the impossibility to prove Theorem 3 for vertex cuts
However, Theorem 3 does not hold anymore: the set X \ B i ( X ) of a minimum( S, T )-cut X is not necessarily included in the dry instance of B h ( X ) . We givean example in Fig. 10. Set X = { v , v } is a minimum vertex ( S, T )-cut andits two vertices are drawn in red. One of its vertices v belongs to cut Z , so B i ( X ) = B h ( X ) = { v } . We observe that vertex v is reachable from S in graph G D \ B h ( X ) because the dry area of B h ( X ) = { u } does not contain any vertexdifferent than u itself. To pursue the work presented in this article, our intentionis to modify the definitions of the dry area and the dry instance in order to makeTheorem 3 be true for vertex cuts. Acknowledgement
We would like to thank Saket Saurabh who pointed out the related work [21]during the WG’19 conference.
References
1. Arvind, V., Raman, V.: Approximation algorithms for some parameterized count-ing problems. In: Proc. of ISAAC. pp. 453–464 (2002)2. Ball, M.O., Colbourn, C.J., Provan, J.S.: Network reliability. Handbooks in Oper-ations Research and Management Science, vol. 7, pp. 673 – 762. Elsevier (1995)3. Ball, M.O., Provan, J.S.: Calculating bounds on reachability and connectedness instochastic networks. Networks (2), 253–278 (1983)4. Ball, M.O., Provan, J.S.: Computing network reliability in time polynomial in thenumber of cuts. Operations Research (3), 516–526 (1984)5. Bez´akov´a, I., Chambers, E.W., Fox, K.: Integrating and sampling cuts in boundedtreewidth graphs. In: Advances in the Math. Sciences. pp. 401–415 (2016)6. Bez´akov´a, I., Friedlander, A.J.: Counting and sampling minimum (s,t)-cuts inweighted planar graphs in polynomial time. Theor. Comput. Sci. , 2–11 (2012)7. Bousquet, N., Daligault, J., Thomass´e, S.: Multicut is FPT. In: Proc. of STOC.pp. 459–468 (2011)8. Boykov, Y., Veksler, O.: Graph cuts in vision and graphics: Theories and applica-tions. In: Handbook of Math. Models in Computer Vision, pp. 79–96 (2006)9. Chambers, E.W., Fox, K., Nayyeri, A.: Counting and sampling minimum cuts ingenus g graphs. In: Proc. of SoCG. pp. 249–258 (2013)10. Chandran, L.S., Ram, L.S.: On the number of minimum cuts in a graph. In: Proc.of COCOON. pp. 220–229 (2002)11. Chen, J., Liu, Y., Lu, S.: An improved parameterized algorithm for the minimumnode multiway cut problem. Algorithmica (1), 1–13 (2009)12. Chitnis, R.H., Hajiaghayi, M., Marx, D.: Fixed-parameter tractability of directedmultiway cut parameterized by the size of the cutset. SIAM J. Comput. (4),1674–1696 (2013)13. Curticapean, R.: Counting problems in parameterized complexity. In: Proc. ofIPEC. pp. 1–18 (2018)14. Cygan, M., Lokshtanov, D., Pilipczuk, M., Pilipczuk, M., Saurabh, S.: Minimumbisection is fixed parameter tractable. In: Proc. of STOC. pp. 323–332 (2014)15. Downey, R.G., Fellows, M.R.: Parameterized Complexity. Monographs in Com-puter Science, Springer (1999)16. Flum, J., Grohe, M.: The parameterized complexity of counting problems. SIAMJ. Comput. (4), 892–922 (2004)17. Ford, L.R., Fulkerson, D.R.: Maximal flow through a network. Canad. J. Math. ,399–404 (1956)18. Guillemot, S., Sikora, F.: Finding and counting vertex-colored subtrees. Algorith-mica (4), 828–844 (2013)19. Krom, M.R.: The decision problem for a class of firstorder formulas in which alldisjunctions are binary. Mathematical Logic Quarterly (12), 15–20 (1967)20. Marx, D.: Parameterized graph separation problems. Theor. Comput. Sci. (3),394–406 (2006)21. Marx, D., O’Sullivan, B., Razgon, I.: Finding small separators in linear time viatreewidth reduction. ACM Trans. Algorithms (4), 30:1–30:35 (2013)22. Marx, D., Razgon, I.: Fixed-parameter tractability of multicut parameterized bythe size of the cutset. In: Proc. of STOC. pp. 469–478 (2011)23. Menger, K.: Zur allgemeinen Kurventheorie. Fundamenta Mathematicæ (1), 96–115 (1927)ixed-parameter tractability of counting small minimum ( S, T )-cuts 2324. Nagamochi, H., Sun, Z., Ibaraki, T.: Counting the number of minimum cuts inundirected multigraphs. IEEE Trans. Reliab. , 610–614 (1991)25. Niedermeier, R.: Invitation to Fixed-Parameter Algorithms. Oxford Lecture Seriesin Math. and Its Applications, OUP Oxford (2006)26. Provan, J.S., Ball, M.O.: The complexity of counting cuts and of computing theprobability that a graph is connected. SIAM J. Comput. (4), 777–788 (1983)27. Valiant, L.G.: The complexity of counting the permanent. Theor. Comput. Sci. ,189–201 (1979)28. Williams, V.V., Williams, R.: Finding, minimizing, and counting weighted sub-graphs. SIAM J. Comput.42