soft open fences
Computing Real Numbers with Large-Population Protocols Having a Continuum of Equilibria
)
Abstract
Bournez, Fraigniaud, and Koegler [6] defined a number in [0,1] as computable by their Large-Population Protocol (LPP) model, if the proportion of agents in a set of marked states converges to said number over time as the population grows to infinity. The notion, however, restricts the ordinary differential equations (ODEs) associated with an LPP to have only finitely many equilibria. This restriction places an intrinsic limitation on the model. As a result, a number is computable by an LPP if and only if it is algebraic, namely, not a single transcendental number can be computed under this notion.
In this paper, we lift the finitary requirement on equilibria. That is, we consider systems with a continuum of equilibria. We show that essentially all numbers in [0,1] that are computable by bounded general-purpose analog computers (GPACs) or chemical reaction networks (CRNs) can also be computed by LPPs under this new definition. This implies a rich series of numbers (e.g., the reciprocal of Euler’s constant, , Euler’s , Catalan’s constant, and Dottie number) are all computable by LPPs. Our proof is constructive: We develop an algorithm that transfers bounded GPACs/CRNs into LPPs. Our algorithm also fixes a gap in Bournez et al.’s construction of LPPs designed to compute any arbitrary algebraic number in [0,1].
Keywords: Population protocols, Chemical reaction networks, and Analog computation.
1 Introduction
1.1 GPAC/CRN Computable Number
The computation of real numbers provides a theoretical benchmark for an abstract model’s computational power. In 1936, Turing [32] considered computable numbers while researching a discrete model now known as the Turing machine. Then, Shannon [30] introduced the general-purpose analog computer (GPAC) to the world. The GPAC is a mathematical abstraction of Bush’s differential analyzer. Bush [8] developed this machine to obtain numerical solutions of ordinary differential equations (ODEs). After much revision [29, 27, 18, 17], we can now characterize GPACs by polynomial initial value problems (PIVPs):
(1) |
where is a vector of multivariate polynomials, is a vector of variables, and is its initial value. Bournez et al. [7] have shown that GPACs are provably equivalent to Turing machines in terms of computability and complexity. Chemical reaction networks (CRNs), as a restricted form of GPACs, are widely used in molecular programming applications. The deterministic semantic of CRNs usually assumes well-mixed solutions and mass-action kinetics. CRN dynamics can be modeled by polynomial systems with extra constraints [21] (see the preliminary section for more details). Although the constraints could seemingly weaken the computational power of CRNs, they are able to simulate GPACs. Hence, the CRN model is also Turing complete [13]. The key idea is to encode every variable (possibly having negative values) in a GPAC by the difference between a pair of positive variables and in the copycat CRN. That is, for all .
A straightforward idea to “compute” a number by a GPAC/CRN is to designate a variable such that as . Further down this line, Huang et al. defined the class of real-time computable real numbers by chemical reaction networks [24], wherein the real-time computability notion essentially requires to converge exponentially fast to . Huang et al. then demonstrate that GPACs and CRNs compute the same class of real numbers in real-time [23]. Notably, famous transcendental numbers like and are among this class. Later, Huang [22] added Euler’s and Dottie number (the unique real root of the equation ) to the list. Note that in order to get a meaningful measure of time, in Huang et al.’s work, all variables in ODEs associated with GPACs or CRNs are bounded. Hence, the notion of time aligns with the time parameter of the ODEs since no more than a linear speedup is allowed. This notion prevents the so-called Zeno phenomena [19] caused by inordinate speedup. Another, perhaps equivalent, metric is the arc length of . A complexity theory [7] of analog computation can then be built upon this metric.
Also, note that the notion Huang et al. used has a descriptive nature: the initial values are all zero, and rate constants are integrals (rationals). Hence, one can only encode a finite amount of information in the initial value and rate constant. In this sense, a system that computes a number also gives a finite description of . This idea will prove crucial for later discussions.
1.2 Large Population Protocols
Population protocols (PPs) [2] can be treated as special CRNs with two inputs, two outputs, and a unit rate constant per reaction. Observe that population protocols conserve the population since interactions do not change agent counts. This property imposes a vital constraint on the population: the sum of all agents remains constant. After normalization, we can say that this sum is one without loss of generality.
Classical PPs are concerned with computing predicates over their input configuration in a discrete, stochastic setting. Therefore, computing real numbers does not make sense under this setting. In a series of papers [3, 5, 6], Bournez et al. developed a setting they termed a Large-Population Protocol (LPP). LPPs are a new analytical setting rather than a new computational model. They are still population protocols, but their behaviors are analyzed as the population grows to infinity. Bournez et al. aimed for asymptotic results independent of the initial configuration. Our approach departs from theirs in that dependence on initial values is considered. Note that we should approach with caution when defining what is meant by “initial configuration” since LPPs need to talk about different population sizes along the way.
The LPP setting provides a playground for computing real numbers by population protocols: a number is said to be computable by an LPP if the proportion of agents in a set of marked states converges to over time as the population grows to infinity. An additional requirement is that the ODE induced by the balance equation of the LPP must have finitely many equilibria. This condition enforces (exponential) stability and detaches the dependence on initial values.
Bournez et al. specifically asked[6] “… is it possible to compute solutions of trigonometric equations? E.g., can we design a protocol insuring that, asymptotically, a ratio of the nodes are in some prescribed state?” Their answer is negative. They proved that, under their definition, LPPs compute exactly the algebraic numbers in [0,1]. Closely related is a result by Fletcher et al. [15], where a class of numbers, called Lyapunov numbers, are found to be the set of algebraic numbers. It is not a coincidence: both works involve ODEs with either finitely many or isolated equilibria. Hence, Tarski’s quantifier elimination over real closed fields can be performed. Alternatively, one can find more modern elimination algorithms involving Gröbner bases in standard algebraic geometry texts [10, 31].
Why is there a gap between LPPs (cannot compute transcendentals) and GPAC/CRN (can compute and )? The following example helps explore the question.
Motivating Example.
Let , , and be a function such that its derivative “cancels” with and ’s derivative. We have the first-order system and the corresponding chemical reaction network:
It is evident that with initial values , , and , the solution of as . Correspondingly, in the LPP setting, if we let , , and for a population of size , we can observe from the experimental results in Figure 1 that the proportion of gets very close to when becomes larger. In fact, the so-called Kurtz’s Theorem [26], which says ODE solution equals the proportion random variable almost surely when goes to infinity, guarantees the limit is . Although the CRN in the above example is not technically a PP, we can translate it into a probabilistic PP (Construction 1, see also [11], Theorem 1). We maintain the protocol in the current form for simplicity.

So the above LPP can “compute” , a transcendental number! Is it a counter-example to Bournez et al.’s algebraic result? Not really. Since the system of ODEs in the example has the whole - plane (with ) as equilibria, the system has a continuum of equilibria. Note that the key reason GPACs/CRNs in [23] can compute transcendentals is that they are systems with a continuum of equilibria.
1.3 Computing with a Continuum of Equilibria
The Motivating Example invites us to extend the notion of LPP-computable numbers: We can drop the finitary requirement on equilibria and therefore include systems with a continuum of equilibria. The seminal work [4] by Sanjay and Bernstein provides an in-depth study of this type of system.
The move has several consequences. An immediate one is that computation now depends on initial values: since the equilibria “stick together”, we need the initial values to determine which equilibrium the system converges to. Another one is stability: we lose asymptotic stability. As pointed out in [4], “… Since every neighborhood of a non-isolated equilibrium contains another equilibrium, a non-isolated equilibrium cannot be asymptotically stable. Thus asymptotic stability is not the appropriate notion of stability for systems having a continuum of equilibria.” However, it is inaccurate to immediately conclude that such systems must be fragile and sensitive to perturbations. Indeed, Sanjay and Bernstein investigated semistability, a more appropriate notion of stability for these systems.
We now state our new finding under the extended notion of LPP-computable numbers.
Main Theorem.
LPPs compute the same set of numbers in [0,1] as GPACs and CRNs.
Our proof is constructive: We give an explicit algorithm to translate a bounded GPAC or CRN into an LPP. A critical step is the construction of a cubic form (homogeneously degree 3 polynomial) system that conserves the population. Then, we transform the system from the cubic form into the quadratic form. Finally, the system can be rewritten as a probabilistic population protocol.
The key feature of our construction is that we always guarantee the system is either CRN-implementable or PP-implementable. Bournez et al. constructed a system in [6] that claimed to compute any algebraic number. While their system is a GPAC, it is not a PP in general. As a by-product, our construction fixes this flaw.
Related work:
Besides Bournez et al.’s work [6, 3, 5], Gupta, Nagda, and Devaraj [20] develop a framework for translating a subclass of differential equation systems into practical protocols for distributed systems (stochastic CRNs in most cases and, in some examples, population protocols). They also restated Kurtz’s theorem and considered a large-population setting. The subclasses they considered are complete and completely partitionable, which means the derivatives of the system sum to zero, and any term (monomial) occurs as a pair in the system, a very nice property to have. Doty and Severson [11] provided an algorithm to translate CRNs that consist solely of unimolecular () and bimolecular reactions () to PPs. Those reactions correspond to an ODE system’s linear terms (e.g., ) and quadratic terms (e.g., ). Their assumption, however, restricts the application of their algorithm from more general GPACs. Firstly, the CRNs they considered preserve populations. Constant terms in GPACs , which correspond to reactions like , change the population. Another consideration is the treatment of square terms. Some quadratic systems can not be directly written as a CRN with bimolecular reactions (i.e. if positive square terms like occur in ). Later in this paper, we will discuss how the deep entanglement of the two (constant terms and squared terms) makes translating a general GPAC into a PP very difficult.
Our construction does not make any assumptions in the above work on GPACs, except that all variables are bounded.
The rest of this paper is organized as follows. Section 2 discusses preliminaries as well as some notations and conventions necessary to present our main result; Section 3 includes the main theorem, a four-stage constructive proof, and a few immediate corollaries. Section 4 provides some concluding remarks and discussion on future directions.
2 Preliminaries
We review some key definitions and basic facts in this section.
2.1 GPACs, CRNs, Population Protocols, and Their ODE Characterization
We have discussed that GPACs can be characterized by polynomial initial value problems (PIVPs) in the previous section. To align with the ODE descriptions of GPACs, we will use the ODE characterization of CRNs and PPs throughout this paper. This choice clarifies the discussion of our construction and proof in the coming sections.
We start with a few notations and conventions in this paper.
Notation (Variable Vector).
We use the notation to denote a vector of variables in (usually the solution of) an ODE system, where is the vector’s dimension and the parameter is regarded as “time” in the system. The first component is usually designated for tracing the number we wish to compute.
A typical definition of a CRN or PP specifies a pair , with being the set of species or states and being the set of reactions or interactions between states. In general, a reaction for an abstract CRN looks like , where is the reaction constant. There is no restriction on the number of reactants (input) or products (output). Reactions in population protocols, however, are strictly limited to those with two inputs and two outputs:
The so-called deterministic mass-action semantic of a CRN defines a polynomial differential system, which governs the CRN’s dynamics. One can find descriptions of this semantic in many works of literature (e.g., [23]). We will use these polynomial differential systems directly throughout the paper.
Convention.
We manipulate our use of the variable vector: when the context is clear, we simply say , or itself is a GPAC (CRN, PP), without specifying the associated polynomial differential system . If we don’t specify the initial values that means we assume them to be zero. We would assume the correspondence between a variable and the species that it describes. In some cases, we will call a variable a species and a set of species.
Now, we introduce notation and terminology for polynomials.
Notation (Positive Polynomials).
We denote the set of multivariable polynomials with positive (rational) coefficients for each monomial (terms). For instance, , while .
Notation (Variable Occurrence in a Polynomial or Monomial).
Let be a polynomial (or monomial) and be a variable, we use the convenient notation to express occurs in .
Homogeneous polynomials play a fundamental role in our construction. We call them forms for short.
Terminology (Forms).
In mathematics, “form” is another name for homogeneous polynomials. A quadratic form is a homogeneous polynomial of degree two, for example, ; a cubic form is a homogeneous polynomial of degree three, for example, .
Terminology (Conservative Systems).
A conservative system has a (non-trivial) quantity that is constant along each solution. In this paper, we call a system that maintains constant total mass, i.e., a system that satisfies
a conservative system.
We say a function is implementable (generable) by a GPAC (CRN, LPP) if there exist a GPAC (CRN, LPP) and a variable (species, state) in it, such that for all . We choose the word implementable over generable (as in [18]) to reflect the idea that we program a GPAC (CRN, LPP) to implement a function.
Definition 1 (GPAC-implementable Functions [18]. See also Definition 3 in [13].).
A function is GPAC-implementable if it is the first component i.e. , of the solution for the following differential equation:
(2) |
where is a vector of multivariate polynomials and is a variable vector with as its initial value.
Note that if a variable has initial value , we can introduce a new variable to make . Therefore, without loss of generality, we often assume in this paper.
Theorem 2 (CRN-implementable Functions [21], Theorem 3.1 and 3.2).
A function is CRN-implementable if and only if it is GPAC-implementable with further restriction such that the derivative of each component in its variable vector is of the form
(3) |
The restriction is rooted in reaction modeling: a negative term in means to destroy some molecular at some rate. However, a reaction cannot destroy a non-reactant, so must appear as a reactant in the reaction. Such restriction extends to Population Protocols together with some extra constraints.
Corollary 3 (PP-implementable Functions).
A function is PP-implementable, if and only if
-
i.
it is CRN-implementable, i.e., there is a CRN computing it.
-
ii.
for all in , does not possess a positive term.
-
iii.
is a quadratic form system, and
-
iv.
is conservative.
Proof.
For the “only if” direction, all conditions other than condition (ii) are clear. To see that can not have an , we consider two ’s on the left-hand side of a reaction. The reaction can not increase the amount of , since that would require at least ’s as products on the right-hand side. As a result, a positive term can not occur in . See Theorem 16 for the “if” direction of the proof.
∎
In this paper, we will also call a CRN containing only unimolecular reactions of the form a unimolecular population protocol (UPP). Similarly, a CRN containing only termolecular reactions of the form is called a termolecular population protocol (TPP). In general, a -PP is a CRN that contains only reactions of the form . Generally, we have the following characterization.
Corollary 4 (-PP-implementable Functions).
A function is -PP-implementable, if and only if
-
i.
it is CRN-implementable, i.e., there is a CRN computing it.
-
ii.
for all in , does not possess a positive term.
-
iii.
is homogeneously degree , and
-
iv.
is conservative.
From above, we see that turning a GPAC into a PP means having to dance with more and more chains. We must carefully appease all restrictions, which makes the translation process difficult.
We first revisit some useful concepts regarding PPs.
2.2 Probabilistic Large-Population Protocols
Definition 5 (Balance Equations [6]).
Let be a large-population protocol, where is the state (species, variables) set and is a set of reaction rules, each with two reactants and two products. The balance equation of a deterministic LPP is a function such that
(4) |
where if , and 0 otherwise; is the canonical base of and is the proportion of the population in state .
The balance equation is a description of the system’s dynamics. Intuitively, it says whenever and bump into each other, if there is a reaction in the PP, then the pair turns into ; otherwise, we interpret as a null reaction and the agents remain unchanged. We adopt an asymmetric interpretation of reactions in PPs throughout the paper. That is, the ordered pairs and , when used as reactants, do not necessarily result in the same products. The assumption is not essential: the choice is to align with the existing literature (e.g., [6]) for convenience.
The above balance equation is for deterministic PPs, where is either 0 or 1. It is more convenient to use probabilistic transition rules in many scenarios. We introduce probabilistic LPPs (PLPPs).
Definition 6 (Probabilistic LPP (PLPP) [6]).
A PLPP is an LPP with transition rules in the form
and for every , we have
-
•
for every , and , and
-
•
The balance equation remains mostly the same as Equation (4). To simplify the notations, we often take and will still use or use terms like “state ” when referring to a state.
(5) |
The ODE associated with a PLPP can be written as
(6) |
where is a variable vector and its -th component, , tracks the proportion of the total population in state over time . We will often call or an LPP (PLPP).
A simple observation results directly from the definition of LPP or PLPP.
Observation 7 (“The one trick”).
Let be an LPP or PLPP, then
Although obvious, the above is the single most important observation in this paper. Many constructions and proofs rely on it. This observation is frequently used to re-write the constant term in an ODE. We will rewrite a constant in either of the following ways, depending on our needs:
-
•
, or
-
•
.
Observation 8.
An intuitive way to think about equation 7:
-
•
The term represents all reactions that consume . A complete set of rules for a PP must include all combinations of pairs , or , where iterates through all . These combinations sum to .
-
•
The represents all reactions that produce . This observation is critical in the constructive proof of our main theorem.
Proof.
Take the component in Equation (6). We have
where and is the -th component a vector. This completes the proof. ∎
We now give a formal definition of LPP-computable numbers.
2.3 Large-Population Protocol Computable Numbers: Revisited
We extend the definition from [6]. Note that the definition also applies to large-population unimolecular protocols (LPUPs).
Definition 9.
A real number is said to be computable by an LPP (PLPP, LPUP) if there exists an LPP (PLPP, LPUP) such that and
where represents the subset of states marked in . Moreover, all the states must be initialized to some positive rational , in the sense that , when is the initial fraction of state at the stage when the population is .
A major change is our removal of the finitary requirement on equilibria. A note originally in [6] discusses the rationale for the requirement of finitely many equilibria. This assumption is needed to “avoid pathological cases, in particular the case of idle systems for all and . Indeed, in idle systems, all initial states are equilibria, and such a system would compute any real of [0,1], depending on the initial configuration.”
This pathological behavior could occur, if one is allowed to initialize the system with any real numbers. However, we can prevent this case by restricting the initial configuration to rational numbers. Also note that by forcing the initial counts of a species to be a fraction of the total population , we exclude those systems (e.g.,[12, 1]) that crucially depend on small counts in a very large population. These systems are not modeled correctly by ODEs. For instance, one can not initialize to have 100 molecules. Any state initialized to a constant amount will be a fraction that approaches zero, as grows to infinity. In our definition, such will be initialized to have zero molecules for a fixed .
Remark 1.
It is worth noting the above setup satisfies the assumptions of Kurtz’s Theorem [26]. Therefore, the long-term behavior of an LPP is governed by an ODE, which is induced by its balance equation. As a result, in this paper, we often blur the boundary between the continuous semantics (by ODE) and stochastic semantics when discussing limiting behavior. See Section 4 for initial discussion on further investigation on the two semantics.
For the rest of the paper, whenever we mention LPP computable number, we mean the extended notion defined above, unless specified otherwise.
2.4 Basic Results
2.4.1 Large-Population UPPs Compute Only Rationals
As a toy case study, we investigate the class of numbers computable by large-population unimolecular protocols (LPUP). We find that unimolecular protocols have limited power.
Lemma 10.
A number is LPUP-computable if and only it is rational.
Proof.
Suppose is a rational number. Lemma 3 of Bournez et al. [6] constructs an LPP with states such that each state converges for an exponentially stable equilibrium. We modify their construction to obtain a unimolecular LPP. Let be the state set and the transitions be of the form (see Figure 3 for a visualization). Then each state will converge to . To compute , mark states . Thus, there exists a deterministic unimolecular LPP that computes . (Alternatively, one could initialize an idle system with the desired rationals, since now the extended notion of LPP-computable number allows a continuum of equilibria and rational intial values.)
Suppose a deterministic unimolecular protocol computes some number . Then there is a graph corresponding to the reactions of such that nodes are states and directed edges are transitions. The deterministic nature ensures that self-loops exist only if a node is isolated from all other nodes. Since each node has the outdegree , is a functional graph. Functional graphs are a set composed of rooted trees attached to a cycle ([14], page 129; or see Figure 3 for an example). Traversing the graph from any starting point will eventually lead to being stuck in a cycle. The proportion of mass that flows into a cycle will become uniformly distributed among the cycle’s finite number of nodes, computing a rational number. Thus, deterministic unimolecular protocols compute rational numbers. ∎
Note that the above lemma can be extended to probabilistic unimolecular protocols, but we omit this work for the sake of simplicity.


2.4.2 Product Protocols and Multiplication
We will show that LPP-computable numbers are closed under multiplication. The proof is done through product protocols. Since our Main Theorem shows that LPP-computable numbers are essentially GPAC-computable, many other arithmetic operations can be done by taking a detour via GPACs. However, the resulting protocols are not so intuitive. In addition, the product protocol is an important technique for our later construction in Section 3.

Lemma 11 (Product of LPP-computable Numbers is LPP-computable).
Let and be LPPs that compute and respectively. Denote their respective state vectors by and , initial configurations by and , and differential systems by and . Assume any differential equation in or is a quadratic form. Then there exists an LPP, , that computes the product .
Proof.
Let . Then we can write for all . Since is a quadratic form, is a quadratic form and is a linear form. This notation generalizes to as well. Introduce new state variables for all where is the Cartesian product (view and as sets). Then we have the state vector . Suppose and are the marked states. For each , mark if and . For the initial values, let .
To obtain the differential system , perform the following steps. First, differentiate . By the chain rule, we have
Next, substitute the equations for and . Then, we have the cubic form,
Apply the one-trick (Proposition 7) to obtain a homogeneously degree four polynomial such that every term is exactly degree two in variable and exactly degree two in variable . We have,
After expanding the polynomial, group the positive and negative terms. Note that we can factor from the collection of negative terms, which yields
By substituting for the factored , we have
which satisfies condition from Corollary 3.
Let . Without loss of generality, consider . Note that every monomial in is of the form where is a monomial in . Then we can substitute either or for each in . Since is not a valid monomial of , we will not have in . Thus, is a quadratic form in variable that satisfies condition of Corollary 3.
Let . Without loss of generality, consider . Note that every monomial in is of the form , where is a monomial in . Then we can substitute for each in . Thus, we can rewrite as
where is a quadratic form and meets all conditions of Corollary 3.
Hence, we have defined the state set, initial configuration, and differential system of a PP-implementable protocol that computes . ∎
3 Translating Bounded GPACs into PPs
3.1 Construction Overview
We will prove our main theorem in this section. It suffices to show that LPPs can simulate GPACs. Since one can transform a bounded GPAC into a bounded CRN with zeroed initial values [23], it is sufficient to consider only this type of CRN. We develop a four-stage algorithm that translates CRNs into LPPs.
-
•
Input: A CRN that computes a target number . We now enter a cascade of transformations:
-
•
Stage 1: into a CRN-implementable quadratic system,
-
•
Stage 2: into a TPP-implementable cubic form system,
-
•
Stage 3: into a PP-implementable quadratic form system, and
-
•
Stage 4: into a PLPP.
3.2 Basic Operations
First, we discuss some basic operations as building blocks for our constructive proof. The notations used are as described in the preliminary section. The naming of operations “-trick” and “-trick” (the use of the Greek letters and ) originates in the proof of Lemma 5 in [6].
Operation 1 (Constant Dilation, “-trick”).
Let be the solution to the ODE and a positive constant, then is the solution to the ODE
The operation is essentially a change of variable and a direct result of the chain rule. The behavior of the ODE system will not change; it only alters the flow of time. Indeed, in the new system corresponds to of the original system. In our construction, we will use this operation to shrink the coefficient of an ODE system. The operation can be seen in [11, 6].
We can do a more general change of variable (composition.)
Operation 2 (Time Dilation ([28], Theorem 3) ).
Let be the solution to the GPAC , be a GPAC-implementable function, and , then is the solution to the GPAC
In our construction, we must choose such that its integral satisfies
and we call such a as “nonterminating time”.
A time dilating operation, as above, controls the flow of time with the function . More accurately, in the new system corresponds to of the original system. If we want the new system to mimic the old system’s limiting behavior (i.e., to achieve the value ), we must guarantee . Thus, time in the new system is nonterminating and can go to infinity in the eyes of the old system. Otherwise, the new system would terminate somewhere in the middle, relative to the old system. To obtain nonterminating time, it is enough to consider functions that converge slowly, e.g., . Alternatively, one could ensure is bounded from below, i.e., , for some constant .
Time dilation for CRNs can be found in [25] (page 15, Theorem 3.7).
Next, we introduce an operation that shrinks variables to [0,1].
Operation 3 (Variable Shrinking, or “-trick”).
Let be a bounded CRN that computes a number in . That is, . To transform the CRN into a LPP, we must ensure all other components, some of which may not not converge, fall in [0,1] for all . We can pick a sufficiently small and a constant such that
This is possible since all variables are bounded. Then we
-
•
make a change of variables: , and
-
•
introduce a new variable such that by
-
1.
initialing (recall for ), and
-
2.
adding the ODE for : .
-
1.
Note that remains unchanged in the operation, so it still computes .
The biggest challenge in translating a CRN into an LPP is: the CRN does not necessarily preserve population, while the LPP requires it. In fact, our input CRN initializes at zero. However, needs to compute some number as all other components remain positive throughout time; evidently, not preserving the population. A straightforward idea to “balance” the system, is to introduce a variable , such that its derivative cancels all changes to the population size by other variables. That is, .
However, the resulting is not CRN-implementable in general. As a result, it is not transformable to an LPP. The rationale is clear in the derivative of . In general, has the form
A typical would contain at least one monomial . Evidently, since the variable is newly introduced. Then will contribute to a negative term in and , making not CRN-implementable and, in turn, not PP-implementable. That is why Bournez et al.’s construction in [6] (Lemma 2) fails to produce a population protocol in general. To address the this issue, we purposefully multiply with every and introduce the following operation.
Operation 4 (Balancing Dilation, or “Garbage Collection” (“g-trick”)).
Let be a CRN-computable system, (i.e., every component is CRN-computable). Then the following operation (multiplying an unknown variable determined by an ODE) produces a conservative CRN-implementable system.
What makes the operation different from a normal time dilation operation is, the function is not known in advance: It needs to adjust/customize according to the system it is dilating. In our construction, we also need to combine the operation with the -trick to achieve nonterminating time. This operation also turns a non-conservative system into a conservative CRN-implmentable one.
We will present our construction in the following subsections.
3.3 Stage 1: Conversion to CRN-implementable Quadratic Systems
The following is a CRN version of [9] (Theorem 1).
Theorem 12.
Any solution of a CRN is a solution of a CRN-implementable system of degree at most two.
Proof.
Let be a CRN, then each has the form , where . We in introduce variables (we call them -variables) for each monomial as follows:
Specially, , , and so on. Note that we can rewrite and in each with the -variables and denote them as and . We can see that and are of degree one in terms of the -variables.
Consider the system that contains the collection of all ’s. Notice that
Note that the -system is a CRN-implementable system with degree less than two. ∎
With this result, we can assume a CRN’s associated polynomial system is quadratic with out loss of generality.
3.4 Stage 2: Conversion to TPP-implementable Cubic Form Systems
Theorem 13.
Any solution of a quadratic CRN is a solution of a TPP-implementable cubic form system.
Proof.
(sketch) Given a quadratic CRN , we first apply the -trick to “make room” for a new variable . That is, we choose a and a constant , such that Then apply the one-trick and balancing dilation to get a cubic form:
-
1.
Introduce a new variable
-
2.
Rewrite each (quadratic), (linear) in to forms:
-
•
for a linear monomial in of the form , apply the “one”-trick and rewrite it as .
-
•
for a constant term in of the form , rewrite it as .
-
•
for a constant term in , rewrite it as .
We call the resulting forms and respectively.
-
•
-
3.
Apply balancing dilation with . The new system looks like
It is a TPP-implementable cubic form system. See the appendix for a full proof.
∎
Proof.
(full)
Let be a quadratic CRN-implementable system. Then we have such that for . Since the CRN is quadratic, it follows that and for .
First, apply the -trick to shrink variables . Choose and a constant , such that . Then perform the change of variables: .
Next, we introduce a new variable such that . Use this summation and the “one-trick” to ensure that every term in is quadratic for . Once each is a quadratic form, we signify these changes by writing where . Note that is a quadratic form and is a linear form.
We can now perform time dilation with . As a result, we have the cubic form system,
where we let and for . Note that and is in every negative term of for . Some algebraic manipulation reveals that
Clearly, and is in every negative term of . Thus, is CRN implementable.
Since is a factor of every term in the cubic form , is not a positive term of for . For the case of , recall that the positive terms of come from the negative terms of . Given that every negative term of will have as a factor, every positive term of will have at least one as a factor. Thus, cannot occur as a positive term in .
Hence, we have satisfied Corollary 4 to obtain a TPP-implementable cubic form system. ∎
Remark 14.
Note that in the above proof is bounded from below, away from zero. We can observe that:
-
1.
The variable starts from and remains greater than for all . It will not introduce new equilibria.
-
2.
The new system has at most a linear slowdown compared to the old system, since .
The variable acts like a source, distributing the total mass (sum ) to all other variables (initialized at 0).
3.5 Stage 3: Conversion to PP-implementable Quadratic Form Systems
Theorem 15.
A number computable by a TPP-implementable function given by Stage 2 can be computed by the sum of a finite set of PP-implementable functions.
Proof.
(sketch) We utilize the self-product of the TPP-implementable cubic form system. Let be the system resulting from the previous stage that computes a real number with initial values and 0 otherwise. We consider the system where and . Let and 0 otherwise. The marked set . Then we can verify the -system is PP-implementable and the sum of the marked variables traces . Check the appendix for a full proof. ∎
Proof.
(full)
Let be the TPP-implementable cubic form system from Stage . Then we have
where computes some and the system is initialized such that and otherwise.
We construct our proof based on the “one trick” given by Observation 7,
We begin by defining a new variable vector, . Introduce new variables for all . To compute , define the marked states as . Given , let and otherwise.
Now, we find . For all we have , where . Recall that consists of cubic forms. Therefore, is a quartic form in variable . It follows from a change of variables from to that is a quadratic form. For each , we check conditions and of Theorem 3. There are three non-trivial cases.
Case 1: Assume such that and . Then by the chain rule and substitution of , we have
We then distribute and group terms by their sign to obtain:
Note that we can factor from every negative term,
and the terms , , , and can be further written into linear form of ’s. We will not repeat these argument in the rest of the proof, though.
The above implies is a factor of every negative term. Also, since can be factored from every positive term, we cannot have a positive (recall that are nonzero). Thus, conditions and are satisfied.
Case 2: Assume such that . From the chain rule and substituting equations from , we have
Distribute and group terms by their sign to obtain,
Note that we can factor from every negative term,
which implies is a factor of every negative term. Suppose a positive term in has the monomial . By carefully choosing the change of variable (i.e., choose , not ), we satisfy condition . If there is no positive term in with the monomial , then condition is met. Then, both conditions and are met.
Case 3: Assume . With the chain rule and substitution, we have
Distributing and grouping terms by their sign yields,
Since can be factored from every negative term, condition is satisfied. Since , it follows that . Thus, condition is satisfied.
In summary, we have defined the states , marked states , initial configuration , and differential system . Furthermore, for each we have established: each is a quadratic form, can be written to avoid a positive in , and the existence of in every negative term of . Hence, a TPP-implementable cubic form system can be transformed into a PP-implementable system that computes .
∎
3.6 Stage 4: Converting PP-implementable Quadratic Form Systems to PLPPs
In this subsection, we turn the PP-implementable quadratic form given as a result of the previous stage into a PLPP. The following construction is from the proof of Lemma 5 in [6].
Construction 1.
Let be a PP-implementable quadratic form. We denote the derivative as
(8) |
where is a quadratic form and is a linear form.
We will apply the -trick (Operation 1) to shrink the coefficient of the above system, where is an undetermined parameter. In order to align with the form in Equation (7), we add and subtract a term . Now the system has the form
(9) | ||||
(10) |
We then use the one-trick to rewrite . Note that the term brings in for . We will then pick sufficiently small
-
1.
to ensure the terms dominate the monomials in such that for all .
-
2.
and to ensure
(11) where denotes the coefficient of in , and .
Next, we construct a rule set for a PLPP. For an ordered pair and a term in we do the following:
-
•
If , add a rule
-
•
otherwise, add two rules and
-
•
In the above rules, if for an order pair , we add an idle reaction
If a term appears in , it implies that the pair will produce . We use the all-in greedy strategy, that is, we produce two ’s and let the pair do the same. So we need to divide the coefficient by 4 for ; yet, when we don’t have a flipped order pair, so we only divide the coefficient by 2.
There need to make sure that the rule set generated above forms a PLPP.
Theorem 16.
Let be a quadratic system satisfying . Then it can be turn into a PLPP by Construction 1 if and only if it is PP-implementable.
Proof.
The “only if” part is clear. Therefore, it suffices to show the “if” direction. We adopt the same symbols and notations as in Construction 1. Recall that we denote . Consider an arbitrary ordered pair . We need to show that in the construction:
-
1.
The selection of satisfying the two conditions is always possible.
-
2.
The rule set generated by the construction forms an PLPP. Specifically, for the ordered pair , we must show that =1 and for all . That is, the ’s form a discrete probability measure with fixed.
We break the proof into two cases:
-
•
Case : The term occurs in from two sources.
-
–
Case 1: . The coefficients of such terms for all must sum to zero, since the system is assumed to be PP-implemetable.
-
–
Case 2: . We have two sources: occurs in as a term in and similarly in as a term in .
The sum of these coefficients is . Note that the coefficients are divided by 4 in the construction, which ensures the resulting sum of is one. One can verify that the selection of is always possible under this case.
-
–
Case : For term , which occurs in , there are two subcases:
-
•
: Then and the coefficient must be positive.
-
•
: Then and coefficient is less than 2. ( can not occur in since the system is PP-implementable.)
Recall that when constructing the rule set, the coefficients are divided by 2. As a result, generated ’s are positive and less than 1. Due to the system’s conservative nature, the coefficients in for ’s in will sum to zero. Since the term introduces a term, the resulting coefficient sum for is . In the construction, these coefficients are always divided by 2 to generate in . Thus, the . One can then verify that the selection of is feasible.
In contrast, assume the system is not PP-implementable. Then there is an with a positive coefficient. Once combined with the term , the sum of coefficients will be greater than two. Then dividing by 2 will generate an , which is not permitted by PLPPs. Hence, the selection of is not feasible in this case. ∎
The following theorem can help in transforming a PLPP to an LPP.
Theorem 17 ([6], Lemma 4).
Let , and assume that there exists a PLPP computing , with rational probabilities. Then there exists a (deterministic) LPP computing .
Note that although the above theorem is based on the original notion of LPP-computable number with the finite-equilibria constraint, the construction in the proof of the theorem still correctly encodes the balance equation. So the theorem also holds under the new definition.
We therefore finish the proof of our main theorem.
Main Theorem.
LPPs compute the same set of numbers in [0,1] as GPACs and CRNs.
Corollary 18.
Algebraic numbers are LPP computable.
Proof.
Algebraic numbers are computable computable by a GPAC [6] (Lemma 5) so they are also LPP-computable by the main theorem. ∎
The above corollary fix the gap in Bournez et al.’s construction.
Corollary 19.
Famous math constants , , Euler’s , Dottie number, and Catalan’s constant are LPP-computable.
Proof.
The first four numbers are GPAC/CRN computable (see [22]). Note that all real-time computable numbers by CRNs in [23] are computable in this paper. One just need to disregard the real-time constraint. Then by our main theorem, they are also LPP computable. It suffices to show that Catalan’s constant is GPAC computable. We use the formula We have
We let
and
Taking derivatives against , we get
Therefore Catalan’s constant can be computed by the above PIVP. Note that the system’s non-zero initial values can be transformed into a system with zeroed initial values ([23], Theorem 3). Hence by our Main Theorem, Catalan’s constant is LPP computable. ∎
This result answers Bournez et al.’s question about whether solutions of trigonometric equations (Dottie number) and are “computable” asymptotically by population protocols.
4 Conclusion and Discussion
In this paper, we extend the notion of LLP-computable numbers and connect it with GPAC/CRN-computable numbers. Moreover, we show that LLPs and GPACs/CRNs essentially compute the same set of real numbers. The result, to some degree, says LPPs, or more straightforwardly, population protocols with the mass-action semantic, can simulate GPACs in some way. We would ask a natural question: What is the next “weak” or minimal (according to some measure) model that can simulate GPACs? Unimolecular protocols are provably incapable since they only compute rational numbers. However, a model discussed in [16], which can be viewed as a two-state (“black” or “white”) -PP with restrictions on reactions (the product of a reaction must either be all black or all white), can compute algebraic numbers such as but not rational numbers like . Diving into the sub-models of population protocols and characterizing the power spectrum will be an interesting avenue for further exploration.
The ODE systems we used to compute transcendental numbers have a continuum of equilibria. We have not addressed the semistability nor the system’s convergence rate in this paper. Regarding the latter, since our construction essentially rewrites the system with a new set of auxiliary variables, the system’s solutions in some sense remain the same, except for the linear slowdown introduced in Stage 2. It is hoped that an LPP’s convergence rate is similar to the input CRN. If an input CRN converges exponentially fast to a number , we desire the translated LPP also converges (exponentially) fast. We would need a thorough stochastic analysis along this line in future work.
The definition of GPAC/CRN-computable numbers and LPP-computable numbers have a major difference: We can trace a real number by a set of variables in an LPP, rather than one, as in a GPAC/CRN. Currently, the proof of our main theorem relies on using a set of marked variables. Our question: Is the difference intrinsic? Or can we compute the same set of numbers using one variable?
Another area of exploration is protocols with a large population (tending to infinity) that also have “scarce” variables with a limited population. The behaviors of these systems, due to the existence of the scarce variables, can not be governed by Kurtz’s theorem. Therefore, a new analytic tool or theoretical benchmark (probably not a computable number) awaits development.
Our construction in Section 3 is not optimal. To implement the translation algorithm in a software package, one would want to have a better algorithm for Stage 1. To apply the -trick, one needs to know the bounds of the variables, which would require numerical methods. A theory to predict the bounds is desired but difficult to achieve due to the non-linear nature of ODEs.
Acknowledgment
We thank Titus Klinge for providing the motivating example in Section 1.
We thank the anonymous reviewers for their careful reading of our manuscript and their many insightful comments and suggestions.
References
- [1] Dan Alistarh, Bartłomiej Dudek, Adrian Kosowski, David Soloveichik, and Przemysław Uznański. Robust detection in leak-prone population protocols. In International Conference on DNA-Based Computers, pages 155–171. Springer, 2017.
- [2] Dana Angluin, James Aspnes, David Eisenstat, and Eric Ruppert. The computational power of population protocols. Distributed Computing, 20(4):279–304, 2007.
- [3] Guillaume Aupy and Olivier Bournez. On the number of binary-minded individuals required to compute. Theoretical Computer Science, 412(22):2262, 2011.
- [4] Sanjay P. Bhat and Dennis S. Bernstein. Nontangency-based lyapunov tests for convergence and stability in systems having a continuum of equilibria. SIAM Journal on Control and Optimization, 42(5):1745–1775, 2003.
- [5] Olivier Bournez, Philippe Chassaing, Johanne Cohen, Lucas Gerin, and Xavier Koegler. On the convergence of population protocols when population goes to infinity. Applied Mathematics and Computation, 215(4):1340–1350, 2009.
- [6] Olivier Bournez, Pierre Fraigniaud, and Xavier Koegler. Computing with large populations using interactions. In Proceedings of the 37th International Conference on Mathematical Foundations of Computer Science, pages 234–246. Springer, 2012.
- [7] Olivier Bournez, Daniel S. Graça, and Amaury Pouly. Polynomial time corresponds to solutions of polynomial ordinary differential equations of polynomial length. Journal of the ACM, 64(6):38, 2017.
- [8] Vannevar Bush. The differential analyzer. A new machine for solving differential equations. Journal of the Franklin Institute, 212(4):447–488, 1931.
- [9] David C. Carothers, G. Edgar Parker, James S. Sochacki, and Paul G. Warne. Some properties of solutions to polynomial systems of differential equations. Electronic Journal of Differential Equations (EJDE)[electronic only], 2005:Paper–No, 2005.
- [10] David Cox, John Little, and Donal OShea. Ideals, Varieties, and Algorithms: an Introduction to Computational Algebraic Geometry and Commutative Algebra. Springer Science & Business Media, 2013.
- [11] David Doty and Eric Severson. Ppsim: A software package for efficiently simulating and visualizing population protocols. In International Conference on Computational Methods in Systems Biology, pages 245–253. Springer, 2021.
- [12] Bartłomiej Dudek and Adrian Kosowski. Universal protocols for information dissemination using emergent signals. In Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing, pages 87–99, 2018.
- [13] François Fages, Guillaume Le Guludec, Olivier Bournez, and Amaury Pouly. Strong Turing completeness of continuous chemical reaction networks and compilation of mixed analog-digital programs. In Proceedings of the 15th International Conference on Computational Methods in Systems Biology, pages 108–127. Springer International Publishing, 2017.
- [14] Philippe Flajolet and Robert Sedgewick. Analytic Combinatorics. Cambridge University Press, 2009.
- [15] Willem Fletcher, Titus H. Klinge, James I. Lathrop, Dawn A. Nye, and Matthew Rayman. Robust real-time computing with chemical reaction networks. In International Conference on Unconventional Computation and Natural Computation, pages 35–50. Springer, 2021.
- [16] Lucas Gerin and Marie Albenque. On the algebraic numbers computable by some generalized ehrenfest urns. Discrete Mathematics & Theoretical Computer Science, 14, 2012.
- [17] Daniel S. Graça. Some recent developments on shannon’s general purpose analog computer. Mathematical Logic Quarterly: Mathematical Logic Quarterly, 50(4-5):473–485, 2004.
- [18] Daniel Silva Graça and José Félix Costa. Analog computers and recursive functions over the reals. Journal of Complexity, 19(5):644–664, 2003.
- [19] Daniel S. Graça, Manuel L. Campagnolo, and Jorge Buescu. Computability with polynomial differential equations. Advances in Applied Mathematics, 40(3):330–349, 2008.
- [20] Indranil Gupta, Mahvesh Nagda, and Christo Frank Devaraj. The design of novel distributed protocols from differential equations. Distributed Computing, 20(2):95–114, 2007.
- [21] Vera Hárs and János Tóth. On the inverse problem of reaction kinetics. In Colloquia Mathematica Societatis János Bolyai, 30: Qualitative Theory of Differential Equations, pages 363–379, 1981.
- [22] Xiang Huang. Chemical Reaction Networks: Computability, Complexity, and Randomness. PhD thesis, Iowa State University, 2020.
- [23] Xiang Huang, Titus H. Klinge, and James I. Lathrop. Real-time equivalence of chemical reaction networks and analog computers. In International Conference on DNA Computing and Molecular Programming, pages 37–53. Springer, 2019.
- [24] Xiang Huang, Titus H. Klinge, James I. Lathrop, Xiaoyuan Li, and Jack H. Lutz. Real-time computability of real numbers by chemical reaction networks. Natural Computing, 18(1):63–73, 2019.
- [25] Titus H. Klinge. Modular and Robust Computation with Deterministic Chemical Reaction Networks. PhD thesis, Iowa State University, 2016.
- [26] Thomas G. Kurtz. The relationship between stochastic and deterministic models for chemical reactions. The Journal of Chemical Physics, 57(7):2976–2978, 1972.
- [27] Leonard Lipshitz and Lee A Rubel. A differentially algebraic replacement theorem, and analog computability. Proceedings of the American Mathematical Society, 99(2):367–372, 1987.
- [28] G. Edgar Parker and James S. Sochacki. Implementing the picard iteration. Neural, Parallel & Scientific Computations, 4(1):97–112, 1996.
- [29] Marion B Pour-El and Jonathan I Richards. Abstract computability and its relations to the general purpose analog computer. Transactions of the American Mathematical Society, 199:1–28, 1974.
- [30] Claude E Shannon. Mathematical theory of the differential analyzer. Studies in Applied Mathematics, 20(1-4):337–354, 1941.
- [31] Justin R. Smith. Introduction to Algebraic Geometry. Justin Smith, 2014.
- [32] Alan M. Turing. On computable numbers, with an application to the Entscheidungsproblem. Proceedings of the London Mathematical Society, 42(1):230–265, 1936.