Research Article

Energy Measure Semigraph-Based Connected Edge Domination Routing Algorithm in Wireless Sensor Networks

Algorithm 2

Generation of EDS.
Input: A connected semigraph with and .
Output: EDS in the semigraph S.
(1), , ,
(2)Let  = 
(3)for to do
(4) for all and do
(5)  
(6) end for
(7)end for
(8)for to do
(9) Sort the edge in the descending order of
(10)end for
(11)add first edges to
(12) for to do
(13)   for all edge
(14)    If satisfies the following conditions(i), for some (ii) The battery level of one of the node should be higher
(15)    Then add to
(16)    end if
(17)   end for
(18) end for
(19)return