Skip to main content
. 2015 Nov 11;15(11):28513–28530. doi: 10.3390/s151128513
Algorithm 1 DMPID algorithm.
Require: Each node knows information of its neighbor and two-hop neighbor.
Ensure: A node knows the probabilities of the links to which it is attached.
1: Initially, node v is marked as the dominatee.
2: For node v, u and w are two of its neighbors
3: if eu,w does not exist then
4:   the role of v is changed to be the dominator and marked as blue.
5: if node v is a dominator (has been marked as blue) then
6:   For each v’s neighbor u, that DA(u) ≥ DA(v)
7:   if {u} can dominate N[v], and DA({u}, N[v]) ≥ DA({v}, N(v)) then
8:    v is changed to be potential dominator, and marked as green
9:   For nodes {u1, …, uk} ⊂ N(v), and DA(ui) ≥ DA(v), i = 1, …, k
10:   if Set S = {u1, …, uk} can dominate N[v], and DA(S, N[v]) ≥ DA({v}, N(v)) then
11:    v is changed to be the potential dominator and marked as green
12: if node v is a potential dominator (has been marked as green) then
13:   For each v’s neighbor u that is a dominatee
14:   if a dominator wN(v), wN(u) and Pro(v, u|w) > γ then
15:    v is changed to be the dominator and marked as blue
16:    u is changed to be the dominator and marked as blue