Research Article

Cluster Head Selection in a Homogeneous Wireless Sensor Network Ensuring Full Connectivity with Minimum Isolated Nodes

Algorithm 2

Function[Left_Neighbours] = notflag_neighbours(Neighbours, Setflag)
for i = 0 to Neighbours
{
Min_count = min_setflag_count()
  node   is the CH
set flag for   in the set Neighbours()
set CH id’s   for in the set Neighbours()
notflag_neighbours(Neighbours, Setflag)
  set Neighbours  =  left_neighbours
}
min_setflag_count is a function which calculates the minimum of of all the nodes in for which the flag is not set.