3.1. Basic concepts
Sensor nodes are randomly distributed in the network field and have different transmission ranges. The link between any pair of nodes is bidirectional and the neighbour of one node is defined in Definition 1.
Definition 1: If and only if d(u, v) < min{r_{
u
}, r_{
v
}}, node v is a neighbour of u, and node u is a neighbour of v. d(u, v) denotes the distance between node u and v, r_{
u
}, and r_{
v
} denote the transmission ranges of node u and v, respectively.
A neighbour set N_{
v
} records the neighbour of node v as defined in Definition 1. At the same time, node v has two sets Pa_{
v
} and Ch_{
v
}, which denote the parent node set and children node set, respectively.
Any node i has a tuple \left({E}_{i},\mid R{N}_{v}^{i}\mid \right), where E_{
i
} denotes the residual energy of node v and R{N}_{v}^{i} denotes the reduced neighbour set computed by node i, and v is a neighbour of i. The reduced neighbour set is illustrated in Figure 1.
In Figure 1, node 1 covers nodes 2, 10, 11, 12, 10, 13, 14. Node 2 covers nodes 1, 10, 11, 12, 3, 4, 5, 6, 7, 8, 9. Assume all these nodes have the same transmission range, then we get that node 1's neighbour set is N_{1} = {2,10,11,12,13,14} and node 2's neighbour set is N_{2} = {1,3,4,5,6,7,8,9,10,11,12}. Then we define the reduced neighbour set R{N}_{2}^{1}={N}_{2}{N}_{1}, thus we get R{N}_{2}^{1}=\left\{3,4,5,6,7,8,9\right\} and \mid R{N}_{2}^{1}\mid =7.
The reduced neighbour set R{N}_{v}^{i} is a very important basis for both selecting the backbone nodes and constructing a MCDS in WSN.
3.2. Algorithm description
In order to understand EMCDS better, we first give the overview of the algorithm and then describe each part of EMCDS in detail.
3.2.1. Overview of EMCDS
In EMCDS, there are mainly two stages, which are CDS construction stage and pruning stage, respectively. In order to execute the EMCDS, all nodes have to be given an initial status and then exchange neighbour information among themselves to get ready for the CDS construction. We call this progress as the initial or bootstrapping stage. Following the bookstrapping stage are the main operations for generating a nearoptimal MCDS, which are composed of two steps: CDS construction and the CDS pruning stages.
In the initial stage, every node exchanges one message with their neighbour and put onehop neighbour into its own neighbour set N_{
i
} at first, and then each node exchanges their neighbour's information with their neighbour and computes the reduced neighbour sets of every neighbour. For example, node i exchanges the neighbour's information with its all neighbours and then N_{
i
} can be obtained. If node i get N_{
i
}, then it exchanges N_{
i
} with all its neighbours, and computes the reduced neighbour set R{N}_{v}^{i}={N}_{v}{N}_{i}\left(v\in {N}_{i}\right) for any neighbour v and stores R{N}_{v}^{i} for the following computation.
The CDS construction stage is divided into two substages, which are CS construction stage and DS construction stage, respectively. In the CS construction stage, an initial node is selected by the BS as the root node according to its residual energy. In order to select some nodes belonging to CDS it executes the algorithm in this stage. And after the nodes selected by initial node, all the selected nodes need to execute the algorithm in this stage and select their neighbour nodes as the backbone nodes. This backbone nodes selection progress is executed constantly in this substage, and only the newly selected backbone nodes execute this progress. If there are no new backbone node selected, this substage is ended. The resulting set is a connected set. Then we need to make sure the nodes in this set can cover all or almost all other nodes in the network, which triggers the next stage, i.e., DS construction. In the DS construction stage, the uncovered nodes by the CS will select its neighbour nodes covered by CS according to some mechanism as backbone node, and the progress is executed repeatedly until there are no newly selected backbone nodes. At the end of the DS construction stage, the constructed CS is expanded to a CDS.
In order to minimize the size of CDS, the pruning stage is designed. If all of a backbone node's nonbackbone neighbour are covered by at least two backbone nodes (including the backbone node itself), the backbone node is redundant and deleted from the CDS.
In the following, the two main stages, namely CDS construction stage and the pruning stage, are introduced in detail. In order to simplify the algorithm description, it is assumed that each node receives the messages broadcasted from their neighbour and updates its neighbour' information accordingly in the following stages.
3.2.2. CDS construction
CDS construction follows two steps: firstly to construct a CS and then to update this CS into a dominating set, i.e., CDS.
CS construction substage: In this substage, the node with the maximum residual energy is selected as the initial node, which is also called root node. If the initial node is selected, it marks itself black, and selects the black nodes from its neighbour. The selection criterion is defined as ProcedureI, which is also used by other selected black nodes. In order to execute the ProcedureI, the initial node or the newly selected black nodes need define a temp set denoted as {N}_{i}^{new}. The ProcedureI is only executed once at the newly selected black node.
The ProceduceI's algorithm is shown as follow:
ProcedureI: The black node selection criterion of the newly selected black node i
Step1: {N}_{i}^{new}=\Phi, puts the white neighbour into {N}_{i}^{new}
Step2: Selects white nodes \left\{{v}_{1},{v}_{2},...,{v}_{n}\right\}\left({v}_{k\left(1\le k\le n\right)}\in {N}_{i}^{new},{E}_{{v}_{k}}\ge {E}_{u},\forall u\in {N}_{i}^{new},u\ne {v}_{k}\right), TE_{
i
} = TE_{
i
} ∪{v_{k(1 ≤ k ≤ n)}}.
Step3: Selects nodes \left\{{v}_{1},{v}_{2},...,{v}_{n}\right\}\left({v}_{k\left(1\le k\le n\right)}\in T{E}_{i},\mid R{N}_{{v}_{k}}^{i}\mid \ge \mid R{N}_{u}^{i}\mid ,\forall u\in T{E}_{i},u\ne {v}_{k}\right), TRN_{
i
} = TRN_{
i
} ∪{v_{k(1 ≤ k ≤ n)}}.
Step4: Selects a node v(v ∈ TRN_{
i
}, id_{
u
} > id_{
u
}, ∀u ∈ TRN_{
i
}, u ≠ v), B_{
i
} = B_{
i
}∪{v}.
Step5: {N}_{i}^{new}=\Phi, and selects white nodes {u_{1},u_{2,...,}u_{
n
}}(u_{k(1 ≤ k ≤ n)}∈N_{
i
},∀v ∈ B_{
i
}, u ∉ N_{
v
}), {N}_{i}^{new}={N}_{i}^{new}\cup \left\{{u}_{k\left(1\le k\le n\right)}\right\}
Step6: if ∀v ∈N_{
i
}\B_{
i
}, ∃u ∈B_{
i
}, v ∈N_{
u
}, return B_{
i
}, Ch_{
i
} = B_{
i
}, else go to Step2.
In ProcedureI, E_{
v
} and E_{
u
} denote the energy of v and u, respectively. TE_{
i
} and TRN_{
i
} are temp set used for computing. B_{
i
} denotes the selected black node set. The selection criterion is illustrated in Figure 2.
In Figure 2, node 1 computes the black nodes. At first, node 1 selects the nodes with the maximum residual energy, then nodes 2 and 4 are selected and TE_{1} = {2,4}. Then node 1 selects the node with the maximum size R{N}_{v}^{1} from TE_{1}. Because R{N}_{2}^{1}=\left\{7,8,9\right\} and R{N}_{4}^{1}=\left\{11,12\right\}, thus node 2 is selected and B_{1} = {2}, which is shown in Figure 2b. According to Step4, {N}_{1}^{new}=\left\{4,5,6\right\}. Then node 1 computes the next black node, and according to Step1, TE_{1} = {4}. Then node 4 is selected as a black node, and B_{1} = {2, 4} shown in Figure 2c. According to Step4, {N}_{1}^{new}=\left\{5\right\}, thus node 5 is selected as a black node, and B_{1} = {2, 4, 5} shown in Figure 2d. Finally, the selected neighbour of node 1 covers all the node 1's neighbour.
The CS construction algorithm is implemented according to the ProcedureI. At first we defined the node set of the network as N. The distributed algorithm is shown as follow.
CS construction algorithm (CCA)
For the BaseStation (BS)

1.
Selects the initial node i (E_{
i
} > E_{
k
}, ∀k∈ N)

2.
Sets CS construction timer (ctimer)

3.
Sets DS construction timer (dtimer)

4.
Sets pruning stage timer (ptimer)

5.
Sends a black flag to i, broadcasts the timers in the network
For the newly selected black node i

1.
If N_{i} contains white nodes

2.
Executes ProcedureI

3.
Broadcasts black message containing B_{i}
For any white node u

1.
If received a black message from v

2.
If count (black message) > 1

3.
Mark itself grey, broadcasts a grey message

4.
Else if count (black message) = 1

5.
If u ∈ B_{
v
}

6.
Marks itself black, Pa_{
u
} = Pa_{
u
}∪{v}

7.
End

8.
End

9.
End
For the stopping criterion

1.
If the ctimer is up or no black nodes are newly selected, the stage is completed

2.
For any white node u

3.
If count (black message) = 1

4.
Marks itself grey, broadcasts a grey message

5.
End

6.
End
After the CS construction substage is ended, if the network is redundant and all nodes are fully covered, maybe the CS can cover all the nodes in the network. But some special cases maybe also exist, which are shown in Figure 3.
In Figure 3a, the node 1 is the initial node selected by the BS. Then node 1 computes the black nodes, according to ProcedureI, nodes 2 and 3 are selected as black node. Then nodes 2 and 3 compute their black children according to ProcedureI, finally, nodes 4 and 5 are selected. Then node 6 received two black messages from nodes 4 and 5, thus node 6 turns grey. Thus nodes 7, 8, 9 are isolated and not covered by CS. According to the CCA, the isolated nodes in Figure 3b are nodes 4, 8 and 9.
In order to solve the isolating nodes problem, another construction algorithm should be designed, which is used for constructing a DS based on the CS constructed in the first substage. The DS construction algorithm is implemented at the second substage called the DS construction substage.
DS construction substage: After the timer of the first substage is up, the DS construction substage is beginning. In this substage, if white node i covers grey neighbour, it selects the grey node as the black node according to the ProcedureII, which is shown as follows:
ProcedureII: The black node selection criterion of the isolated white node i
Step1: Selects all grey neighbour {v_{1}, v_{2},...v_{
n
}}⊆ N_{
i
}, G_{
i
} = Φ,G_{
i
} = G_{
i
}∪{v_{1}, v_{2},...v_{
n
}}
Step2: Selects grey nodes \left\{{v}_{1},{v}_{2},...,{v}_{n}\right\}\left({v}_{k\left(1\le k\le n\right)}\in {G}_{i},{E}_{{v}_{k}}\ge {E}_{u},\forall u\in {G}_{i},u\ne {v}_{k}\right), TE_{
i
} = TE_{
i
} ∪{v_{k(1 ≤ k ≤ n)}}.
Step3: Selects nodes \left\{{v}_{1},{v}_{2},...,{v}_{n}\right\}\left({v}_{k\left(1\le k\le n\right)}\in T{E}_{i},\mid R{N}_{{v}_{k}}^{i}\mid \le \mid R{N}_{u}^{i}\mid ,\forall u\in T{E}_{i},u\ne {v}_{k}\right), TRN_{
i
} = TRN_{
i
} ∪{v_{k(1 ≤ k ≤ n)}}.
Step4: Selects a node v (v ∈ TRN_{
i
}, id_{
u
} > id_{
u
}, ∀u ∈ TRN_{
i
}, u ≠ v), B_{
i
} = B_{
i
} ∪{v}.
ProcedureII is similar to ProcedureI, and the isolated white node selects the grey with the maximum residual grey neighbour, and then selects the grey neighbour with the minimum reduced neighbour set size. Thus in general, white node selects the node with more energy and closest to itself. An example is shown in Figure 4.
In Figure 4a, nodes 4, 8 and 9 are isolated, and according to ProcedureII, nodes 4 and 9 have grey neighbour, then node 4 selects nodes 2 and 10 as the node with the maximum residual energy, TE_{4} = {2,10}, node 9 selects node 7 as the node with the maximum residual energy, TE_{9} = {7}. According to ProcedureII, node 4 selects nodes 2 and 10 as the nodes with the minimum reduced neighbour set size, because \mid R{N}_{2}^{4}\mid =2 and \mid R{N}_{10}^{4}\mid =2, mean while node 9 selects 7 as the nodes with the minimum reduced neighbour set size. According to Step4, node 4 selects 10 as its black node, and node 9 selects 7 as its black node shown in Figure 4b. If node 8 received the black messages from node 4, it executes the ProcedureII and selects the only grey node 4 as a black node, which is shown in Figure 4c.
The algorithm of construction the DS is shown as follow:
DS construction algorithm (DCA)

1.
Computes its grey neighbour set G_{i} = {v_{1},v_{2,...,}v_{
n
}}, v_{k(1 ≤ k ≤ n)}is grey

2.
If G_{i} ≠ Φ

3.
Executes ProcedureII, sends an inviting black message containing B_{
i
}

4.
Marks itself grey, broadcasts a grey message

5.
End
For any grey node v

1.
If received an inviting black message from i

2.
If v ∈ B_{
i
}

3.
Marks itself black, broadcasts a black message

4.
End

5.
End
For the stopping criterion
1. If the dtimer is up or no black nodes are produced, the stage is completed
As the example in Figure 4, nodes 4 and 9 select nodes 10 and 7 as their black nodes, respectively. Then nodes 4 and 9 send messages to nodes 10 and 7, respectively, thus nodes 10 and 7 mark themselves black and broadcast a black message as shown in Figure 4b. At the same time, nodes 4 and 9 broadcast a grey message, thus node 8 knows node 4 has turn grey. Then node 8 will select node 4 as its black node according to ProcedureII, and at last node 8 marks itself grey and node 4 turns black as shown in Figure 4c.
The first stage contains two substages, and the first stage is constructing a CS, the second stage is constructing a DS, and finally, a CDS is constructed. In the following section, a prune stage is introduced, which deletes the redundant black node for minimize the size of CDS.
The constructed CDS in the first stage is connected and dominating all the nodes in the network. But in order to construction an approximation minimum CDS, the size of the CDS should be the smaller the better. Thus deleting the redundant black nodes in the CDS is necessary.
As to the CDS constructed in the first stage, the redundant black nodes always exist, and in Figure 5 some examples are introduced.
In Figure 5a, nodes 4 and 6 are isolated, and according to the DS construction substage, Figure 5b can be got, and nodes 2, 5 turn black, nodes 4 and 6 turn grey. In Figure 5b, all the grey neighbour of node 5 is covered by node 2 and thus node 5's grey neighbour can send packets to node 2, thus black node 5 is redundant and turns grey shown in Figure 5c. The algorithm of pruning stage is described as follow in detail.
3.2.3. Pruning stage
At first, we define the number of nodes in the network as n, and id_{
i
} denotes the identifier of node i. G_{
i
} denotes the grey nodes set of node i.
The algorithm of Pruning Stage is shown as follow:
Pruning redundant black nodes algorithm (PRA)
For any black node i

1.
If Ch_{i} = Φ

2.
Sets a timer T_{
i
} = ptimer•(id_{
i
}/n)

3.
If T_{
i
} is up

4.
Requires N_{
v
}(∀v ∈G_{i})

5.
If ∀v ∈ G_{
i
}, ∃black node u, u ∈ N_{
v
}, i ≠ u

6.
Marks itself grey, broadcasts a grey message

7.
End

8.
End

9.
End
For the stopping criterion
1: if the dtimer is up, the stage is completed
In Figure 5b, nodes 2 and 5 are leaf nodes and set T_{2} and T_{5}, respectively. Clearly, T_{5} > T_{2}, thus node 2 requires the N_{6} and N_{4}, and by computation the condition ∀v ∈ G_{
i
}, ∃black node u, v ∈ N_{
u
} is not met and node 2 stays black. When T_{5} is up, node 5 requires the N_{4}, and by computation node 4 is covered by node 2, then node 5 turns grey and broadcasts a grey message. Thus, Figure 5c is the final topology.