## 6 Numerical Results and Analysis
### Simulation Results and Analysis  
To compare the advantages and disadvantages of the DFS and BFS schemes, some simulation experiments were conducted employing these two search algorithms in the network coding tree algorithm. The range of sink nodes in WSNs could be changed between \(|U_{s}|+1\) and \(2\ |U_{s}|\). Additionally, we continued to increase the number of sensor nodes, keeping the number of sink nodes at twice as many. The experiments were executed 100 times to obtain average values. Figure 8 depicts the number of sink nodes needed while increasing the number of sensor nodes. We observe that the number of leaves generated using the BFS method is larger than that generated by the DFS method. Although global optimization was not achieved, the introduction of the BFS search algorithm was more beneficial than DFS in generating more leaf combinations in the network coding tree. Figure 9 presents the probability of successful transmission as link failure probability changes. It can be observed that the \(SDR\) values of these three fault-tolerant mechanisms shrink as the link failure probability increases. In particular, the \(SDR\) values drop abruptly to zero when the link failure  
Figure 8: Comparison of the total number of generated leaves nodes between breadth-first search (BFS) and depth-first search (DFS) algorithms. probability exceeds 0.3. This is because the NCFM, 1:N and 1 + 1 fault-tolerant mechanisms cannot receive correct packets in harsh channel conditions when the maximum number of retransmissions is reached. In addition, we observe that the \(SDR\) of the 1 + 1 scheme is more or less the same as that of the 1:N scheme. This is because we reserve just one backup path to retransmit the lost packet in the 1:N scheme; the difference between the 1 + 1 and 1:N schemes can be shown from the analysis of \(RRD\) and \(ED\). Therefore, we conclude that the fault-tolerant capacity of the NCFM algorithm is stronger than those of the 1 + 1 and 1:N schemes. Additionally, the NCFM algorithm has an evident advantage over 1:N and 1 + 1 when the link failure probability is lower than 0.3. Figure 10 presents the average latency performance analysis for the three fault-tolerant mechanisms as the link failure probability increases. The end-to-end delay curve of the elastic transmission mechanism varies with those of the 1:N and 1 + 1 protection mechanisms if the link failure probability is zero in perfect channel conditions. When the link failure probability rises, the average latency curve of the elastic transmission mechanism will become better than those of the 1:N and 1 + 1 protection mechanisms. This is because the random linear network coding operation can reduce the number of packet transmissions or retransmission times as much as possible when the maximum transmissions bottleneck is reached. Here it is assumed that a node can finish only one packet delivery each time. The 1:N fault-tolerant mechanism must continue to switch the backup path for the retransmission of lost packets, which results in longer \(ED\). For the 1 + 1 scheme, packet delivery will be postponed when transmissions fail on both the working and backup paths. In particular, the average latency curves of all schemes will rise rapidly if the wireless link quality degrades. In this situation, it is likely that the destination node cannot receive sufficient packets for decoding with the NCFM algorithm. Therefore, the \(ED\) performance will fail when the link failure probability is greater than 40%. Figure 11 shows the average end-to-end delay analysis for the three fault-tolerant mechanisms as the network traffic continues to increase. The simulation experiments were conducted assuming that the link failure probability was 8%. As increased network traffic is injected into the WSN, the average end-to-end delay of the three fault-tolerant mechanisms shows an upward trend. As the number of source packets continues to increase, the \(ED\) benefit achieved by NCFM becomes gradually evident.