# Trust-Aware Routing Mechanism through an Edge Node for IoT-Enabled Sensor Networks
## 4 Proposed Trust-Aware Routing Mechanism
### Trust-Value-Based Route Path Selection
#### 4.2.1 Trust Values Evaluation
The \(z\)-value is given by \(z=\frac{r_{0}-r_{i}}{h}\), where the ranks are taken from Table 8. \(r_{0}\) is the average rank of the proposed method and \(h=\sqrt{\frac{y(y+1)}{\epsilon x}}\). Using this \(z\)-value, the \(p\)-value is obtained from a normal distribution chart. This \(p\)-value is compared with \(\frac{\alpha}{(y-i)}\). If the \(p\)-value is less than \(\frac{\alpha}{(y-i)}\), the null hypothesis is rejected; otherwise, it is accepted. Table 9 shows that Hybrid WGWO, MBCO, and ALO-K perform similarly to the proposed algorithm and other heuristic approaches perform differently. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Algorithms** & **Average Time** & **Success Rate** \\ \hline PSO & 60.12 & 68 \\ Hybrid WGWO & 57.44 & 70 \\ ACO & 42.78 & 59 \\ MBCO & 35.05 & 87 \\ ALO-K & 31.84 & 92 \\ TARM & 28.56 & 97 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Success rates and average time of execution for all algorithms. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Datasets** & **Number of Instances** & **Classes** & **Number of Features** \\ \hline Iris [36] & 150 & 3 & 4 \\ Wine [37] & 178 & 3 & 13 \\ RSSI [38] & 6611 & 3 & 15 \\ Dry bean [39] & 13,611 & 7 & 17 \\ Air quality [40] & 9358 & 2 & 15 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Dataset description. ## 6 Conclusions

To establish a trust-based relationship between the nodes in an IoT-based network and a mobile edge data collector for dynamic scenarios, we develop a trust-aware model that enables clustering and routing in a sensor network. In our proposed work, an edge-enabled IoT architecture is implemented to find trustworthy nodes and those nodes are only targeted for data gathering. The clustering is performed using modified gray wolf optimization and the ABC approach is utilized for effective routing. The results manifested that the proposed work ensures energy-saving and has the advantage of having negligible packets drop. The proposed scheme shows approximately 80% reduction in average delay and around 50-70% reduction in energy consumption when compared with other state-of-the-art approaches. Furthermore, the accuracy of the proposed scheme is recorded to be 91.96%. The proposed distributed method can be easily implemented for a broad range of IoT applications that ensures good data transmission and information storage by virtue of edge intelligence. As a future direction, this work can be further extended for large-scale sensor networks that can use more than one edge node. The method can be made computationally efficient by employing some novel learning techniques to find trustworthy nodes and routes. Furthermore, multi-objective optimization can also be used to achieve energy-efficient optimized clustering and routing. Conceptualization, A.S. and P.J. ; Data curation, A.S. and P.J. ; Formal analysis, A.S., P.J. and S.S.S. ; Funding acquisition, R.S.R. and S.S.S. ; Investigation, A.S. and P.J. ; Methodology, A.S. and P.J. ; Project administration, P.J. and R.S.R. ; Resources, A.S., P.J. and R.S.R. ; Software, S.S.; Supervision, R.S.R. and S.S.S. ; Validation, A.S., P.J., R.S.R. and S.S.S. ; Visualization, A.S. and P.J. ; Writing--original draft, A.S. and P.J. ; Writing--review & editing, P.J., R.S.R. and S.S.S. All authors have read and agreed to the published version of the manuscript. This research received no external funding. **Institutional Review Board Statement:** Not applicable. **Informed Consent Statement:** Not applicable. **Data Availability Statement:** The data used for this paper are cited within the article.