## 3 Distance Vector-Hop (DV-Hop) and Differential Evolution (DE) Algorithms
### DV-Hop Algorithm  
The three steps of the DV-Hop algorithm are discussed as follows.  
Step 1: Flooding  
In this step, all anchor nodes broadcast data packets with their localizations to their neighbors and hop digital segments are initially set to zero. The structure of the data packet is \(\left\{id,x_{i},y_{i},h_{i}\right\}\), including identifier id, the coordinate of the anchor node \(i\) is \((x_{i},y_{i})\), \(h_{i}\) the minimum hop-count value from the anchor node \(i\), and the initial value of \(h_{i}\) is zero. Once the neighbor node receives a packet with a smaller hop-count value from a particular anchor node, the localization of the anchor node is recorded and adds \"1\" to the hop-count value before sending it to other neighbor nodes [38; 39; 40; 41]. Packets with high hop-count values are defined as obsolete information to be ignored. As soon as this step is completed, each one of the unknown nodes in the network retrieves the value of the minimum hop-count for each anchor node.  
Step 2: Distance Estimation between Nodes  
In this step, the distance between each node is estimated. First, it calculates the average distance per hop of each anchor node. For the anchor node, it uses Equation (1) to calculate the average distance per hop:  
\[\textit{HopSize}_{i}=\frac{\sum\limits_{i\
eq j}d_{i,j}}{\sum\limits_{i\
eq j }h_{i,j}} \tag{1}\]  
where \(d_{i,j}=\sqrt{\left(x_{i}-x_{j}\right)^{2}+\left(y_{i}-y_{j}\right)^{2}}\), \((x_{i},y_{i})\) and \(\left(x_{j},y_{j}\right)\) represent the location of anchor nodes \(i\) and \(j\), and \(h_{i,j}\) represents the minimum hop-count value in anchor nodes \(i\) and \(j\).  
After calculating \(\textit{HopSize}_{i}\), each anchor node broadcasts its \(\textit{HopSize}_{i}\) in the system through controlled flooding. Equation (2) is used to determine the estimated distance between the unknown node and the anchor node \(i\).  
\[d_{u,i}=\textit{HopSize}_{i}\times h_{u,i} \tag{2}\]  
where \(h_{u,i}\) represents the minimum value of hop-count between anchor node \(i\) and unknown node \(u\).  
Step 3: Estimate the Location of Nodes  
In step 3, it is required to find out the location of all unknown nodes. For the unknown node \(u\), the multilateration method [38] is used to estimate its location.  
Let \((x_{u},y_{u})\) be the location of the unknown node \(u\) and \((x_{i},y_{i})\) be the location of the anchor node, where \(i=1,2,\cdots,m\). Therefore, the distance between unknown nodes \(u\) and \(m\) anchor nodes is specified by the following equation:  
\[\left\{\begin{array}{l}\left(x_{1}-x_{u}\right)^{2}+\left(y_{1}-y_{  
Equation (3) can be extended to:  
\[\left\{\begin{array}{l}x_{1}^{2}-x_{m}^{2}-2(x_{1}-x_{m})x_{u}+y_{1}^{2}-y_{m}^{ 2}-2(y_{1}-y_{m})y_{u}=d_{1}^{2}-d_{m}^{2}\\ x_{2}^{2}-x_{m}^{2}-2(x_{2}-x_{m})x_{u}+y_{2}^{2}-y_{m}^{2}-2(y_{2}-y_{m})y_{u}= d_{2}^{2}-d_{m}^{2}\\ \cdots\cdots\\ x_{m-1}^{2}-x_{m}^{2}-2(x_{m-1}-x_{m})x_{u}+y_{m-1}^{2}-y_{m}^{2}-2(y_{m-1}-y_{ m})y_{u}=d_{m-1}^{2}-d_{m}^{2}\end{array}\right. \tag{4}\]  
The above Equation (4) can be expressed in matrix form as \(AX=B\), where \(A\), \(X\) and \(B\) are expressed by Equations (5)-(7), respectively.  
\[A=\left[\begin{array}{ccc}2(x_{1}-x_{m})&2(y_{1}-y_{m})\\ 2(x_{2}-x_{m})&2(y_{2}-y_{m})\\ \cdots\cdots\\ 2(x_{m-1}-x_{m})&2(y_{m-1}-y_{m})\end{array}\right] \tag{5}\]  
\[B=\left[\begin{array}{c}x_{1}^{2}-x_{m}^{2}+y_{1}^{2}-y_{m}^{2}+d_{m}^{2}-d _{1}^{2}\\ x_{2}^{2}-x_{m}^{2}+y_{2}^{2}-y_{m}^{2}+d_{m}^{2}-d_{2}^{2}\\ \cdots\cdots\\ x_{m-1}^{2}-x_{m}^{2}+y_{m-1}^{2}-y_{m}^{2}+d_{m}^{2}-d_{m-1}^{2}\end{array}\right] \tag{6}\]  
\[X=\left[\begin{array}{c}x_{u}\\ y_{u}\end{array}\right] \tag{7}\]  
It utilizes the least square method to solve the equation. The coordinate location of the unknown node \(u\) is calculated:  
\[X=\left(A^{T}A\right)^{-1}A^{T}B \tag{8}\]