Research Article

Delay Tolerance and Energy Saving in Wireless Sensor Networks with a Mobile Base Station

Algorithm 6

CT balanced algorithm (CTBA).
Input: A sensor network , Set of CTs , hop count
Output: set of balanced CTs , Remain Nodes
(1) number of CL nodes   ;
(2) ;/ set of nodes in the network /   ;
(3) ;
(4) ;
(5) Sort trees in increasing order according to the number of nodes in each tree   ;
(6) // remove CL nodes from testing nodes   ;
(7) for  hc= 1 to h  do
(8) for  each    do
(9) ;
(10) if    then
(11) ;
(12) Find an MST ;
(13) / remove tree nodes from testing nodes /   ;
(14) ;
(15) Return(,)   ;