Skip to main content
. 2022 Apr 22;22(9):3236. doi: 10.3390/s22093236
Algorithm 3: Cluster Maintenance
1: if ACK from CMj is not heard by CH
2:  deplete CMj from CM list
3: end if
4: if CHi leaves the cluster
5:  execute Algorithm 2
6: end if
7: if a new node requests to join the cluster
8:  the new node sends HELLO message to CHi
9:  if (remaining energy of the new node > Eth)
10:   CHi reply ACK and agree to join
11:  else
12:   ignore the request
13:  end if
14: end if