# Design and Analysis of Systematic Batched Network Codes
## 4 Triangular Embedding: A Structured Systematic Outer Code Design
### Design Verification  
We verify the triangular embedding design from two aspects. First, it can help to generate zero-coding-overhead consistent outer codes using a small number of random trials. Second, when jointly decoded with batches generated by the ordinary outer code, the decoding performance is similar to the case of decoding only the batches generated by the ordinary outer code.  
We perform the experiments using the batch size \(M=16\) and the rank-\(M\) rank distribution \(\mathbf{h}\). As with the experiments in Section 3.4, we use the BATS code implementation in [45] with the parameters in Appendix B. The experimental results of the triangular embedding outer code are shown in Table 2. We see that, using triangular embedding, for \(K\) up to \(1000M\), more than \(99.5\%\) instances are of zero coding overhead. In fact, for the remaining instances that are not of zero coding overhead, the coding overhead is only 1 packet (generated using the ordinary outer code). The last row in Table 2 gives the maximum number of inactive packets for all the instances tested for each value of \(K\). We see that the number of inactivations is lower than 150, the number of inactivations in the random design. Therefore, diagonal embedding also reduces the decoding computation cost.  
As \(\text{ENC}_{n_{s}}\) uses a different encoding approach to the ordinary outer code \(\text{ENC}_{n_{s}+}\), we consider whether the batches generated by diagonal embedding and the batches generated by the ordinary outer code together form a good outer code. We perform some numerical experiments to verify the joint decoding performance of these two types of batches. For each batch generated by triangular embedding, we discard the batch with probability \(e=0.1,0.3,0.5\) and send the remaining batches to the decoder. After the first \(n_{s}\) batches,  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & \(K=\mathbf{10}M\) & \(K=\mathbf{100}M\) & \(K=\mathbf{1000}M\) \\ \hline zero overhead & 4978 & 4983 & 4977 \\ max total inact. & 27 & 91 & 149 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Experiments using triangular embedding for consistent outer codes. Here, \(M=16\) and \(\mathbf{h}\) has rank \(M\) with probability 1. For each value of \(K=10M,100M,1000M\), in total, 5000 instances of the triangular embedded outer code are tested. The table gives the number of consistent instances.  
Figure 6: Illustration of decoding using triangular embedding. The gray part contains non-zero entries and the white part contains only zero.  
the ordinary outer code is applied to generate more batches for the decoder. We adopt the same degree distribution \(\mathbf{\
abla}\) optimized for the rank-\(M\) distribution. The results are shown in Table 3. We see that for all the cases of \(\epsilon\) and for \(K=10M,100M,200M\), the number of zero-coding-overhead instances is higher than that in Table 1 and the number of instances with a coding overhead larger than \(2M\) is lower than that in Table 1. For \(K=400M,600M\), the decoding performance is similar to that in Table 1 in terms of both the ratio of zero coding overhead and the ratio of coding overhead larger than \(2M\).