Self-Stabilizing Master-Slave Token Circulation and Efficient Size-Computation in a Unidirectional Ring of Arbitrary Size

Self-stabilizing algorithms represent an extension of distributed algorithms in which nodes of the network have neither coordination, synchronization, nor initialization. We consider the model where there is one designated master node and all other nodes are anonymous and have constant space. Recently, Lee et al. obtained such an algorithm for determining the size of a unidirectional ring. We provide a new algorithm that converges much quicker. This algorithm exploits a token-circulation idea due to Afek and Brown. Disregarding the time for stabilization, our algorithm computes the size of the ring at the master node in O(n log n) time compared to O(n3) steps used in the algorithm by Lee et al. We have also shown that the master node, after determining the size of the ring, can compute the average of observations made at each node in O(n) rounds or O(n2) steps. It seems likely that one should be able to obtain master–slave algorithms for other problems in networks.