# A Co-Design-Based Reliable Low-Latency and Energy-Efficient Transmission Protocol for UWSNs
## 5 Design of Data Transmission Protocol
### Dynamic Routing Strategy
Considering the impact of the above three aspects on the conflict, the optimization problem can be expressed as:  
\[\arg\max_{S_{n}}|MC_{S_{n}}| \tag{4}\] \[\arg\max_{S_{n}}-|S_{n}^{1}C_{n}^{1}\cup S_{n}^{2}C_{n}^{2}\cup... \cup S_{n}^{j}C_{n}^{j}|\] (5) \[\arg\max_{S_{n}}\sum_{\alpha=1}^{j}S_{n}^{\alpha} \tag{6}\]  
which are subject to the following constraints:  
\[\sum_{\beta=2}^{j}\sum_{\alpha=1}^{\beta-1}S_{n}^{\alpha}S_{n}^{ \beta}e_{\alpha\beta}/\sum_{\beta=2}^{j}\sum_{\alpha=1}^{\beta-1}S_{n}^{ \alpha}S_{n}^{\beta}=1 \tag{7}\] \[S_{n}^{\alpha},S_{n}^{\beta},e_{\alpha\beta}\in\{0,1\} \tag{8}\]  
Equation (4) finds the maximum value of the minimum conflict competitors set under different \(S_{n}\), where \(MC_{S_{n}}\) is the minimum conflict competitors set in \(S_{n}\). Equation (5) finds the minimum competitor set from all potential competitors of node \(n\) under the strategy \(S_{n}\), where \(C_{n}^{j}\) means the competitors brought by node \(j\). In order to unify the format, we converted the symbol for Equation (5). Equation (6) is the maximum for the total numbers of selected nodes in \(S_{n}\). This means that when more forward nodes are selected, the transmission success rate is higher. To calculate the optimal strategy \(S_{n}\), we need to deal  
Figure 6: Relationships between the competitors. with all three optimization goals at the same time. The number of competitors will increase with the number of forwarders, and the number of competitors and forwarders will affect the size of the minimum conflict competitors set. Therefore, an algorithm needs to be designed to solve these three optimization goals together. Algorithm 1 can be used to solve the optimization problem above. The algorithm takes as its input all the information from the neighbor table of node \(n\). Based on such information, lines 1-4 create a forwarding set \(F_{n}\), an adjacency matrix \(E\) and a candidate set \(Can\). All combinations of the nodes in \(F_{n}\) are stored in the candidate set. The eligibility of these candidates is then judged according to Equation (7) (line 5-9). After traversing the qualified candidates set, lines 10-20 calculate the size of the minimum conflict competitors set as \(Counter_{i}\) by finding the competitors with the most coverage candidates in turn until all candidates are covered. After calculating the size of the minimum conflict competitors set, lines 21-24 pick the best candidates according to the three different optimization targets. Most directly affecting the probability of conflict is Equation (4). It contains more complex neighbor relationships than the other two expressions. Therefore, this optimization target needs to be satisfied first. Generally, more candidates bring more competitors, and every additional candidate determined will increase the stability of the transmission. For this reason, Equation (6) has a higher calculation priority than Equation (5). Eventually, the algorithm will calculate the filtered candidate set \(Can_{0}\) as the optimal selection strategy \(S_{n}\).