4.7 Multipath Blocking Vertices Property
4.7.2 Flow Networks for Split Graphs
InAlgorithm 4.8it has been shown how to enforce the Multipath Property using a flow network. We extend this algorithm here to also incorporate blocking vertices, such that we finally obtain an algorithm for the Multipath Blocking Vertices Property.
To this end, consider the procedure EnforceMNSBOut(G, π, σ) listed inAlgorithm 4.9. Like all property-enforcing algorithms, it takes a graph G and a linear ordering π
Algorithm 4.9Multipath Blocking Vertices Property
Require: graph G= (V, A), linear ordering π, (side σ = left or σ = right) Return: πif MNoBlock(π), otherwise an improved linear ordering π′
1: procedureEnforceMultiPathsNoBlocking(G, π)
2: π′ ← EnforceMNSBOut(G, π,left)
3: if π′ ̸= π then return π′
4: else π′ ← EnforceMNSBOut(G, π,right)
5: if π′ ̸= π then return π′
6: else π′← EnforceMNSBOut(GR, πR,left)R
7: if π′ ̸= π then return π′else returnEnforceMNSBOut(GR, πR,right)R
8: procedureEnforceMNSBOut(G, π, σ)
9: π,B, F ← ComputePositionsAndArcSets(G, π)
10: Q← set of σ-blocking vertices in G according to π
11: Gsp, πsp ← SplitVertically(G, π, Q)
12: πsp,B′,F′ ← ComputePositionsAndArcSets(Gsp, πsp)
13: N ← Gsp⏐
⏐F′ ▷construct flow network N with unit capacities as default
14: for all q∈ Q do add zero-capacity arc (ql, qr) to N
15: for all v∈ V do
16: add new vertex s to N ▷consider forward paths for arcs in Bπ+sp(v)
17: for all(v, u) ∈ Bπ+sp(v) do add arc (s, u) to N
18: D← MinCut(N, s, v) ▷compute minimum cut closest to v
19: ifsize(D) <b+πsp(v) then 20: Z ← {q ∈ Q | (ql, qr) ∈ D} 21: X← D ∩ F′ 22: Y ← B+(v) \ {(v, u) | (s, u) ∈ D} 23: if σ= right then F′′ ← F \ (X ∪ F+[Z]) ∪ Y ∪ B−[Z] 24: elseF′′← F \ (X ∪ F−[Z]) ∪ Y ∪ B+[Z] 25: π′ ← TopSort(G⏐ ⏐F′′) 26: return π′
27: remove s and all incident arcs from N
4.7 Multipath Blocking Vertices Property 105 as input. In this case, however, there is a third parameter σ specifying whether to enforce the Multipath Blocking Vertices Property with respect to the left- or to the right-blocking vertices. The algorithm follows largely that of EnforceMPathsOutgoing shown inAlgorithm 4.8, but adds a couple of statements. Like EnforceMPathsOutgoing, EnforceMNSBOutonly considers the set of outgoing backward arcs for every vertex.
In line 10, a set Q of vertices is obtained that either contains all left- or all right- blocking vertices in G, depending on whether σ is set to left or right. This set is then used in the following statement to obtain, respectively, the left- or right-blocking split graph Gspalong with linear ordering πsp. The initialization step in the following line sets the additional data structures up. In contrast to EnforceMPathsOutgoing, the flow network here is constructed from the split graph restricted to the set of forward arcs (cf.line 13). Unless specified otherwise, all arcs of N have a default capacity of one unit. The following line,line 14, describes the addition of zero-capacity arcs between the two split components of a vertex in Q and thereby represents the key idea to handle the blocking vertices: As their capacity is set to zero, they do not influence the value of a maximum flow or minimum cut between a source and a sink, but if they are on a path connecting these two vertices, they may be part of the cut set.
Next, the algorithm loops over all vertices v of the input graph. Recall that when the vertical split operation was introduced inSection 4.5, we identified every arc of the unsplit graph with its counterpart in the split graph. Therefore, we do not have to make a distinction between whether an arc is incident to a split or an unsplit vertex.
The loop (lines 15–27) encompasses the check for all outgoing backward arcs for each vertex. To this end, a new vertex s is added to the flow network (line 16) along with an arc from s to the (split or unsplit) head of every outgoing backward arc of v. In the next step, the minimum s − v cut closest to v is obtained (line 18). As already mentioned, this cut set, D, may contain zero-capacity arcs that originate from the blocking vertices. The choice of the minimum cut as the one that is closest to v implies that the zero-capacity arc belonging to last blocking vertex on each forward path, if existing, is in D. Furthermore, we must compare the size of D, i. e. , the sum of capacities of arcs in D, tob+(v) inline 19
rather than D’s cardinality, in order to know whether the set of backward arcs can be improved.
If the test is positive, the set Z of blocking vertices is extracted from Q as those whose zero-capacity arcs are part of the minimum cut D. As mentioned above, we assume here that MinCut(N, s, v) yields a set of arcs that is closest to v and minimal with respect to the definition given inSection 3.1, as can be obtained, e. g. , by a backward-looking
breadth-first search starting from v. Then, Z matches the definition in the proof of
Lemma 4.14.
Next, the reduced cut set X and the corresponding reduced set of backward arcs Y are obtained inline 21like inAlgorithm 4.8. Note, however, that intersecting D and the set of forward arcs in G, F, not only eliminates arcs incident to the new vertex s, but also zero-capacity arcs originating from Q.
The improved set of forward arcs is obtained for the right-blocking case inline 23and for the left-blocking case inline 24, as described in the proof ofLemma 4.14. Topologically sorting the subgraph of G restricted to this new set of forward arcs then yields the improved linear ordering π′, which is returned immediately. Otherwise, if the test in
line 19was negative, the algorithm continues with the next vertex.
The procedure EnforceMultiPathsNoBlocking(G, π), which is also listed in Algo- rithm 4.9, calls EnforceMNSBOut four times: once with side σ set to left, once with
σset to right with parameters G and π, and the same with parameters GRand πRto ensure the Multipath Blocking Vertices Property also for the incoming backward arcs of every vertex.
Let κ(n, m) be the time complexity of computing a minimum cut in a unit-capacity network.
Lemma 4.15
EnforceMultiPathsNoBlocking(G, π) runs in time O(n · κ(n, m)).
Proof. We start again by analyzing EnforceMNSBOut. EnforceMNSBOut differs from EnforceMPathsOutgoing, which was analyzed in the proof ofLemma 4.11, only in few statements. The construction of the set of blocking vertices Q inline 10as well as the call to SplitVertically inline 11and the insertion of the zero-capacity arcs inline 14can be accomplished in time O(m). In comparison to G, the split graph Gsphas at most twice as many vertices and the same number of arcs, hence, their size is asymptotically equal. Thus, the initialization steps inline 9andline 12require O(m) time each.
An important point in the algorithm is the call to MinCut inline 18. In the proof ofLemma 4.11, we introduced a function κ(n, m) to express the running time of an algorithm that computes a minimum cut in a unit-capacity network as O(κ(n, m)). Here, the flow network additionally contains exactly the zero-capacity arcs, which are, however, irrelevant for the computation of the maximum s − v flow. The set of arcs that form a minimum cut can be obtained by a backward breadth-first search on the residual
4.7 Multipath Blocking Vertices Property 107 graph that starts from v and that also takes the zero-capacity arcs with residual capacity zero into account. This does not increase the asymptotic running time of MinCut and is compliant with the demands on the cut set stated in the description ofAlgorithm 4.9. The effort to compute an improved set of forward arcs stays asymptotically the same in comparison to EnforceMPathsOutgoing.
In conclusion, as κ(n, m) ∈ Ω(m) as argued in the proof ofLemma 4.11, the time needed to compute the minimum cut still dominates the asymptotic time complexity of the statements inside the loop. For the total running time of the loop, this yields O(n · κ(n, m)), which in turn supersedes the additional effort of O(m) at the beginning of the procedure.
EnforceMultiPathsNoBlockingconsists of four calls to EnforceMNSBOut and there- fore has the same asymptotic running time. Due to the general assumptions regarding the implementation (cf.Section 4.2.5), we neglect again the cost of comparing π to π′and of the reverse operations.
By passing EnforceMultiPathsNoBlocking as parameter to Iterate, we obtain an algo- rithm that establishes the Multipath Blocking Vertices Property. For easier reference, we set EstablishMultiPathsNoBlocking(G, π) to Iterate(G, π, EnforceMultiPathsNoBlocking).
Lemma 4.15in combination withProposition 4.1yields:
Corollary 4.19
EstablishMultiPathsNoBlocking(G, π) runs in time O(n · m · κ(n, m)).
As already mentioned inSection 4.6, κ(n, m) ∈ O(m · min{n23, m12}).