## 3 Algorithm Description and Process
### Algorithm Description
#### 3.2.3. Cluster Head Node Calculating the Depth of Each Node in a Cluster  
When one cluster head node \(f_{m}\) receives the \"calculate diving depth\" message \(M_{CD},f_{m}\) optimizes its own position and the position of its in-cluster nodes. After the depths of all nodes in its cluster are calculated, each node dives to its position synchronously. \(f_{m}\) initially calculates its own diving position according to the principle of maintaining and adjusting the layout on the water surface formed by uneven clustering. The rules are as follows:  
1. \(f_{m}\) is a common node (having both the last-hop node and the next-hop node). If the communication radius of \(f_{m}\) on the water surface \(R_{UA}(f_{m})\) plus one is greater than the adjusted communication radius \(R_{A}(f_{j})\) of its next-hop node \(f_{j}\), _i.e._, \(f_{m}\) satisfies the feature of the uneven clustering after it adjusts its depth, \(f_{m}\) regards its adjusted communication radius as \(R_{UA}(f_{m})+1\) and calculates its diving depth; otherwise, \(f_{m}\) regards the adjusted communication radius of its next-hop node \(R_{A}(f_{j})\) plus one as its adjusted communication radius and calculates its diving depth. This process of calculating the diving depth of \(f_{m}\)_dep(\(f_{m}\)) is formulated as follows: \[dep(f_{m})=dep(f_{j})+\left\{ \begin{array}{cc}\sqrt{2R_{UA}(f_{m})+1}&R_{ UA}(f_{m})+1>R_{A}(f_{j})\\ \sqrt{\left(R_{A}(f_{j})+1\right)^{2}-\left(R_{UA}(f_{m})\right)^{2}}&R_{UA}(f _{m})+1\leqslant R_{UA}(f_{j})\end{array} \right.\] (13) where \(R_{UA}(f_{m})\) is the communication radius of \(f_{m}\) before it adjusts its depth. In other words, \(R_{UA}(f_{m})\) represents the distance between itself and its next-hop node on the water surface. \(R_{A}(f_{m})\) is the communication radius of \(f_{m}\) after it adjusts its depth. In other words, \(R_{A}(f_{m})\) represents the distance between itself and its next-hop node after \(f_{m}\) adjusts its depth. 2. If \(f_{m}\) is a leaf node (having only next-hop nodes), it can reduce the \(CRR\) with its last-hop node by increasing its own depth. \(f_{m}\) determines its depth _dep(\(f_{m}\))_ by Equation (14) on the basis of whether it is the one-hop node of the sink node. \[dep\left(f_{m}\right)=dep\left(f_{j}\right)+\left\{ \begin{array}{cc}\sqrt{ d_{hot}^{2}-d^{2}\left(f_{m},Sink\right)}&d\left(f_{m},Sink\right)\leqslant d_{ hot}\\ \sqrt{\left(2R_{s}\right)^{2}-\left(R_{UA}(f_{m})\right)^{2}}&d\left(f_{m},Sink \right)>d_{hot}\end{array} \right.\] (14) After the cluster head node \(f_{m}\) defines its depth, it updates the node set _all_deployed_ consisting of nodes that have adjusted their depths in the entire network and the node set _part_deployed_ consisting of nodes with depths calculated in the cluster and begins to calculate the depth of its in-cluster nodes. The cluster head node \(f_{m}\) defines the depth of one in-cluster node \(N_{f}\) every round. In each round, \(f_{m}\) initially selects each node in order from the nodes in _part_deployed_ as the basic node \(b\) of \(N_{f}\) (_i.e._, nodes in the same cluster with \(N_{f}\), as the next-hop nodes of \(N_{f}\)). For every basic node \(b,f_{m}\) individually calculates the diving depth of \(N_{f}\) by Equations (15) and (16) when the distance _d_adjust_ between the adjusted position of \(N_{f}\) and the adjusted position of \(b\) is \(R_{c\_Max}\), \(R_{c\_Max\_1}\dots\)\(d(N_{f},b)\). \(f_{m}\) then selects the minimum \(CRR\) as the \(CRR\) of basic node \(b\) and saves the corresponding depth (when the minimum \(CRR\) corresponds to several different depths,\(f_{m}\) selects the corresponding depth by the communication radius of node \(N_{f}\) and the diving distance of \(N_{f}\) in order). \[dis\_vertical=\sqrt{d\_adjust^{2}-d^{2}(N_{f},b)}\] (15) \[dep(N_{f})=\left\{ \begin{array}{cc}R_{s}&dep(b)-dis\_vertical<R_{s}\\ Depth-R_{s}&dep(b)+dis\_vertical>Depth-R_{s}\\ dep(b)\pm dis\_vertical&others\end{array}