## 4 Proposed Algorithm
### Cluster Head Selection
The same issue occurs when CHs transmit multi-hop data to the BS, with the exception that CHs closer to the BS wear out faster than CHs farther away due to the overhead of transmitting the additional packets from faraway nodes to the BS. This is taken into account by the proposed algorithm (FEHCA), which focuses on controlling the entire region for almost the entire network lifespan. It demonstrates the inclusion of advanced nodes within the clusters in uniform fashion (in case the BS is within the deployment zone) as well as in increasing fashion when the distance between the cluster and BS increases (in case the BS is far away from the deployment zone). This is crucial in order to monitor a larger area rather than only monitoring clusters in close proximity to the BS for most of the time and making decisions for the entire area based solely on inputs from neighbouring CHs only. With or without the same number of high energy nodes, the CHs far away from the BS die out early and only the CHs and the clusters near the BS remain alive for a longer period of time. We need sensed data from the entire area being monitored for better decision-making, which means that the CHs of the entire area must be alive, and one way to achieve this is to deploy advanced nodes in increasing order as the distance from the BS increases. If two CHs are at different distances from the BS, then the transmission energy consumption must be different according to Equation (1). Therefore, in order to equate the transmissions of both the CHs to the BS, we require additional energy for the distant CH. The computation of the additional amount of energy is given in Lemma 2. **Lemma 1**. : _The cluster head election in FEHCA has a worst-case time complexity of O (Cn\({}^{2}+\)Cn CN\({}^{2}\) log CN)._

Proof. : The major components in the FEHCA algorithm that dominate the complexity from Step 2 and Steps 3 to 15. As in Step 2, we use the k-means algorithm, which has a complexity of O (CN). Steps 3 to 15 mainly consist of two parts. For Part 1 (Steps 5 to 8), the complexity of this part is O (CN). For Part 2 (Steps 10 to 14), in Step 12, we have used a sorting technique, which has a time complexity of O (CN log CN). Thus, the complete Steps 10 to 14 have a time complexity of O (CN\({}^{2}\) log CN). Therefore, the time complexity from Steps 3 to 15 is O (Cn\({}^{2}\)) + O (Cn CN\({}^{2}\) log CN). Now, the overall complexity of Algorithm 1 is O (Cn\({}^{2}\)) + O (Cn CN\({}^{2}\) log CN) + O (CN) \(\approx\) O (Cn\({}^{2}+\) Cn CN\({}^{2}\) log CN). **Lemma 2**. : _Let the energy requirement for the transmission of k-bits from a cluster head (CH) to the base station (BS) in the case of a multipath be \(E_{Tx}(k,d)=k*E_{elec}+k*\varepsilon_{mp}*d^{4}\), where '\(d\)' is the distance between BS and a CH. If the distance between two CHs (CH\({}_{1}\) and CH\({}_{2}\)) from the BS is \(d_{1}\) and \(d_{2}\) such that \(d_{2}\)\(\times\)\(d_{1}\), then, in order to equate the transmissions of CH\({}_{1}\) and CH, we need additional energy for CH\({}_{2}\), which is given by_

\[\Delta=\frac{\theta*\varepsilon_{mp}\left(d_{2}^{4}-d_{1}^{4}\right)}{k*E_{ elec}+k*\varepsilon_{mp}*d_{1}^{4}}\]

where \(\theta\) is the initial energy with CH\({}_{1}\) and CH\({}_{2}\). Proof. : The energy requirement for transmitting k-bits over the distance d as discussed in Equation (1) is given by:

\[E_{Tx}(k,d)=k*E_{elec}+k*\varepsilon_{mp}*d^{4} \tag{3}\]

Since \(E_{Tx}()\) is a strictly increasing function over 'd', \(E_{Tx}(k,d_{2})>E_{Tx}(k,d_{1})\) for given d\({}_{2}>\) d\({}_{1}\).