Algorithm 1. MIS Construction Algorithm (MISC). |
|
MIS Construction Algorithm (MISC) |
|
Input: the wireless sensor network G = (V, E), the source node src ∈ V; |
Output: the ordered sequence list S. |
Run the Breadth First Search (BFS) algorithm on the network G with src as the root; record the node layer according to their distance to the source, and there is only the source src in Layer 0; |
Sequence the nodes in increasing order of the layer, and build list L; |
Check the nodes from Layer 0 to the end, and order them in decreasing order of the node degree, the result is preserved in list S. |
Set the state of all nodes in S as UNMARKED; |
Mark node src as INDEPENDENT, and add it to list M; |
Mark the state of neighbors of node src as COVERED, and let l = 2; |
l = l + 1; |
For each node i in S and Layer l, check the state; if it is UNMARKED, change to INDEPENDENT and add i into set M, and change the neighbors of node i to COVERED if their initial value is UNMARKED, and finally add these neighbors to Ci; |
If there are still nodes with state as UNMARKED, go to step a7; |
End. |
|