# Markov Chain Model-Based Optimal Cluster Heads Selection for Wireless Sensor Networks
## 1 Introduction  
Wireless Sensor Network (WSN) is an important technology used in different applications. The sensor nodes used in WSN are usually small battery-operated devices. These sensor nodes are installed in the field to collect the physical information. After deployment, the nodes batteries cannot be replaced. The lifetime of the WSNs ends when the batteries of these sensor nodes are empty [1]. As a result, the WSNs sensor nodes always meet a severe energy problem. The network lifetime can be increased by cutting down the usage of available resources or by energy harvesting [2; 3; 4; 5; 6]. Different schemes and strategies have been designed to reduce the energy consumption of sensor nodes. In these designed approaches, the cluster-based approaches [7; 8; 9; 10; 11; 12; 13; 14] are the most efficient and reliable way to save the energy resources of WSNs. The cluster-based framework is a hierarchal structure in which sensor nodes fall into a local structure called clusters [8; 9; 10; 11; 12], which consist of a Cluster Head (CH) and a few root nodes. When these root nodes are in a cluster, they are called Cluster Member Nodes (\(C_{MNs}\)). The \(C_{MNs}\) convey thesensed information through a CH, which manages the information of \(C_{MNs}\) in its cluster by allocating transmission slots for each of them [15]. All the CHs then form the communication backbone of the network at a higher hierarchical level. In hierarchical clustering protocols [9; 10; 11; 12], CHs perform various extra tasks compared with \(C_{MNs}\), such as node association, authentication, data aggregation, data fusion, and task assignments [16]. Therefore, it is logical that the CHs would usually have much higher energy consumption as compared to the root nodes. To prevent CHs from early dying and to increase the network lifetime, the energy consumption within the network needs to be balanced by equally distributing the energy and data load among all the CHs. The previously designed cluster-based [17; 18] routing protocols randomly pick the CH node. These randomly selected CHs are not optimal in number. Consequently, this creates imbalance and uneven clusters in the network. Additionally, when the size of the cluster is greater, the pressure on CH for aggregating and receiving information also increases. The CHs which are in charge of large clusters expend more energy in comparison with the CHs of small clusters which create an unbalanced energy situation leads to end the network lifetime very earlier [19; 20]. Controlling the size of the cluster is also important for balancing the load. In the proposed mechanism, we use the Markov chain model [21] to select an optimal number of CHs in the network according to the number of available sensor nodes for optimal resource utilization. In this designed framework, we also limit the number of \(C_{MNs}\) in a cluster to divide the energy overhead and other CH-related responsibilities. In current cluster-based protocols [22; 23], once a sensor node gets the CH status message from all the selected CHs, in a moment, it assesses their received signal strengths. Then nodes join themselves with the CH, which has the strongest received signal strength among them [24; 25]. Whenever a member node links itself to a CH which is selected on the basis of received signal strength and this CH positioned backward compared to its route of transmission towards the BS, back transmission occurs. This type of data transmission contributes to extending the general path length traveled by the locally collected data. In this paper, we present a node association strategy through which every member node compares the received signal strengths by all the CHs. If the received response by any CH is greater as compared to the other CHs, then it computes a midpoint towards the BS from both the CHs. The node then associates itself with a CH having a strong signal strength and located at a lesser distance from the BS. Otherwise, it joins the CH which is at the lesser distance from the BS.