Skip to main content
. 2016 Aug 5;16(8):1235. doi: 10.3390/s16081235
Algorithm 2. Determination of the minimum communication radius of inters cluster communication.
Input: the sensor node set S={s1,s2,,sN}, the number of cluster head k.
Output: the set of relay nodes RS.
1. Suppose all nodes in the set S as generic point, generates the corresponding k order Voronoi diagram Vk(S);
2. The set of polygon for Voronoi diagram is denoted as V={Vk(PL1,S), Vk(PL2,S), ,Vk(PLM,S)}, where Vk(PL1,S) is the i-th polygon for Vk(S);
3. RS=;
4. while V do
5.    for each Vk(PLi,S)V do
6.      if sj is the generic point of polygon Vk(PLi,S) then
7.        record the occurrence time of node sj;
8.      end if;
9.   end for;
10. Find out the smax which denotes the maximum number of occurrences of generic point;
11. The node smax can be added in the set of RS;
12. V=V{Vk(PLi,S)|smaxPLi};
13. end while.