Skip to Main Content
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. using the same computing paradigm. It seems likely that one should be able to obtain master-slave algorithms for other problems in networks.