Counting in Anonymous Dynamic Networks: An Experimental Perspective
Counting is a fundamental problem of every distributed system as it represents a basic building block to implement high level abstractions. In anonymous dynamic networks, counting is far from being trivial as nodes have no identity and the knowledge about the network is limited to the local perception of the process itself. Moreover , nodes have to cope with continuous changes of the topology imposed by an external adversary. A relevant example of such kind of networks is represented by wireless sensor networks characterized by the dynamicity of the communication links due to possible collisions or to the presence of duty-cycles aimed at battery preservation. In a companion paper , two leader-based algorithms, namely ANoK and ALCO, to count the number of processes in an anonymous dynamic network have been proposed. Such algorithms employ the notion of energy transfer to count the exact number of nodes by (i) having no knowledge on the network or (ii) having access to a local counting oracle reporting the exact number of neighbors at the beginning of a communication round. Let us notice that, while ALCO has a well defined terminating condition, ANoK only ensures that eventually the leader is able to count the exact number of processes but it is not able to identify when this happens. In this paper, we define a new algorithm A * N oK by augmenting ANoK with a termination heuristics that allows the leader to guess when it should output the current count and we provide an experimental evaluation on different types of dynamic graphs for both ANoK and A * N oK. In addition, we also extended ALCO by defining a new algorithm, namely A * LCO , that is the basic ALCO augmented with a symmetry breaking condition that helps to speed up the convergence time.