NETWORK ENCODING COMPLEXITY: EXACT VALUES, BOUNDS, AND INEQUALITIES

. For an acyclic directed network with multiple pairs of sources and sinks and a set of Menger’s paths connecting each pair of source and sink, it is known that the number of mergings among these Menger’s paths is closely related to network encoding complexity. In this paper, we focus on networks with two pairs of sources and sinks and we derive bounds on and exact values of two functions relevant to encoding complexity for such networks.


Introduction
Let G = (V, E) denote an acyclic directed graph, where V denotes the set of all the vertices (or points) in G and E denotes the set of all the edges (or links) in G. In this paper, a path in G is treated as a set of concatenated edges. For k paths β 1 , β 2 , . . . , β k in G, we say these paths merge [6] at an edge e ∈ E if 1. e ∈ k i=1 β i , 2. there are at least two distinct edges f, g ∈ E such that f, g are immediate predecessors of e in some β i , β j , i = j, respectively. We call the maximal subpath that starts with e and is shared by all β i 's (i.e., e together with the subsequent concatenated edges shared by all β i 's until some β i branches off) merged subpath (or simply merging) by all β i 's at e; see Figure 1 for a quick example. For any two vertices u, v ∈ V , we call any set consisting of the maximum number of pairwise edge-disjoint directed paths from u to v a set of Menger's paths from u to v. By Menger's theorem [10], the cardinality of Menger's paths from u to v is equal to the size of a minimum cut between u and v. Here, we remark that the Edmonds-Karp algorithm [4] can find a minimum cut and a set of Menger's paths from u to v in polynomial time.
Assume that G has two sources S 1 , S 2 and two distinct sinks R 1 , R 2 . For i = 1, 2, let c i denote the size of a minimum edge-cut between S i and R i , and let α i = {α i,1 , α i,2 , . . . , α i,ci } denote a set of Menger's paths from S i to R i , whose elements are often referred to as α i -paths. We are interested in the number of mergings among paths from different α i 's, denoted by ||G||(α 1 , α 2 ). In this paper we will count the number of mergings without multiplicity: all the mergings at the same edge e will be counted as one merging at e. And we define where the minimum is taken over all possible Menger's path sets α i 's, i = 1, 2. Roughly speaking, M (G) corresponds to the best choice of α 1 , α 2 in terms of minimizing the number of mergings. Let N * (c 1 , c 2 ) denote the set of all directed networks with one source S, two distinct sinks R 1 , R 2 , satisfying that the minimum size of edge cut between S and R i is c i for i = 1, 2. We define M * (c 1 , c 2 ) sup G∈N * (c1,c2) M (G).
Let N (c 1 , c 2 ) denote the set of all directed networks with two distinct sources S 1 , S 2 , two distinct sinks R 1 , R 2 , satisfying that the minimum size of edge cut between S i and R i is c i for i = 1, 2. We define M(c 1 , c 2 ) sup G∈N (c1,c2) M (G).
The above definitions can be roughly interpreted as follows: for a given G, we try to choose α 1 , α 2 to obtain the minimal number of mergings, and M and M * give us the minimum number corresponding to the worst-case scenarios among all possible G.
It is first shown in [8] that M * (c 1 , c 2 ) is finite for all c 1 , c 2 (see Theorem 22 in [8]). It was first conjectured that M(c 1 , c 2 ) is finite in [13]. Here, we remark that all the aforementioned work are done primarily in the context of network coding and we have rephrased their results using our notation and terminologies.
In [6], we have shown that for any c 1 , c 2 , M * (c 1 , c 2 ), M(c 1 , c 2 ) are both finite, and we further studied the behaviors of M * , M as functions of the sizes of minimum cuts. One novel aspect of our approach is that paths, rather than vertices and edges, are treated as "elementary" objects, which can be transformed to different paths through reroutings. The effectiveness of this approach is further evidenced by this work, where the lines of the thoughts in [6] are continued to derive exact values of and tighter bounds on M * and M for certain parameters. The contribution of this paper can be summarized as follows: • novel methods are used to derive the exact values of some M * with two parameters (Theorems 4.1). • through a non-trivial refinement of the arguments in [6], we obtain tighter upper bounds (Theorems 5.3, 5.8) and a scaling law (Theorem 5.9). • using the new techniques of "glueing" smaller graphs to obtain larger graphs, we give constructive proofs for tighter lower bounds (Theorems 5.2, 5.6) and some inequality relationships between M * and M (Theorems 6.1, 6.2). These inequalities may serve as a first step to understand the connections between single-source and multiple-source networks. • our constructive proofs (for the lower bounds on M and M * in Sections 4, 5 and 6) reveal the topological structure of some worse case networks (in terms of the number of encoding nodes required), which may shed some light on the implementation of efficient network coding strategies.

Network encoding complexity
One of the most fundamental yet challenging problems in the theory of network coding [17] is to determine the encoding complexity [8] for a given network, that is, the minimum number of encoding nodes required for the existence of a network coding solution. It turns out that the combinatorial notions defined in Section 1, such as M , M * and M, are closely related to the encoding complexity for a variety of networks, as elaborated below. Roughly speaking, for a network with multiple groups of Menger's paths, each of which is used to transmit a set of messages to a particular sink, network encodings are only needed at mergings by different groups of Menger's paths. As a result, with respect to a given set of Menger's paths, the number of encoding nodes required in the network is always upper bounded by the number of mergings.
Next, we illustrate in greater details the aforementioned connections in multicast networks, two-way channels and multiple unicast networks. Throughout this Multicast networks. For illustrative purposes, we first consider the famous "butterfly network" [9]. As depicted in Figure 2(a), for the purpose of transmitting messages a, b simultaneously from the source S to the sinks R 1 , R 2 , network encoding has to be done at node C. Another way to interpret the necessity of network coding at C (for the simultaneous transmission to R 1 and R 2 ) is as follows: If the transmission to R 2 is ignored, Menger's paths S → A → R 1 and S → B → C → D → R 1 can be used to transmit messages a, b from S to R 1 ; if the transmission to R 1 is ignored, Menger's paths S → A → C → D → R 2 and S → B → R 2 can be used to transmit messages a, b from S to R 2 . For the simultaneous transmission to R 1 and R 2 , merging by these two groups of Menger's paths at C → D becomes a "bottleneck", therefore network coding at C is required to avoid the possible congestions.
Generally speaking, consider a network G ∈ N * (c 1 , c 2 ) with one source S and two sinks R 1 , R 2 and chosen Menger's path sets Assume that all c i are equal to c and messages a 1 , a 2 , . . . , a c are to be transmitted to each sink simultaneously. It is well-known that the Jaggi et al. algorithm [7] can be applied along Menger's paths to obtain a network coding solution. An examination of the algorithm reveals that as long as the field size is large enough, appropriately chosen network encoding functions at all the tails of the mergings will produce a linear network coding solution. Therefore, for given α i , i = 1, 2, the number of encoding nodes needed in the Jaggi et al. algorithm is just ||G||(α 1 , α 2 ); and moreover, M (G) gives the minimum number of encoding nodes required for the existence of a network coding solution and M * (c, c) is the largest such number among all possible G ∈ N * (c, c).
Two-way channels. We first illustrate the idea using a variant of the classical butterfly network (see Example 17.2 of [16]; cf. the two-way channel in [3, Page 519]) with two sources and two sinks, where the source S 1 is attached to the sink R 2 to form a group and the source S 2 is attached to the sink R 1 to form the other group. As depicted in Figure 2(b), the two groups wish to exchange messages a and b through the network. Similarly as in the previous example, the edge A → B is where the Menger's paths S 1 → A → B → R 1 and S 2 → A → B → R 2 merge with each other, which is a bottleneck for the simultaneous transmission of messages a, b. The simultaneous transmission is achievable if upon receiving the messages a and b, network encoding is performed at the node A and the newly derived message a + b is sent over the channel A → B.
More generally, consider a network G ∈ N (c 1 , c 2 ) with two sources S 1 , S 2 and two sinks R 1 , R 2 and chosen Menger's path sets α i = {α i,1 , α i,2 , . . . , α i,ci }, i = 1, 2, where the source S 1 is attached to the sink R 2 to form a group and the source S 2 is attached to the sink R 1 to form the other group. Assume that messages a 1 , a 2 , . . . , a c1 are to be sent from S 1 to R 1 , and messages b 1 , b 2 , . . . , b c2 from S 2 to R 2 . Similarly as in multicast networks, with the field size chosen large enough and appropriately chosen encoding functions the tails of all mergings, the Jaggi et al. algorithm can be applied along Menger's paths so that R 1 (or R 2 ), together with its complete knowledge of messages b j (or a i ), can decode messages a i (or b j ) based on what has been transmitted along α 1 (or α 2 ). Therefore, for given α i , i = 1, 2, the number of encoding nodes needed in the Jaggi et al. algorithm is just ||G||(α 1 , α 2 ); and moreover, M (G) gives the minimum number of encoding nodes required for the existence of a network coding solution and M(c 1 , c 2 ) is the largest such number among all possible G ∈ N (c 1 , c 2 ).
Multiple unicast networks. Our idea can be best illustrated using the following example network with two sessions of unicast [11]. As shown in Figure 2(c), the source S 1 is to transmit message a to the sink R 1 using path And the source S 2 is to transmit message b to the sink R 2 using two Menger's paths S 2 → A → B → C → D → R 2 and S 2 → E → F → R 2 . Since mergings A → B, C → D and E → F become bottlenecks for the simultaneous transmission of messages a and b, network coding at these bottlenecks, as shown in Figure 2(c), is performed to ensure the simultaneous message transmission.
More generally, consider a network G ∈ N (c 1 , c 2 ) with two sources S 1 , S 2 and two sinks R 1 , R 2 and chosen Menger's path sets α i = {α i,1 , α i,2 , . . . , α i,ci }, i = 1, 2. Assume that all c i are equal to 2 and message a i is to be transmitted from S i to R i through α i , i = 1, 2, simultaneously. Similarly, with appropriately chosen field and encoding functions at the tails of all mergings, the Jaggi et al. algorithm can be applied along Menger's paths to obtain a network coding solution. Therefore, for given α i , i = 1, 2, the number of encoding nodes needed in the Jaggi et al. algorithm is just ||G||(α 1 , α 2 ); and moreover, M (G) gives the minimum number of encoding nodes required for the existence of a network coding solution and M(2, 2) is the largest such number among all possible G ∈ N (2, 2). For closely related work on the network coding solvability in multiple unicast networks, we refer to [2,11,12].

Notation and terminology
3.1. Basic notation. For a path β in G, let t(β), h(β) denote the tail (or starting point ) and the head (or ending point ) of path β, respectively; let β[u, v] denote the subpath of β with the starting point u and the ending point v. For two distinct paths ξ, η in G, we say ξ is smaller than η (or, η is larger than ξ) if there is a directed path from h(ξ) to t(η); if ξ, η and the connecting path from h(ξ) to t(η) are subpaths of path β, we say ξ is smaller than η on β. Note that the relation "smaller" only imposes a partial order among all paths in G, rather than a total order; and this definition also applies to the case when paths degenerate to vertices/edges (in other words, in the definition, ξ, η or the connecting path from h(ξ) to t(η) can be vertices/edges in G, which can be viewed as degenerated paths). If h(ξ) = t(η), we use ξ • η to denote the path obtained by concatenating ξ and η subsequently.
A graph G in N (c 1 , c 2 ) (or N * (c 1 , c 2 )) is said to be minimal if for any e ∈ E, G \ {e} ∈ N (c 1 , c 2 ) (or G \ {e} ∈ N * (c 1 , c 2 )). It is clear that in order to compute M(c 1 , c 2 ) (or M * (c 1 , c 2 )), it is enough to consider all the minimal graphs with distinct (or identical) sources. Since every graph in N (c 1 , c 2 ) has at least one minimal subgraph in N (c 1 , c 2 ), it follows that and similarly M * (c 1 , c 2 ) = sup ) is said to be a (c 1 , c 2 )-graph if there exists a set α i of c i edge-disjoint paths from S i to R i , i = 1, 2, such that every edge in G belongs to some α i,j . For a (c 1 , c 2 )-graph G, we say α i is reroutable if there exists a different set of Menger's paths α ′ i from S i to R i , and we say G is reroutable (or alternatively, there is a rerouting in G), if some α i , i = 1, 2, is reroutable. Note that for a non-reroutable G, the choice of α i 's is unique, so we often write ||G||(α 1 , α 2 ) as ||G|| for notational simplicity.
It follows from the following theorem that to compute M(c 1 , c 2 ) (or M * (c 1 , c 2 )), it is enough to consider all non-reroutable (c 1 , c 2 )-graphs with distinct (or identical) sources. Proof. Here we prove its equivalent statement: G is not minimal if and only if G is reroutable or G is not a (c 1 , c 2 )-graph.
Necessity: If G is not minimal, there exists e ∈ G such that G \ {e} ∈ N (c 1 , c 2 ) (or N * (c 1 , c 2 )). If e belongs to some α 1 -path or α 2 -path, there exists a different set of Menger's paths α ′ i from S i to R i (or from S to R i ) for some i ∈ {1, 2} in G, implying G is reroutable. If e does not belong to any α 1 -path or α 2 -path, G is not a (c 1 , c 2 )-graph by definition.
Sufficiency: If G is not a (c 1 , c 2 )-graph, then there exists e ∈ G that does not belong to any α 1 -path or α 2 -path. So G\ {e} in N (c 1 , c 2 ) (or N * (c 1 , c 2 )), and hence G is not minimal. If G is a reroutable (c 1 , c 2 )-graph, by symmetry, assume that there exists another set of Menger's paths α ′ 1 = {α ′ 1,1 , α ′ 1,2 , . . . , α ′ 1,c1 } from S 1 to R 1 (or from S to R 1 ) with α ′ 1,i sharing the same outgoing edge to R 1 as α 1,i , for 1 ≤ i ≤ c 1 . Pick an α ′ -path, say, α ′ 1,i1 , such that α ′ 1,i1 = α 1,i1 , and let v i1 denote the largest vertex on α 1,i1 where they leave each other. Assume that, after v i1 , α ′ 1,i1 first meets some α-path, say, α 1,i2 , at the vertex u i1 . Denote by v i2 the largest vertex where α ′ 1,i2 and α 1,i2 leave each other. Assume that, after v i2 , α ′ 1,i2 first meets some α-path, say, α 1,i3 at the vertex u i2 . Continue the procedure in a similar manner to obtain an index sequence i 1 , i 2 , . . . , i t , . . ., and similarly define v it 's and u it 's. Pick the smallest k such that i k = i j for some j < k. Notice that each edge ) and thereby G is not minimal. Now, for a fixed i, reverse the directions of edges that do not belong to any α ipath to obtain a new graph G ′ . For any two mergings λ, µ, if there exists a directed path in G ′ from the head (or tail) of λ to the head (or tail) of µ, we say the head (or tail) of λ semi-reaches [6] the head (or tail) of µ along α i , or simply, λ semi-reaches µ along α i from head (or tail) to head (or tail) 1 . It is easy to check that G is reroutable if and only if there exist i and a merging λ such that λ semi-reaches itself along α i from head to head, which is equivalent to the condition that there exist i ′ and a merging λ ′ such that λ ′ semi-reaches itself along α i ′ from tail to tail. Figure 3, the source S 1 is connected to the sink R 1 by a group of Menger's paths
The group of Menger's paths α 1 is reroutable, since there exists another group of Menger's paths Similarly, α 2 is also reroutable. Hence, G is reroutable. It is easy to check, by definition, that γ 2 semi-reaches γ 4 along α 1 from tail to tail, γ 1 semireaches γ 4 along α 1 from head to tail, γ 1 semi-reaches itself along α 1 from head to head, and γ 4 semi-reaches itself along α 2 from tail to tail.
Assume that there are ω mergings in G. It follows from the acyclicity of G that all the mergings in G can be ordered from upstream to downstream, or more precisely, they can be listed as a sequence (M 1 , M 2 , . . . , M ω ) such that as long as M i and M j , i < j, are comparable (which means there is a directed path between M i and M j ), then M i is smaller than M j . For i = 1, 2, . . . , ω, suppose that M i belongs to α 1,ki and α 2,ki . The sequence of index pairs ((k 1 ,k 1 ), (k 2 ,k 2 ), . . . , (k ω ,k ω )) is called a merging sequence of G. There might be multiple merging sequences associated with the same (c 1 , c 2 )-graph.

Alternating sequences. Consider a non-reroutable
An edge in G is said to be private if it is not shared by any pair of α 1 -path and α 2 -path. An alternating sequence in G consists of a set of private edges such that when the orientation of G is ignored, all edges form a path whose intermediate vertices are from V \ {S 1 , S 2 , R 1 , R 2 } and whose pair of terminal vertices is one of the following: (S 1 , S 2 ), (S 1 , R 1 ), (R 2 , S 2 ) and (R 2 , R 1 ). The length of an alternating sequence π, denoted by L(π), is defined to be the number of intermediate vertices that are either heads or tails of a merging.
Alternatively, an alternating sequence can be generated through the following procedure on G, where, as an example, S 1 and S 2 are supposed to be distinct. For each i, starting from S 1 , traverse along path α 1,i until we reach the tail of some merged subpath, we then traverse against the associated α 2 -path (corresponding to the merged subpath just visited) until we reach the head of another merged subpath, we then traverse along the associated α 1 -path, . . . Continue this procedure of alternately traversing along α 1 -paths or traversing against α 2 -paths until we reach a merged subpath in the same manner as above, then the fact that G is non-reroutable and acyclic guarantees that eventually we will reach R 1 or S 2 (since otherwise, as in the proof of Theorem II.1 in [6], one can find some merging that semi-reaches itself from head to head and thus G is reroutable, a contradiction). Then, an S 1 -alternating sequence is produced by sequentially listing all the edges visited during the procedure. Clearly, a similar procedure starting from R 2 will produce an R 2 -alternating sequence.
Remark 1. For the case when S 1 and S 2 are distinct, to compute M(c 1 , c 2 ), without loss of generality, we can assume that each Menger's path in G merges at least once, which implies that each alternating sequence is of positive length.
For the case when S 1 and S 2 are identical, by Proposition III.6 in [6], we can restrict our attention to the case when c 1 = c 2 . For the purpose of computing M * (c 2 , c 2 ), without loss of generality, we assume that paths α 1,i and α 2,i share a starting subpath (a maximal shared subpath by α 1,i and α 2,i starting from the source) for i = 1, 2, . . . , c 2 (since otherwise either some α 1 -path or α 2 -path would be reroutable, a contradiction to non-reroutability of G). Note that the existence of c 2 starting subpaths implies that any alternating sequence is of positive length and has terminal pair of vertices (R 1 , R 2 ). The length of an alternating sequence π, denoted by L(π), is defined to be the number of intermediate vertices that are terminal (heads or tails) of a merging or heads of a starting subpath.
It turns out that the lengths of alternating sequences are closely related to the number of mergings in G.
for a non-reroutable (c 2 , c 2 )-graph G with identical sources and c 2 starting subpaths, where the two summations above are over the all the possible alternating sequences π's in G (Here the summations implicitly involve c 1 and/or c 2 ).
Proof. We first consider the case when G has distinct sources. For an alternating sequence π, let V π denote the set of intermediate vertices, each of which is the head or tail of some merging in π. Then, (1) immediately follows from the observation that all V π 's are mutually exclusive and any merging is adjacent to some vertex in For the case when G has identical sources, (2) follows from the same observation as above and the fact that each of the c 2 starting paths is also adjacent to some vertex in π V π . Example 3.4. Consider the two graphs in Figure 5. In Graph (a), sequentially listing the edges visited during the above-mentioned procedure, the two S 1 -alternating sequences can be represented by Similarly, the two R 2 -alternating sequences can be represented by It is easy to see that that the number of mergings is 5, which is half of (1 + 4 + 1 + 4), the sum of lengths of all alternating sequences.
In Graph (b), sequentially listing the edges visited during the above-mentioned procedure, the three R 2 -alternating sequences can be represented by Clearly, the number of mergings is 4, which is half of (5 + 1 + 5 − 3).
Lemma 3.5. The shortest S 1 -alternating sequence (R 2 -alternating sequence) is of length at most 1.
Lemma 3.6. For a non-reroutable graph G, any path pair occurs at most once in any given alternating sequence.
Proof. By way of contradiction, suppose that (i, j) occurs in an alternating sequence twice. Let u 1 , u 2 be the two vertices where α 1,i and α 2,j meets. Then, as in the proof of Lemma II.4 in [6], one can prove that u 1 semi-reaches itself from head to head through α 1 . So G is reroutable, which is a contradiction.
Remark 2. It then immediately follows from Lemma 3.6 that in a non-reroutable (c 1 , c 2 )-graph with distinct sources, • the longest S 1 -alternating sequence (R 2 -alternating sequence) is of length at most c 1 c 2 ; • any α 1 -path (α 2 -path) merges at most c 1 c 2 times.
Next, we show that M(2, c 2 ) ≤ 3c 2 − 1. Consider a non-reroutable (2, c 2 )graph G with distinct sources S 1 , S 2 , sinks R 1 , R 2 , and a set of Menger's paths : merging λ is smaller than merging µ on some α 2 -path and there is no other merging between them on this path}.
Note that for any (λ, µ) ∈ Σ, λ, µ must belong to different α 1 -paths. We say (λ, µ) ∈ Σ is of type I, if λ belongs to α 1,1 , and (λ, µ) ∈ Σ is of type II, if λ belongs to α 1,2 . For any two different elements (λ 1 , µ 1 ), (λ 2 , µ 2 ) ∈ Σ. We say (λ 1 , µ 1 ) ≺ (λ 2 , µ 2 ) if either (they are of the same type and λ 1 is smaller than λ 2 ) or (they are of different types and λ 1 is smaller than µ 2 ). Clearly, the relationship defined by ≺ is a strict total order. Letting x denote the number of elements in Σ, we define to be the sequence of the ordered (by ≺) elements in Σ. Now we consecutively partition Θ into z "medium-blocks" B 1 , B 2 , . . . , B z , and further consecutively partition each B i into y i "mini-blocks" B i,1 , B i,2 , . . . , B i,yi (see Example 4.3 for an example) such that • for any i, j, the elements in B i,j are of the same type.
• for any i, j, B i,j is linked to B i,j+1 in the following sense: let (λ i,j , µ i,j ) denote the element with the largest second component in B i,j and let (λ i,j+1 , µ i,j+1 ) denote the element with the smallest first component in B i,j+1 , then µ i,j = λ i,j+1 . • for any i, B i,yi is not linked to B i+1,1 .
A mini-block is said to be a singleton if it has only one element. We then have the following lemma.
Lemma 4.2. Between any two "adjacent" singletons (meaning there is no other singleton between these two singletons) in a medium-block, there must exist a miniblock containing at least three elements.
Proof. Suppose, by way of contradiction, that there exist two adjacent singletons Θ i , Θ j with i < j in a medium-block such that each of Θ i+1 , Θ i+2 , . . . , Θ j−1 contains exactly two elements. Let Θ j = (λ, µ). Then it is easy to see that µ semi-reaches itself along α 2 from head to head, which implies G is reroutable, a contradiction.
Letting y denote the number of mini-blocks in Θ and x i denote the number of elements in medium-block B i for 1 ≤ i ≤ z, we then have x = x 1 + x 2 + · · · + x z , y = y 1 + y 2 + · · · + y z .
Suppose there are k singletons in Θ, then by Lemma 4.2, we can find (k − 1) mini-blocks, each of which has at least three elements. And any other mini-block has at least two elements. Hence, for 1 ≤ i ≤ z, For any two linked mini-blocks B i,j and B i,j+1 , let (λ i,j , µ i,j ) denote the element with the largest second component in B i,j , and let (λ i,j+1 , µ i,j+1 ) denote the element with the smallest first component in B i,j+1 . By the definition (of two mini-blocks being linked), we have µ i,j = λ i,j+1 , which means B i,j and B i,j+1 share a common merging. Together with the fact that each element in Σ is a pair of mergings, this further implies that the number of mergings in G is Notice that λ i,j , λ i,j+1 , µ i,j+1 belong to the same α 2 -path, and furthermore, there exists only one α 1 -path passing by both an element (more precisely, passing by both its mergings) in B i,j and an element in B i,j+1 . So, c 2 , the number of α 2 -paths in G, can be computed as (6) c 2 = x − (y − z).
It then follows from (4), (5), (6) and the fact z ≥ 1 that and furthermore which establishes the theorem. Remark 3. The proof of Theorem 4.1 reveals in greater depth the topological structure of non-reroutable (2, c 2 )-graphs achieving 3c 2 − 1 mergings, and further helps to determine the number of such graphs.

Advances in Mathematics of Communications
Clearly, x i,j 's, y i,j 's are distinct and Then the merging sequence of the rest of the graph can be defined as (f (k)) Now, we prove that Proof. Let z = c 2 − 1. For each i, j = 0, 1, . . . , z, label each merging (i, j) in the merging sequence as γ i,j (Here, note that no two mergings share the same label). We only prove that there is only one possible set of Menger's paths from S to R 1 . The uniqueness of Menger's path sets from S to R 2 can be established using a parallel argument.
Let α 1 be an arbitrary yet fixed set of Menger's paths from S to R 1 . It suffices to prove that α 1 is non-reroutable. Note that each path in α 1 must end with either ω z → R 1 or γ i,z−i → R 1 , i = 0, 1, . . . , z − 1 (here and hereafter, slightly abusing the notations "→" and "←", for paths (or vertices) A 1 , A 2 , . . . , A k , we use A 1 → A 2 → · · · → A k or A k ← · · · ← A 2 ← A 1 to denote the path which sequentially passes through A 1 , A 2 , . . . , A k ; note that such an expression uniquely determines a path in this proof). In α 1 , label the Menger's path ending with γ i,z−i → R 1 as the i-th Menger's path for 0 ≤ i ≤ z − 1, and the Menger's path ending with ω z → R 1 as the z-th one.
The above lemma then immediately implies a lower bound on M * (c 2 , c 2 ).
Proof. Consider any (c 2 , c 2 )-graph G with one source S, sinks R 1 , R 2 , a set of Menger's paths α i = {α i,1 , α i,2 , . . . , α i,c2 } from S to R i for i = 1, 2. As discussed in Section 3.3, we assume that, for 1 ≤ i ≤ n, paths α 1,i and α 2,i share a starting subpath, and paths α 1,c2 and α 2,1 do not merge with any other paths, directly flowing to the sinks (then, necessarily, each R 2 -alternating sequence is of positive length, and by Lemma 3.5, the shortest R 2 -alternating sequence is of length 1). We say that the path pair (α 1,i , α 2,j ) is matched if i = j, otherwise, unmatched. Clearly, each starting subpath corresponds to a matched path pair; and among the set of all path pairs, each of which corresponds some merging in G, there are at most (c 2 − 2) matched and at most (c 2 2 − 3c 2 + 3) unmatched. We then consider the following two cases (note that they may not be mutually exclusive): Case 1: there exists a shortest R 2 -alternating sequence associated with a matched path pair. By Lemma 3.6 and the fact that each starting subpath corresponds to a matched path pair, there are at most c2−1 2 mergings corresponding to this path pair, at most c2−2 2 corresponding to any other matched path pair, and at most c2−1 2 mergings corresponding to any unmatched. So, the number of mergings is upper bounded by Case 2: there exists a shortest R 2 -alternating sequence associated with an unmatched path pair. Again, by Lemma 3.6 and the fact that each starting subpath corresponds to a matched path pair, there are at most c2 to this path pair, at most c2−1 2 mergings corresponding to any other unmatched path pair, and at most c2−2 2 mergings corresponding to any matched. So, the number of mergings is upper bounded by Then M * (c 2 , c 2 ) ≤ max{(9), (10)}. For odd c 2 , (9) is larger than (10), so we have For even c 2 , (10) is larger than (9), so we have The proof is then complete.
We then have the following lemma, whose proof is similar to Lemma 5.1 and thus omitted.
We are now ready for the following theorem, which gives us a lower bound on M(c 1 , c 2 ).
Example 5.7. To construct a non-reroutable (4, 6)-graph with 39 mergings, one can concatenate F (4, 4) and a non-reroutable (3, 4)-graph, which can be obtained by concatenating F (3, 3) and a non-reroutable (2, 3)-graph. The latter can be obtained by concatenating F (2, 2) and a non-reroutable (2, 2)-graph. Finally, a nonreroutable (2, 2)-graph can be obtained by concatenating F (2, 2) and H(1, 2). One readily verifies that the number of mergings in the eventually obtained graph is Proof. Consider any (c 1 , c 2 )-graph G with distinct sources S 1 , S 2 , distinct sinks R 1 , R 2 , and a set of Menger's paths α i = {α i,1 , α i,2 , . . . , α i,ci } from S i to R i for i = 1, 2. As discussed in Section 3.3, we assume that all the alternating sequences are of positive lengths. By Lemma 3.5, the shortest S 1 -alternating sequence and R 2 -alternating sequence are both of length 1. We then consider the following two cases (note that they may not be mutually exclusive): Case 1: there are a shortest S 1 -alternating sequence and a shortest R 2 -alternating sequence, which are associated with the same path pair. By Lemma 3.6, there are at most c1+c2 2 mergings corresponding to this path pair, and at most c1+c2−2 2 mergings corresponding to any other path pair. So, the number of mergings is upper bounded by Case 2: there are a shortest S 1 -alternating sequence and a shortest R 2 -alternating sequence, which are associated with two distinct path pairs. Again, by Lemma 3.6, there are at most c1+c2−1 2 mergings corresponding to each of these two path pairs, and at most c1+c2−2 2 mergings corresponding to any other path pair. So, the number of mergings is upper bounded by (12) 2 Then, M(c 1 , c 2 ) ≤ max{(11), (12)}. Straightforward computations then lead to the claimed result.
Remark 5. It has been established in [8] that By summarizing all the four bounds, we obtain

5.3.
Bounds on M(3, c 2 ). In this section, we give the following scaling law for M when c 1 = 3.
Proof. Consider any non-reroutable (3, c 2 )-graph G with distinct sources S 1 , S 2 , sinks R 1 , R 2 , a set of Menger's paths α 1 = {α 1,1 , α 1,2 , α 1,3 } from S 1 to R 1 and a set of Menger's paths α 2 = {α 2,1 , α 2,2 , . . . , α 2,c2 } from S 2 to R 2 . If a merging is the smallest (the largest) on an α 2 -path, we say it is an x-terminal (y-terminal ) merging on the α 2 -path, or simply a α 2 -terminal merging. For a set of vertices v 1 , v 2 , . . . , v k in G, define G v 1 , . . . , v k to be the subgraph of G induced on the set of vertices, each of which is smaller or equal to some v i , i = 1, 2, . . . , k. Consider the following iterative procedure (Figures 10, 11 and 12 roughly illustrate the procedure), where, for notational simplicity, we treat a graph as the union of its vertex set and edge set. Initially set S (0) = ∅, and R (0) = G. Now for each j = 1, 2, 3, pick a merging γ 0,j such that γ 0,j belongs to path α 1,j and  (1) . Suppose that we already obtain and S (i) = S (i−1) ∪ L i , R (i) = G \ S (i) , where L i contains exactly 14 mergings and at least two α 2 -terminal mergings. We then continue to pick merging γ i,j on α 1,j from R (i) such that and there are at least two α 2 -terminal mergings in R (i) t(γ i,1 ), t(γ i,2 ), t(γ i,3 ) . If such γ i,j 's exist, set and if |R (i) | < 14, set L i+1 = R (i) and terminate the iterative procedure. So far, for any obtained "block" L i+1 , either we have ||L i+1 || < 14 or (||L i+1 || = 14 and there are at least two α 2 -terminal mergings in L i+1 ); such block L i+1 is said to be normal. If |R (i) | ≥ 14, however, we cannot find a normal block, we continue the procedure and define a singular L i+1 in the following. Note that S (i) = L 1 ∪ L 2 ∪ · · · ∪ L i . Let z i = i j=1 (x j − y j ), where x i and y i denote the numbers of x-terminal and y-terminal mergings in the α 2 -paths in L i , respectively; then z i is the number of α 2 -paths which can continue to merge within R (i) . If a normal block does not exist after i iterations, necessarily we will have z i ≥ 3 (suppose z i ≤ 2, by the fact that M(3, 3) = 13 (see Theorem 3.1 in [15]), we would be able to obtain a normal block L i+1 , which contains two x-terminal mergings or (an x-terminal merging and a y-terminal merging)). We say that a merging is critical within a subgraph of G if the corresponding α 2 -path, does not merge any more after this merging within this subgraph. It then follows that the number of the critical mergings within S (i) is z i . Figure 11. Case 1 Now, let K i denote the set of all the mergings within R (i) , each of which can semi-reach the tail of some critical merging within S (i) along φ. Note that at least one of those α 1 -paths, each of which contains at least one critical merging within S (i) , does not contain any merging within K i . Without loss of generality, we assume that α 1,3 ∩ K i = ∅. Now we consider the following two cases: Case 1: α 1,1 ∩ K i = ∅ and α 1,2 ∩ K i = ∅. As shown in Figure 11, assume that within K i , λ i,1 , λ i,2 are the largest mergings on α 1,1 , α 1,2 , respectively. Now, set Note that for λ i,j , j = 1, 2, the associated α 2 -path, from λ i,j , may merge outside Q i next time. If this α 2 -path merges within Q i again after a number of mergings outside Q i , we call it an excursive α 2 -path. Note that there are at most one excursive α 2 -path (since, otherwise, we can find a cycle in G, which is a contradiction). On the other hand, for any merging from K i other than λ i,1 , λ i,2 , say, µ, the associated α 2 -path, from µ, can only merge within Q i and will not merge outside Q i . So, the number of connected α 2 -paths that contain at least one merging within L i+1 ∩ Q i is upper bounded by y i+1 + 2. Then, by the fact that M(2, c 2 ) = 3c 2 − 1 (see Theorem 4.1), we have It is clear that all non-excursive α 2 -paths that contain at least one merging within L i+1 \ Q i must have x-terminal mergings in L i+1 . Thus, again by the fact that M(2, c 2 ) = 3c 2 − 1, we have It then immediately follows from (13) and (14) that Next, we claim that x i+1 + y i+1 ≥ 3. To see this, suppose, by contradiction, that x i+1 + y i+1 ≤ 2. Observing that y i+1 ≥ z i − 2 ≥ 1, we then consider the following two cases: If x i+1 + y i+1 = 2, we have ||L i+1 || ≤ 3(x i+1 + y i+1 ) + 7 = 13, which implies that we can continue to choose a normal block (with two α 2 -terminal mergings), a contradiction. If x i+1 + y i+1 = 1, we have x i+1 = 0, y i+1 = 1. Note that if there is no excursive α 2 -path, we have z i ≤ y i+1 + 2; if there is one excursive α 2 -path, then z i ≤ y i+1 + 1. This, together with z i ≥ 3, implies that z i = 3 and there is no excursive α 2 -path. Consequently, we have But this, together with M(3, 3) = 13, implies that we can continue to choose a normal block with an x-terminal merging and a y-terminal merging, which is a contradiction. Case 2: α 1,1 ∩ K i = ∅ and α 1,2 ∩ K i = ∅. As shown in Figure 12, assume that within K i , λ i,1 is the largest merging on α 1,1 . Clearly, there is no excursive α 2 -path. By the fact that M(1, c 2 ) = c 2 (see Example II.10 of [6]) and M(2, c 2 ) = 3c 2 − 1, we have ||L i+1 ∩ Q i || ≤ y i+1 + 1, ||L i+1 \ Q i || ≤ 3x i+1 − 1.
Combining the above two cases, we conclude that the number of mergings within the singular block L i+1 is upper bounded by 3(x i+1 +y i+1 )+7, where x i+1 +y i+1 ≥ 3.
We continue these operations in an iterative fashion to further obtain normal blocks and singular blocks until there are no mergings left in the graph. Suppose there are q 1 singular blocks L j1 , L j2 , . . . , L jq 1 and q 2 normal blocks. Note that each singular block has at least three α 2 -terminal mergings and each normal block except the last one has at least two α 2 -terminal mergings. If the last normal block has at least two α 2 -terminal mergings, we then have It then follows that ≤ 14q 2 + 3(2c 2 − 2q 2 ) + 7q 1 = 6c 2 + 7q 1 + 8q 2 ≤ 14c 2 .

Conclusions and future work
The two functions M and M * , originally defined in [6], are of great relevance to network encoding complexity for a variety of networks, as they indicate the numbers of encoding operations needed for some worst case networks. One natural and fundamental question in network encoding complexity is to compute the exact values of these two functions, which, however, appears to be extremely difficult. It turns out that, even for small parameters, computations of these two functions are far from straightforward, and these two functions for general parameters remain largely unknown to date. In this paper, we have further developed the graph theoretical approach proposed in [6] to derive exact values and bounds for these two functions for certain special parameters. A natural follow-up problem is to further explore the power of our approach to derive exact values and tighter bounds for more general parameters.
A central idea that runs through all the proofs (for the upper bound on M and M * ) in this paper is as follows: for any (c 1 , c 2 )-graph G, if the number of mergings