The first self-stabilizing algorithm to compute a weakly connected minimal dominating set was presented by Srimani and Xu [SX07]. Their algorithm requires a breadth-first spanning tree of the given graph. A self-stabilizing algorithm that establishes such a tree is also presented in [SX07] (within at mostO(n3)moves). It assumes unique node identifiers and the node with maximum id is chosen to be the root of the spanning tree. The spanning tree algorithm initializes the variable v.p that stores the parent nodeof a nodev, and v.l which holds the level, i.e. the distance in hops to the root node. The root noder has r.p=r and r.l =0. The boolean flag v. f denotes, whether nodev is a member of the weakly connected minimal dominating set or not. The set of rules is shown in Algorithm4.1.
Via rule R1the root node enters the WCMDS, if it is not included already. Rule R2
makes a node leave the set if an adjacent node with lower level is included. Otherwise it enters the set itself. A more detailed description and the proofs of correctness and termination can be found in [SX07].
Algorithm 4.1 WCMDS Algorithm of Srimani and Xu
Functions:
hasLowerLevelIncludedNeighbor(v):
return(∃u∈ N(v)s.t.u.l ≤v.l∧u. f =true) Actions: (root node) R1:: [(v.p=v)∧ (v. f =false)] −→v. f :=true (non-root nodes) R2:: [(v.p6= v)∧ (hasLowerLevelIncludedNeighbor(v) = v. f)] −→v. f :=¬hasLowerLevelIncludedNeighbor(v)
4.2.1 Complexity Analysis
Srimani and Xu prove that Algorithm4.1stabilizes by performing an analysis of the global configuration. In particular they show that no configuration can occur twice. This leads to an upper bound of at mostO(2n)moves. Since they did not provide a lower bound, i.e. a worst-case study that indeed usesO(2n)moves, it remained an open question whether this limit is sharp or not. The following example provides a lower bound for Algorithm4.1.
Consider a circleC which consists of eight nodes. It contains a nodes vsand a node
vt with distance4 (Figure4.2). Assume nodevs to have the lowest level inC and
hence,vt has the highest level of all nodes inC. Obviously, if node vs sets its flag
then all nodes ofC with even distance will finally have assigned the same state and the other nodes take on the opposite value.
vs vt
Figure 4.2: CircleC with node vshaving the lowest level
In the following it will be shown that a certain initial configuration and an adverse sequence of moves allows nodevt to make four moves when vs only moves twice.
This is made possible because the nodes of the two paths that connect vs andvt not
necessarily execute their rules synchronously. Hence it is possible to “store a decision” from a higher-ranked node for a finite time and pass it on with delay. Figure4.3shows an execution of Algorithm 4.1on C that demonstrates this behavior (this example does not consider why nodevs changes its state at all, configurations that allow for
such an assumption will be presented later in this section). Nodevschanges its state
twice andvt changes its state four times. Nodesv with v. f =true are colored black,
the others are white.
vs vt (a) vs vt (b) vs vt (c) vs vt (d) vs vt (e) vs vt (f) vs vt (g) vs vt (h) vs vt (i) vs vt (j) vs vt (k) vs vt (l) vs vt (m) vs vt (n) vs vt (o) vs vt (p) vs vt (q) vs vt (r) vs vt (s)
Figure 4.3: Adverse execution of Algorithm4.1on a circle when nodevsmoves
twice: Nodevtmakes four moves!
LetGkbe a graph that is composed of two nodes, one of them regarded as root, and
that every circle shares a particular node with its neighboring circle, i.e. for all circles CiandCi+1: vt,i =vs,i+1. Figure4.4shows G3.
root
vs,1 vt,1 vs,2 vt,2 vs,3 vt,3
Figure 4.4: GraphG3
According to the considerations of a single circle it is now possible to construct a graph and an initial configuration that leads to an exponential number of moves until stabilization: Consider the initial configuration given in Figure4.5:
root
vs,1 vt,1 vs,2 vt,2 vs,3 vt,3
Figure 4.5: Adverse initial configuration of the WCMDS algorithm on GraphGk
As shown above, vt,i can make twice as much moves asvs,i, ifvs,igets enabled by a node with higher level. In an adversarial execution the nodes of a circleCido not
perform a move if a node of a circleCjwithi <j is enabled. Furthermore, the node
betweenvs,1 and root only moves if no other node is enabled. Consequently, node
vs,1 will move twice. Thus, there is an execution of Algorithm4.1ofGk(consisting
of7k+2 nodes) in which node vt,kcan make2kmoves. Hence,O(2n)is also a lower
bound for Algorithm4.1.
Remark1. The behavior of the system in case of a single transient error after having reached stability heavily depends on the rank of the node in the hierarchy, i.e. the distance of the erroneous node to the root node. If a node with no lower-ranked neighbors in the breadth-first tree fails, no other node gets enabled to execute a rule. The node will reset its status and the system regains legitimacy after a single move. However, if the memory of the root node gets corrupted, the same situation as described in the worst-case example can occur, i.e. all nodes can make a move and the system stabilizes afterO(2n) moves.