Schallmoser, DominikDominikSchallmoserLohmann, MaximilianMaximilianLohmann2024-08-072024-08-072024-06-17Proceedings of the Annual ACM Symposium on Principles of Distributed Computing (PODC 2024)9798400706684https://hdl.handle.net/11420/48663The population protocol model describes collections of distributed agents that interact in pairs to solve a common task. We consider a dynamic variant of this prominent model, where we assume that an adversary may change the population size at an arbitrary point in time. In this model we tackle the problem of counting the population size: in the dynamic size counting problem the goal is to design an algorithm that computes an approximation of log n. This estimate can be used to turn static, non-uniform population protocols, i.e., protocols that depend on the population size n, into dynamic and loosely-stabilizing protocols.Our contributions in this paper are three-fold. Starting from an arbitrary initial configuration, we first prove that the agents converge quickly to a valid configuration where each agent has a constant-factor approximation of log n, and once the agents reach such a valid configuration, they stay in it for a polynomial number of time steps. Second, we show how to use our protocol to define a uniform and loosely-stabilizing phase clock for the population protocol model. Finally, we support our theoretical findings by empirical simulations that show that our protocols work well in practice.enhttps://creativecommons.org/licenses/by/4.0/loose stabilizationphase clockspopulation protocolssize countingNatural Sciences and Mathematics::510: MathematicsDynamic size counting in the population protocol modelConference Paper10.15480/882.1319710.1145/3662158.366282510.15480/882.13197Conference Paper