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)$时间内实现静默稳定。最后,我们讨论了权重系统所启用的单目与二进制表示之间隐式转换的影响,及其在其他问题中的应用,包括(子)群体规模的计算与表示。