Population protocols are a popular model of distributed computing, in which n agents with limited local state interact randomly, and cooperate to collectively compute global predicates. Inspired by recent developments in DNA programming, an extensive series of papers, across different communities, has examined the computability and complexity characteristics of this model. Majority, or consensus, is a central task in this model, in which agents need to collectively reach a decision as to which one of two states A or B had a higher initial count. Two complexity metrics are important: the time that a protocol requires to stabilize to an output decision, and the state space size that each agent requires to do so. It is currently known that majority requires Ω(log log n) states per agent to allow for fast (polylogarithmic time) stabilization, and that O(log 2 n) states are sufficient. Thus, there is an exponential gap between the upper and lower bounds for this problem. We address this question. On the negative side, we provide a new lower bound of Ω(log n) states for any protocol which stabilizes in O(n 1−c ) expected time, for any constant c > 0. This result is conditional on basic monotonicity and output assumptions, satisfied by all known protocols. Technically, it represents a significant departure from previous lower bounds, in that it does not rely on the existence of dense configurations. Instead, we introduce a new generalized surgery technique to prove the existence of incorrect executions for any algorithm which would contradict the lower bound. Subsequently, our lower bound applies to more general initial configurations. On the positive side, we give a new algorithm for majority which uses O(log n) states, and stabilizes in O(log 2 n) expected time. Central to the algorithm is a new leaderless phase clock technique, which allows agents to synchronize in phases of Θ(n log n) consecutive interactions using O(log n) states per agent, exploiting a new connection between population protocols and power-of-two-choices load balancing mechanisms. We also employ our phase clock to build a leader election algorithm with a state space of size O(log n), which stabilizes in O(log 2 n) expected time.
The currently best known protocol from REF requires O(log n) states and O log 2 n parallel time, which is tight w.r.t.