Journal of Graph Algorithms and Applications Flows in One-crossing-minor-free Graphs 202 Chambers and Eppstein Flows in One-crossing-minor-free Graphs

We study the maximum flow problem in directed H-minor-free graphs where H can be drawn in the plane with one crossing. If a structural decomposition of the graph as a clique-sum of planar graphs and graphs of constant complexity is given, we show that a maximum flow can be computed in O(n log n) time. In particular, maximum flows in directed K3,3-minor-free graphs and directed K5-minor-free graphs can be computed in O(n log n) time without additional assumptions.


Introduction
Computing maximum flows is fundamental in algorithmic graph theory, and has many applications. Although flows can be computed in polynomial time for arbitrary graphs, it is of interest to find classes of graphs for which flows can be computed more quickly, and specialized algorithms are known for flows in planar graphs [3,13,17,18,21,22,24,25,27,35], graphs of bounded genus [4,5], graphs with small crossing number [19], and graphs of bounded treewidth [15].
Planar graphs, graphs of bounded genus, and graphs of bounded treewidth are minor-closed graph families, families of graphs closed under edge contractions and edge deletions. According to the Robertson-Seymour graph minor theorem [32], any minor-closed graph family can be described as the X-minorfree graphs, graphs that do not have as a minor any member of a finite set X of non-members of the family; for instance, the planar graphs are exactly the {K 5 , K 3,3 }-minor-free graphs [33]. In many cases the properties of a graph family are closely related to the properties of its excluded minors: for instance, the minor-closed graph families with bounded treewidth are exactly the families of X-minor-free graphs for which X includes at least one planar graph [29], and the families with bounded local treewidth (a functional relationship between the diameter of a graph and its treewidth) are exactly those for which X includes at least one apex graph, a graph that can be made planar by removing a single vertex [10]. If X includes a graph that can be drawn in the plane with a single pair of crossing edges, then the X-minor-free graphs have a structural decomposition as a clique-sum of smaller graphs that are either planar or have bounded treewidth [8,30]. In this last case we say that the family of X-minor-free graphs is one-crossing-minor-free; families of this type include the K 3,3 -minor-free graphs and K 5 -minor-free graphs, since K 3,3 and K 5 are one-crossing graphs ( Figure 1).
In this paper we consider flows in one-crossing-minor-free graph families. We provide O(n log n) algorithms to compute maximum flows in any directed Hminor-free graph, where H is a fixed one-crossing graph and where the structural decomposition of the graph is provided as part of the input. In the case of K 3,3minor-free graphs and K 5 -minor-free graphs, algorithms are known that can find such a decomposition efficiently [2,28], and by combining our techniques with those known decomposition algorithms we provide an O(n log n) time algorithm for maximum flow in directed K 3,3 -minor-free and K 5 -minor-free graphs without requiring the decomposition to be part of the input.
Our main motivation for looking at flows in one-crossing-minor-free graphs is to try to make progress towards finding flows in arbitrary minor-closed graph families. Due to known separator theorems for minor-closed families [1], an algorithm of Johnson and Venkatesan [22] can be applied to find flows in any minor-closed family in time O(n 3/2 log n), but this does not come close to the nearly-linear time bounds known for planar and bounded-genus graphs. Like onecrossing-minor-free graphs, graphs in more general minor-closed families have a structural decomposition in terms of bounded-genus surfaces, clique-sums, apexes (a constant number of vertices that can be adjacent to arbitrary subsets of each of the bounded-genus surfaces), and vortexes (bounded-treewidth graphs glued into faces of the bounded-genus surfaces) [7,31]. However, these decompositions are greatly simplified in the one-crossing-minor-free case: the surfaces are planes and there are no apexes or vortexes. To handle the general case, we would need to combine clique-sums, bounded-genus, apexes, and vortexes. The problem of flows on bounded genus surfaces has been previously examined [4,5] and the present work focuses on clique-sums, as these are the main feature in the structural decomposition for one-crossing-minor-free graphs. However, it remains unclear how to handle apexes and vortexes.
As an important tool in our results, we greatly simplify the mimicking networks of Hagerup et al [15] for multiterminal flow networks in the case of four terminals with a single source, leading to significantly reduced constant factors in the running time of algorithms that use this networks. Similar simplifications had been achieved in the undirected case [6] but to our knowledge our small directed mimicking network is novel.

Flows and Cuts
A flow network is a graph G = (V, E), where each edge e ∈ E has an associated nonnegative real capacity c e , along with two distinguished vertices s and t which are called the source and sink, respectively. A flow in this graph is a set of nonnegative real values f e for each edge e ∈ E such that f e ≤ c e for every e ∈ E and uv∈E f uv = (vu)∈E f vu for every v ∈ V − {s, t}. The value of the flow is the amount of net flow going from s to t, or sv∈E f sv .
A cut in a flow network is a set of edges separating s from t; the capacity of the cut is the sum of the capacities of all the edges that cross the cut in the direction from s to t. Clearly, the value of any flow is less than or equal to the value of any cut. The classic max-flow min-cut theorem states that the maximum possible flow from s to t is in fact equal to the minimum possible cut.
In our setting, we will need to know the maximum possible flow that can travel through a subgraph of the input graph; this will allow us to simplify the graph by removing the subgraph and replacing it with an equivalent (but much smaller) subgraph. To do this, we compute an external flow. In external flow networks, instead of a single source and sink, we have an ordered set of terminals Q = {q 1 , . . . q k } where each terminal q i has associated with it a number x i ; we require that i x i = 0. If x i is positive then it is interpreted as a supply, and if x i is negative it is interpreted as a demand. (It may also be the case that x i is zero, in which case x i carries neither a supply nor a demand.) A realizable external flow is a set of k values (x 1 , . . . , x k ) for (q 1 , . . . , q k ), along with a flow f such that (qi,v)∈E f (qi,v) − (v,qi)∈E f (v,qi) = x i for all i. Basically, the flow remains balanced at every vertex in V \ Q, and the imbalance of flow at each vertex in q i ∈ Q is exactly x i .
It will be helpful to define a special case of external flow networks, which we call single-source external flow networks. A single-source external flow network is, simply, an external flow network for which only q 1 may have a positive supply x i ; every other terminal has x i ≤ 0 indicating that it is either a demand node or is inactive as a terminal. As before, a realizable single-source external flow is a realizable external flow subject to this constraint on the values of x i .
We define S → T , for sets of terminals S and T in an external flow network, to be the minimum value of a cut for which every terminal in S is on the source side of the cut and every terminal in T is on the sink side of the cut. We will further abbreviate the notation by writing strings of symbols instead of bracketed set notation for the sets of terminals on each side of the cut; e.g., s → abc should be interpreted as an abbreviation for {s} → {a, b, c}.

Mimicking networks
Let G be an external flow network or single-source external flow network with a fixed specification of the edge capacities and a fixed ordered set of terminals Q, but where the supply and demand quantities x i remain variable. A key ingredient for our technique, as formalized by Hagerup et al. [15], is the concept of a mimicking network, a network H that has the same terminals as G and has the same realizable external flows, but may have many fewer edges and vertices than G. In what amounts to a form of separator based sparsification [11], Hagerup et al. solve flow problems on bounded-treewidth networks by repeatedly replacing subnetworks of the given network with smaller mimicking networks. Their construction of mimicking networks is based on an observation of Gale [14]: . . , q k } if and only if the following relations are satisfied: Essentially, this means that in order to understand the possible flow patterns in a subnetwork with k terminals, one needs only to know the (2 k − 2) minimum cut values from a nonempty subset of terminals to its nonempty complement. If two networks have the same minimum cut values for each subset then they behave the same with respect to flows. Based on this observation, Hagerup et al. show that there exists a replacement network of at most 2 2 k −2 vertices that behaves equivalently to any k-terminal network: [?] Given any external flow network G with k terminals, there exists a flow network having at most 2 2 k −2 vertices which has the same external flow value as G.
Specifically, the mimicking network of Lemma 2 can be constructed from G by finding a set of 2 k − 2 minimum cuts, one for each partition of the terminals into two nonempty subsets, and by collapsing subsets of vertices in G into a single supervertex whenever all vertices in the subset are on the same side of every cut. Note that the mimicking network is not necessarily a minor of G, as the collapsed subsets need not form connected subgraphs of G.
However, the size of the mimicking networks formed by Lemma 2, while constant, is large. Our algorithms will involve external flow networks with up to four terminals, and if we applied Lemma 2 directly we might get as many as 16384 vertices in our mimicking networks. It is possible to reduce the number of vertices in the construction of Hagerup et al. from a power of two to a Dedekind number by requiring nested partitions of the terminals to have nested cuts, but this would still lead to 168 vertices for the mimicking network of a four-terminal network. We describe in an appendix a simpler mimicking network of Chaudhuri et al. [6] for external flows with at most three terminals, and a new mimicking network for single source external flows with at most four terminals that are both much smaller, requiring at most one nonterminal vertex. These simplified mimicking networks are depicted in Figure 2. It is important for our techniques that the mimicking network for a three-terminal network is planar and has its three terminals in a single face of its planar embedding (more strongly, in fact, it is outerplanar); however, we do not rely on the planarity of the four-terminal mimicking network.

Structure of minor free graphs
A minor of a graph G is a graph that can be formed from G by contracting and removing edges. A graph family F is minor-closed if every minor of a graph in F also belongs to F . If X is a finite set of graphs, the X-minor-free graphs are the graphs G such that no minor of G belongs to X; the X-minor-free graphs are obviously a minor-closed graph family, and (much less obviously) the Robertson-Seymour graph minor theorem [32] states that every minor-closed graph family has this form. If F is the family of X-minor-free graphs, then X is the set of forbidden minors for F ; for instance, K 5 and K 3,3 are the forbidden minors for the planar graphs. We will abuse notation and abbreviate the {H}-minor-free graphs (where H is a single graph) as the H-minor-free graphs.
A clique-sum is an operation that combines two graphs by identifying the vertices in two equal-sized cliques in the two graphs, and then possibly removing some of the edges of the cliques. A k-sum is a clique-sum where all cliques have at most k vertices. More generally, we will say that a given graph is a ksum of a collection of more than two graphs if it can be formed by repeatedly replacing pairs of graphs of the collection by their k-sum. Clique-sums are closely related to vertex-connectivity of graphs: for instance, the decomposition of a biconnected graph into triconnected components, formalized in the SPQR-tree, gives a representation of the graph as a 2-sum of triconnected graphs, cycles, and two-vertex multigraphs [9,20,26]. (As some of our algorithms use the SPQR-tree decomposition, we include a brief description of it in an appendix.) Besides their relation to connectivity, clique-sums have also played an important role in describing the structure of minor-closed graph families since the proof by Wagner [33] that K 5 -minor-free graphs are exactly the graphs that can be formed by 3-sums of planar graphs and the 8-vertex nonplanar Wagner graph, the graph formed by adding four edges connecting opposite pairs of vertices in an 8-cycle (Figure 3, right). Wagner [34] and D. W. Hall [16] also proved that K 3,3 -minor-free graphs are exactly the 2-sums of planar graphs and the five-vertex complete graph K 5 (Figure 3, left). These two characterizations of H-minor-closed families can be generalized to any H-minor-free graph with the property that H can be drawn in the plane with only a single edge crossing, as K 3,3 and K 5 both can. In this case, the H-minor-free graphs can always be decomposed into 3-sums of planar graphs and graphs of bounded treewidth [30].
Algorithmically, a decomposition of a K 3,3 -minor-free graph into a 2-sum of planar graphs and K 5 can be computed in linear time [2]. Essentially, this is simply a matter of constructing the SPQR tree and verifying that all triconnected components are either planar or K 5 . As has been shown more recently, a decomposition of a K 5 -minor-free graph into a 3-sum of planar graphs and the Wagner graph can also be constructed in linear time [23,28]. Algorithmic versions of the generalized decomposition of graphs in any H-minor-free family (where H is a one-crossing graph) into 3-sums of planar graphs and graphs of bounded treewidth can also be solved in polynomial time [8], but the polynomial O(n 4 ) is too high to be of use in flow algorithms, so in this case we will assume that a decomposition has been given to us as part of the input. In case a future development leads to linear time algorithms for decomposition of one-crossing-minor-free graphs, this assumption may be removed.

Flow algorithm
Recall first that any H-minor free graph G (where H is a one-crossing graph) can be decomposed into 3-sums of planar and bounded treewidth graphs; we refer to these smaller graphs as components of the clique-sum decomposition. In order to handle the case that three or more components are glued together by a 3-sum at a single shared clique, we may represent the decomposition as a 2-colored tree, in which the vertices of one color represent the components of the decomposition and the vertices of the other color represent the cliques at which they are glued together. We may identify two distinguished components of the decomposition, one containing s and another containing t, where s and t are the two terminals of our given flow problem; if s or t is part of a clique on which multiple components are glued, then the distinguished component containing that terminal may be chosen arbitrarily among all components containing it. The two distinguished components are necessarily connected by a path in the clique-sum decomposition tree (possibly a path of length zero).
The vertices of G that belong to the cliques of the clique-sum decomposition, in effect, will form terminals in each component, so any flows into and out of components of the decomposition can be treated as an external flow computations. Our algorithm will iteratively replace each component in the decomposition with a mimicking network of constant size. However care is needed in ordering these computations, as some components may have more than a constant number of vertices that belong to cliques of the decomposition and we can only use mimicking networks for components that have a constant number of terminals. We perform this replacement in two phases: in the first phase, the components that are replaced do not belong to the path from s to t of the decomposition tree, and in the second phase the replaced components lie along this path.
Refining the decomposition. For technical reasons it is necessary to ensure that the planar components in our decomposition are only glued together by 3-sums along their faces, which we achieve by refining the given clique-sum decomposition tree. To do so, we make the following changes, each of which replaces one of the components in the decomposition by a clique-sum of smaller components: -If any component of the decomposition is not biconnected, replace it with the 1-sum of its biconnected components, glued together by 1-sums at its articulation vertices. -If any component of the decomposition is biconnected but not triconnected, find an SPQR tree representing it as a 2-sum of its triconnected components [9,20,26], as outlined in an appendix. All these refinements may be performed in linear time, and after this stage each triangle in each planar component of the decomposition forms a face of the component.
Simplification phase I: components off the terminal path. Next, we deal with all components that are not on the s to t path in the clique-sum decomposition tree. Our algorithm iteratively finds a component C i that is a leaf in the clique-sum decomposition tree; let C j be the component to which C i is glued by a clique-sum, one step closer to the s-t path. Then C i is connected to C j and the rest of the graph via at most three vertices, so we can treat the flow calculation within that component as an external flow problem with at most three terminals. Since the subgraph is either planar or of bounded treewidth, we can in O(n log n) time compute the min-cut values of all 6 possible partitions of its terminals, and by Lemma 4, we can replace the component C i with a mimicking network C i of at most four vertices. We then split into cases according to how C i and C j fit into the rest of the clique-sum decomposition tree: -If C j is a bounded-treewidth component, then C i can be glued directly into C j by performing the clique-sum that connects these two components, forming a decomposition tree with one fewer component. The treewidth of the merged component is the maximum of 3 and the treewidth of C j (using the fact that the mimicking network for C i is at worst an oriented form of K 4 ), so after any number of repetitions of steps of this type the treewidth remains bounded. -If C j is a planar component, and C i connects to C j via one or two terminals or via a triangle of three terminals that is not used for any other 3-sum in the decomposition tree, then again C i can be immediately glued into C j forming a decomposition tree with one fewer component. Due to the planar structure of our three-terminal mimicking networks and due to the fact that the gluing triangle is a face of C j , this step preserves both the planarity of C j and the property that all gluing triangles in the new larger planar component are still faces of their component. -If C j is a planar component and the gluing triangle of C i is shared with another four-vertex replacement network C h , then C h and C i may be merged into a single mimicking network. Then, if this merged component is the only component that uses that gluing triangle, it may be glued into C j as in the previous case. -In the remaining cases, we replace C i by C i in the decomposition tree but do not merge it with C j .
After all simplifications of this type have been performed, the remaining decomposition tree must have the structure of a path of components connecting s to t, where each of the gluing triangles in this path may also be connected to a single mimicking network off the path.
Simplification phase II: components along the terminal path. To complete the algorithm we will perform a similar sequence of replacements along the path from s to t. However, we must use a slightly different technique, since we may now need to deal with four terminals at a time: s and the three vertices in the 3-sum connecting the first two components in the s-t path. Additionally, after some of the replacements in this final stage of the algorithm, we will have to compute flows in networks that are neither planar nor of bounded treewidth, but that can be made planar by the removal of a constant number of edges; a result of Hochstein and Weihe [19] allows us to compute minimum cuts in these graphs in near-linear time. In this stage of the algorithm, as long as s and t belong to different components, we perform the following steps: -Let C i be the component containing s and T i be the set of vertices in the clique-sum connecting C i to the next component in the s-t path. -Compute the minimum cut amounts between s and each nonempty subset of T i , using the algorithm of Hochstein and Weihe [19] if C i has been formed by adding a constant number of edges to a planar component, and the algorithm of Hagerup et al. [15] if C i is a bounded-treewidth component. Eventually this simplification will leave us with a planar or bounded treewidth graph containing both s and t, and we can compute the maximum flow between them directly in near linear time.
Reversing the simplifications and constructing a flow. We then reverse the sequence of simplifications we have performed, replacing each mimicking network with the larger network it replaced; for each such replacement we perform a single flow computation to find valid flow amounts forming the same external flow as in the mimicking network. At the end of this reversal of the simplification process, we will have a correct maximum flow in the original network that we were given as input. We summarize our results as a theorem.
Theorem 1. If we are given as input a decomposition of a directed flow network into a 3-clique-sum of planar and bounded-treewidth components, then in O(n log n) time we may compute a maximum flow between any two terminals s and t of the network.
Corollary 1. For any fixed one-crossing graph H, maximum flows in directed H-minor-free flow networks may be computed in O(n log n) time once a cliquesum decomposition of the network has been found.
In the case of K 5 -free and K 3,3 -free graphs, we can find a clique-sum decomposition in O(n) time [2,28]. The case of K 3,3 -free graphs is particularly simple, since it uses only 2-sums, and therefore involves simpler mimicking networks.
Corollary 2. We may compute maximum flows between any two terminals in a K 5 -free or K 3,3 -free directed flow network in O(n log n) time.

Conclusions
We have shown how to find flow in near linear time when the input graph is a clique-sum of planar and bounded tree-width graphs by using mimicking networks to iteratively simplify the graph. This technique allows us to use known near linear algorithms in each bounded tree-width or planar component of the decomposition.
There is no added generality in considering 4-sums of planar graphs in place of 3-sums (any 4-sum involving a planar graph can be rearranged into a combination of 3-sums), but our methods immediately generalize to 2-sums of boundedgenus graphs and bounded-treewidth graphs. Flow computation in 3-sums of bounded genus graphs is more problematic due to the possible existence of nonfacial non-separating triangles.
The larger goal, however, is computing flow quickly in more arbitrary minorfree families of graphs. Since flow can be computed efficiently in bounded genus and bounded tree-width graphs, the primary remaining open questions are those of computing flow in graphs with vortices or apexes, since these are the relevant building blocks for more general minor free families. Even the case of a planar graph with two apexes would be of great interest, since it could be used to solve a generalization of the maximum flow problem on planar graphs in which the flow is allowed to have multiple sources and sinks.
Proof. Let the three terminals of flow network G be a, b, and c, and form a network that consists of these three terminals together with a fourth vertex d, in the form of a star K 1,3 with six edges connecting d in both directions to each terminal. For each terminal q, set the capacity of the edge from q to d to the minimum cut amount q → ({a, b, c} \ {q}) as measured in G, and set the capacity of the edge from d to q to be ({a, b, c} \ {q}) → q. It follows from Lemma 3 that each minimum cut separating one of the terminals from the other two consists of a single edge, and therefore that the capacity of this cut in the mimicking network exactly matches the capacity of the corresponding cut in G. The correctness of the mimicking network then follows by Lemma 1.
It is tempting to try an even simpler network, a triangle with three vertices and six edges, in place of the four-vertex network of Lemma 4, but as Chaudhuri et al. observe this does not work: the triangle can only mimic networks for which (a → bc)+(b → ac)+(c → ab) = (ab → c)+(ac → b)+(bc → a), and this equality is not necessarily true in other three-terminal external flow networks. However, in undirected flow networks, it is possible to form an undirected triangle network as a mimicking network, as shown in [6]: the capacity of the edge from a to b should be 1 2 (a → bc) + (b → ac) − (c → ab) and symmetrically for the other three edges.
We also need mimicking networks for four terminals, but only for singlesource external flows. In this case, the following variant of Lemma 1 is helpful.
Proof. Augment G by a sink vertex t, add an edge of capacity −x i from each terminal q i (i > 1) to t, and set the demand on t to x 1 . The result follows by the classical max-flow min-cut theorem: the desired single-terminal external flow exists if and only if the augmented graph has a two-terminal flow meeting the given demands, if and only if it has no cut with capacity less than x 1 . But any cut in the augmented graph has a capacity equal to its capacity in the original graph plus the sum of the demands for the terminals on the source side of the cut, and each inequality in the statement of the lemma can be restated as requiring the capacities of some of these cuts to be at least x 1 . So a cut with capacity less than x 1 exists, if and only if at least one of these inequalities is violated.
Lemma 6. Let P , Q, R, and S be four disjoint sets of terminals in an external flow network G.
Proof. Let C 1 and C 2 be minimum cuts separating P ∪ Q from R ∪ S and P ∪ R from Q ∪ S, respectively. Let A be the set of vertices of G on the source side of C 1 , and let B be the set of vertices of G on the source side of C 2 . Then the edges of C 1 ∪ C 2 can be partitioned into three disjoint subsets: the edges from A ∩ B to G \ (A ∩ B), the edges from A ∪ B to G \ (A ∪ B), and any remaining edges that go in either direction between A \ B and B \ A. The first of these three subsets of edges forms a cut separating P from Q ∪ R ∪ S, and the second of these three subsets of edges forms a cut separating P ∪ Q ∪ R from S, so the total capacity of C 1 ∪ C 2 is at least equal to (P → Q ∪ R ∪ S) + (P ∪ Q ∪ R → S).
Lemma 7. Any single-source external flow network with four terminals has a mimicking network with five vertices and seven edges.
Proof. Given a single-source external flow network G, with terminals s, a, b, and c, we may assume without loss of generality (by permuting the final three terminals, if necessary) that s → a is at least as large as s → b and s → c, and that s → ab is at least as large as s → ac. We create a mimicking network with a single nonterminal vertex x and with the following seven edges: -An edge from s to a with capacity s → a.
-An edge from s to b with capacity (s → ab) − (s → a).
-An edge from s to c with capacity (s → abc) − (s → ab).
-An edge from a to x with capacity (s → bc) + (s → a) − (s → abc).
-An edge from x to b with capacity (s → b) + (s → a) − (s → ab).
-An edge from x to c with capacity (s → c) + (s → ab) − (s → abc).
Lemmas 3 and 6 can be used to show that all edge capacities in this network are non-negative. As we now verify, each of the seven minimum cuts from s to any subset of terminals in this network has the same capacity as the corresponding minimum cut in G: -Every cut separating s from a must cut edge sa, so the cut that separates only that edge is the minimum cut, and has capacity s → a.
-Every cut separating s from {a, b} must cut edges sa and sb, so the cut that separates only those two edges is the minimum cut, and has capacity s → ab. -Every cut separating s from {a, b, c} must cut edges sa, sb, and sc, so the cut that separates only those three edges is the minimum cut, and has capacity s → abc. -There are three minimal cuts from s to {b, c}: the cut {sa, sb, sc}, the cut {ax, sb, sc}, and the cut {xb, xc, sb, sc}. The first of these has capacity (s → abc) ≥ (s → bc), the second has capacity s → bc, and the third is at least as large as the second by Lemma 3, so the minimum cut has capacity s → bc. -The minimal cuts from s to {a, c} are the cut {sa, sb, sc} with capacity s → abc, the cut {sa, sc, bx} with capacity s → ac, and the cut {sa, sc, xc} which is at least as large as the previous cut by Lemma 3. Therefore the minimum cut has capacity s → ac. -There are three minimal cuts from s to b: the cut {sa, sb}, the cut {ax, sb}, and the cut {xb, sb}. The first of these has capacity (s → ab) ≥ (s → b), the second has capacity at least equal to s → b by Lemma 6, and the third has capacity s → b, so s → b is the minimum cut value. -Among the cuts from s to c, the ones that cut off another terminal from s as well as c fall into one of the previous cases, and therefore have capacity at least s → c. There are two remaining minimal cases: the cut {sc, ax, bx} with capacity (s → bc) − (s → abc) + (s → ac), at least as large as s → c by Lemma 6, and the cut {sc, xc} with capacity s → c. Therefore, the minimum cut value is s → c.
Since all of these cuts have the same value as the corresponding cuts in G, it follows by Lemma 5 that the network constructed as above is a valid mimicking network for G. In the full paper we verify that all edge capacities are non-negative and that each of the seven minimum cuts from s to a subset of terminals in this network has the same capacity as the corresponding cut in G, from which it follows that it is a valid mimicking network.
The mimicking networks described in Lemmas 4 and 7 are shown in Figure 2.  Fig. 4. An SPQR tree (left) and the graph that it represents (right). From the full version of [12].

Appendix: SPQR tree
The SPQR tree of a graph is a formalized method of decomposing the graph into a 2-sum of simpler multigraphs, its triconnected components [9,20,26]. In order to have a self-contained exposition, we describe it briefly here. The SPQR tree is properly defined only for 2-connected graphs; to apply it to graphs that may not be 2-connected, they need to be first decomposed into 2-connected components and the SPQR tree construction applied separately to each such component. A cycle is a 2-connected graph with n vertices and n edges; a bond is a multigraph with two vertices and three or more edges, each of which has the same two endpoints. Then an SPQR tree is a tree with the following properties: -Each node t i of the SPQR tree is associated with a multigraph G i that is either a nontrivial 3-connected simple graph (an "R" node), a cycle (an "S" node), or a bond (a "P" node). -Each tree edge t i t j of the SPQR tree and is associated with a multigraph edge e ij in G i and another multigraph edge e ji in G j . These two multigraph edges e ij and e ji are known as virtual edges. -Each multigraph edge can be a virtual edge for at most one SPQR tree edge.
-Every SPQR tree edge connects two "R" nodes or two nodes of different types from each other. -Each "P" node has at most one non-virtual edge.
A tree of this type represents a graph G that is formed by repeated 2-sum operations. Each 2-sum glues together the two designated virtual edges e ij and e ji for an SPQR tree edge and then deletes the glued-together edge. The order in which the 2-sums are performed does not affect the final result. Each edge that is not virtual, in the graph associated to each node, survives to become an edge in the overall graph. The graphs associated with the SPQR tree nodes are known as the triconnected components of G.
Conversely, any 2-connected graph with two trivial exceptions, the graphs K 1 and K 2 , has a unique representation as an SPQR tree; this representation can be constructed in linear time [9,20]. In order to handle the two exceptions, we allow as a special case an SPQR tree with one "Q" node associated with one of these two exceptional graphs.