Abstract 1 Introduction 2 Leader-based localisation in distance query model 3 Self-stabilising localisation in k dimensions 4 Self-stabilising localisation in vector query model 5 Concluding remarks References

Anonymous Self-Stabilising Localisation via Spatial Population Protocols

Leszek Gąsieniec ORCID Department of Computer Science, University of Liverpool, UK Łukasz Kuszner ORCID Institute of Informatics, University of Gdańsk, Poland Ehsan Latif ORCID AI4STEM Education Center, University of Georgia, Athens, GA, USA Ramviyas Parasuraman ORCID School of Computing, University of Georgia, Athens, GA, USA Paul Spirakis ORCID Department of Computer Science, University of Liverpool, UK Grzegorz Stachowiak ORCID Institute of Computer Science, University of Wrocław, Poland
Abstract

In the distributed localisation problem (DLP), n anonymous robots (agents) A0,,An1 are located at arbitrary points p0,,pn1S, where S is a Euclidean space. Initially, each agent Ai operates within its own coordinate system in S, which may be inconsistent with those of other agents. The primary goal in DLP is for agents to reach a consensus on a unified (jointly agreed) coordinate system, in which all agents receive unique labels (coordinates) that accurately reflect the relative distances between all points p0,,pn1 in S. Extensive research on DLP has primarily focus on the feasibility and complexity of achieving consensus when agents have limited access to inter-agent distances, often due to missing or imprecise data. In contrast, this paper proposes a minimalist, computationally efficient distributed computing model where agents can query any pairwise relative positions, if needed. Specifically, we introduce a novel variant of population protocols, referred to as the spatial population protocols model. In this variant each agent can memorise one or a fixed number of coordinates, and when agents Ai and Aj interact, they can not only exchange their current knowledge but also either determine the distance dij between them in S (distance query model) or obtain the vector vij spanning points pi and pj (vector query model).

We propose and analyse several distributed localisation protocols, including:

  1. 1.

    Leader-based localisation protocol with distance queries We propose and analyse two leader-based localisation protocols that stabilise silently in o(n) time. These protocols leverage an efficient solution to the novel concept of multi-contact epidemic, a natural generalisation of the core communication tool in population protocols, known as the one-way epidemic.

  2. 2.

    Self-stabilising leader localisation protocol with distance queries We show how to effectively utilise a leader election mechanism within the leader-based localisation protocol to get a DLP protocol that self-stabilises silently in time O(n(logn/n)1/(k+1)logn) in k-dimensions.

  3. 3.

    Self-stabilising localisation protocol with vector queries We propose and analyse an optimally fast DLP protocol which self-stabilises silently in O(logn) time.

Keywords and phrases:
Population Protocols, Distributed Localisation, Spacial Queries, Self-Stabilisation
Funding:
Paul Spirakis: Supported by the EPSRC grant EP/P02002X/1.
Grzegorz Stachowiak: Supported by the NCN grant 2020/39/B/ST6/03288.
Copyright and License:
[Uncaptioned image] © Leszek Gąsieniec, Łukasz Kuszner, Ehsan Latif, Ramviyas Parasuraman, Paul Spirakis, and
Grzegorz Stachowiak; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Distributed computing models
Related Version:
Previous Version: https://arxiv.org/abs/2411.08434
Editors:
Ho-Lin Chen, Wing-Kai Hon, and Meng-Tsung Tsai

1 Introduction

Location services are crucial for modern computing paradigms, such as pervasive computing and sensor networks. While manual configuration and GPS can determine node locations, these methods are impractical in large-scale or obstructed environments. Recent approaches use network localisation, where beacon nodes with known positions enable other nodes to estimate their locations via distance measurements. Key challenges remain, including determining conditions for unique localisability, computational complexity, and deployment considerations. In the distributed localisation problem (DLP), n anonymous robots (agents) A0,,An1 located at arbitrary points p0,,pn1S, where S is a Euclidean space. Initially, each agent Ai operates within its own coordinate system in S, which may be inconsistent with those of other agents. The primary goal in DLP is for agents to position themselves by adopting labels (coordinates) in a unified (jointly agreed) coordinate system that accurately reflects the relative distances between all points locations p0,,pn1 in S.

A network’s unique localisability depends on its graph’s combinatorial properties and the number of anchors (agents with known locations). Graph rigidity theory [22, 28, 31, 36] states that a planar network is uniquely localisable with at least three anchors and a globally rigid graph. Global rigidity is rare in non-dense networks, though parts may be rigid, leaving some node positions indeterminate [22]. The graph embedding problem, determining if a weighted graph can be embedded in the plane to match edge weights, is strongly NP-hard [39], even for globally rigid graphs [22]. In sensor networks, modelled as unit disk graphs (adjacent nodes within distance r), the unit disk graph reconstruction problem, ensuring adjacent nodes are within r and non-adjacent nodes are farther apart, is also NP-hard [8]. No efficient algorithm exists for localisation unless P = NP, even for unique reconstructions [8]. Despite distributed computing models like population protocols [24], localisation remains unstudied in these frameworks.

Distributed localisation is also vital for robotic systems, enabling autonomous spatial positioning for navigation, mapping, and multi-robot coordination [46]. It encompasses centralised systems, where a central server computes positions, offering accuracy but limited scalability [34], and distributed systems, where robots independently or collaboratively localise, enhancing resilience but increasing complexity [32, 33]. Leader-based methods use designated robots as reference points [23], while leaderless approaches, leveraging probabilistic [43], geometric [35], or graph-based models [32], excel in decentralised, fault-tolerant settings [41]. Tools like Kalman filters [37], particle filters [34], and graph rigidity theory [42] improve accuracy and efficiency.

A strongly related variant of the localisation problem, known as the n-point location problem, has been studied in more centralised setting [17, 18]. This problem was motivated by and is closely related to the computation of relative positions of markers on a DNA string [29, 30, 38]. In the n-point location problem, the objective is to design one or more rounds of pairwise distance queries between points to determine the relative distances among all points. In [17], a one-round deterministic strategy is presented that utilises 8n5 distance queries, along with a proof that any one-round strategy requires at least 4n3 distance queries. The same work also introduces a simple two-round deterministic strategy that uses 3n2 queries. An alternative two-round randomised approach, which requires only n+O(nlogn) queries and solves the n-point location problem with high probability, is described in [18].

1.1 Spatial population protocols

This paper presents a minimalist, efficient distributed computing model where randomly paired agents can query their relative positions upon meeting. Our focus is on achieving anonymity while maintaining high time efficiency and minimal use of network resources, including limited local storage (agent state space) and communication. To meet these goals, we introduce a new variant of population protocols, referred to as the spatial population protocols model.

The population protocol model originates from the seminal work by Angluin et al. [6]. This model provides tools for the formal analysis of pairwise interactions between indistinguishable entities known as agents, which have limited storage, communication, and computational capabilities. In a nutshell, population protocols comprise three major components: (1) a population of agents A0,,An1, which are simple computational entities with limited states that interact in pairs; (2) interaction rules forming a transition function, which specify how agents update their states based on pairwise encounters; and (3) a (possibly random) scheduler of interactions, which determines the sequence of agent interactions, guiding the system toward a desired output or consensus. In self-stabilising protocols, the initial configuration of agents’ states is arbitrary. By contrast, non-self-stabilising protocols start with a predefined configuration encoding the input of the considered problem. A protocol concludes when it stabilises in a final configuration of states representing the solution of the considered problem. In the probabilistic variant of population protocols, which is also used here, the random scheduler selects an ordered pair of agents at each step, designated as the initiator and the responder, uniformly at random from the entire population. The asymmetry in this pair introduces a valuable source of random bits, which is utilised by population protocols. In this probabilistic setting, besides efficient state utilisation, time complexity is also a primary concern. It is often measured by the number of interactions, , required for the protocol to stabilise in a final configuration. More recently, the focus has shifted to parallel stabilisation time (or simply time), defined as /n, where n is the population size. This measure captures the parallelism of independent, simultaneous interactions, which is leveraged in efficient population protocols that stabilise in time O(polylogn). All protocols introduced in this paper are stable (consistently correct), stabilise silently (agent states cease to change post-stabilisation), and guarantee stabilisation time with high probability (whp), defined as 1nη, for a constant η>0. Furthermore, our primary contribution, the localisation protocols detailed in Sections 3 and 4, exhibits self-stabilisation.

Among the primary tools in our localisation protocols, we emphasise the novel concept of multi-contact epidemic, see Section 2, a natural extension of the fundamental communication mechanism in population protocols, known as the one-way epidemic. Another key tool is leader election, a cornerstone of distributed computing that tackles the essential challenges of symmetry breaking, synchronisation, and coordination. In population protocols, the presence of a leader facilitates a more efficient computational framework [7]. However, achieving leader election within this model presents significant difficulties. Foundational results [16, 19] demonstrate that it cannot be solved in sublinear time if agents are restricted to a fixed number of states [20]. Further, Alistarh and Gelashvili [3] introduced a protocol stabilising in O(log3n) time with O(log3n) states. Later, Alistarh et al. [1] identified trade-offs between state use and stabilisation time, distinguishing slowly (o(loglogn) states) and rapidly stabilising (O(logn) states) protocols. Subsequent work achieved O(log2n) time whp and in expectation with O(log2n) states [13], later reduced to O(logn) states using synthetic coins [2, 12]. Recent research by Gąsieniec and Stachowiak reduced state usage to O(loglogn) while retaining O(log2n) time whp [26]. The expected time of leader election was further optimised to O(lognloglogn) by Gąsieniec et al. in [27] and to the optimal time O(logn) by Berenbrink et al. in [11]. In contrast, self-stabilising leader election protocols present unique computational challenges. Notably, it was shown by Cai et al. in [15] that such protocols require at least n states, in addition to knowledge of the exact value of n. Alternatively, if loose-stabilisation is allowed (where a leader remains in place for a long but finite time before re-election) an upper bound on n may suffice, see work of Sudo et al. [40]. In [14, 21], it was established that any silently self-stabilising leader election protocol has an expected time complexity of at least Ω(n). Furthermore, Burman et al. in [14] present silently self-stabilising protocols with expected time O(n) and with high probability (whp) time O(nlogn), both using n+Ω(n) states. More recently, the space complexity of O(nlogn)-time leader election self-stabilising whp protocol has been improved to n+O(log2n) in [10] and to n+O(logn) in [25]. In this work, however, we employ a relatively straightforward leader election mechanism where each agent collects logn random bits, and a leader is determined by a complete set of logn 1s. This simple protocol ensures the election of a unique leader with constant probability. When repeated O(logn) times, this procedure guarantees unique leader election whp. For details see Section 3.

Spatial embedding with geometric queries

While population protocols offer an elegant and resilient framework for randomised distributed computation, with the exception of work on graphical models [9, 44, 5, 4, 45], they typically lack topological (in particular, geometric) embedding. To address this limitation, we propose a spatial variant of probabilistic population protocols that extends the state space and transition function to accommodate unspecified agent locations p0,,pn1 and two fundamental geometric queries.

More specifically, in the spatial model each agent can memorise a fixed number of hypothetical or agreed coordinates, and during an interaction of two agents Ai and Aj, in addition to exchange of their current knowledge, the agents can determine:

  1. (1)

    the distance dij separating them in S, in distance query model, and

  2. (2)

    vector vij spanning points pi and pj, in vector query model.

As this is the initial work on spatial population protocols, we assume the random scheduler remains unchanged, with pairs of agents selected uniformly at random for interactions. In future work, it would be worth considering models where the probability of agent interactions vary (e.g., in relation to pairwise relative distances) as well as other geometric queries.

1.2 Importance and structure of presentation

As previously discussed, the localisation problem is fundamental, with its many variants extensively studied over time. This work effectively integrates research in (distributed) localisation with rigidity theory of random geometric graphs, leveraging the increasingly popular population protocol model of computation. Surprisingly, little research has explored population protocols incorporating spatial properties, particularly those supporting geometric queries. The most relevant prior work focuses on efficient majority and leader election protocols for general toroidal grids [4] and self-stabilising leader election in rings [44, 45].

In this study, we assume agents are distributed in a k-dimensional space, where each interaction, viewed as a pairwise geometric query, results in an exchange of states (knowledge held by agents) augmented by information about the relative positions of the interacting agents. We present the following results.

In Section 2, we propose and analyse two leader-based localisation protocols in the model with distance queries. The first protocol (Algorithms 1) stabilises silently in time O(n(logn/n)1/(k+1)) whp (Theorem 4), in k-dimensional space. For k=1, we present a faster protocol with the stabilisation time O((nlogn)1/3) whp (Theorem 9). These two protocols leverage an efficient solution to the novel concept of multi-contact epidemic (Section 2.1), a natural generalisation of the core communication tool in population protocols, known as the one-way epidemic. In Section 3, we show how to effectively utilise leader election within the leader-based localisation protocol (Algorithm 1) in the model with distance queries. We propose and analyse a DLP protocol that self-stabilises silently in time O(n(logn/n)1/(k+1)logn) whp (Theorem 13), in k-dimensional space. Finally, in Section 4, we present surprisingly simple and optimally fast DLP protocol which self-stabilises silently in O(logn) time whp (Theorem 15), in the model with vector queries and fixed k.

For simplicity we assume that all geometric calculations are done via real arithmetic. Alternatively, one may assume that the actual positions of the agents are on vertices of a grid with integer coordinates, and, when determining the position of an agent, the agent can round the position up to the closest grid point.

2 Leader-based localisation in distance query model

In this section, we discuss two localisation protocols with predefined input stabilising in o(n) time, i.e., after this time labels of all agents become stable. These protocols are non-self-stabilising. We assume that one of the agents starts as the leader of the population. The agents’ point positions p0,,pn1 are distributed in a k-dimensional Euclidean space S. It is assumed that any k+1 agents’ positions span the entire space. For example, in two-dimensional space, this assumption guarantees that no three positions are collinear. Although our algorithms can be adapted to handle an arbitrary distribution of agents’ positions, the time guarantees of such adaptations would be weaker. The state of an agent can accommodate a fixed (related to k) number of agent positions and distances.

We adopt a symmetric model of communication, which means that when agents Au and Av interact, they both gain access to each other’s states as well as the distance duv. The early transitions assigned to the leader are distinct from those of the other agents, as the leader also serves as the initiator of the entire process. Initially, the state of each agent Au stores a label xu (representing a hypothetical position in S) and its colour C[Au]. We assume that at the beginning, only the leader is coloured green, and each non-leader’s colour is set to blue. Finally, the leader’s label (position in S) is set at the origin of the coordinate system, i.e., this label is used as the anchor in the localisation process. In due course, each agent eventually becomes green, adopting a label (position) consistent with all other green agents upon doing so. Before presenting the localisation protocol, we introduce a novel concept of multi-contact epidemic, which is pivotal to our proposed solution.

2.1 Multi-contact epidemic

We introduce and analyse the process of κ-contact epidemic (a multi-contact epidemic with a fixed parameter κ), a natural generalisation of epidemic dynamics in population protocols. In this process, the population initially contains at least κ green agents, while the remaining agents are blue. A blue agent turns green after interacting with κ distinct green agents. We show that the time complexity of this process is O(n11/κlogn), for any fixed integer κ.

We start with two key lemmas that outline the progression of nominating green agents in the multi-contact epidemic.

Lemma 1.

The time needed to transition from a configuration with m green agents to a configuration with 2m green agents for m<n1/κlogn is bounded by

(c+κ)n11/κ(logn)1/κmκ+1

with high probability (whp), for some constant c>0.

Proof.

Assume that the number of green agents is exactly m. Consider κ1 successive periods of length n11/κ(logn)1/κ/mκ+1 and an additional period of length cn11/κ(logn)1/κ/mκ+1. We show that after all these periods, we obtain at least m new green agents whp.

We prove by induction that after the first i periods there are at least ni agents that had at least i contacts (interactions with distinct green agents) for i=0,1,2,,κ1, where n0=nm and for i>0,

ni=m(m1)(m2)(mi+1)n(lognn)i/κ(mκ+1)i/2.

Now we prove the inductive step. Assume that after initial i1 periods there are at least ni1 agents with at least i1 contacts. Let Xt be a random variable that equals 1 if, at time t, an agent with i1 contacts experiences a new contact (with its i-th green agent), and 0 otherwise. If in time t less than ni agents had i contacts

Pr(Xt=1)>2(mi+1)ni1nin(n1)>1.5(mi+1)ni1n2.

After the i-th period of length n11/κ(logn)1/κ/mκ+1 the expected value of EX=tEXt is at least

1.5(mi+1)ni1n2nn11/κ(logn)1/κmκ+1>1.4ni.

By Lemma 5 this number is at least ni whp. Thus also the number of agents that had at least i contacts is at least ni whp.

After κ1 periods of length n11/κ(logn)1/κ/mκ+1 there are at least nκ1 agents that had at least κ1 contacts. We show that after an additional period of length cn11/κ(logn)1/κ/mκ+1 we will have at least m new green agents whp. Let Xt be a random variable that equals 1 if, at time t, an agent with κ1 contacts experiences a new contact (with its κ-th green agent), and 0 otherwise. Note that each time Xt=1, a new green agent is produced. As long as less than m agents became green,

Pr(Xt=1)>2(mκ+1)nκ1mn(n1)>nκ1n2.

After one extra period of length cn11/κ(logn)1/κ/mκ+1 the expected value EX=tEXt is at least cm(m1)(mκ+1)mκ/2logn>cmlogn. By Lemma 5 this number is at least m whp. Thus, also the number of newly generated green agents is at least m whp.

Lemma 2.

Starting with at least n1/κlogn green agents guarantees recolouring all n agents to green in time O(n11/κ) whp.

Proof.

If there are altogether n1/κlogn green agents, then for any blue agent one can define a random variable Xt equal 1 if during interaction t this agent interacts with a new green agent, and 0 otherwise. We have Pr(Xt=1)>1.5n1/κlogn/n. In time cκn11/κ the value EX=EXt>1.5cκlogn. By Lemma 5 for c big enough Xκ whp, i.e., each agent becomes green whp.

Theorem 3.

The stabilisation time of κ-contact epidemic is O(n11/κlog1/κn) whp.

Proof.

The execution time of κ-contact epidemic is the sum of the times to increase the number of green agents from m=κ to m=n, and can be calculated using Lemmas 1 and 2

T=O(n11/κ)+m=κ,2κ,4κ,8κ,,n1/κlogn(c+κ)n11/κ(logn)1/κmκ+1=O(n11/κlog1/κn),

since we assumed that κ is fixed.

2.2 Localisation via multi-contact epidemic in k-dimensions

The localisation protocol consists of two parts (see Algorithm 1). In Part 1: nomination process (lines 9-15), the leader nominates and labels k agents, s.t., their labels (coordinates) span k-dimensional space in a common coordinate system. Their labels stabilise and agents become green. In Part 2: multilateration process (lines 16-22), the labels of all remaining (blue) agents become stable (green). And this happens when each remaining (blue) agent manages to interact with k+1 different green agents. This sequence of interactions enables each agent to position itself within a mutually agreed-upon coordinate system. Part 2 is based on a direct application of κ-contact epidemic, for κ=k+1, as discussed in Section 2.1.

In Part 1, the positioning (labelling) of the first k green agents requires nomination and approval from the leader, who maintains its private list of nominated green agents. More precisely, after an aspiring to become green agent Av manages to interact with all i<k currently existing green agents. To become green Av must meet the leader and verify its list of green contacts to get nomination. Upon successful verification, the leader updates its list of green agents, and the new green agent Av is ready to calculate its projection onto the subspace spanned by its i green predecessors and the leader, as well as its Euclidean distance from this subspace. Namely, the first i coordinates of Av’s label are determined by this projection, and the (i+1)-th coordinate (in the newly formed dimension) is equal to its distance from the aforementioned subspace. In Part 2, when positioning the remaining agents, we use the fact that interactions with k+1 green agents allow for the unambiguous determination of an agent’s position in the commonly agreed coordinate system.

Algorithm 1 Positioning in k dimensions.
Theorem 4.

Algorithm 1 stabilises silently in time O(n(logn/n)1/(k+1)) whp.

Proof.

As mentioned earlier, Algorithm 1 operates in two parts. In Part 1, the protocol stabilises the labels of the leader and k extra agents, creating an initial set of k+1 green agents in time O(n(logn/n)1/k) whp (Lemma 6). The second part stabilises labels of all remaining agents via (k+1)-contact epidemic in time O(n(logn/n)1/(k+1)) (Theorem 3).

First we formulate the following lemma.

Lemma 5.

Consider X=X1+X2++Xn of n independent 01 random variables and any δ>0. If the expected value EXclogn, for c>0 large enough, then |XEX|<δEX holds whp.

Proof.

The following equality holds

Pr(|XEX|<δEX)=Pr(X>(1+δ)EX)+Pr(X<(1δ)EX)

By Chernoff inequalities, for c large enough and any parameter η, we get

Pr(X>(1+δ)EX)<eEXδ2/(2+δ)<ecδlogn<nη/2

and

Pr(X<(1δ)EX)<eEXδ2/2<ecδ2logn/2<nη/2.

Thus, Pr(|XEX|<δEX)<nη.

Now we formulate another lemma determining the time needed to position i-th agent during the process of positioning the first k green agents.

Lemma 6.

Algorithm 1 (Part 1), the i-th green agent is positioned in parallel time O(n11/i(logn)1/i) whp.

Proof.

Consider i1 successive periods of length n11/i(logn)1/i and an additional period of length cn11/i(logn)1/i. We show that after all these periods, whp a new green agent is positioned.

We now prove by induction that after the first j periods there are at least nj agents that had at least j interactions with green agents for j=0,1,2,,i1, where n0=n1 and for j>0, nj=n(lognn)j/i.

We start with the inductive step. Assume that after initial j1 periods there are at least nj1 agents with at least j1 contacts, i.e., interactions with at least j1 green agents. Let Xt be a random variable that equals 1 if, at time t, an agent with j1 contacts has a new contact with its j-th green agent, and 0 otherwise. If in time t less than nj agents had j contacts then

Pr(Xt=1)>2nj1njn(n1)>1.5nj1n2.

After the j-th period of length n11/i(logn)1/i the expected value of EX=tEXt is at least

1.5nj1n2nn11/i(logn)1/i>1.4nj.

By Lemma 5 this number is at least nj whp. Thus also the number of agents that had interactions with at least j green agents is at least nj whp.

Furthermore, after i1 periods there are at least ni1=(n/logn)1/ilogn agents that experienced i1 contacts. Consider an extra period of length cn11/i(logn)1/i. Let Xt be a random variable that equals 1 if, at time t, an agent with i1 contacts has a contact with the leader, and 0 otherwise. If in time t none of these agents had interaction with the leader yet, we get

Pr(Xt=1)>2ni1n2.

After an extra period of length n11/i(logn)1/i the expected value of EX=tEXt is at least

2nj1n2ncn11/i(logn)1/i=2clogn.

And by Lemma 5 this number is at least 1 whp.

2.3 Faster positioning algorithm on the line

In this section, we demonstrate how to enhance performance of Algorithm 1 on the line, i.e., within a linear space S. While we focus on one dimension, our observations can be utilised also in higher dimensions. In what follows, we propose an alternative localisation protocol which positions agents not only by using 2-contact epidemic but also utilising interactions between agents with a single green contact on their list, coloured as greenish. In the new algorithm we take advantage of the fact that there are only two types of interactions between greenish agents not leading to positioning of both of them. The first type refers to interactions between agents that became greenish via contacting the same green agent. In the second, each of the two interacting greenish agents is at the same distance and on the same side of their unique green contact, rendering positioning impossible. We show that these types of interactions do not contribute significantly to the total time of the stabilisation.

Lemma 7.

The time needed to increase the number of green agents from m to 2m, for m[2,n0.9], is O((nlogn/m)1/3) whp.

Proof.

First we consider an initial period I1 of length (nlogn/m)1/3. The average number of greenish agents produced by m green agents in time (nlogn/m)1/3 is (m2nlogn)1/3. By Lemma 5 this number is at least 0.9(m2nlogn)1/3 whp. For any given green agent Au, one can define a subset 𝒮u of greenish agents originating from contact with agents other than Au. The cardinality of Su is on average at least 0.9(m1)(nlogn/m)1/3. By Lemma 5 this number is greater than 0.8(m1)(nlogn/m)1/3 whp. For a given agent Av, which turned greenish after contacting Au, there are fewer than 2m greenish agents in 𝒮u with whom no interaction leads to the positioning of Av, unless the number of green agents exceeds 2m (they are the second kind of non-positioning agents). Let us consider any set Z of at most 2m agents located at points that are translations of the positions of green agents by a fixed vector. The expected number of greenish agents belonging to Z is at most n(nlogn/m)1/3(2m)2/n2=4(m2nlogn)1/3m/n. So by Chernoff bound this number is at most 0.1(m2nlogn)1/3 whp.

Thus for a given greenish agent Av, the number of other greenish agents with whom interactions position Av is whp at least

0.8(m1)(nlognm)1/30.1(m2nlogn)1/3>0.6(m2nlogn)1/3.

Let I2 be a time interval of length c(nlogn/m)1/3 that follows immediately after I1. The probability that an interaction t between two greenish agents is the one that positions them and makes them green is at least 0.6(m2n2logn)2/3. An average number of interactions that position pairs of greenish agents in period I2 is 0.6cmlogn. By Lemma 5 this yields at least m new green agents whp.

Lemma 8.

The time in which the number of green agents increases from n0.9 to n is O(n0.1logn).

Proof.

Consider all interaction of agent Au during period cn0.1logn. The probability of having at most one interaction with a green agent for Au is

(12n0.9n2)cn1.1logn+cn1.1(logn)0.9n2(12n0.9n2)cn1.1logn1<<c(logn)eclogn<e2clogn=n2cln2. (1)

So, there is c>0, s.t., all agents have at least two interactions with green agents during the considered period cn0.1logn whp.

Theorem 9.

The stabilisation time of the improved algorithm is O((nlogn)1/3) whp.

Proof.

The stabilisation time can be bounded by the sum of the chunks of time needed to increase the number of green agents m from 2 to n utilising Lemmas 7 and 8

T=O(n0.1logn)+m=2,4,8,,n0.9O((nlogn/m)1/3)=O((nlogn)1/3).

3 Self-stabilising localisation in k dimensions

We begin with a brief description of the solution. The proposed self-stabilising protocol in k-dimensions is based on iterative rounds, with each round utilising three mechanisms: leader election incorporated into leader-based localisation (the first stage of a round), and a buffering mechanism (the second stage of a round) adopted from [25] (Section 5.2).

During leader election, each agent draws logn random bits, and if none of these bits is 0, the agent proceeds to the actual localisation protocol as a leader. Note that after all agents complete drawing random bits, which takes O(logn) time, a unique leader is elected with constant probability, see Lemma 10. Regardless of whether a unique leader is elected, the leader-based localisation protocol continues (possibly indefinitely) unless an anomaly is detected. Two types of anomalies may arise. The first, label inconsistency, occurs only between two green agents. This kind of anomaly occurs when either the initial configuration has conflicting labels of green agents or multiple leaders were elected during the current round. When all agents are green this type of anomaly is detected in time O(klogn), see Lemma 11. The second anomaly occurs when any non-green agent’s counter reaches its deadline O(n(logn/n)1/(k+1)), i.e., the expected stabilisation time of Algorithm 1, indicating that the localisation process is not completed on time. Upon detecting any anomaly, a reset signal is initiated and propagated via a simple epidemic in O(logn) time. This, together with the (collection and) buffering mechanism adopted from [25] (Section 5.2), ensures sufficient time, namely O(logn), to reset states of all agents, and prepare them for the next round.

Finally, the time of each round is dominated by the expected time of localisation stabilisation O(n(logn/n)1/(k+1)). Also, the probability of stabilisation in a round is constant, primarily driven by the constant probability associated with successful leader election. Thus, after O(logn) rounds and a total time of O(n(logn/n)1/(k+1)logn), the localisation protocol self-stabilises with high probability (whp), see Theorem 13.

Our result demonstrates that self-stabilisation is not only feasible but also efficient, i.e., comparable to Algorithm 1 presented in Section 2. Moreover, although our self-stabilising localisation protocol relies on leader election, it only requires knowledge of logn, whereas self-stabilising leader election requires precise knowledge of n, see [15]. This is not a contradiction because we only need leader election to succeed with constant probability, which together with efficient anomaly detection, discussed in Section 3.3, and lightly modified buffering mechanism from [25], discussed in Section 3.4, allows us to restart leader election and in turn the localisation protocol, when necessary.

3.1 Memory utilisation

We begin by analysing the memory utilisation of the protocol. The number of states required for leader election and buffering is O(logn), as shown in Lemma 10 and Lemma 21 of [25], respectively. However, agents occupying states used for leader election and buffering do not participate in the actual localisation process. As a result, the overall state space of the self-stabilising protocol is dominated by that of Algorithm 1, extended by a deadline counter of size O(n(logn/n)1/(k+1)) used by the blue agents.

3.2 Leader election

We begin by presenting a suitable leader election protocol that operates in O(logn) time and uses O(logn) space. This protocol is executed at the beginning of the first stage of each round and is followed by the main localisation protocol, Algorithm 1, augmented with anomaly detection and deadline counters.

Leader election is done by independently assigning a leader role to each agent with probability p=Θ(1/n). In this way, the probability of electing exactly one leader is constant and is maximised when p=1/n and is then approximately 1/e. In our protocol, each agent independently tosses a symmetric coin logn times and becomes the leader if it gets heads on all tosses. We are left to describe the protocol implementing this process.

States in this protocol are denoted as pairs (A,i), in which A{N,H,T} and i{1,,logn,L,F}. The first component, A, represents the type of coin toss state: Neutral (N), Head (H), or Tails (T). The second component, i, either serves as a counter indicating progress toward successful leader election, or denotes a status: L for leader and F for follower. On leaving the buffering mechanism (the second stage of the previous round) all agents receive state (N,1), and the only meaningful interactions in the leader election protocol are:

  • The creation of H:T state pairs ensuring that there are consistently the same number of agents with H and T states in the population: (N,)+(N,)(H,)+(T,).

  • A coin toss in which the initiator gets heads: (,i)+(H,)(,i+1)+(H,), if i<logn, and (,logn)+(H,)(,L)+(H,), otherwise.

  • A coin toss in which the initiator gets tails: (,i)+(T,)(,F)+(T,), if i{1,,logn}.

Lemma 10.

A unique leader is elected in O(logn) time with a constant probability.

Proof.

Let us assume that at time 0 all agents have already left the buffer and joined the leader election protocol. For as long as the number of agents in (N,) states exceeds n/2 the probability of forming a H:T pair in a given interaction exceeds 1/4. Thus, the expected time in which the number of agents in (N,) states falls below n/2 is less than 2, coinciding with 2n interactions. And whp this time is less than 3. After this time, the probability that an agent with a counter in an interaction makes a coin flip is 1/2n. Thus, in a time period of 2clogn it performs at least clogn coin tosses on average. From Chernoff’s inequality for a sufficiently large constant c it makes at least clogn coin tosses whp. From the union bound in total time O(logn) all agents will perform logn coin tosses each, which will establish their leader (L) or follower (F) status.

We still need to explain how to adopt this leader election protocol in the self-stabilising leader-based localisation protocol. Later in Section 3.4, we show that at some point all agents are located in the buffer, and ready to proceed to the next round. When the first agent leaves the buffer, it assumes the state (N,1), which triggers an epidemic process that informs all other agents in the buffer to adopt the same state (N,1). Note that all agents participating in the leader election protocol contribute to this epidemic, ensuring that the entire population engages in leader election within O(logn) time. Upon completing the leader election, agents with confirmed leader or follower status start leader-based localisation protocol adopting green and blue states, respectively. In addition, they never give up their coin (H|T|N) attributes to guarantee fairness of the remaining coin tosses for agents still executing leader election protocol. Thus, after integration, the overall running time of the leader election protocol remains O(logn).

3.3 Augmented leader-based localisation

On the conclusion of the leader election process leader-based localisation (Algorithm 1) is executed, however, with a few modifications. Namely, the interaction counter with the deadline O(n(logn/n)1/(k+1)) is added to every new blue agent. This is to ensure that the first stage does not exceed the expected stabilisation time of Algorithm 1. One also needs to manage anomaly detection. Recall, that two types of anomalies may arise. The first, label inconsistency, occurs only between two green agents. In particular, when all agents become green, this type of anomaly is detected in time O(klogn), see the lemma below.

Lemma 11.

When all agents are green, the anomaly based on labels inconsistency is detected in time O(klogn) whp.

Proof.

It is known that a random graph with nodes embedded in k-dimensional space and O(klogn) edges chosen uniformly at random is globally rigid whp [36]. This implies that there exists a unique embedding of the graph resulting from the interactions, up to isometries such as rotations, translations, and reflections. Consequently, if the labels of any green agents are inconsistent, such inconsistencies will be detected after O(klogn) interactions.

The second anomaly occurs when any blue agent’s counter reaches the deadline. Upon detecting either of the anomalies, a reset signal is triggered initiating the buffering mechanism discussed in the next section.

3.4 Buffering mechanism

The buffering for reset of the self-stabilising localisation protocol is solved in the same way as the buffering in the ranking protocol with O(logn) additional states from [25]. In this work, the signal for reset is the detection of an anomaly. It causes the state of the agents that performed the anomaly detection to be set to the first state of the buffer: X1. The buffer is a line consisting of 2dlogn states: X1,X2,,X2dlogn for d large enough. We assign red colour to the states X1,,Xdlogn and white (green in [25]) to the remaining buffer states.

We define the following transitions for these states:

  • Progress on the line: Xi+XjXi+1+Xi+1 for ij.

  • Reset propagation by red agents: Xi+AX1+X1, if idlogn and A not on the line.

  • Buffer departure by white agents: X2dlogn+X2dlogn(N,1)+(N,1), where (N,1) is the initial state of the leader election phase. Also Xi+A(N,1)+A, where i>dlogn and A is not on the line.

The analysis of the buffering process is summed up in the paper [25] by the following Lemma, proved there

Lemma 12 (Lemma 21 in paper [25]).

There exists d>0, s.t., for any d0 there exists c>0, for which after at most clogn time since state X1 (reset signal) arrival, all agents are in line states Xi with indices dlogn<i(d+d)logn whp.

If we substitute our d for d and d in this lemma we obtain that at time O(logn) after the first agents appear in state X1, all agents are white. On the other hand, when we substitute 2d for d in the lemma and d for d, we obtain that at time O(logn) the agents start to leave the line of the buffer.

We conclude Section 3 with the following theorem.

Theorem 13.

The localisation protocol presented in this section self-stabilises silently in time O(n(logn/n)1/(k+1)logn) whp.

4 Self-stabilising localisation in vector query model

In this section, we adopt the vector query model, assuming first that S is a linear space where agents A0,,An1 are arbitrarily positioned at (unknown to the agents) points p0,,pn1, respectively. We use notation vij to denote the vector connecting pi and pj, in this case vij=pjpi. Additionally, each agent Ai possesses a hypothetical coordinate referred to as its label xi. In this variant of population protocols, during an interaction of Ai with Ar, the initiator Ai learns about vector vir and label xr. We show that this model is very powerful as it allows design of an optimal O(logn) time self-stabilising labelling protocol.

Algorithm 2 Fast positioning in one dimension.

We start with a trivial fact concerning label updates.

Fact 1.

For each agent Ai its label xi never decreases during the execution of Algorithm 2.

Let M=max0in1(xipi).

Fact 2.

The value of M does not change during the execution of Algorithm 2.

Proof.

Consider an effective update of label xi, where xi is the updated value of this label.

xi=xrvir=xr(prpi). Thus, xipi=xrprM.

After this update agent Ai adopts new label xi=xrpr. Let SM={Ai:xipi=M}.

Fact 3.

For any two agents Ai,AjSM we have xjxi=pjpi.

Proof.

Note that vij=pjpi=xjM(xiM)=xjxi.

Thus, the labels of agents in SM are stable, meaning they align with the coordinate system that will ultimately be agreed upon by all agents.

Fact 4.

After AiSM interaction with ArSM, Ai becomes an element of SM.

Proof.

As AiSM, we get xipi<M. However, as rSM we also get xipi<xrpr, and in turn xi<xrpr+pi<xrvir. Thus, xi becomes xrvir, which is equal to M as rSM.

Theorem 14.

The localisation Algorithm 2 self-stabilises silently in the optimal time O(logn) whp.

Proof.

The membership of agents in SM is spread via one-way epidemic in time O(logn) whp. This protocol is silent as after all agents are included in SM, further label updates are not possible. Ultimately, this protocol is self-stabilising, requiring no initial assumptions about agents’ labels, and achieves time optimality of O(logn), corresponding to the communication bound in population protocols.

Algorithm 2 can be extended to higher fixed dimensions by applying multiple instances of the one-dimensional protocol to each dimension’s coordinates, as shown in Algorithm 3.

Algorithm 3 Fast positioning in fixed k dimensions.
Theorem 15.

The localisation Algorithm 3 self-stabilises silently in a fixed k dimensional space in the optimal time O(logn) whp.

Proof.

By directly applying the union bound.

5 Concluding remarks

In this paper, we introduce a novel variant of spatial population protocols and explore its applicability to the distributed localisation problem. Any meaningful advances in this problem could pave the way for developing faster and more robust lightweight communication protocols suitable for real-world applications. It could also provide insights into the limitations of what can be achieved in such systems.

Several challenges remain unresolved in this work. Firstly, we do not account for inaccuracies in distance measurements. As no measuring device is perfect, future studies should model measurement errors, which can significantly affect system stability and performance. Our preliminary studies on the fast positioning protocol from Section 4 reveal a phenomenon called label drifting in the presence of errors, resembling phase clock behaviour. This drifting can be controlled to achieve near-complete label stabilisation and may support mobility coordination in large robotic agent populations.

Second, we leave the issue of limited communication range unaddressed. In real-world scenarios, agents often cannot communicate with all other agents in the system, which adds further complexity. As mentioned in the introduction, it is well known that limited communication range and arbitrary network topologies can lead to intractable localisation problems in the worst case. Therefore, a promising direction for future research would be to focus on specific classes of network topologies for which lightweight localisation protocols are more likely to be effective.

A third challenge is the development of efficient localisation algorithms for mobile agents. In this case, assumptions about the relative speeds of communication and movement would likely be necessary to ensure that data from previous positions can still be utilised effectively.

Finally, of independent interest are further studies on the computational power of spatial population protocols, both in comparison to existing variants of population protocols and in relation to various geometric problems, types of queries, distance-based biased communication, and other related topics.

References

  • [1] D. Alistarh, J. Aspnes, D. Eisenstat, R. Gelashvili, and R.L. Rivest. Time-space trade-offs in population protocols. In SODA 2017, pages 2560–2579, 2017.
  • [2] D. Alistarh, J. Aspnes, and R. Gelashvili. Space-optimal majority in population protocols. In Artur Czumaj, editor, Proceedings of the Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2018, New Orleans, LA, USA, January 7-10, 2018, pages 2221–2239. SIAM, 2018. doi:10.1137/1.9781611975031.144.
  • [3] D. Alistarh and R. Gelashvili. Polylogarithmic-time leader election in population protocols. In M.M. Halldórsson, K. Iwama, N. Kobayashi, and B. Speckmann, editors, ICALP 2015, Part II, pages 479–491, 2015.
  • [4] D. Alistarh, R. Gelashvili, and J. Rybicki. Fast Graphical Population Protocols. In OPODIS 2021, pages 14:1–14:18, 2022. doi:10.4230/LIPIcs.OPODIS.2021.14.
  • [5] D. Alistarh, J. Rybicki, and S. Voitovych. Near-optimal leader election in population protocols on graphs. In PODC’22, pages 246–256, 2022.
  • [6] D. Angluin, J. Aspnes, Z. Diamadi, M.J. Fischer, and R. Peralta. Computation in networks of passively mobile finite-state sensors. In PODC 2004, pages 290–299, 2004.
  • [7] D. Angluin, J. Aspnes, and D. Eisenstat. Fast computation by population protocols with a leader. Distributed Comput., 21(3):183–199, 2008. doi:10.1007/S00446-008-0067-Z.
  • [8] J. Aspnes, D.K. Goldenberg, and Y.R. Yang. On the computational complexity of sensor network localization. In ALGOSENSORS 2004, pages 32–44, 2004.
  • [9] J. Beauquier, P. Blanchard, and J. Burman. Self-stabilizing leader election in population protocols over arbitrary communication graphs. In OPODIS 2013, pages 38–52, 2013.
  • [10] P. Berenbrink, R. Elsässer, T. Götte, L. Hintze, and D. Kaaser. Silent self-stabilizing ranking: Time optimal and space efficient. CoRR, abs/2504.10417, 2025. To appear at ICDCS 2025. doi:10.48550/arXiv.2504.10417.
  • [11] P. Berenbrink, G. Giakkoupis, and P. Kling. Optimal time and space leader election in population protocols. In STOC 2020, pages 119–129, 2020.
  • [12] P. Berenbrink, D. Kaaser, P. Kling, and L. Otterbach. Simple and efficient leader election. In SOSA 2018, volume 61 of OASIcs, pages 9:1–9:11, 2018. doi:10.4230/OASICS.SOSA.2018.9.
  • [13] A. Bilke, C. Cooper, R. Elsässer, and T. Radzik. Brief announcement: Population protocols for leader election and exact majority with O(log2 n) states and O(log2 n) convergence time. In PODC 2017, pages 451–453, 2017.
  • [14] J. Burman, H.-L. Chen, H.-P. Chen, D. Doty, T. Nowak, E.E. Severson, and C. Xu. Time-optimal self-stabilizing leader election in population protocols. In PODC 2021, pages 33–44, 2021.
  • [15] S. Cai, T. Izumi, and K. Wada. How to prove impossibility under global fairness: On space complexity of self-stabilizing leader election on a population protocol model. Theory of Computer Systems, 50(3):433–445, 2012. doi:10.1007/S00224-011-9313-Z.
  • [16] H.-L. Chen, R. Cummings, D. Doty, and D. Soloveichik. Speed faults in computation by chemical reaction networks. In Fabian Kuhn, editor, DISC 2014, pages 16–30, 2014.
  • [17] P. Damaschke. Point placement on the line by distance data. Discret. Appl. Math., 127(1):53–62, 2003. doi:10.1016/S0166-218X(02)00284-6.
  • [18] P. Damaschke. Randomized vs. deterministic distance query strategies for point location on the line. Discret. Appl. Math., 154(3):478–484, 2006. doi:10.1016/J.DAM.2005.07.014.
  • [19] D. Doty. Timing in chemical reaction networks. In SODA 2014, pages 772–784, 2014.
  • [20] D. Doty and D. Soloveichik. Stable leader election in population protocols requires linear time. Distributed Comput., 31(4):257–271, 2018. doi:10.1007/S00446-016-0281-Z.
  • [21] D. Doty and D. Soloveichik. Stable leader election in population protocols requires linear time. Distributed Computing, 31(4):257–271, 2018. doi:10.1007/S00446-016-0281-Z.
  • [22] T. Eren, D.K. Goldenberg, W. Whiteley, Y.R. Yang, A.S. Morse, B.D.O. Anderson, and P.N. Belhumeur. Rigidity, computation, and randomization in network localization. In INFOCOM 2004, pages 2673–2684, 2004.
  • [23] R. Fareh, M. Baziyad, S. Khadraoui, B. Brahmi, and M. Bettayeb. Logarithmic potential field: A new leader-follower robotic control mechanism to enhance the execution speed and safety attributes. IEEE Access, 2023.
  • [24] P. Flocchini, G. Prencipe, and N. Santoro, editors. Distributed Computing by Mobile Entities, Current Research in Moving and Computing, volume 11340 of LNCS. Springer, 2019. doi:10.1007/978-3-030-11072-7.
  • [25] L. Gąsieniec, T. Grodzicki, and G. Stachowiak. Near-state and state-optimal self-stabilising leader election population protocols. CoRR, abs/2502.01227, 2025. To appear at PODC 2025. doi:10.48550/arXiv.2502.01227.
  • [26] L. Gąsieniec and G. Stachowiak. Enhanced phase clocks, population protocols, and fast space optimal leader election. J. ACM, 68(1):2:1–2:21, 2021. doi:10.1145/3424659.
  • [27] L. Gąsieniec, G. Stachowiak, and P. Uznański. Almost logarithmic-time space optimal leader election in population protocols. In SPAA 2019, pages 93–102, 2019.
  • [28] B. Hendrickson. Conditions for unique graph realizations. SIAM Journal on Computing, 21(1):65–84, 1992. doi:10.1137/0221008.
  • [29] J. Lagergren J. Håstad, L. Ivansson. Fitting points on the real line and its application to rh mapping. J. Algorithms, 49:42–62, 2003. doi:10.1016/S0196-6774(03)00083-X.
  • [30] W.L. Ruzzo J. Redstone. Algorithms for a simple point placement problem. In CIAC 2000, volume 1767 of Lecture Notes in Computer Science, pages 32–43, 2000. doi:10.1007/3-540-46521-9_3.
  • [31] B. Jackson and T. Jordán. Connected rigidity matroids and unique realizations of graphs. J. Comb. Theory B, 94(1):1–29, 2005. doi:10.1016/J.JCTB.2004.11.002.
  • [32] E. Latif and R. Parasuraman. Dgorl: Distributed graph optimization based relative localization of multi-robot systems. In International Symposium on Distributed Autonomous Robotic Systems, pages 243–256. Springer, 2022.
  • [33] E. Latif and R. Parasuraman. Multi-robot synergistic localization in dynamic environments. In ISR Europe 2022; 54th International Symposium on Robotics, pages 1–8. VDE, 2022.
  • [34] E. Latif and R. Parasuraman. Instantaneous wireless robotic node localization using collaborative direction of arrival. IEEE Internet of Things Journal, 2023.
  • [35] E. Latif and R. Parasuraman. GPRL: Gaussian processes-based relative localization for multi-robot systems. In 2024 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS). IEEE, 2024.
  • [36] A. Lew, E. Nevo, Y. Peled, and O.E. Raz. Sharp threshold for rigidity of random graphs. Bulletin of the London Mathematical Society, 55(1):490–501, 2023.
  • [37] A.P. Moreira, P. Costa, and J. Lima. New approach for beacons based mobile robot localization using Kalman filters. Procedia Manufacturing, 51:512–519, 2020.
  • [38] B. Mumey. Probe location in the presence of errors: a problem from dna mapping. Discrete Appl. Math., 104:187–201, 2000. doi:10.1016/S0166-218X(00)00189-X.
  • [39] J.B. Saxe. Embeddability of weighted graphs in k-space is strongly NP-hard. 17th Allerton Conf. Commun. Control Comput., 1979, pages 480–489, 1979.
  • [40] Y. Sudo, F. Ooshita, H. Kakugawa, T. Masuzawa, A.K. Datta, and L.L. Larmore. Loosely-stabilizing leader election with polylogarithmic convergence time. Theoretical Computer Science, 806:617–631, 2020. doi:10.1016/J.TCS.2019.09.034.
  • [41] S. Wang, Y. Wang, D. Li, and Q. Zhao. Distributed relative localization algorithms for multi-robot networks: A survey. Sensors, 23(5):2399, 2023. doi:10.3390/S23052399.
  • [42] J. X. Guo, Hu, J. Chen, F. Deng, and T.L. Lam. Semantic histogram based graph matching for real-time multi-robot global localization in large scale environment. IEEE Robotics and Automation Letters, 6(4):8349–8356, 2021. doi:10.1109/LRA.2021.3058935.
  • [43] M. Xu, N. Snderhauf, and M. Milford. Probabilistic visual place recognition for hierarchical localization. IEEE Robotics and Automation Letters, 6(2):311–318, 2020.
  • [44] D. Yokota, Y. Sudo, and T. Masuzawa. Time-optimal self-stabilizing leader election on rings in population protocols. IEICE Trans. Fundam. Electron. Commun. Comput. Sci., 104-A(12):1675–1684, 2021. doi:10.1587/TRANSFUN.2020EAP1125.
  • [45] D. Yokota, Y. Sudo, F. Ooshita, and T. Masuzawa. A near time-optimal population protocol for self-stabilizing leader election on rings with a poly-logarithmic number of states. In PODC 2023, pages 2–12, 2023.
  • [46] Y. Yue and D. Wang. Collaborative Perception, Localization and Mapping for Autonomous Systems, volume 2. Springer Nature, 2020.