Skip to main content
. 2013 Apr 12;13(4):4922–4946. doi: 10.3390/s130404922
Algorithm 2. Efficient MCDS Construction Algorithm (EMCDS).

Efficient MCDS Construction Algorithm (EMCDS)

Input: the wireless sensor network G = (V, E), ordered sequence list S, maximal independent set M;
Output: the connected dominating set D.
For each node iS, traverse each distinct node jS according to the priori, and j is added into the list Pi if j is adjacent to node i and closer / in the same layer to the source;
Insert all nodes in list M to D in the same priori order; set the state of src as CONNECTED, and all other nodes in M as UNCONNECTED;
For each node iS excluding the source src;
If the state of i is UNCONNECTED, change to CONNECTED, and then check Pi in the following way: if there exists a node jPiD, then j is selected as the connected node of i, and i is inserted into Cj; otherwise, select the first node k in Pi as the connected node, and i is inserted into Ck;
If the state of all nodes in M is CONNECTED, then go to step b6, otherwise go to step b3;
Remove all the leaf nodes on the spanning tree of set D;
Set the state of all nodes in D as UNMARKED;
For each node iD excluding the source src;
If the state of i is UNMARKED, change to MARKDED, and then check each jCi; if there exists some other candidate parent node in the above or same layer for each j, remove i from the dominating set D, and change its children list Ci;
End.