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