## 3 System Model and Framework
### System Budget Constraints
End if End for
```  
**Algorithm 1**Minimum Energy Consumption Chain Based Algorithm (ME-CBCCP)  
As the network grows in size, it becomes difficult to maintain its reliability, but all the applications require that the network should not be partitioned and the transmission algorithm should be robust. To make ME-CBCCP more suitable for IoT applications, in Step 5, the energy level of each CH and CCO is checked, and if it is found that their energy level is far less than the required level to act as the CH and CCO, then their role is changed by reselecting CHs and CCOs by moving back to Step 3. In this way the transmission process will continue even when some nodes have depleted their energy up to the largest extent. Equation (12) presents the optimization problem, by which the energy consumption in each cluster should be decreased. This is achieved by balancing the load on the clusters by a cooperation method among the nodes, CHs and CCOs. Moreover ME-CBCCP is a static algorithm in contrast to the traditional dynamic algorithms of WSNs. In dynamic algorithms, nodes exchange their information about the routes during the network operation and this increases the network overhead which is why those algorithms cannot be applied to IoT framework. **Theorem 2. **_The clusters are formed in fixed iterations and the complexity is O (1)._  
**Proof of Theorem 2. ** According to Algorithm 1, in Step 2 the clusters are formed by division of the area into subareas which are fixed. Due to static clustering, this process is accomplished in one round only. For NN1 nodes the probability of election as the CH is much less during the initial phase that is 1/NN1. With the increase in the number of dead nodes (d), the CH_prob also increases. CH_prob = 1/ NN1 - d, where 0 <= d < NN1. Nodes with more energy than the threshold energy can be CH and nodes with less energy than the required energy will join the cluster as normal nodes. As the number of dead nodes increases, the number of iterations decreases ( NN_itr \(\alpha\) 1/NN1 - d ). **Theorem 3. **_The complexity for N nodes for message exchange is O (N)._  
**Proof of Theorem 3. ** According to Theorem 2, the number of iterations is fixed for clustering and for electing CHs. So it takes, at most, N time for their processing. Computation of the total time taken in the data communication process can be considered as N_ITR \(\times\)N (for the transmission) of data of N nodes in N_ITR ). Hence the complexity to exchange the messages in N nodes is taken as O (N). **Theorem 4. **_Each rectangle cell has at least CH to aggregate the data from local nodes_. **Proof of Theorem 4. ** Data is aggregated from the local nodes by CHs in each cell. From Step 3 in Algorithm 1, each cluster will have one CH. In the worst case, if a cluster has only one node, then it will act as the CH till its energy falls below the threshold level. It will coordinate with the upper layer CCO in transmitting the data. If there is no CCO in the upper layer (due to depletion of energy of the nodes by time) then data is transmitted directly to the BS to avoid delay in transmitting the data which are the requirement of many applications of IoT. The network lifetime of ME-CBCCP can be easily computed. The network lifetime can be considered in various ways. For example, it can be considered as the time period from the initial operation till the death of first node or it can be considered as the time span from initial operation of the death of all the nodes. We have considered the second option. To provide an in-depth insight for the whole IoT, the worst case of network lifetime can be given as:  
\[N^{t}=\min\left(\frac{E_{1}}{E_{x}},\frac{E_{2}}{E_{y}},\frac{E_{3}}{E_{x}}, \frac{E_{4}}{E_{y}}\right) \tag{14}\]where \(E_{{}_{1}},E_{{}_{2}},E_{{}_{3}},E_{{}_{4}}\) defines the initial energy of normal nodes, relay nodes, cluster heads and luster coordinators. With the use of RNs, CHs and CCOs the network is connected and an energy efficient IoT can be easily deployed with this scheme.