## 3 Dynamic Multi-Hop Routing (DMR) Technique
### Phases of the DMR Protocol  
#### 3.2.1 The Initialization Phase  
As mentioned above, the round starts with the initialization phase, which is responsible for creating the network clusters. First, each node generates a random number in the range between 0 and 1. This value is then compared with a threshold value \(T^{\prime}(i)\). If it is less than \(T^{\prime}(i)\), the node is elected as the CH for the current round. Otherwise, the node remains as a normal node and attempts to join a nearby cluster. The value of \(T^{\prime}(i)\), used in the DMR protocol, was introduced in [21] and is computed using Equation (5). It is considered a modified version of Equation (1), as follows:  
\[T^{\prime}(i)=\left\{\begin{array}{l}max\left(\frac{p}{1-p\left(r\ mod\frac{1} {p}\right)}\times\frac{E_{residual}}{E_{max}},T_{min}\right)\ \ \forall_{i}\in G\\ 0\ \becomes capable of forming clusters. To maintain balanced energy dissipation among the clusters, the DMR protocol determines the member nodes in each cluster. Thus, each CH manages a limited number of nodes within its cluster. For a network with \(J\) nodes, the number of _CHs_ is estimated using Equation (6). Accordingly, the number of member nodes \(N_{O}\) is given in Equation (7) and should not exceed this value [11]:  
\[Number\ of\ the\ CH_{s}=\sum_{n=1}^{J}p\times 1=J\times p \tag{6}\]  
\[N_{O}=\frac{J}{Number\ of\ the\ CH_{S}} \tag{7}\]  
The cluster formation process begins with the announcements. Each CH announces to the surrounding ordinary nodes to join its cluster in the current round. The announcement message includes the CH identification (CH ID) and its geographical coordinates. In response, the Ns receiving these announcements calculate their distances to these CHs. The computed distances are recorded in their selection tables (STs) and sorted in descending order. Accordingly, each N sends its JOIN-REQ message to the closest CH, provided that the distance is less than \(\mathrm{d_{o}}\), whereas the other distances are disregarded. Each CH checks its TDMA schedule for an available slot to serve the JOIN-REQ. If a free slot is found, it is assigned to the requesting node and an acceptance message is sent. Otherwise, a refusal message is transmitted. In that case, the node proceeds to the next option in the ST and sends a JOIN-REQ to the corresponding CH, and so forth. As a result of these cases, most of the nodes belong to their clusters, while some nodes fail to join any cluster. Hence, the DMR protocol considers the nodes that do not participate in any cluster as INs. These INs perform tasks similar to those accomplished by the CHs. Similar to the CHs, they contribute towards sensing data and routing these data directly to the BS or via other CHs or INs across multiple levels. They also assist CHs in routing their data to the BS. The DMR protocol divides the entire network architecture into levels with respect to the BS. It assigns a length of \(\mathrm{d_{o}}/2\) to each level. Hence, the first level includes all the CHs and INs located at distances less than \(\mathrm{d_{o}}/2\), while the boundary of the second level lies at distances greater than, or equal to, \(\mathrm{d_{o}}/2\) and less than \(\mathrm{d_{o}}\), and so on. Additionally, the DMR protocol assumes that the network clusters are composed of two levels. The first level contains all Ns located at distances less than \(\mathrm{d_{o}}/2\), whereas the second level contains the Ns located at distances greater than or equal to \(\mathrm{d_{o}}/2\). Based on this distribution, the DMR protocol ensures that most data transmissions occur within a distance less than \(\mathrm{d_{o}}/2\). This leveling approach, whether at the inter-cluster or intra-cluster level, positively affects the amount of energy dissipation and extends the network's lifetime. Figure 1 illustrates the overall architecture of the WSN using the DMR protocol. As described earlier, the entire network is divided into concentric levels, each with a length of \(\mathrm{d_{o}}/2\).