## 2 Related Work
When we to talk about clustering algorithm, then [PERSON] et al. in [13] presented a protocol known as low energy adaptive cluster hierarchy (LEACH). It is a cluster-based routing protocol for homogenous networks. In LEACH, the cluster heads rotate randomly to evenly distribute the energy load between the sensor nodes. In setup phase clusters are formed and CH are selected, while in steady-state phase sensed data is aggregated and delivered to the sink. Cluster head is selected as following: nodes randomly select a number \(r\) between 0 and 1. If \(r\) is less than the threshold value \(T(n)\), then this node becomes a cluster head for the current round. Threshold is calculated as:  
\[T(n)=\frac{p}{1-p\times\Big{(}r\;mod\bigg{(}\frac{1}{p}\bigg{)}\Big{)}},if\;n\in G \tag{14}\]  
where \(G\) is a set of nodes that are associated in cluster head election and which are not picked out as a cluster head in the past 1/\(p\) rounds. Once node is elected as a cluster head then it cannot be elected as a cluster head in the next successful 1/\(p\) rounds. Therefore, the possibility of other nodes to be elected as a cluster head is increased. The elected cluster head broadcasts an ADV message to remaining nodes, so that non-cluster head nodes choose and form a cluster based on the received message signal strength. After receiving a feedback message from nodes, cluster head creates a time division multiple access (TDMA) time schedule, then sets a time slot to every member node of its cluster, representing a time they are allowed to send a data. In this manner at each round setup phase is replaced by steady-state phase and continues until the lifetime of the network [29]. However, the LEACH algorithm does not give a good performance in heterogeneous environment. The stable election protocol (SEP) was presented as a cluster-based two level heterogeneous-aware routing algorithm consisting of normal regular and extended advanced nodes [14]. In a SEP algorithm, the network becomes unsteady after the death of the first node. Therefore, to improve the stability period, SEP provides even-tempered power consumption technique. Thus, sensor nodes with higher initial energy have better possibility to become a cluster head than normal nodes due to weighed election probability based on remaining residual energy. Hence, network lifetime and energy consumption is well-balanced [30]. Normal nodes have \(E_{0}\) initial energy, while advanced nodes have \(E_{0}(1+\alpha)\). Scene \(\alpha\) indicates more energy than a normal node. Thus, the total network energy is \(n(1-m)E_{0}+nmE_{0}(1+\alpha)=nE_{0}(1+\alpha m)\). Hence, the network is enhanced by \(1+\alpha m\) energy. To refine the period of stability, the new calculated epoch is \(1/p_{opt}\) (\(1+\alpha m\)), since the network has \(\alpha m\) of more sensor nodes and accordingly \(\alpha m\) times more power. Each node selects a random number between 0 and 1 and if this number is less than the threshold value \(T(s)\), then it becomes a cluster head for the current round. This cluster head cannot be nominated for the same epoch at this round. Threshold value \(T(s)\) increases as rounds rise and becomes equal to 1 at the round of last. It means that, the probability of remaining nodes to be elected as a cluster head is 1 at the last round. So the probability \(p_{mm}\) of normal nodes and \(p_{adv}\) of advanced nodes to become a cluster head is:  
\[p_{mm}=\frac{p_{opt}}{1+\alpha m} \tag{15}\]  
\[p_{adv}=\frac{p_{opt}}{1+\alpha m}(1+\alpha) \tag{16}\]  
where \(p_{opt}\) is a cluster head probability and an average \(n\cdot p_{opt}\) cluster heads must be elected per round per epoch. Advanced nodes have a higher chance to be selected as a cluster head than normal nodes. \(m\) is the subset of extended advanced nodes, where \(\alpha\) is the energy factor that is added to the whole network. Thus, the threshold value for normal and advanced nodes is:  
\[T(n_{mm})=\left\{