Research Article

Layer-Based Data Aggregation and Performance Analysis in Wireless Sensor Networks

Algorithm 2

Data aggregation tree construction.
Input: Graph ;
Output: Data aggregation tree , the dominated set , the set of connective nodes ,
(1) ,   ;
(2) Breadth first search graph with the root as ;
(3) Divide all node of into layers ;
(4) ;
(5) for each node , par( ) = ; ;
(6) for = 2 to do
(7)  calculate upper( ),
(8)  if and , then , ;
(9)  if is even, construct the layer independent set , and sequence the lower( ) with decreasing order of the set size as
    , and the set size as ;
(10)   ;
(11)  while != empty do
(12)   for each node lower( )
(13)   par( ) = , , ;
(14)   if is even then ;
(15)   end for
(16)    ;
(17)  end while
(18) end for