| Algorithm 1. IEE-LEACH |
| 1. N-number of nodes, r-number of rounds. |
| 2. The first step is to initialize the network parameters for WSN. |
| 3. The second step is the random deployment of the nodes in the network. |
| 4. The third step is the deployment of the BS in the network. |
| 5. Calculate
|
| 6. for to r
|
| 7.
|
| 8.
|
| 9.
|
| 10. t=Random number |
| 11. If
|
| 12. CH
|
| 13. Calculate
|
| 14. end if |
| 15. if
|
| 16. Select CH and join the cluster; |
| 17. else |
| 18. Nodes do not participate in the cluster |
| 19. end if |
| 20. Transfer to BS |
| 21. i=i+1 |
| 22. go to step 6 |
| 23. end |