We study the problems of leader election and population size counting for population protocols: networks of finite-state anonymous agents that interact randomly under a uniform random scheduler. We show a protocol for leader election that terminates in O(log m (n) · log 2 n) parallel time, where m is a parameter, using O(max{m, log n}) states. By adjusting the parameter m between a constant and n, we obtain a single leader election protocol whose time and space can be smoothly traded off between O(log 2 n) to O(log n) time and O(log n) to O(n) states. Finally, we give a protocol which provides an upper boundn of the size n of the population, wheren is at most n a for some a > 1. This protocol assumes the existence of a unique leader in the population and stabilizes in Θ(log n) parallel time, using constant number of states in every node, except the unique leader which is required to use Θ(log 2 n) states.information in O(log n) expected parallel time. We use this property to construct an algorithm that solves the Leader Election problem. In addition, by observing the rate of the epidemic spreading under the uniform random scheduler, we can extract valuable information about the population. This is the key idea of our Approximate Counting algorithm.
Related WorkThe framework of population protocols was first introduced by Angluin et al. [1] in order to model the interactions in networks between small resource-limited mobile agents. When operating under a uniform random scheduler, population protocols are formally equivalent to a restricted version of stochastic Chemical Reaction Networks (CRNs), which model chemistry in a well-mixed solution [4]. "CRNs are widely used to describe information processing occurring in natural cellular regulatory networks, and with upcoming advances in synthetic biology, CRNs are a promising programming language for the design of artificial molecular control circuitry" [5,6]. Results in both population protocols and CRNs can be transfered to each other, owing to a formal equivalence between these models.Angluin et al. [7] showed that all predicates stably computable in population protocols (and certain generalizations of it) are semilinear. Semilinearity persists up to o(log log n) local space but not more than this [8]. Moreover, the computational power of population protocols can be increased to the commutative subclass of NSPACE(n 2 ), if we allow the processes to form connections between each other that can hold a state from a finite domain [9], or by equipping them with unique identifiers, as in [10]. For introductory texts to population protocols the interested reader is encouraged to consult [11,9] and [12] (the latter discusses population protocols and related developments as part of a more general overview of the emerging theory of dynamic networks).Optimal algorithms, regarding the time complexity of fundamental tasks in distributed networks, for example leader election and majority, is the key for many distributed problems. For instance, the help of a central coordinator ca...