{'fraction_non_alphanumeric': 0.04608553026363164, 'fraction_numerical': 0.006380765691883026, 'mean_word_length': 4.20401790361195, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Universal and Robust Distributed Network Codes

Random linear network codes can be designed and implemented in a distributed manner, with low computational complexity. However, these codes are classically implemented over finite fields whose size depends on some global network parameters (size of the network, the number of sinks) that may not be known prior to code design. Also, if new nodes join the entire network code may have to be redesigned. In this work, we present the first universal and robust distributed linear network coding schemes. Our schemes are universal since they are independent of all network parameters. They are robust since if nodes join or leave, the remaining nodes do not need to change their coding operations and the receivers can still decode. They are distributed since nodes need only have topological information about the part of the network upstream of them, which can be naturally streamed as part of the communication protocol. We present both probabilistic and deterministic schemes that are all asymptotically rate-optimal in the coding block-length, and have guarantees of correctness. Our probabilistic designs are computationally efficient, with order-optimal complexity. Our deterministic designs guarantee zero error decoding, albeit via codes with high computational complexity in general. Our coding schemes are based on network codes over ``scalable fields". Instead of choosing coding coefficients from one field at every node, each node uses linear coding operations over an ``effective field-size"that depends on the node's distance from the source node. The analysis of our schemes requires technical tools that may be of independent interest. In particular, we generalize the Schwartz-Zippel lemma by proving a non-uniform version, wherein variables are chosen from sets of possibly different sizes. We also provide a novel robust distributed algorithm to assign unique IDs to network nodes.


I. INTRODUCTION
The paradigm of network coding allows each node in a network to process information in a non-trivial manner. As shown in [3], [4], [5], even if intermediate nodes simply perform linear operations over some finite field, the resulting network codes can be information-theoretically rate-optimal for a large class of communication problems. In particular algorithms that design codes for multicast communication problems, wherein each of multiple sinks requires the same information from a source node, have been well-studied. The design algorithms in [6], [7] are deterministic and centralized, and result in network codes with zero-error. In contrast the algorithms in [1], [8] are decentralized and probabilistic, and for any > 0 result in network codes that "fail" with probability at most . Both these types of design algorithms (and the resulting network codes) are computationally tractable.
However, for all current network code design algorithms, some information network parameters is necessary prior to the code design, to determine the size of the finite field over which linear network coding is performed. In particular, the centralized algorithms in [6], [7] require prior knowledge of the entire network, and even the decentralized algorithms in [1], [8] require knowledge of the network size and the number of sinks -if these parameters are unavailable, code design cannot proceed with any guarantees of correctness, hence prior designs are not universal. Also, in the case of dynamically changing network topologies, if even one new node joins the network the entire network code may need to be updated due to a change in the field-size required, hence such codes are also not robust.
In this work we develop the first universal and robust distributed linear codes that are independent of all network parameters, and are designed to satisfy a pre-specified tolerance on the error-probability (defined as the probability that the linear transform from the source to some sink is not invertible). The essential idea behind our design is that of using "scalable fields" 1

A. Related work
The distributed random linear codes of [1], [8] require field-sizes to scale roughly as |E||T |. As shown in [10], even with centralized design of network codes, the field size over which coding must be performed as at least |T |.
As to universal codes (codes independent of some problem parameters), they have been well-studied in the classical information-theory setting (for instance in source coding [11] and channel coding [12]).
In the network coding setting, however, the literature is much sparser. The work of [5] proposes "robust network codes" that are resilient to network failure patterns. However, the field-size over which coding is performed depends on the number of failure patterns, and hence these codes are not truly universal. Further, the computational complexity of designing such codes is prohibitive. There is also significant work on network coding for packet erasure networks (for instance [13]). Our codes can tolerate all such errors.
The work of [14] examines "decentralized network coding" in which new nodes can join a network without disrupting pre-designed coding operations. Here, too, the field-size choice for the initial design depends on the size of the network. Further, the code designs are for special cases -either for rate-2 codes (analogous to the codes we present in Section V-C) or for networks with only two sink nodes.
A preliminary version of the work in Section V was previously in the thesis [15], and presented (but not published) in [16].

II. NOTATION AND DEFINITIONS A. Network Model
In this paper, we adopt the single-source multicast network model of [5]. Let the network be represented by a directed acyclic 3 graph G = (V, E). Here V represents the set of nodes and E the set of edges. The graph has a pre-specified source node s and |T | sink nodes T = {t 1 , t 2 , . . . , t |T | }. A directed edge e from node u to node v is said to have tail u (denoted tail(e)) and head v (denoted head(e)). The link e is then said to be an incident outgoing link of u and an incident incoming link of v.

B. Communication Model
The communication goal is for the source to communicate identical information to each sink. As is standard [5], we assume that each link carries one packet of information per time-step. This is reasonable since if some link's capacity is less we may consider the link's communication to be over multiple successive time-steps, and if the link's capacity is greater we can subdivide it into multiple links. The packet-length in bits is denoted by n.
The network capacity, denoted by C, is the time-average of the maximum number of packets that can be delivered from the source s to each sink t ∈ T simultaneously. It can be also expressed as the minimum of the min-cut from the source s to each sink t. The rate R is the average number of information packets that the source s generates per time-step, to be delivered to each sink t over the network G. Without loss of generality we assume that R < C. Lastly, let c denote the maximum capacity of any single link in the network.
C. Code Model 1) Network code: The network code comprises of the encoders at the source and each node inside the network, and the decoders at each of the sinks. In particular we focus on linear network codes, i.e., codes where the source node, each internal node, and each sink performs linear combinations of information in packets on incident incoming links to generate packets on incident outgoing links. Specifically we consider the class of convolutional linear operations, well-studied in classical coding theory, that we reprise below. The base-field for arithmetic is chosen to be F 2 , hence all operations described below are binary.
2) Convolutional network code: Recall that the z-transform [17] of any sequence {a(i)} n i=1 of bits is given by the polynomial n i=1 a(i)z i , denoted A(z). Further, recall that the output of the convolution operation a * b between two sequences 4 {a(i)} n i=1 and {b(i)} n i=1 is defined as the length-n + n sequence whose ith term equals i j=1 a(j)b(n − j + i). Lastly, it is well-known that the z-transform of a * b equals A(z)B(z).
Convolutional codes [17] have long been used in point-to-point communication scenarios. The idea of using convolutional codes for network coding (in networks with cycles) was foreshadowed in [3], and made explicit in [5] (who also noted that such an algebraic model for coding operations can help kill two birds with one stone, i.e., it can also help model delays in networks). The work of Erez et al. (see for example [9]) gave the first efficient designs for convolutional network codes, i.e., codes over F 2 (z). In our work, F 2 (z) affords the advantage that it allows for coding operations to be chosen from a potentially unbounded set, which helps us circumvent the difficulty that we do not know the network's parameters in advance.
The source's packets are denoted by X 1 , X 2 , . . . , X R -each is a length-n bit-vector. The corresponding z-transforms are denoted X 1 (z), X 2 (z), . . . , X R (z). Collectively they are represented by the length-R vector of polynomials X(z). Each edge e carries the packet Y e , and its z-transform is denoted Y e (z). Lastly, the z-transform of the packets on incident incoming links to any sink t are denoted by the vector Y t (z). We henceforth refer to a sequence and its z-transform interchangeably.
Let u, v and w be three nodes such that there is at least one edge from u to v and at least one edge from v to w. We use a 5-tuple to denote a coding choice for such nodes -specifically, β u,i,v,j,w (z) refers to the local coding coefficient of the convolutional operation on the information on the ith edge from u to v to the jth edge from v to w. The choices of values of the local coding coefficients β u,i,v,j,w (z) are code design parameters whose specifications are the primary objective of subsequent sections. Let e be a specific edge from v to w, and e denote a dummy variable that ranges over all edges incoming to v (and hence is indexed by the pair (u, i)). Thus the convolutional operation that is performed at node v comprises of taking linear combinations of the information Y e with the appropriate β u,i,v,j,w (z) over all edges e incident incoming to node v, to generate the information Y e on the edge e incident outgoing from v. To simplify notation, we henceforth write β u,i,v,j,w (z) simply as β e,e (z) with the understanding that (e, e ) index the appropriate 5-tuple. Thus the linear transform at each node can be written symbolically as Y e (z) = e β e ,e (z)Y e (z).
Since all the linear operations performed by the network can be represented via operations over polynomials over the binary field, we henceforth consider all arithmetic to be over the field of rational functions [5] over F 2 , denoted by F 2 (z). The elements of this field are of the form P (z)/Q(z), where both P (z) and Q(z) are binary polynomials. Linear codes over this field have been well-studied in the convolutional coding literature [17]. As in classical distributed network codes [1], the codes in this work are distributed, i.e., the choice of a value for β u,i,v,j,w (z) at node v can depend only on its local parameters (u, i, v, j, w), and the corresponding parameters of the nodes upstream of node v. Since we consider only directed acyclic networks in this work, this imposes a significant design constraint, since nodes that cannot directly communicate with each other over the network cannot coordinate their coding choices.
One idea of [1] that we too use is the idea of having "short headers" in each transmitted packet. Specifically, each packet (containing n bits) transmitted by the source, also contains the linear transformation induced by the network from the source to that packet -as in [1] these transforms are computed in a distributed manner and percolated down the network along with the payload information at an asymptotically negligible rate. For every t ∈ T , let T t be the network transfer matrix from s to t -these too can be computed in a distributed manner. Let T be the overall network transfer matrix from s to T formed as Π t∈T T t . Let |T t | and |T | denote the determinants of T t and T respectively.
Our codes are either probabilistic or deterministic depending on whether local coding coefficients are chosen probabilistically or deterministically. The error probability is the probability over choices of local coding coefficients that for each source message, at least one sink's reconstruction of at least one possible message from the source is inaccurate. For linear network codes this happens if and only if the transfer matrix from the source to each sink is invertible. Rate R is said to be achievable if for any > 0 and δ > 0 there exists a coding scheme of block length n with rate ≥ R − δ and error probability ≤ . In particular, we require our deterministic network codes to be zero-error, i.e., to have error probability be zero.
III. THE GENERALIZED SCHWARTZ-ZIPPEL LEMMA The classical Schwartz-Zippel lemma [2] provides an upper bound on the probability that when variables of a polynomial are chosen uniformly at random from a field, then the polynomial evaluates to zero.
Recall that the degree d i of a variable x i in a polynomial P (x 1 , x 2 , . . . , x N ) is the maximal exponents of x i in its non-zero terms. Further, recall that the degree d of a polynomial P (x 1 , x 2 , . . . , x N ) itself is the maximal value among the sum of the exponents of all its non-zero terms. Note that d ≤ d i .
Lemma 1 (Schwartz-Zippel lemma [2]). Let P (x 1 , x 2 , . . . , x N ) be a non-zero polynomial of degree d ≥ 0 over a field F. Let S be a finite subset of F, and the value of each x 1 , x 2 , . . . , x N be selected independently and uniformly at random from S. Then the probability that the polynomial equals zero is at most d/|S|.
The Schwartz-Zippel lemma is a useful tool in the analysis of random linear network codes (for instance [1]). A random linear network code causes an error if and only if one of the transfer matrices from the source to the destination is singular. This in turn happens if and only if the product of the determinants of these transfer matrices equals zero. But this product of determinants may be viewed as a polynomial whose variables consist of the local coding coefficients at each node. Hence the Schwartz-Zippel lemma provides an upper bound on the probability of error of a random linear network code.
In this work we are interested in a generalization of the Schwartz-Zippel lemma, for polynomials whose variables are chosen from different subsets of F. We prove: Lemma 2. Let P (x 1 , x 2 , . . . , x N ) be a non-zero polynomial over a field F. For all i ∈ {1, 2, . . . , N }, let S i be a finite subset of F, the degree of x i in P (x 1 , x 2 , . . . , x N ) be d i , and the value of each x i be selected independently and uniformly at random from S i . Then the probability that the polynomial equals zero is . Proof: Given in Appendix A Note 1: Neither Lemma 1 nor Lemma 2 put any restriction on the size of the field F, as long as the appropriate subsets from which variables chosen are finite. Note 2: A related but inequivalent generalization of the Schwartz-Zippel lemma was proved in [18]. The utility of this proof is that it allows for the variables comprising the polynomial to be chosen nonuniformly. This is integral to the proof techniques in this work, wherein we choose local coding coefficients over progressively larger sets, depending on how far from the source they are.

IV. PROBABILISTIC DESIGNS
In this section we describe two probabilistic designs of universal distributed robust network codes. In particular, given any > 0, we present schemes such that the overall error probability of the code is at most .
Our first scheme is independent of the size (number of nodes/edges) of the network, but does requires that the source has a priori knowledge of the number of sinks it shall be required to service. Hence we say it is only weakly universal. Our purpose in presenting this scheme is primarily expository, since the proof is significantly easier than that of the second scheme -it helps set the stage for the second scheme.
The second scheme is strongly universal and is independent of all network parameters, including the number of sinks.
We first describe some useful preprocessing steps relevant for both of our schemes.

A. Graph transformation
We find it desirable to work over a transformed graph (V , E ) rather than the original graph (V, E). This transformation can be done locally at each node, and results in a graph with some useful properties. In particular, we use the work of [7] which demonstrates the equivalence between general network coding problems and those over "low-degree" networks where each node has degree at most three. In particular, nodes in the reduced network either have one incident incoming edge and at most two incident outgoing edges (in which case they broadcast the incoming information on incident outgoing edges, and hence are called broadcasting nodes). Otherwise, they have two incident incoming edges and one incident outgoing edge (in which case they code the information on the incident incoming edges to generate information transmitted on the incident outgoing edge, and hence are called coding nodes). (See Figure 3(b).) This equivalence is useful for our probabilistic algorithms since it allows us to effectively enumerate networks. We change the equivalence relationship of [7] slightly as described below so as to make it robust to nodes joining the original network. That is, in our equivalence relationship, nodes can join the original network while only locally perturbing the "low-degree" network.
The transformation is as follows. For every node v ∈ V we construct a virtual robust gadget G(v) (see Figure 1 for an example 5 ).  Suppose v has d in (v) incoming links and d out (v) outgoing links. Corresponding each incoming link we construct a binary tree whose root is connected to that incoming link, and which has d out (v) + 1 leaves. Similarly, corresponding to each outgoing link we construct an inverted binary tree whose root is connected to that outgoing link, and which has d in (v) + 1 leaves. The last leaf node of each binary tree is called a virtual node, and the other leaf nodes are called connection nodes. We then connect connection nodes so that there is exactly one path from each incoming link to each outgoing link (the connection order does not matter).
If a new link 6 is created in the network -say, a link directed from w to v (see Figure 2 for an example). In this case we first create a virtual gadget corresponding to the directed edge (w, v). We then split each virtual node on the inverted binary tree (corresponding to the outgoing links of v) into two by appending a binary tree of depth one to it. We denote the second of the two new leaf nodes as a new virtual node, and the first as a new connection node. The connection nodes on (w, v)'s virtual gadget are then connected to the new connection nodes on each of the outgoing links' virtual gadgets so that there is exactly one path from (w, v) to each link outgoing from v. A corresponding (but inverted) procedure holds if the new link corresponded to a link outgoing from v. The removal of a link simply corresponds to removal of the corresponding virtual gadgets on the incoming and outgoing sides, and all links connected to it. The virtual nodes in each virtual gadget are what give our transformation robustness, since in case a new node joins or leaves the network, nodes other than the ones directly connecting with the changing node experience no structural changes in their existing virtual gadgets 7 .
Henceforth, all algorithms in Section IV shall convert the original graph to the virtual graph above as a pre-processing step, and all computations shall be over this virtual graph. Also, as part of normal communication each node v in the virtual graph (V , E ) estimates its depth ∆(v), i.e., the length of the shortest path from the source to itself. This can be done by any of a variety of distributed shortest-path algorithms over acyclic graphs, such as the Bellman-Ford algorithm [19].

B. Weakly universal design
The essential idea behind our first scheme is as follows. Each node having estimated its depth, it then chooses a subset of F 2 (z) whose size scales exponentially in this depth from which it pick its coding coefficients uniformly at random. We then show that the probability of error due to information being lost at any depth decays geometrically in the depth, and hence by the union bound the overall probability of error can be controlled so as not to exceed any desired . WUP( , |T |) (Weakly Universal Probabilistic) Code: • Each coding node v in the vertex-set V of the virtual graph chooses two local coding coefficients corresponding to the two incoming links uniformly at random from the set of polynomials of degree at most 2∆(v) + 1 + log(R|T |/ ). 8 Theorem 1. For any > 0, WUP( , |T |) has error probability at most .
Proof: Recall that |T t | represents the determinant of the transfer matrix from the source to sink t. As noted in [5], the network code is error-free if and only if the polynomial Π t |T t | comprising of the product of the |T t | determinants over all sinks (with the network's local coding coefficients β u,i,v,j,w (z) as variables) is non-zero. To evaluate the probability that this is the case given the random assignment of local coding coefficients in WUP( , |T |) , we use Lemma 2. Specifically, Each variable x i in Lemma 2 corresponds to a local coding coefficient. We group the coding coefficients β u,i,v,j,w (z) in terms of the depths ∆(v) of the nodes at which they are used. But there are at most 2 ∆ R coding nodes at any depth ∆ in the virtual graph, since after the transformation in Section IV-A the fast possible growth-rate for the new graph would be if it corresponded to R parallel binary trees -one for each of the source's messages. Hence there are at most 2R2 ∆ local coding coefficients at that depth. Also, Corollary 1 in [1] shows that the degree of each local coding coefficient in Π t |T t | is bounded from above by |T |. By construction in WUP( , |T |) each virtual node in the network chooses local coding coefficients uniformly at random from the set of polynomials of degree at most 2∆(v) Summing over all possible local coding coefficients at all possible (possibly infinite) depths and substituting the appropriate parameters into Lemma 2, the error probability of the network code is bounded from above by The computational complexity of WUP( , |T |) codes is polynomial in network parameters and log(1/ ), and the achievable rates approach the network capacity C asymptotically in the block-length. Further, our codes are robust to links joining and leaving. Since the analysis of these properties is very similar to that of the codes in Section IV-C, we delay discussion to the end of that section.

C. Strongly universal design
We now present design of probabilistic robust linear network codes that are strongly universal, i.e., independent of all network parameters. This obviates the requirement of knowledge of |T | of the codes in Section IV-B. The idea underlying the construction in this section is as follows. For the purpose of analysis, for each sink we identify a set of edge-disjoint paths, and estimate the probability that the information on these edge-disjoint paths remains invertible as information flows through the network. In particular, for any sink t and any depth ∆ in the network we identify the set of edges in these edge-disjoint paths that must contain linearly independent combinations of the source's information. We call such sets of edges flow-cuts. It turns out that the number of flow-cuts at any depth is in fact independent of the number of sinks, and further, a bound on this number at each depth can be computed locally. Thus sinks can be classified according flow-cuts. Hence, instead of trying to ensure that the linear transform to each sink is invertible as in Theorem 1, nodes at each depth simply try to ensure that the linear transform to each flow-cut is invertible. To analyze the probability of non-invertibility at each flow-set an alternative to the end-to-end analysis of the probability of error used in [1], [8] is required. Here we use the proof technique of [20], which analyzes the probability that information gets lost from one set of edges in the network to a neighbouring set of edges.

SUP( ) (Strongly Universal Probabilistic) Code
• Each coding node v at depth ∆(v) in the vertex-set V of the virtual graph chooses two local coding coefficients corresponding to the two incoming links uniformly at random from the set of polynomials of degree at most (R + 1)(∆(v) + 1 + log R) + ∆(v) + log(1/ ) − 1.  Recall that by assumption the capacity of the network is at least R. Hence there is a set P of at least R edge-disjoint paths that go from the source s to each t.
Corresponding to each such set P of edge-disjoint paths, we define flow-cuts. A flow-cut F (t) is defined as a set of R edges that have the property that each edge in the flow-cut is from a distinct edge-disjoint path in P(t). These flow-cuts are useful since we intend to analyze the linear (in)dependence of information flowing through the edges in each flow-cut -if the information on each edge in a flow-cut is linearly independent, then the source's information can be retrieved from that flow-cut. Hence, we only need to inductively prove that no information is lost from one flow-cut to the "next" flow-cut, appropriately defined as below 9 .
We define the depth ∆(F t ) of a flow-cut F t as the maximum depth of the head of any edge in it, i.e., ∆(F (t)) = max head(e)∈F (t) ∆(e i ). Further, we denote a flow-cut of depth ∆ by F (t, ∆).
We then define a flow-set F(t) as an ordered set of flow-cuts with some properties. In particular, each flow-cut in a flow-set differs from the successive flow-cut in exactly one edge. Specifically, if one flow-cut in F(t) differs from the next flow-cut in F(t) in that some edge e is replaced by another e , then it must be the case that e is the edge preceding e in some path in the set of edge-disjoint paths P(t). Intuitively, each flow-set F(t) captures successive snapshots of how information flow from the source to the sink t.
Examples of flow-cuts and flow-sets are provided in Figure 4(b), based on the butterfly network in Figure 4(a).
Let F (t, ∆) be some flow-cut of depth ∆ to sink t, and F (t) be the flow-cut immediately preceding 10 F (t, ∆) in flow-set F(t). Let T (F (t, ∆)) be the linear transform that the network imposes from the source s to the edges in the flow-cut F (t, ∆), and let ρ(∆) be the rank of this transform. Correspondingly, let T (F (t)) be the linear transform from s to F (t), and let ρ be the rank of this transform. Then the following lemma gives an upper bound on the probability that choosing local coding coefficients according to the dictates of WUP( , |T |) results in a loss of information in going from F (t) to F (t, ∆).
Proof: Note that of the two types of nodes in the virtual graph, the broadcasting nodes induce no additional error -if a flow-cut contains R linearly independent packets, and one of the edges in the flow-cut is replaced with another edge at a broadcasting node, the information in the succeeding flow-cut remains unchanged. Thus from now on we focus only on coding nodes.
By construction the structure of the virtual graph (V , E ) is such that each node can have at most two outgoing edges, and further the source node is replicated R times. Hence the maximum possible number of edges in the virtual graph up to a depth ∆ occurs when it comprises of R parallel binary trees. But each binary tree has at most 2(2 ∆ ) edges, hence the total number of edges in the virtual graph up to depth ∆ is at most 2R(2 ∆ ). Also, the total number of flow-sets of depth ∆ is at most 2R(2 ∆ ) R , which is bounded from above 11 by exp(R(∆ + 1 + log R)).
We use these bounds to bound from above the number of distinct type of coding choices a coding node at a certain depth faces. All our analysis now focuses on the specific following coding node v. Let its incoming edges be e and e , and the outgoing edge be e. Let edge e belong to a flow-cut F (t) in flow-set F(t) going towards sink t, and edge e be an arbitrary other edge. Then the outgoing edge e replaces e in the flow-cut F (t) to produce flow-cut F (t). Suppose F (t) is of depth ∆. Then by the bounds in the preceding paragraph, the number of ways an arbitrary flow-cut of depth ∆ can result from the merger of a preceding flow-cut and an arbitrary edge of depth at most ∆ is at most 2R(exp(∆)) × exp(R(∆ + 1 + log R)), which equals exp((R + 1)(∆ + 1 + log R)). (1) Next, we estimate the probability that a coding node "loses information". That is, we bound from above the probability that the number of linearly independent packets on the edges of a flow-cut is less than R even though the immediately preceding flow-cut has R linearly independent packets.
Say T (F (t, ∆)) represents the R × R matrix whose ith row represents the linear combinations of the source's R messages on the ith link in the flow-cut F (t, ∆) of depth ∆. Correspondingly, let T (F (t)) represent the matrix representing the linear transform from the source to the flow-cut F (t) immediately preceding F (t, ∆) in the flow-set F(t), and suppose it is of full rank R. Then the message Y e (z) on edge e in flow-cut F (t, ∆) may be written as β e ,e (z)Y e (z) + β e ,e (z)Y e (z). (Recall that e and e are the edges incoming to v, Y e (z) and Y e (z) are the corresponding messages carried by them, and β e ,e (z) and β e ,e (z) represent the local coding coefficients at node v.) But by assumption T (F (t)) is of full-rank, and hence the message Y e (z) may be written as a linear combination of the messages on the edges in flow-set F (t). Thus the message on edge e may be written as But the information on the links in F(t, ∆) other than e is unchanged, and hence the only manner in which the messages on the edges in F(t, ∆) are linearly dependent is if the coefficient (β e ,e (z) + γ e ,e (z)) equals zero. But by the choice specified in SUP( ) the coding coefficients are chosen from the set of polynomials of degree at most (− [(R + 1)(∆ + 1 + log R) + ∆ + log(1/ − 1)]) -this set is of size exp (− [(R + 1)(∆ + 1 + log R) + ∆ + log(1/ )]). Lemma 2 then implies that the probability that the degree 1 polynomial (β e ,e (z)+γ e ,e (z)) equals zero, is at most exp (− [(R + 1)(∆ + 1 + log R) + ∆ + log(1/ )]). Analogously to Theorem 1, taking the union bound over all possible coding operations at depth ∆ (for which (1) is an upper bound), and summing over all (possibly infinite) depths ∆ gives us that the overall probability of error is at most

D. Robustness
Due to the robust graph transformation described in Section IV-A, neither the addition nor the deletion of edges or nodes in the network causes problems with our proof. If new nodes are added to the network, the actual depth of some nodes in the network, say v in particular, may decrease. However, we require each node v to use in perpetuity the value of the depth ∆(v) it estimates in the first round of communication. This ensures that the bound on the number of coding nodes at a particular depth ∆ is not violated. Conversely, if nodes leave the network, the actual depth of v may increase. Nonetheless, the bound on the number of coding nodes at a particular depth ∆ is still not violated, since the total number of nodes in a network has only decreased.

E. Complexity analysis
The complexity of both WUP( , |T |) and SUP( ) scale with the corresponding degree of the polynomials chosen by nodes as coding coefficients.
For WUP( , |T |) , by construction, the degree of the polynomials used as coding coefficients (as noted in [21] is a good proxy for the implementation complexity of codes) scales as the maximum depth of the virtual graph plus O(log(R|T |/ )). But in the virtual graph each original node is replaced with a gadget with depth that is approximately the logarithm of the degree of the node, which in the worst case is at most 12 c|V|. Hence the maximum depth of the virtual graph is at most O(log(c|V|)) times the number of vertices in the original graph. Pulling it all together, the complexity of implementation scales as O(|V| log(c|V|) + log(R|T |/ )).
The corresponding redundancy the network introduces in the codes, arising from the delays introduced by each coding node, then scales at worst as the maximum depth of the virtual graph times the maximum degree of the polynomials used by any node, since each coding node in a path can introduce at most the maximal delay and delays along a path add up. Using the bounds above, this scales as O(|V| 2 log 2 (c|V|)+ |V| log(c|V|) log(R|T |/ )).
We now demonstrate that the implementation complexity of WUP( , |T |) and SUP( ) is in fact orderoptimal by demonstrating a class of networks for why any universal design requires computational complexity which is similar in order of magnitude to that of WUP( , |T |) and SUP( ) . Our construction is inspired by that of [10]. Consider any universal -error linear network code, i.e., any network code that requires that each sink be able to reconstruct the source's information with probability of error at most , even if the network topology is not known in advance.

Theorem 3.
There exists a class of networks for which the implementation complexity for any -error universal network code is Ω(|E| − log(1/ )).

Proof:
We construct a single-source multicast network that requires that for any universal code, coding 12 Recall that c denotes the maximum value for any edge's capacity in the network. operations must be chosen from a set that must be exponentially larger than would actually be needed if the topology were known in advance. Consider the "binary-tree-like" network demonstrated in Figure IV-E. The upper part of this graph comprises of a binary tree of depth ∆, with the source s located at the root of the tree, and hence 2 ∆ leaf nodes. Each link of this binary tree has capacity 2. Next, each leaf node of this binary tree has a link of unit capacity leaving it to a corresponding forwarding node. Finally, we consider two possibilities. Either there are 2 ∆ 2 sinks, such that each sink is connected to a distinct subset of size two of the set of 2 ∆ forwarding nodes, via unit capacity links to each of the two nodes in the subset (this is in the spirit of the combination networks examined in [10]). Or, there is only one sink node in the network, which is connected to two of these forwarding nodes (say v i and v j ) via links of unit capacity each.
As to coding strategies, each node in the binary tree part of the network can forward two linearly independent messages X 1 (z) and X 2 (z) on each of its outgoing links. Hence at depth ∆ each of the 2 ∆ leaves of the binary tree have both X 1 (z) and X 2 (z). Since neither of the two leaf node corresponding to v i or v j (say we call them u i and u j respectively) is aware of which of the two configurations the network is in, to be universal they must use coding operations that work for both configurations.
First we consider the case of = 0, i.e., every message must be decoded correctly. Suppose the leaf nodes u i and u j choose to transmit the linear combinations A 1 (z)X 1 (z) + B 1 (z)X 2 (z) and A 2 (z)X 1 (z) + B 2 (z)X 2 (z), or equivalently X 1 (z)+α 1 (z)X 2 (z) and X 1 (z)+α 2 (z)X 2 (z) (by setting α i (z) = B i (z)/A i (z) for i = 1, 2). But the messages on each of the forwarding links must be linearly independent (to take into account the eventuality that the network is in the first configuration with 2 ∆ 2 sinks). Hence there must be at least 2 ∆ − 1 choices for the α i (z)s (one for each of the leaf nodes, minus one for the case when A i (z) = 0, which can be handled separately.) But if the set of possible coding operations is Ω(2 ∆ ), then its implementation complexity must be at least Ω(∆). But this is Ω(|E|). In contrast, if the network happened to be in the configuration with only one sink and this was known in advance, then each of u i and u j could simply forward one bit, for an implementation complexity of 1.
The case with -errors can be similarly analyzed, by allowing sinks to make errors a fraction of the time. A direct counting argument gives the required result.
V. DETERMINISTIC DESIGNS In this section we describe two deterministic designs of universal distributed robust network codes that are zero-error 13 .
Our first scheme is only for codes of rate 2. It is related to a construction of [14], but generalizes it so that the choice of coding operations is independent of the size of the network. We call our scheme the Rate 2 Deterministic Design R2-D 2 for short. Our purpose in presenting this first scheme is primarily expository, since the proof is significantly easier than that of the second scheme -it helps set the stage for the second scheme.
Our second scheme is for general rates and is independent of all network parameters, including the number of sinks. We call this scheme the Capacity 3 or more, Probability of error 0 scheme, or C3-P0 for short. However, C3-P0 is more of an existence result than a practical code since the computational complexity of its implementation is exponential in network parameters.
We first describe some useful preprocessing steps relevant for both of our schemes.
A. Robust distributed unique ID assignment While the codes in Section IV only required nodes to estimated their depth, the zero-error codes in presented in this section require nodes to obtain a unique ID, i.e., an ID that is distinct for each node in the network. Such an ID allows nodes to loosely coordinate coding choices even if they are unable to communicate directly with each other, and thereby ensure that the overall code is "good". Such IDs might be pre-assigned to nodes (for example via factory stamps, or GPS coordinates, or IP addresses), or be assigned on the fly, as described below.
The task of distributing unique IDs to nodes over a directed graph was considered in [22]. The essential idea of their algorithm is to pretend that the graph is a tree directed from the root to the leaves (if not, extra edges are removed for the ID assignment protocol), and to assign IDs so that the binary expansion of each node's ID is a prefix to the binary expansion of all nodes downstream from it. This ID distribution can be carried out with communication cost that is asymptotically negligible in the packet length, in conjunction with the normal flow of information through the network, for instance in the header. Here, as in Section IV-A, we need to change the unique ID distribution protocol slightly to make it robust to network changes, so that new nodes are still ensured that IDs assigned to them do not clash with previously assigned IDs. In the same spirit as the robust virtual gadgets in Section IV-A, at each node v we reserve a virtual ID for the event that a new node might in the future connect to v; if so, this virtual ID is again split into another virtual ID, and an ID that is assigned to the new node. As noted in [22] the worst-case growth rate of the largest node ID with the network size is exponential in |V|, for reasons similar to those outlined in Theorem 3 -nodes might be unable to distinguish between a full binary tree, and a very sparse graph.

B. Cantor labeling
The well-known Cantor diagonal argument [23] makes an unexpected cameo in this work. One version states that the cardinality of the set of integers is the same as that of the set of finite dimensional vectors with integer components, and further gives an effective bijection between the two sets. Further, this bijection guarantees that any vector in Z k with maximum component l is mapped to an integer of size θ(l k ). This mapping is useful since, given a unique ID for each node v, we then need to produce unique coding coefficients for each pair of edges such that one is incoming to v and the other is outgoing for v. Prior to code design, the number of such coefficients that each node might need to choose is unknown. However, each β u,i,v,j,w (z) coefficient can be labeled by at most the five indices (u, i, v, j, w), each of which is an integer. Hence given a node's unique ID, one can produce unique integral labels for each vector (u, i, v, j, w) that are not too much larger (at most the fifth power) than any of the five parameters in (u, i, v, j, w). This mapping, denoted K(.), can then be used to select distinct local coding coefficients as needed in Sections V-C and V-D

C. Rate 2 zero-error codes
For the case when the transmission rate equals 2, note that there are essentially just two non-trivial scenarios for each node -either a node receives one linearly independent message on incoming links, or it receives two. In the former case, it can only broadcast incoming information on outgoing links. In the latter case, it can reconstruct the source's information, and thereby can fully control the linear combinations on outgoing links. Our construction for R2-D 2 rests on analysis of these cases.

R2-D 2 (Rate 2 Deterministic Design)
• The source s has two linearly independent messages X 1 (z) and X 2 (z)). • Depending on its connectivity to the source, on incoming edges each node v ∈ V receives either one or two linearly independent combinations of the source messages (X 1 (z), X 2 (z)). • If a node v receives only one linearly independent message on incoming links, it broadcasts it down all outgoing edges. • If a node v receives two linearly independent combinations of (X 1 (z), X 2 (z)), this enables it to reconstruct both X 1 (z) and X 2 (z). For each jth directed edge connecting each pair of nodes v, w (connected possibly by multiple parallel edges), we use the Cantor labeling algorithm 14 in Section V-B to assign a distinct local coding coefficient. In particular, let K(v, j, w) denote the 3-dimensional Cantor mapping. Then the node v then transmits X 1 (z) + β K(v,j,w) (z)X 2 (z) down the jth edge connecting v to w (here β K(v,j,w) (z) is chosen to be distinct for each K(v, j, w)).
Theorem 4. For any network G with min-cut capacity at least 2, R2-D 2 succeeds with zero error.
Proof: For any v ∈ V such that the mincut between the source and v is at least 2, there are at least two edge-disjoint paths from the source to v. By the statement of our R2-D 2 algorithm, for any such nodes v and v , the linear combinations of X 1 (z) and X 2 (z) on all their outgoing links must be distinct, and linearly independent (since the vectors (1, β K(v,j,w) (z)) and (1, β K(v ,j ,w ) (z)) are linearly independent if and only if β K(v,j,w) (z) and β K(v ,j ,w ) (z) are distinct).

D. General zero-error codes
The challenge in extending the results of Section V-C to rates greater than 2 lies in the fact that there might be nodes receiving two or more linearly independent pieces of information, and yet are unable to decode the source messages. In this case, they do not have full control over the messages they are able to send out, and hence the argument of Theorem 4 fails. In this section, we get around this challenge by examining a different invariant of linear convolutional network codes. In particular, we choose coding coefficients in a distributed manner so that the delay of the source messages on every path in the network is distinct. This means that the source messages never cancel out at the sinks, and hence can be reconstructed. C3-P0 (Capacity 3 or more, Probability of error 0) codes • For each 5-tuple (u, i, v, j, w), let K(u, i, v, j, w) be the 5-dimensional Cantor mapping defined in Section V-B. We define the local coding coefficient β u,i,v,j,w (z) as i.e., the monomial in z with degree exp(K(u, i, v, j, w)) (here the exponent is base 2).
Theorem 5. For any network G, C3-P0 succeeds with zero error.
Proof: Theorem 4 in [1] demonstrates that |T t |, the determinant of the transfer matrix T t from the source to any sink t, can be written as Σc P Π P β u,i,v,j,w (z), where the product is over all the local coding coefficients on a particular path P from s to t, c P is a non-zero constant corresponding to P, and the outer summation is over all paths from s to t. Our choice of local coding coefficients along any path in C3-P0 implies that |T t | equals c P P z exp(K(u,i,v,j,w)) = c P z ( P exp(K(u,i,v,j,w))) .
But by choice, each of the terms K(u, i, v, j, w) is distinct, and hence the binary expansion of exp(K(u, i, v, j, w)) has a single 1 in a distinct location. But if two paths in the summation (2) differ, then they must differ in at least one of the local coding coefficients, and therefore the exponent of the power of z along the two paths must differ -hence each path corresponds to a distinct power of z. This implies that as long as there is at least one path from s to each t ∈ T , each of the corresponding transforms T t must be invertible.

E. Complexity Analysis
The complexity of both R2-D 2 and C3-P0 scale with the corresponding Cantor labeling and node assignments.
For R2-D 2 the size of the set any node chooses its coding coefficients from scales as the third power of the largest node ID or the largest link-capacity in the network. But as noted in Section V-B, the largest node ID can scale exponentially in |V|. Hence the degree of the polynomials used as coding coefficients scales logarithmically in the size of the sets from which local coding coefficients are chosen, which in turn scales as O(max{|V|, log 3 (c)}). The corresponding redundancy the network introduces in the codes, arising from the delays introduced by each coding node, then scales as O(|V| max{|V|, log 3 (c)}), since each coding node in a path can introduce at most the maximal delay and delays along a path add up.
A similar analysis shows that the complexity of implementation of C3-P0 scales as O(exp(max{|V|, log 5 (c)})), and that the redundancy introduced by such codes scales as O(|V|exp(max{|V|, log 5 (c)})).
The problem of polynomial identity testing (PIT) [24] examines the question of deterministically determining whether a polynomial with a succinct but non-standard representation (such as the determinant of a matrix of polynomials) identically equals zero. The deterministic complexity of such problems is a long-standing open problem in theoretical computer science. Given this context, we are unable to provide intuition on whether our codes in Section V-D have order-optimal computational complexity -indeed, answering this question in either direction would represent significant progress in resolving the complexity of PIT problems.
VI. IMPLEMENTATION ISSUES As noted in [21], the complexity of implementation of network codes scales polynomially in the logarithm of the field-size over which operations are performed, or in the case of convolutional network codes, polynomially in the degree of the polynomials used at each node. By this measure, the implementation complexity of the codes in [1], [8] is poly-logarithmic in network parameters, whereas the implementation complexity of the first three of the four codes in this work is polynomial in network parameters. While this is an exponential blow-up, we note that the resulting codes are still computationally tractable, and further, as noted in Section IV-E, such a blow-up is in fact necessary for codes to be universal.

Code
|T | |E| Error Implementation known known Probability Complexity [1] yes yes O(polylog(|E||T |))  While the schemes in this work have been presented in the context of convolutional network coding operations at each node, they also go through for other infinite fields such as Q -the only requirement is that the field be unbounded in size, and that an infinite subset of it have a succinct representation.
Also, despite presenting all messages at the source and each link as bit-streams of possibly unbounded length, the schemes described in prior sections can also be implemented by packetization, by chopping up the bit-streams into packets of a standard size n.
In our codes the header of each packet contains low-rate control information used by each node to decide on its coding operations. However, by design, the size of this header changes as information flows down the network -the rate of change depends on the network topology, and hence is unpredictable in advance. One challenge in the implementation of our codes is thus to ensure that the intermediate nodes are able to distinguish between header information and payload information. One standard trick for such scenarios is used in Theorem 14.2.3 of [25] -each bit of the header is doubled, and the final such doublebit is followed by a 01 to signify the end of the header. Since the length of the header is asymptotically negligible in the packet-size, the communication cost of this bit-doubling is still asymptotically negligible.

VII. DISCUSSION
In this work we provide the first rate-optimal network code designs that have guaranteed decodability performance, and yet are independent of all network parameters. While requiring such universality makes us pay a price in the computational complexity and redundancy, (all but one of) our codes are computationally efficient to implement. The analytical tools we derive may well be of independent interest.

A. Proof of Lemma 2
We proceed by mathematical induction. In the base case when N = 1, Lemma 2 is equivalent to the Schwartz-Zippel lemma in one variable.
The probability that P (.) equals zero can be bounded from above by But by the inductive hypothesis Substituting (4) and (5) into (3) gives the required result.