Expressive Power of Broadcast Consensus Protocols
Michael Blondin, Javier Esparza, Stefan Jaax

TL;DR
This paper demonstrates that extending population protocols with reliable broadcast capabilities enhances their computational power to match the class NL, simplifying implementation compared to previous complex extensions.
Contribution
The paper introduces reliable broadcast as a simpler extension to population protocols, achieving NL-level computational power without complex device requirements.
Findings
Reliable broadcast extends population protocols to NL power.
Simpler implementation compared to previous extensions.
Achieves computational power equivalent to NL class.
Abstract
Population protocols are a formal model of computation by identical, anonymous mobile agents interacting in pairs. Their computational power is rather limited: Angluin et al. have shown that they can only compute the predicates over expressible in Presburger arithmetic. For this reason, several extensions of the model have been proposed, including the addition of devices called cover-time services, absence detectors, and clocks. All these extensions increase the expressive power to the class of predicates over lying in the complexity class NL when the input is given in unary. However, these devices are difficult to implement, since they require that an agent atomically receives messages from all other agents in a population of unknown size; moreover, the agent must know that they have all been received. Inspired by the work of the verification community on…
Click any figure to enlarge with its caption.
Figure 1
Figure 2
Figure 3Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Département d’informatique, Université de Sherbrooke, Sherbrooke, [email protected] Supported by the Fonds de recherche du Québec – Nature et technologies (FRQNT), by a Quebec–Bavaria project funded by the Fonds de recherche du Québec (FRQ), and by the Natural Sciences and Engineering Research Council of Canada (NSERC) Fakultät für Informatik, Technische Universität München, Garching bei München, [email protected] by an ERC Advanced Grant (787367: PaVeS) Fakultät für Informatik, Technische Universität München, Garching bei München, Germany [email protected] by an ERC Advanced Grant (787367: PaVeS)
\CopyrightJohn Q. Public and Joan R. Public \ccsdesc[500]Theory of computation Distributed computing models \ccsdesc[500]Theory of computation Complexity classes \ccsdesc[500]Theory of computation Automata over infinite objects
Acknowledgements.
Part of this work was realized while Stefan Jaax was visiting the Université de Sherbrooke. We warmly thank the anonymous reviewers for their helpful comments and suggestions. \EventEditorsJohn Q. Open and Joan R. Access \EventNoEds2 \EventLongTitle42nd Conference on Very Important Topics (CVIT 2016) \EventShortTitleCVIT 2016 \EventAcronymCVIT \EventYear2016 \EventDateDecember 24–27, 2016 \EventLocationLittle Whinging, United Kingdom \EventLogo \SeriesVolume42 \ArticleNo23
Expressive Power of Broadcast Consensus Protocols
Michael Blondin
Javier Esparza
Stefan Jaax whilewhilewhilewhilefirefireififfirefireififfirefireelseelsefirefire
Abstract
Population protocols are a formal model of computation by identical, anonymous mobile agents interacting in pairs. Their computational power is rather limited: Angluin et al. have shown that they can only compute the predicates over expressible in Presburger arithmetic. For this reason, several extensions of the model have been proposed, including the addition of devices called cover-time services, absence detectors, and clocks. All these extensions increase the expressive power to the class of predicates over lying in the complexity class when the input is given in unary. However, these devices are difficult to implement, since they require that an agent atomically receives messages from all other agents in a population of unknown size; moreover, the agent must know that they have all been received. Inspired by the work of the verification community on Emerson and Namjoshi’s broadcast protocols, we show that -power is also achieved by extending population protocols with reliable broadcasts, a simpler, standard communication primitive.
keywords:
population protocols, complexity theory, counter machines, distributed computing
1 Introduction
Population protocols are a theoretical model for the study of ad hoc networks of tiny computing devices without any infrastructure [5, 6], intensely investigated in recent years (see e.g. [2, 3, 4, 14]). The model postulates a “soup” of indistinguishable agents that behave identically, and only have a fixed number of bits of memory, i.e., a finite number of local states. Agents repeatedly interact in pairs, changing their states according to a joint transition function. A global fairness condition ensures that every finite sequence of interactions that becomes enabled infinitely often is also executed infinitely often. The purpose of a population protocol is to allow agents to collectively compute some information about their initial configuration, defined as the function that assigns to each local state the number of agents that initially occupy it. For example, assume that initially each agent picks a boolean value by choosing, say, or as its initial state. The many majority protocols described in the literature allow the agents to eventually reach a stable consensus on the value chosen by a majority of the agents. More formally, let and denote the initial numbers of agents in states and ; majority protocols compute the predicate given by . Throughout the paper, we use the term “predicate” as an abbreviation for “function from to for some ”.
In a seminal paper, Angluin et al. proved that population protocols compute exactly the predicates expressible in Presburger arithmetic [6, 7]. Thus, for example, agents can decide if they are at least a certain number, if at least of them voted the same way, or, more generally, if the vector representing the number of agents that picked option in an election with choices is a solution of a system of linear inequalities. On the other hand, they cannot decide if they are a square or a prime number, or if the product of the number of votes for options and exceeds the number of votes for option . Much work has been devoted to designing more powerful formalisms and analyzing their expressive power. In particular, population protocols have recently been extended with capabilities allowing an agent to obtain global information about the current configuration, which we proceed to describe.
In [22], Michail and Spirakis extend the population protocol model with absence detectors, by means of which an agent knows, for every state, whether the state is currently populated or not. Further, they implement absence detectors by a weaker object called a cover-time service, which allows an agent to deduce if it has interacted with every other agent in the system. They prove that protocols with cover-time can compute all predicates in and can only compute predicates in , where is the number of agents111Observe that, for example, agents can decide whether is prime. Indeed, a Turing machine can decide if is a prime number in space by going through all numbers from to , and checking for each of them if they divide ..
In [8], Aspnes observes that cover-time services are a kind of internal clock mechanism, and introduces clocked population protocols. Clocked protocols have a clock oracle that signals to one or more agents that the population has reached a bottom strongly connected component of the configuration graph, again an item of global information. Aspnes shows that clocked protocols can compute exactly the predicates in NL.
Absence detectors, cover-time services, and clocked protocols are difficult to implement, since they require that an agent reliably receives information from all other agents; moreover, the agent needs to know that it has already received messages from all other agents before making a move, which is particularly difficult because agents are assumed to have no identities and to ignore the size of the population. In this paper, we propose a much simpler extension (from an implementation point of view): We allow agents to perform reliable broadcasts, a standard operation in concurrency and distributed computing. We are inspired by the broadcast protocol model introduced by Emerson and Namjoshi in [15] to describe bus-based hardware protocols. The model has been used and further studied in many other contributions, e.g. [16, 18, 12, 24, 9]. In broadcast protocols, agents can perform binary interactions, as in the population protocol model, but, additionally, an agent can also broadcast a signal to all other agents, which are guaranteed to react to it. Broadcast protocols are rather simple to implement with current technology on mobile agents moving in a limited area. Broadcasts also appear in biological systems. For example, Uhlendorf et al. describe a system in which a controller adds a sugar or saline solution to a population of yeasts, to which all the yeasts react [27]. An idealized model of the system, which is essentially a broadcast protocol, has been analyzed by Bertrand et al. in [9].
In this paper, we show that population protocols with reliable broadcasts also compute precisely the predicates in NL, and are therefore as powerful as absence detectors or clocks. To prove this result, we first define the notion of silent semi-computation, a weaker notion than standard computation, and prove that broadcast protocols silently semi-compute all protocols in NL. This result makes crucial use of the ability of broadcast protocols to “restart” the whole population nondeterministically whenever something bad or unexpected is detected. We then prove that silent semi-computability and computability coincide for the class NL.
In a second contribution, we explore in more detail the minimal requirements for achieving NL power. On the one hand, we show that it is enough to allow a single agent to broadcast a single signal. On the other hand, we prove that the addition of a reset, which causes all agents to return to their initial states, does not increase the power of population protocols.
2 Preliminaries
Multisets. A multiset over a finite set is a mapping . The set of all multisets over is denoted . For every , denotes the number of occurrences of in . We sometimes denote multisets using a set-like notation, e.g. is the multiset such that , and for every . Addition and comparison are extended to multisets componentwise, i.e. for every , and for every . We define multiset difference as for every . The empty multiset is denoted and, for every , we write . Finally, we define the support and size of respectively as and .
Population protocols. A population over a finite set is a multiset such that . The set of all populations over is denoted by . A population protocol with leaders (population protocol for short) is a tuple where:
- •
is a non-empty finite set of states,
- •
is a set of rendez-vous transitions,
- •
is a non-empty finite input alphabet,
- •
is the input function mapping input symbols to states,
- •
is the multiset of leaders, and
- •
is the output function mapping states to boolean values.
Following the standard convention, we call elements of configurations. Intuitively, a configuration describes a collection of identical finite-state agents with as set of states, containing agents in state for every , and at least two agents in total.
We write to denote that . The relation is defined by: iff there exists such that and . We write if , and if , the reflexive and transitive closure of . If , then we say that is reachable from . An execution is an infinite sequence of configurations such that for every . An execution is fair if for every step the following holds: if for infinitely many indices , then for infinitely many indices .
We now explain the roles of the input function and the multiset of leaders. The elements of are called inputs. For every input , let denote the configuration defined by
[TABLE]
A configuration is initial if for some input . Intuitively, the agents of encode the input, while those of are a fixed number of agents, traditionally called leaders, that perform the computation together with the agents of .
Predicate computed by a protocol. If for every , then is a consensus configuration, and denotes the unique output of the states in . We say that a consensus configuration is a -consensus if . An execution stabilizes to if there exists such that is a -consensus for every .
A protocol over an input alphabet computes a predicate if for every input , every fair execution of starting at the initial configuration stabilizes to .
Throughout the paper, we assume for some . Abusing language, we identify population to vector , and say that computes a predicate of arity . In the rest of the paper, the term “predicate” is used with the meaning “function from to ”. It is known that:
Theorem 2.1** ([7]).**
Population protocols compute exactly the predicates expressible in Presburger arithmetic, i.e. the first-order theory of the natural numbers with addition.
3 Broadcast consensus protocols
Broadcast protocols were introduced by Emerson and Namjoshi in [15] as a formal model of bus-based hardware protocols, such as those for cache coherency. The model has also been applied to the verification of multithreaded programs [12], and to idealized modeling of control problems for living organisms [27, 9]. Its theory has been further studied in [16, 18, 24].
Agents of broadcast protocols can communicate in pairs, as in population protocols, and, additionally, they can also communicate by means of a reliable broadcast. An agent can broadcast a signal to all other agents, which after receiving the signal move to a new state. Broadcasts are routinely used in wireless ad-hoc and sensor networks (see e.g. [1, 28]), and so they are easy to implement on the same kind of systems targeted by population protocols. They can also model idealized versions of communication in natural computing. For example, in [9] they are used to model “communication” in which an experimenter “broadcasts” a signal to a colony of yeasts by increasing the concentration of a nutrient in a solution.
We introduce broadcast consensus protocols, i.e., broadcast protocols whose goal is to compute a predicate in the computation-by-consensus paradigm.
Definition 3.1**.**
A broadcast consensus protocol is a tuple , where all components but are defined as for population protocols, and is a set of broadcast transitions. A broadcast transition is a triple where and is a transfer function.
The relation of is defined as follows. A pair of configurations belongs to iff
- •
there exists such that and ; or
- •
there exists a transition such that and is the configuration computed from in the following three steps:
[TABLE]
Intuitively, (1)–(3) is interpreted as follows: (1) an agent at state broadcasts a signal and leaves , yielding ; (2) all other agents receive the signal and move to the states indicated by the function , yielding ; and (3) the broadcasting agent enters state , yielding . Correspondingly, instead of we use as notation for a broadcast transition.
Beyond Presburger arithmetic. As a first illustration of the power of broadcast protocols, we show that their expressive power goes beyond Presburger arithmetic, and so beyond the power of population protocols. We present a broadcast consensus protocol for the predicate , defined as iff and is a power of two. For readability, we use the notation for a broadcast transition, where and where transfers of the form may be omitted.
Let be the broadcast consensus protocol where , , , , , and and are defined as follows:
- •
contains the rendez-vous transition ;
- •
contains the broadcast transitions and
[TABLE]
Intuitively, repeatedly halves the number of agents in state , and it accepts iff it never obtains an odd remainder. More precisely, the transitions of are intended to be fired as follows, where denotes the current configuration:
[TABLE]
It is easy to show that produces a (lasting) consensus, and the right one, if transitions are executed as above. However, an arbitrary execution may not follow the above procedure. Firing transition when not intended has no incidence on the outcome. Moreover, if another transition is fired when it should not be, then , or will detect this error by moving an agent to state . In this case, by fairness, eventually resets the agents back to the initial configuration and, again by fairness, transitions are eventually fired as intended.
Proposition 3.2**.**
The broadcast consensus protocol described above computes the predicate , defined as iff and is a power of two.
Leaderless broadcast protocols. A broadcast protocol is leaderless if . It can be shown that leaderless broadcast consensus protocols compute the same predicates as the general class. We only sketch the argument. First, a broadcast protocol with leader multiset can be simulated by a protocol with a single leader. Indeed, the protocol can be designed so that the first task of the leader is to “recruit” the other leaders of from among the agents. Second, a protocol with one leader can be simulated by a leaderless protocol because, loosely speaking, a broadcast protocol can elect a leader in a single computation step222Unlike population protocols, where efficient leader election is non-trivial and much studied; see e.g. [14].. Indeed, if initially all agents are in a state, say , then a broadcast , where , sends exactly one agent to leader state , and all other agents to state . It is simple to construct using this feature, and the details are omitted.
In the rest of the paper, we use protocols with leaders to simplify the constructions, but all results (except Proposition 5.1) remain valid for leaderless protocols.
4 Broadcast consensus protocols compute exactly
In this section, we prove our main theorem: a predicate is computable by a broadcast consensus protocol iff it is in . We follow the convention and say that a predicate belongs to if there is a nondeterministic Turing machine that accepts in -space exactly the tuples , encoded in unary, such that holds.
The proof is divided in two parts. Section 4.1 proves the easier direction: predicates computable by broadcast consensus protocols are in . Section 4.2 proves the converse, which is more involved.
4.1 Predicates computable by broadcast consensus protocols are in
We prove the result in more generality. We define a generic computational model in which the possible steps between configurations are given by an arbitrary relation preserving the number of agents. Formally, a generic consensus protocol is a tuple where are defined as for population protocols, and is the step relation between populations, satisfying for every .
Clearly, broadcast consensus protocols are generic consensus protocols. Further, it is easy to see that if is the one-step relation of a broadcast protocol, then . Indeed, if there is a nondeterministic Turing machine that given a pair of configurations with agents, uses space and accepts iff . A quick inspection of the two conditions in the definition of (Definition 3.1) shows that this is the case.
Thus, it suffices to prove that generic consensus protocols satisfying can only compute predicates in . We sketch the proof, more details can be found in the Appendix.
Proposition 4.1**.**
Let be a generic consensus protocol computing a predicate . If , then . In particular, predicates computable by broadcast consensus protocols are in .
Proof 4.2**.**
We show that there is a nondeterministic Turing machine that decides whether holds, and uses space. Let be the graph where is the set of all configurations of of size , and iff .
It is easy to see that iff contains a configuration of size satisfying (1) ; and (2) every configuration reachable from , including itself, is a -consensus. Therefore, we can decide by guessing , and checking (1) and (2) in space. For (1), this follows from the fact that graph reachability is in NL. For (2), we observe that determining whether some configuration reachable from is not a -consensus can be done in NL, and we use the fact that [20].
Remark 4.3**.**
Protocols with absence detector [22] are a class of generic consensus protocols, and hence Proposition 4.1 can be used to give an alternative proof of the fact that these protocols only compute predicates in .
4.2 Predicates in are computable by broadcast consensus protocols
The proof is involved, and we start by describing its structure. In Section 4.2.1, we show that it suffices to prove that every predicate in is silently semi-computable. In the rest of the section, we proceed to prove this in three steps. Loosely speaking, we show that:
- •
predicates computable by nondeterministic Turing machines in space can also be computed by counter machines with counters polynomially bounded in (Section 4.2.2);
- •
predicates computed by polynomially bounded counter machines can also be computed by -bounded counter machines, i.e. in which the sum of the values of all counters never exceeds their initial sum (Section 4.2.3);
- •
predicates computed by -bounded counter machines can be silently semi-computed by broadcast protocols. (Section 4.2.4).
Finally, Section 4.2.5 puts all parts of the proof together.
4.2.1 Silent semi-computation
Recall that, loosely speaking, a protocol computes if it converges to for inputs that satisfy , and it converges to [math] for inputs that do not satisfy . Additionally, a protocol silently computes if convergence to happens by reaching a terminal -consensus, i.e., a configuration that is a -consensus and from which one can only reach itself. (Intuitively, the protocol eventually becomes “silent” because no agent changes state anymore, and hence communication “stops”.) We say that a protocol silently semi-computes if it reaches a terminal -consensus for inputs that satisfy , and no terminal configuration for other inputs.
Definition 4.4**.**
A broadcast consensus protocol silently semi-computes a -ary predicate if for every the following properties hold:
if , then every fair execution of starting at eventually reaches a terminal -consensus configuration; 2. 2.
if , then no fair execution of starting at eventually reaches a terminal configuration.333Since every finite execution can be extended to a fair one, this condition is actually equivalent to “no terminal configuration is reachable from ”.
We show that if a predicate and its complement are both silently semi-computable by broadcast consensus protocols, say and , then the predicate is also computable by a broadcast consensus protocol which, intuitively, behaves as follows under input . At every moment in time, is simulating either or . Initially, simulates . Assume is simulating and the current configuration is . If is a terminal configuration of , then terminates too. Otherwise, nondeterministically chooses one of three options: continue thesimulation of , “reset” the computation to , i.e., start simulating , or “reset” the computation to . Conditions 1 and 3 ensure that exactly one of and can reach a terminal configuration, namely . Fairness ensures that will eventually reach a terminal configuration of , and so, by condition 1, that it will always reach the right consensus. Hence, silently computes .
The “reset” is implemented by means of a broadcast that sends every agent to its initial state in the configuration ; for this, the states of are partitioned into classes, one for each input symbol . Every agent moves only within the states of one of the classes, and so every agent “remembers” its initial state in both and .
Lemma 4.5**.**
Let be an -ary predicate, and let be the predicate defined by for every . Further let and be broadcast consensus protocols that silently semi-compute and , respectively. The following holds: there exists a broadcast consensus protocol that silently computes .
Proof 4.6**.**
Let and be protocols that silently semi-compute and , respectively. Assume w.l.o.g. that and are disjoint. We construct a protocol that computes .
For the sake of clarity we refrain from giving a fully formal description, but we provide enough details to show that the design idea above can indeed be implemented.
States and mappings.* The set of states of is defined as:*
[TABLE]
If an agent is in state , we say that is its origin and that is its position. The initial position of an agent is its initial state in , i.e. . Transitions will be designed so that agents may update their position, but not their origin. Alternatively, instead of applying a transition, agents can nondeterministically choose to transition from to . An agent in state eventually resets the simulation to either or .
Simulation transitions.* We define transitions that proceed with the simulation of and as follows. For every , every , and every rendez-vous transition of , we add the following rendez-vous transitions to :*
[TABLE]
The first transition implements the simulation, while the second transition enables resets when the simulation has not reached a terminal configuration. For every broadcast transition of and every , we add the following broadcast transitions to :
[TABLE]
where only acts on by for every . The first transition implements the simulation of a broadcast in the original protocols, while the second transition enables a reset.
Reset transitions.* We define transitions that trigger a new simulation of either or . For every , let be the function defined as for every . For every and every , we add the following broadcast transition to : .*
Using Lemma 4.5, we may now prove the following:
Proposition 4.7**.**
If every predicate in is silently semi-computable by broadcast consensus protocols, then every predicate in is silently computable (and so computable) by broadcast consensus protocols.
Proof 4.8**.**
Assume every predicate in is silently semi-computable by broadcast consensus protocols, and let be a predicate in . We resort to the powerful result stating that predicates in and coincide. This is an immediate corollary of the theorem for languages [20, 26, 23], and the fact that one can check in constant space whether a given word encodes a vector of natural numbers of fixed arity. Thus, both and are predicates in , and so, by assumption, silently semi-computable by broadcast consensus protocols. By Lemma 4.5, they are silently computable by broadcast consensus protocols.
4.2.2 Simulation of Turing machines by counter machines
We recall that nondeterministic Turing machines working in space can be simulated by counter machines whose counters are polynomially bounded in , and so that both models compute the same predicates.
Let and . A -counter machine over counters is a tuple , where is a finite set of control states; is the transition relation; is the number of input counters; and are the initial, accepting, and rejecting states, respectively.
A configuration of is a pair consisting of a control state and counter values . For every , we denote the value of counter in by . The size of is .
Let be the -th row of the identity matrix. Given , we define the relation over configurations as follows: iff and one of the following holds: and ; , , and ; , , and ; , , and ; and .
For every , the initial configuration of with input is defined as:
[TABLE]
We say accepts if there exist counter values satisfying . We say rejects if does not accept and for all configurations with , there exists satisfying . We say computes a predicate if accepts all inputs such that , and rejects all such that .
A counter machine is -bounded if holds for every initial configuration and every configuration reachable from . It is well-known that counter machines can simulate Turing machines:
Theorem 4.9** ([19, Theorem 3.1]).**
A predicate is computable by an -space-bounded Turing machine iff it is computable by a -bounded counter machine.
In [19], a weaker version of Theorem 4.9 is proven that applies to deterministic Turing and counter machines only. However, the proof can be easily adapted to the nondeterministic setting we consider here.
Corollary 4.10**.**
A predicate is in iff it is computable by a polynomially bounded counter machine.
4.2.3 Simulation of polynomially bounded counter machines by -bounded counter machines
Lemma 4.11**.**
For every polynomially bounded counter machine that computes some predicate , there exists an -bounded counter machine that computes .
Proof 4.12**.**
We sketch the main idea of the proof; details can be found in the Appendix. Let and let be an -bounded counter machine with counters. To simulate by an -bounded counter machine , we need some way to represent any value by means of counters with values in . We encode such a value by its base representation over counters. Zero-tests are performed by zero-testing all counters sequentially. Nonzero-tests are implemented similarly with parallel tests. Incrementation and decrementation are implemented with gadgets to (a) assign [math] to a counter; (b) assign to a counter; (c) test whether a counter value equals .
This construction is only weakly -bounded, in the sense that all counters are indeed bounded by , but the overall sum can reach . To circumvent this issue, we simulate by another counter machine whose counters symbolically hold values from multiple counters of . In more details, the counters are defined as . Intuitively, if counter has value , then it contributes by to the value of each counter of . For example, if and the input size is , then counter values of can be represented in as , , , and for every other . Under such a representation, the sum of all counters equals . Moreover, all instructions can be implemented quite easily.
4.2.4 Simulation of -bounded counter machines by broadcast consensus protocols
Let be an -bounded counter machine that computes some predicate . We construct a broadcast consensus protocol that silently semi-computes .
States and mappings. Let . The states of are defined as
[TABLE]
The protocol will be designed in such a way that there is always exactly one agent, called the leader, in states . Whenever the leader is in state , we say that its position is , and its opinion is . Every other agent will remain in a state from . Whenever a nonleader agent is in state , we say that its position is , its origin is , and its opinion is . Intuitively, the leader is in charge of storing the control state of , and the nonleaders are in charge of storing the counter values of .
The protocol has a single leader whose initial position is the initial control state of , i.e. . Moreover, every nonleader agent initially has its origin set to its initial position, which will remain unchanged by definition of the forthcoming transition relation: . The output of each agent is its opinion:
[TABLE]
We now describe how simulates the instructions of .
Decrementation/incrementation. For every transition , every and every , we add to the rendez-vous transition:
[TABLE]
These transitions change the position of one agent from to idle, and thus decrement the number of agents in position .
Similarly, for every transition , every and every , we add to the rendez-vous transition:
[TABLE]
These transitions change the position of an idle agent to , and thus increment the number of agents in position . If no agent is in position err, then at least one idle agent is available when a counter needs to be incremented, since is -bounded.
Nonzero-tests. For every , every and every , we add to the rendez-vous transition:
[TABLE]
These transitions can only be executed if there is at least one agent in position , and thus only if the value of is nonzero.
Zero-tests. For a given , let be the function that maps every nonleader in position to the error position, i.e. for every , and is the identity for all other states.
For every transition and every , we add to the broadcast transition . If such a transition occurs, then nonleaders in position move to err. Thus, an error is detected iff the value of is nonzero.
To recover from errors, can be reset to its initial configuration as follows. Let be the function that sends every state back to its origin, i.e.
[TABLE]
For every and every , we add the following broadcast transition to to reset to its initial configuration:
[TABLE]
Acceptance. For every and , we add to the broadcast transition . Intuitively, as long as the leader’s position differs from the accepting control state , it can reset to its initial configuration. This ensures that can try all computations.
Let be the function that changes the opinion of each state to , i.e.
[TABLE]
For every , we add the following transition to :
[TABLE]
Intuitively, these transitions change the opinion of every agent to . If such a transition occurs in a configuration with no agent in err, then no agent can change its state anymore, and the stable consensus has been reached.
Correctness. Let us fix some some input . Let and be respectively the initial configurations of and on input . Abusing notation, for every , let
[TABLE]
The two following propositions state that every execution of has a corresponding execution in and vice versa. The proofs are routine.
Proposition 4.13**.**
Let be a configuration of such that is in control state and . There exists a configuration such that (i) ; (ii) for every ; (iii) ; and (iv) for some .
Proposition 4.14**.**
Let be such that . If , then there is a configuration of such that (i) ; (ii) for every ; and (iii) if for some , then is in control state .
We may now prove that silently semi-computes .
Proposition 4.15**.**
For every -bounded counter machine that computes some predicate , there exists a broadcast consensus protocol that silently semi-computes .
Proof 4.16**.**
We show that silently semi-computes by proving the two properties of Definition 4.4. Let be an input.
Assume . Then accepts , and so there is a configuration such that and is in control state . By Proposition 4.13, there exists some configuration satisfying , and . Since halts when reaching , the only transition enabled at is , and its application yields a terminal configuration of consensus . Further, every configuration reachable from , where the leader is not in position or where some nonleader is in position err, can be set back to via some reset transition. Therefore, every fair execution of starting at will eventually reach . 2. 2.
Assume . We prove by contradiction that no configuration reachable from is terminal. Assume the contrary. We must have , and , for otherwise some broadcast transition with or would be enabled. From this and by Proposition 4.14, there exists some configuration of in control state and satisfying . Thus, accepts , contradicting .
4.2.5 Main theorem
We prove our main result, namely that broadcast consensus protocols precisely compute the predicates in .
Theorem 4.17**.**
Broadcast consensus protocols compute exactly the predicates in .
Proof 4.18**.**
Proposition 4.1 shows that every predicate computable by broadcast consensus protocols is in . For the other direction, let be a predicate in . Since by Immerman-Stelepcsényi’s theorem, the complement predicate is also in . Thus, and are computable by -space-bounded nondeterministic Turing machines. By Theorem 4.9 and Proposition 4.11, and are computable by polynomially bounded counter machines, and thus by -bounded counter machines. Therefore, by Proposition 4.15, and are silently semi-computable by broadcast consensus protocols. By Proposition 4.7, this implies that is silently computable by a broadcast consensus protocol.
Actually, the proof shows this slightly stronger result:
Corollary 4.19**.**
A predicate is computable by a broadcast consensus protocol iff it is silently computable by a broadcast consensus protocol. In particular, broadcast consensus protocols silently compute all predicates in .
5 Subclasses of broadcast consensus protocols
While broadcasting is a natural, well understood, and much used communication mechanism, it also consumes far more energy than rendez-vous communication. In particular, agents able to broadcast are more expensive to implement. In this section, we briefly analyze which restrictions can be imposed on the broadcast model without reducing its computational power. We show that all predicates in can be computed by protocols satisfying two properties:
only one agent broadcasts; all other agents only use rendez-vous communication. 2. 2.
the broadcasting agent only needs to send one signal, meaning that the receivers’ response is independent of the broadcast signal.
Finally, we show that a third restriction does decrease the computational power. In simulations of the previous section, broadcasts are often used to “reset” the system. Since computational models with resets have been devoted quite some attention [21, 25, 13, 11], we investigate the computational power of protocols with resets.
Protocols with only one broadcasting agent. Loosely speaking, a broadcast protocol with one broadcasting agent is a broadcast protocol with a set of leader states such that for some (i.e., there is exactly one leader), and whose transitions ensure that the leader always remains within , that no other agent enters , and that only agents in can trigger broadcast transitions. Protocols with multiple broadcasting agents can be simulated by protocols with one broadcasting agent, say . Instead of directly broadcasting, an agent communicates with by rendez-vous, and delegates to the task of executing the broadcast. More precisely, a broadcast transition is simulated by a rendez-vous transition , followed by a broadcast transition .
Single-signal broadcast protocols. In single-signal protocols the receivers’ response is independent of the broadcast signal. Formally, a broadcast protocol is a single-signal protocol if there exists a function such that .
Proposition 5.1**.**
Predicates computable by broadcast consensus protocols are also computable by single-signal broadcast protocols.
Proof 5.2**.**
We give a proof sketch; details can be found in the Appendix. We simulate a broadcast protocol by a single-signal protocol . The main point is to simulate a broadcast step of by a sequence of steps of .
In , an agent at state , say , moves to , and broadcasts the signal with meaning “react according to ”. Intuitively, in , agent broadcasts the unique signal of , which has the meaning “freeze”. An agent that receives the signal, say , becomes “frozen”. Frozen agents can only be “awoken” by a rendez-vous with . When the rendez-vous happens, tells which state it has to move to according to .
The problem with this procedure is that has no way to know if it has already performed a rendez-vous with all frozen agents. Thus, frozen agents can spontaneously move to a state err indicating “I am tired of waiting”. If an agent is in this state, then eventually all agents go back to their initial states, reinitializing the computation. This is achieved by letting agents in state err move to their initial states while broadcasting the “freeze” signal.
Protocols with reset. In protocols with reset, all broadcasts transitions reset the protocol to its initial configuration. Formally, a population protocol with reset is a broadcast protocol such that for every finite execution from an initial configuration , the following holds: implies for every and every .
Proposition 5.3**.**
Every predicate computable by a population protocol with reset is Presburger-definable, and thus computable by a standard population protocol.
Proof 5.4**.**
We give a proof sketch; details can be found in the Appendix. Let be a population protocol with reset that computes some predicate. We show that the set of accepting initial configurations of , denoted , is Presburger-definable as follows. Let:
- •
* be the population protocol obtained from by eliminating the resets;*
- •
* be the set of configurations of from which no reset can occur, i.e., no configuration reachable from enables a reset of ;*
- •
* be the set of configurations of that are stable 1-consensuses, i.e., for every reachable from ;*
- •
* be the set of configurations of that belong to a bottom strongly connected component of the configuration graph, i.e., can reach iff can reach .*
We show that an initial configuration belongs to iff it belongs to or it can reach a configuration from . Using results from [17], showing in particular that is Presburger-definable, we show that is Presburger-definable.
6 Conclusion
We have studied the expressive power of broadcast consensus protocols: an extension of population protocols with reliable broadcasts, a standard communication primitive in concurrency and distributed computing. We have shown that, despite their simplicity, they precisely compute predicates from the complexity class NL, and are thus as expressive as several other proposals from the literature which require a primitive more difficult to implement: receiving messages from all agents, instead of sending messages to all agents.
As future work, we wish to study properties beyond expressiveness, such as state complexity and space vs. speed trade-offs. It would also be interesting to tackle the formal verification of broadcast consensus protocols. Although this is challenging as it goes beyond Presburger arithmetic and the decidability frontier, it has recently been shown that models with broadcasts admit more tractable approximations [10].
Predicates computable by broadcast consensus protocols are in : proof of
Proposition 4.1
See 4.1
Proof .1**.**
Let be the arity of . We show that there is a nondeterministic Turing machine, that decides, on input , whether holds, und uses space.
Let . Let be the graph where is the set of all configurations of of size , and iff . Every node of can be stored using at most space and so, since is fixed, in space . Since implies , the set contains all configurations reachable from .
We claim that iff contains a configuration satisfying (1) ; and (2) every configuration reachable from , including itself, is a -consensus.
If , then such a configuration exists by definition. For the other direction, assume some configuration satisfies both properties. By assumption, there exists a fair execution starting at that converges to . Thus, since computes , every fair execution starting at converges to , and so .
By the claim, it suffices to exhibit a nondeterministic Turing machine that runs in space and accepts a configuration iff satisfies properties (1) and (2).
We first observe that there is a nondeterministic Turing machine that runs in space and accepts the configurations satisfying the following property:
there exists a configuration such that and is not a -consensus.
The machine starts at , guesses a path of configurations step by step, and checks that the final configuration is not a -consensus. While guessing the path, the machine only stores two configurations at any given time, and so, since every configuration reachable from has the same size as , and since , the machine only uses space. Checking whether is not a 1-consensus can be done in constant space.
Now we use the fact that space complexity classes are closed under complement [20]. Since , there exists a nondeterministic Turing machine that, given as input a configuration , decides in space whether every configuration reachable from is a consensus.
The machine first guesses a configuration reachable from , proceeding as in the description of , and then simulates . Clearly, the machine runs in space.
Simulation of polynomially bounded counter machines by -bounded counter machines: proof Lemma 4.11
Recall that a counter machine is -bounded if for every initial configuration and every configuration reachable from . We relax this definition and say that a counter machine is weakly -bounded if the property “” is replaced by “ for every counter ”. In other words, in the weak setting, each counter is -bounded instead of having the sum of counters -bounded.
We prove Lemma 4.11 in two steps. We first show that a polynomially bounded counter machine can be converted to an equivalent weakly -bounded machine. We then show that a weakly -bounded machine can be made -bounded.
Proposition .2**.**
For every polynomially bounded counter machine that computes some predicate , there exists a weakly -bounded counter machine that computes .
Proof .3**.**
Let and let be an -bounded counter machine.
Counter values representation.* To simulate by a weakly -bounded counter machine , we need some way to represent any counter value from with counters with values from . Note that any number can be encoded in base over counters. For example, if and , then and hence can be represented by . Thus, we represent numbers from this way by vectors of .*
Counters and states.* We replace every counter by counters: , where represents digit of the base representation. The set of counters of is:*
[TABLE]
Machine has the same arity as : counter is made an input counter for every . The control states of form a superset of , the initial state is , and the accepting and rejecting states remain unchanged.
Our construction will preserve the invariant for every . This implies weak -boundedness. Moreover, every forthcoming gadget will end with and .
Transitions.* Let us describe the transitions of . As depicted in Figure 1, a gadget initially computes the sum of the input counters, stores it in counter , and restores the contents of the input counters. The purpose of is to store so that other gadgets can use it.*
We describe the other transitions of by explaining how to simulate instructions and over , for every . Instruction is trivially simulated by itself. Let us fix .
(Non)zero-tests.* We have iff . Thus, instruction is simulated by sequential zero-tests over . Similarly, is simulated by parallel nonzero-tests. Both gadgets are depicted in Figure 2. Note that instructions are further added within the gadget for to ensure that does not block where would not block.*
Incrementation/decrementation.* Incrementing (resp. decrementing) amounts to incrementing (resp. decrementing) its base- representation. These standard operations require the following primitives: “”, “”, “?” and “?”. Their straightforward implementations are depicted in Figure 3.*
Proposition .4**.**
For every weakly -bounded counter machine that computes some predicate , there exists a -bounded counter machine that computes .
Proof .5**.**
Let be a weakly -bounded counter machine. We construct an -bounded counter machine that simulates .
Counter values representation.* We introduce counters that symbolically hold values from multiple counters of . The counters of are defined as . Intuitively, if counter has value , then it contributes by to the value of each counter of . More formally, let be a configuration of . The value represented by for counter is defined as:*
[TABLE]
For example, consider the case with counters and an input of size . Suppose we can reach in . Observe that it is weakly -bounded, but not -bounded. However, counter values can be represented in as:
[TABLE]
Under such a representation, the sum of all counters equals , e.g. here. Moreover, all counter values from can be represented in this fashion (in possibly many ways). In particular, is represented by and for every .
Counters and states.* Machine has the same arity as : counter is made an input counter for every . The control states of form a superset of , and the initial, accepting and rejecting states remain unchanged.*
Our construction will preserve the invariant . This implies -boundedness. We define the transitions of by describing how each instruction is implemented.
(Non)zero-tests.* We have iff . Thus, instruction is simulated by sequential zero-tests. Similarly, is simulated by parallel nonzero-tests. Both gadgets are analogous to those of Figure 2 constructed for Proposition .2.*
Incrementation/decrementation.* In order to increment , we nondeterministically decrement any counter such that , and increment . Similarly, to decrement , we non deterministically decrement any counter such that , and increment . Note that both gadgets decrement before incrementing, thereby preserving -boundedness.*
See 4.11
Proof .6**.**
This follows from applying Proposition .2 followed by Proposition .4.
Single-signal broadcast protocols: proof of Proposition 5.1
See 5.1
Proof .7**.**
By Corollary 4.19, it suffices to show that for every broadcast protocol that silently computes a predicate there is a single-signal protocol that computes the same predicate.
States and mappings.* The states of are defined as:*
[TABLE]
Every state of has two or three components. As in the construction of Lemma 4.5, the first two components describe the position of the agent, and its origin. Agents never change ther origin, and so they know which state to return to if they are told to reset.
The third component can be either a broadcast transition, or one of . The intended meaning of agent being in a state with third component is as follows:
- •
: agent is in charge of simulating by first freezing all other agents and then performing a rendez-vous with each of them;
- •
: agent is currently waiting for a rendez-vous with the broadcasting agent that told it to freeze;
- •
: agent has decided not to wait any longer for the rendez-vous with the broadcasting agent, or a new broadcast signal has been sent before the simulation of the previous broadcast is completed;
- •
: agent is in charge of telling other agents to reset.
The input and output mappings are defined respectively by
[TABLE]
where pos is the function that maps every state from to its position, i.e. for every and every .
We now describe how simulates .
Initiation of a broadcast simulation.* The “freeze” signal used by the protocol is described by the following function :*
[TABLE]
Intuitively, when an agent broadcasts this signal, it tells all agents in “normal” states to freeze. In an error-free simulation, all agents are in such normal states, and so the broadcasts sends all other agents to a “frozen state” .
When an already “frozen” agent receives the freeze signal, this means that the simulation of a broadcast or reset is not completed before another broadcast or reset is initiated, and the frozen agent assumes an “error state”. An error state indicates that the population must be reset at some point in the future.
For every broadcast transition from and every , we add to the broadcast transition:
[TABLE]
The agent in state is in charge of simulating the effect of the broadcast transition via rendez-vous with the other agents.
Simulation of rendez-vous.* For every rendez-vous transition and every , we add to the rendez-vous transition:*
[TABLE]
Receiver’s response.* For every broadcast transition and every , we add to the transition:*
[TABLE]
Completion of a broadcast.* For every broadcast transition and every , we add to the transition:*
[TABLE]
The transitions defined thus far would suffice if broadcasts were always simulated correctly. But we cannot rule out the initiation of a broadcast simulation before a previous simulation is completed, which yields an agent in an error state. Additional transitions are thus needed for error handling. Whenever an agent is in an error state, the population must be eventually reset to start a new, clean simulation attempt. In the implementation of the reset we must ensure that “illegitimate” agents, that have not yet been reset, cannot interact with “legitimate” agents, that have already been reset.
Initiation of a reset.* Agents in an error state may transition to a reset state in order to initiate a reset. The agent in a reset state is in charge of implementing the reset via rendez-vous with the other agents. When a reset is initiated, there should be precisely one agent in a reset state, while all other agents are temporarily disabled, for otherwise some agent’s state could be modified by some other “illegitimate” agent before the reset is completed, and a reset agent would have no means to distinguish between “legitimate” agents and “illegitimate” agents.*
We implement the initiation of a reset by a broadcast. For every , we add to the broadcast transition:
[TABLE]
Reset to origin.* For every and every , we add to the transition:*
[TABLE]
Completion of a reset.* A reset is (perhaps prematurely) completed when an agent in a reset state resets itself. For every , we add to the transition:*
[TABLE]
From frozen to error.* It may be the case that a reset agent resets itself to origin before all frozen agents have been reached. To avoid that frozen agents wait forever to be “unfrozen”, frozen agents can non-deterministically decide to assume an error state, thereby initiating a new reset.*
For every and every , we add to the transition:
[TABLE]
* computes the same predicate as : Since is silent, every fair execution of reaches a terminal configuration, and by construction of , every correct simulation of in eventually reaches a terminal configuration of the same consensus.*
An error in the simulation may occur in one of two cases: Either another broadcast signal is initiated before the simulation of the last broadcast or a reset is completed, or the agent in charge of a reset reverts to its initial state before all other agents have been reset. In the former case, at least one agent is sent to an error state, which will eventually lead to a reset. In the latter case, at least one agent in an error state or a frozen agent remains. Frozen agents can non-deterministically choose to turn to error states, and thus eventually initiate a reset. In either case, the population is eventually reset to its initial configuration. Fairness guarantees that the simulation is eventually executed correctly.
Note that silentness of protocol is crucial for the correctness of the construction: Since is silent, broadcast signals are bound to cease to occur in every correct simulation, and thus all agents eventually remain unfrozen forever, hence we may safely demand that frozen agents non-deterministically turn to error states, which allows us to handle incomplete resets.
Protocols with reset: proof of Proposition 5.3
See 5.3
Proof .8**.**
Let be a population protocol with reset that computes some predicate. Let be the reflexive and transitive closure of the relation of . For every , let
[TABLE]
Let denote the mutual-reachability relation of . A bottom strongly connected component (BSCC) is a non empty set of pairwise mutually reachable configurations closed under reachability. We call a configuration bottom if for some BSCC . Further let denote the set of all bottom configurations of . Recall from [17] that an execution of is fair if and only if for all but finitely many indices .
Let be the set of configurations of from which no reset can occur, i.e. let
[TABLE]
For every , let , where is the set of -stable configurations:
[TABLE]
We claim that the set of accepting initial configurations of , denoted , equals . Let us prove the claim. Let be from the latter set. Either or . If , then is -stable in . Notice that every -stable initial configuration of is also -stable in , and consequently is accepting. If , then by definition of , there is a BSCC reachable from such that and such that resets are disabled for every . Since no reset is enabled in , set is a BSCC not just in , but also in . Hence, at least one fair execution of , starting in , stabilizes to and thus all fair executions of starting in stabilize to . The converse direction is proven analogously.
It remains to show that is Presburger-definable. For this, we make use of the following results from [17]:
- •
, , and are Presburger-definable;
- •
for every Presburger-definable sets , if sets and form a partition of , then both sets are Presburger-definable.
By the above, is a boolean combination of Presburger-definable sets, and hence Presburger-definable too. Similarly, is Presburger-definable for every through the Presburger formula :
[TABLE]
Since and are Presburger-definable, and since sets and form a partition of , it follows by the above observations that both and are Presburger-definable. Moreover, it is relatively straightforward to see that the following equalities hold:
[TABLE]
Therefore, is Presburger-definable, as it is a boolean combination of Presburger-definable sets.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Mehran Abolhasan, Tadeusz A. Wysocki, and Eryk Dutkiewicz. A review of routing protocols for mobile ad hoc networks. Ad Hoc Networks , 2(1):1–22, 2004. doi:10.1016/S 1570-8705(03)00043-X . · doi ↗
- 2[2] Dan Alistarh, James Aspnes, David Eisenstat, Rati Gelashvili, and Ronald L. Rivest. Time-space trade-offs in population protocols. In Proc. Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA) , pages 2560–2579, 2017. doi:10.1137/1.9781611974782.169 . · doi ↗
- 3[3] Dan Alistarh, James Aspnes, and Rati Gelashvili. Space-optimal majority in population protocols. In Proc. Twenty-Ninth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA) , pages 2221–2239, 2018. doi:10.1137/1.9781611975031.144 . · doi ↗
- 4[4] Dan Alistarh and Rati Gelashvili. Recent algorithmic advances in population protocols. SIGACT News , 49(3):63–73, 2018. doi:10.1145/3289137.3289150 . · doi ↗
- 5[5] Dana Angluin, James Aspnes, Zoë Diamadi, Michael J. Fischer, and René Peralta. Computation in networks of passively mobile finite-state sensors. In Proc. 23 rd superscript 23 rd 23^{\text{rd}} Annual ACM Symposium on Principles of Distributed Computing (PODC) , pages 290–299, 2004. doi:10.1145/1011767.1011810 . · doi ↗
- 6[6] Dana Angluin, James Aspnes, Zoë Diamadi, Michael J. Fischer, and René Peralta. Computation in networks of passively mobile finite-state sensors. Distributed Computing , 18(4):235–253, 2006.
- 7[7] Dana Angluin, James Aspnes, David Eisenstat, and Eric Ruppert. The computational power of population protocols. Distributed Computing , 20(4):279–304, 2007. doi:10.1007/s 00446-007-0040-2 . · doi ↗
- 8[8] James Aspnes. Clocked population protocols. In Proc. ACM Symposium on Principles of Distributed Computing (PODC) , pages 431–440, 2017.
