Research Article

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

Algorithm 4

Minimum-latency data aggregation.
Input: Data aggregation tree = ( , ), depth of the data aggregation tree ;
Output: Sending time ( ) for each node , and latency.
(1) for each node , run Algorithm 3 to construct the concurrent set , , …, ;
(2) if then ( ) = ;
(3) ;
(4) for to 1
(5)  if is even, then
(6)   all nodes , construct the concurrent set , , …, ;
(7)   if , then ( , ;
(8)  else
(9)   all nodes , construct the concurrent set , , …, ;
(10)   if , then ( ) = latency + , latency = latency + ;
(11)  end if
(12) end for