D Protocol 4.8. Establishing a rooted shortest path tree. Restrictions

102
Decentralized spatial computing
Protocol 4.8. Establishing a rooted shortest path tree.
Restrictions: N B; identifier function id : V → N
State Trans. Sys.: ({root, idle, done}, {(root, done), (idle, done)})
Initialization: One node in state root, all other nodes in state idle
˚ := −1; hop count to root r, initialized r := 0
Local data: parent : V → N∪{−1}, initialized parent
root
Spontaneously
broadcast (tree, ˚
id, 0)
become done
idle
Receiving (tree, i, h)
˚ := i
set parent
set r := h + 1
broadcast (tree, ˚
id, r)
become done
done
Receiving (tree, i, h)
if h + 1 < r then
˚ := i
set parent
set r := h + 1
broadcast (tree, ˚
id, r)
#Broadcast root identifier and hop count of zero
#Store parent id
#Store hop count to root
#Broadcast node identifier incrementing hop count
#Store new parent id
#Store hop new count to root
#Broadcast node identifier incrementing hop count
that an individual node may send and receive more than one message. In the
worst case, an adversary may design a network and execution of Protocol 4.8
such that a node receives and sends |V | − 1 messages (see question 4.5).
Thus the worst case load balance is O(|V |), and the overall communication
complexity is O(|V |2 ). In practice, such a situation is highly unlikely to
eventuate, and on average the communication complexity of Protocol 4.8 may
be closer to that of Protocol 4.7 (a property investigated further in Part III of
this book).
4.3.3 Establishing a bidirected tree with a known root
The information generated by Protocols 4.7 and 4.8 is in the form of the
parent function. Thus, after execution has terminated, each node will have
gained information about its unique parent in the overlay network. For some
algorithms (including the TAG algorithm in the following section), individual
nodes may additionally require information about their children.
The algorithm in Protocol 4.9 provides a simple extension to Protocol 4.7
that can generate both the parents and the children for each node. The idea
behind Protocol 4.9 is that the tree message contains information about
a node and its parent. Nodes in a done state (who have already found
their parents, and broadcast their tree message) may then listen in for any