## 5 Proposed Reliable, Energy Optimized and Void Aware Routing Protocol
### Clustering Process  
The cluster formation and selection of cluster heads play a considerable role in the UASN environment. The proposed clustering procedure dynamically clusters the ASNs and selects a suitable cluster head for each cluster. However, before clustering, the optimal number of clusters is challenging. The optimal number of clustering is essential to accomplish energy efficiency among ASNs. A higher number of clusters while maintaining an equivalent processing load on each cluster head will result in the formation of numerous smaller-sized clusters; however, the communication overhead will also be higher. So, the energy expenditure is higher. Conversely, a smaller number of clusters will result in many larger-sized clusters, where the ASNs that are located further apart require a higher amount of energy to send data packets to their associated cluster head. Therefore, to preserve energy among acoustic sensor nodes, it is essential to choose the optimal sum of clusters. Optimizing the number of clusters enhances the longevity of the network, increases energy efficiency, and improves scalability. The studies in [49; 50; 51] used the K-means clustering to determine the optimal sum of clusters. However, the K-means algorithm requires the user to choose the number of clusters (K) before the clustering process begins. Additionally, if the locations of the ASNs do not vary once they are clustered, the network topology is fixed, which can result in an imbalance in energy usage among ASNs and leads to reduced lifespan. Therefore, in this paper, Algorithm 1 is proposed for the optimal number of clusters. The optimal number of clusters (K) can be calculated below. \[\mathrm{K}=\frac{3\mathrm{LBD}}{4\pi\mathrm{R_{t}}^{3}} \tag{19}\]  
Here, L, B, and D, are the length in the X, breadth in the Y, and depth in the Z directions. \(\mathrm{R_{t}}\) is the maximum transmission range of ASN. Soon after the calculation of the optimal sum of clusters (K) required to cover the networking region, the ASNs are grouped into K clusters based on their submerged positions. The total number of clusters in each layer \(\mathrm{C_{N}}\) can be calculated using the following expression. \[\eta_{\text{N}}=\frac{\varpi_{\text{N}}}{\text{D}} \tag{20}\] \[\text{C}_{\text{N}}=\text{K}\,*\,\eta_{\text{N}} \tag{21}\]  
Here, \(\eta_{\text{i}}\) is the percentage of cluster formation in layer \(\aleph\), and D is the total depth assumed for the networking region. \[\text{D}_{\text{i}}=\frac{1}{\text{N}-1}\underset{j\
eq\text{i}}{\sum}\frac{1} {\text{RSSI}_{\text{i}j}} \tag{22}\]  
The higher RSSI values indicate the closer proximity of an ASN to the neighboring ASNs  
```
Input: 3 Dimensions of Underwater Networking Region and Transmission Range Output: Optimal Number of Clusters Formation
```  
**Algorithm 1**Optimal Cluster Formation  
Residual Energy of the ASN: The cluster head expends a significantly higher amount of energy as compared to other ASNs. An ASN may prematurely die from excessive energy expenditure if it is frequently chosen as the cluster head and the chances of void area occurrence increase. The ASN with higher residual energy is a potential candidate to be selected as a cluster head. However, to reduce the occurrence of void area issues, a specific energy threshold is established for every ASN. Since the ASNs have less remaining energy than the mean remaining energy of cluster ASNs, it is unlikely to be chosen as the cluster-head. Consequently, the void area issue can be avoided by adopting a rotation policy while keeping the ASNs functional for a longer duration. The normalized value for the residual energy (\(\text{e}_{\text{Res}}\)) of ASN i can be calculated as follows. \[\text{e}_{\text{Res}}=\frac{\text{E}_{\text{Res}}-\text{E}_{\text{min}}}{\text {E}_{\text{max}}-\text{E}_{\text{min}}} \tag{23}\]  
Here, \(\text{E}_{\text{max}},\text{andE}_{\text{min}}\) are the maximum and minimum residual energy of all ASNs in the cluster. To select the optimal cluster head, we need a combined metric that considers both criteria.