# On Counting the Population Size

**Authors:** Petra Berenbrink, Dominik Kaaser, Tomasz Radzik

arXiv: 1905.11962 · 2019-05-29

## TL;DR

This paper introduces two protocols for counting population size in distributed systems, one approximate and one exact, achieving high probability accuracy and optimal interaction complexity respectively, with potential for stable, error-free variants.

## Contribution

The paper presents novel uniform population protocols for approximate and exact population counting with optimal or near-optimal complexity and stability features.

## Key findings

- Approximate protocol estimates log n with high probability.
- CountExact protocol computes exact size in O(n log n) interactions.
- Protocols can be stabilized for guaranteed correctness with additional states.

## Abstract

We consider the problem of counting the population size in the population model. In this model, we are given a distributed system of $n$ identical agents which interact in pairs with the goal to solve a common task. In each time step, the two interacting agents are selected uniformly at random. In this paper, we consider so-called uniform protocols, where the actions of two agents upon an interaction may not depend on the population size $n$. We present two population protocols to count the size of the population: protocol Approximate, which computes with high probability either $\lfloor\log n\rfloor$ or $\lceil\log n\rceil$, and protocol CountExact, which computes the exact population size in optimal $\operatorname{O}({n\log{n}})$ interactions, using $\tilde{\operatorname{O}}({n})$ states. Both protocols can also be converted to stable protocols that give a correct result with probability $1$ by using an additional multiplicative factor of $\operatorname{O}({\log{n}})$ states.

---
Source: https://tomesphere.com/paper/1905.11962