preview

Nt1310 Unit 7 Lab 1

Satisfactory Essays

Perform these steps for each & every cluster. SELECT_CLUSTERHEAD (n, S) Begin: Step1. Let we have a set S of n nodes in a cluster viz. S= {S1, S2, S3… Sn} Step2. Calculate the distance of one node to all nodes. for i=1 to n do for j=1 to n do dij = distance from si to sj endfor endfor Step3. Calculate the sum of all distance from one to all nodes. for i=1 to n do for j=1 to n do Di=Di + dij endfor endfor Step4. Calculate distance from BS to each node for all nodes. for i=1 to n do DBSi = Distance from BS to Si endfor Step5. Calculate the net distance with base station for each node for i =1 to n do NDBSi=DBSi + Di endfor Step6. Select the cluster head based on all NDBS values. NDBSi =Min (NDBS1, NDBS2, NDBS3, NDBS4… NDBSn) And corresponding

Get Access