Research Article

Optimal Clustering in Wireless Sensor Networks for the Internet of Things Based on Memetic Algorithm: memeWSN

Algorithm 1: Psuedo code of memeWSN.

1. Procedure memWSN_cluster
2. Input:, ,
3. Output: WSN-IoT cluster head set
4. Initialize all variables
5. Total
6.   whiledo
7.    
8.  end while
9.  
10.  (14)
11.  whiledo \\ initializes a random cluster head set permutation
a.
b.
12.  end while
13.  
14.  
15.  
16.    .
17.  {
18.  }
19.  Return CHs
20. end procedure memWSN_cluster
Algorithm 1: Psuedo code of memeWSN.