For nearly two decades, population protocols have been extensively studied, yielding efficient solutions for central problems in distributed computing, including leader election, and majority computation, a predicate type in Presburger Arithmetic closely tied to population protocols. Surprisingly, no protocols have achieved both time- and space-efficiency for congruency predicates, such as parity computation, which are complementary in this arithmetic framework. This gap highlights a significant challenge in the field. To address this gap, we explore the parity problem, where agents are tasked with computing the parity of the given sub-population size. Then we extend the solution for parity to compute congruences modulo an arbitrary $m$. Previous research on efficient population protocols has focused on protocols that minimise both stabilisation time and state utilisation for specific problems. In contrast, this work slightly relaxes this expectation, permitting protocols to place less emphasis on full optimisation and more on universality, robustness, and probabilistic guarantees. This allows us to propose a novel computing paradigm that integrates population weights (or simply weights), a robust clocking mechanism, and efficient anomaly detection coupled with a switching mechanism (which ensures slow but always correct solutions). This paradigm facilitates universal design of efficient multistage stable population protocols. Specifically, the first efficient parity and congruence protocols introduced here use both $O(\log^3 n)$ states and achieve silent stabilisation in $O(\log^3 n)$ time. We conclude by discussing the impact of implicit conversion between unary and binary representations enabled by the weight system, with applications to other problems, including the computation and representation of (sub-)population sizes.
翻译:近二十年来,群体协议被广泛研究,为分布式计算中的核心问题(如领导者选举和多数计算——一种与群体协议紧密相关的Presburger算术谓词类型)提供了高效解决方案。令人惊讶的是,没有任何协议能在一致性谓词(如奇偶计算)上同时实现时间和空间效率,而这类谓词在该算术框架中具有互补性。这一空白凸显了该领域的重大挑战。为弥补这一空白,我们探索了奇偶问题,其中代理的任务是计算给定子群体大小的奇偶性。随后,我们将奇偶解决方案扩展至任意模数$m$的同余计算。以往关于高效群体协议的研究侧重于针对特定问题最小化稳定时间和状态利用。相比之下,本文适度放宽了这一预期,允许协议不过度追求完全优化,而更注重普适性、鲁棒性和概率保证。这使我们提出了一种新颖的计算范式,该范式整合了群体权重(简称权重)、稳健的时钟机制,以及高效的异常检测与切换机制(确保缓慢但始终正确的解决方案)。该范式支持高效多级稳定群体协议的通用设计。具体而言,本文首次引入的高效奇偶和同余协议使用$O(\log^3 n)$个状态,并在$O(\log^3 n)$时间内实现静默稳定。最后,我们讨论了权重系统所支持的一元与二进制表示之间的隐式转换对其它问题的影响,包括(子)群体大小的计算与表示。