This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

\intervalconfig

soft open fences

Computing Real Numbers with Large-Population Protocols Having a Continuum of Equilibria

Xiang Huang
[email protected]
   Rachel N. Huls
[email protected]
(University of Illinois Springfield, Springfield, IL 62703, USA
)
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, π/4\pi/4, Euler’s γ\gamma, 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):

{𝐱=𝐩(𝐱(t))𝐱(0)=𝐱0,t\begin{cases}\mathbf{x}^{\prime}=\mathbf{p}\big{(}\mathbf{x}(t)\big{)}\\ \mathbf{x}(0)=\mathbf{x}_{0},\end{cases}\quad t\in\mathbb{R} (1)

where 𝐩\mathbf{p} is a vector of multivariate polynomials, 𝐱\mathbf{x} is a vector of variables, and 𝐱0\mathbf{x}_{0} 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 xx (possibly having negative values) in a GPAC by the difference between a pair of positive variables x+x^{+} and xx^{-} in the copycat CRN. That is, x(t)=x+(t)x(t)x(t)=x^{+}(t)-x^{-}(t) for all t0t\geq 0.

A straightforward idea to “compute” a number α\alpha by a GPAC/CRN is to designate a variable xx such that x(t)αx(t)\to\alpha as tt\to\infty. 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 x(t)x(t) to converge exponentially fast to α\alpha. 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 ee and π\pi are among this class. Later, Huang [22] added Euler’s γ\gamma and Dottie number (the unique real root of the equation cos(x)=x\cos(x)=x) 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 tt 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 𝐱(t)\mathbf{x}(t). 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 α\alpha also gives a finite description of α\alpha. 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 ν[0,1]\nu\in[0,1] is said to be computable by an LPP if the proportion of agents in a set of marked states converges to ν\nu 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 π4\frac{\pi}{4} 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 ee and π\pi)? The following example helps explore the question.

Motivating Example.

Let F(t)=12eet1F(t)=\frac{1}{2}e^{e^{-t}-1}, E(t)=12etE(t)=\frac{1}{2}e^{-t}, and G(t)G(t) be a function such that its derivative “cancels” with EE and FF’s derivative. We have the first-order system and the corresponding chemical reaction network:

ODE:{F=2FEE=EG=2FE+ECRN/PP:{F+E2G+EEG.\hskip 42.67912pt\text{ODE:}\hskip 14.22636pt\begin{cases}F^{\prime}=-2FE\\ E^{\prime}=-E\\ G^{\prime}=2FE+E\end{cases}\hskip 28.45274pt\text{CRN/PP:}\hskip 14.22636pt\begin{cases}F+E\xrightarrow{\mathmakebox{2}}G+E\\ E\to G.\end{cases}

It is evident that with initial values F(0)=12F(0)=\frac{1}{2}, E(0)=12E(0)=\frac{1}{2}, and G(0)=0G(0)=0, the solution of F(t)12e1F(t)\to\frac{1}{2}e^{-1} as tt\to\infty. Correspondingly, in the LPP setting, if we let F(0)=N2F(0)=\lfloor\frac{N}{2}\rfloor, E(0)=N2E(0)=\lfloor\frac{N}{2}\rfloor, and G(0)=0G(0)=0 for a population of size NN, we can observe from the experimental results in Figure 1 that the proportion of FF gets very close to 12e1\frac{1}{2}e^{-1} when NN becomes larger. In fact, the so-called Kurtz’s Theorem [26], which says ODE solution F(t)F(t) equals the proportion random variable F(N)(t)/NF^{(N)}(t)/N almost surely when NN goes to infinity, guarantees the limit is 12e1\frac{1}{2}e^{-1}. 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.

Refer to caption
Figure 1: We use the ppsim Python package [11] to simulate our motivating example (transformed into a probabilistic PP). This figure demonstrates that the transcendental number 12e1\frac{1}{2}e^{-1} can be traced by the proportion of a species as the population size grows.

So the above LPP can “compute” 12e1\frac{1}{2}e^{-1}, 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 FF-GG plane (with E=0E=0) 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) TT occurs as a pair {+T,T}\{+T,-T\} in the system, a very nice property to have. Doty and Severson [11] provided an algorithm to translate CRNs that consist solely of unimolecular (XYX\to Y) and bimolecular reactions (X+YZ+WX+Y\to Z+W) to PPs. Those reactions correspond to an ODE system’s linear terms (e.g., xx) and quadratic terms (e.g., xyxy). 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 X\emptyset\to X, 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 x2x^{2} occur in xx^{\prime}). 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 𝐱(t)=(x1(t),x2(t),,xn(t))\mathbf{x}(t)=(x_{1}(t),x_{2}(t),\cdots,x_{n}(t)) to denote a vector of variables in (usually the solution of) an ODE system, where nn\in\mathbb{N} is the vector’s dimension and the parameter tt is regarded as “time” in the system. The first component x1x_{1} is usually designated for tracing the number we wish to compute.

A typical definition of a CRN or PP specifies a pair (S,R)(S,R), with SS being the set of species or states and RR being the set of reactions or interactions between states. In general, a reaction for an abstract CRN looks like X+Y𝑘X+W+ZX+Y\xrightarrow{\mathmakebox{k}}X+W+Z, where kk 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: X+YW+Z.X+Y\to W+Z.

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 (𝐱,𝐱)(\mathbf{x},\mathbf{x}^{\prime}), or 𝐱\mathbf{x} itself is a GPAC (CRN, PP), without specifying the associated polynomial differential system 𝐱(t)=(x1(t),,xn(t))\mathbf{x}^{\prime}(t)=(x_{1}^{\prime}(t),\cdots,x_{n}^{\prime}(t)). If we don’t specify the initial values that means we assume them to be zero. We would assume the correspondence between a variable xx and the species XX that it describes. In some cases, we will call a variable xx a species and 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}) a set of species.

Now, we introduce notation and terminology for polynomials.

Notation (Positive Polynomials).

We denote +[𝐱]=[x1,,xn]\mathbb{P}^{+}\subset\mathbb{Q}[\mathbf{x}]=\mathbb{Q}[x_{1},\cdots,x_{n}] the set of multivariable polynomials with positive (rational) coefficients for each monomial (terms). For instance, x1x2+x3+1+x_{1}x_{2}+x_{3}+1\in\mathbb{P}^{+}, while x1x2x3+1+x_{1}x_{2}-x_{3}+1\not\in\mathbb{P}^{+}.

Notation (Variable Occurrence in a Polynomial or Monomial).

Let pp be a polynomial (or monomial) and xx be a variable, we use the convenient notation xpx\in p to express xx occurs in pp.

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, 4x2+2xy3y24x^{2}+2xy-3y^{2}; a cubic form is a homogeneous polynomial of degree three, for example, x3+3x2y+3xy2+y3x^{3}+3x^{2}y+3xy^{2}+y^{3}.

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 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}) that satisfies

i=1nxi=0,\sum_{i=1}^{n}x_{i}^{\prime}=0,

a conservative system.

We say a function f(t)f(t) is implementable (generable) by a GPAC (CRN, LPP) if there exist a GPAC (CRN, LPP) and a variable (species, state) xx in it, such that f(t)=x(t)f(t)=x(t) for all tt. 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 f:0Rf:\mathbb{R}_{\geq 0}\to R is GPAC-implementable if it is the first component i.e. x1x_{1}, of the 𝐱(t)=(x1,x2,,xn)\mathbf{x}(t)=(x_{1},x_{2},\cdots,x_{n}) solution for the following differential equation:

{𝐱=𝐩(𝐱(t))𝐱(0)=𝐱0,t\begin{cases}\mathbf{x}^{\prime}=\mathbf{p}\big{(}\mathbf{x}(t)\big{)}\\ \mathbf{x}(0)=\mathbf{x}_{0},\end{cases}\quad t\in\mathbb{R} (2)

where 𝐩\mathbf{p} is a vector of multivariate polynomials and 𝐱\mathbf{x} is a variable vector with 𝐱0\mathbf{x}_{0} as its initial value.

Note that if a variable xx has initial value aa, we can introduce a new variable y=xay=x-a to make y(0)=0y(0)=0. Therefore, without loss of generality, we often assume 𝐱(0)=𝟎\mathbf{x}(0)=\mathbf{0} 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 xix_{i} in its variable vector 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}) is of the form

xi=pqxi,where p,q+.x_{i}^{\prime}=p-qx_{i},\quad\text{where }p,\ q\in\mathbb{P}^{+}. (3)

The restriction is rooted in reaction modeling: a negative term in xx^{\prime} means to destroy some molecular xx at some rate. However, a reaction cannot destroy a non-reactant, so xx 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

  1. i.

    it is CRN-implementable, i.e., there is a CRN (𝐱,𝐱)(\mathbf{x},\mathbf{x}^{\prime}) computing it.

  2. ii.

    for all xix_{i} in 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}), xix_{i}^{\prime} does not possess a positive xi2x_{i}^{2} term.

  3. iii.

    𝐱\mathbf{x}^{\prime} is a quadratic form system, and

  4. iv.

    𝐱\mathbf{x}^{\prime} is conservative.

Proof.

For the “only if” direction, all conditions other than condition (ii) are clear. To see that xix_{i}^{\prime} can not have an xi2x_{i}^{2}, we consider two XiX_{i}’s on the left-hand side of a reaction. The reaction can not increase the amount of XiX_{i}, since that would require at least k+1k+1 XiX_{i}’s as products on the right-hand side. As a result, a positive xi2x_{i}^{2} term can not occur in xix_{i}^{\prime}. 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 XYX\to Y a unimolecular population protocol (UPP). Similarly, a CRN containing only termolecular reactions of the form X+Y+ZU+V+WX+Y+Z\to U+V+W is called a termolecular population protocol (TPP). In general, a kk-PP is a CRN that contains only reactions of the form X1++XkY1++YkX_{1}+\cdots+X_{k}\to Y_{1}+\cdots+Y_{k}. Generally, we have the following characterization.

Corollary 4 (kk-PP-implementable Functions).

A function is kk-PP-implementable, if and only if

  1. i.

    it is CRN-implementable, i.e., there is a CRN (𝐱,𝐱)(\mathbf{x},\mathbf{x}^{\prime}) computing it.

  2. ii.

    for all xix_{i} in 𝐱\mathbf{x}, xix_{i}^{\prime} does not possess a positive xikx_{i}^{k} term.

  3. iii.

    𝐱\mathbf{x}^{\prime} is homogeneously degree kk, and

  4. iv.

    𝐱\mathbf{x}^{\prime} 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 (Q,R)(Q,R) be a large-population protocol, where QQ is the state (species, variables) set and RR is a set of reaction rules, each with two reactants and two products. The balance equation of a deterministic LPP is a function b:|Q||Q|b:\mathbb{R}^{|Q|}\to\mathbb{R}^{|Q|} such that

b(x)=(q1,q2)Q2(xq1xq2(eq1eq2+(q3,q4)Q2δq1,q2,q3,q4(eq3+eq4)))b(x)=\sum_{(q_{1},q_{2})\in Q^{2}}\bigg{(}x_{q_{1}}x_{q_{2}}\big{(}-e_{q_{1}}-e_{q_{2}}+\sum_{(q_{3},q_{4})\in Q^{2}}\delta_{q_{1},q_{2},q_{3},q_{4}}(e_{q_{3}}+e_{q_{4}})\big{)}\bigg{)} (4)

where δq1,q2,q3,q4=1\delta_{q_{1},q_{2},q_{3},q_{4}}=1 if (q1,q2)(q3,q4)(q_{1},q_{2})\to(q_{3},q_{4}), and 0 otherwise; (eq)qQ(e_{q})_{q\in Q} is the canonical base of |Q|\mathbb{R}^{|Q|} and xqix_{q_{i}} is the proportion of the population in state qiq_{i}.

The balance equation is a description of the system’s dynamics. Intuitively, it says whenever q1q_{1} and q2q_{2} bump into each other, if there is a reaction (q1,q2)(q3,q4)(q_{1},q_{2})\to(q_{3},q_{4}) in the PP, then the pair (q1,q2)(q_{1},q_{2}) turns into (q3,q4)(q_{3},q_{4}); otherwise, we interpret (q1,q2)(q_{1},q_{2}) 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 (qi,qj)(q_{i},q_{j}) and (qj,qi)(q_{j},q_{i}), 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 δq1,q2,q3,q4\delta_{q_{1},q_{2},q_{3},q_{4}} 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

qiqjαi,j,k,lqkqlq_{i}\ q_{j}\to\alpha_{i,j,k,l}\ q_{k}\ q_{l}

and for every (qi,qj)Q2(q_{i},q_{j})\in Q^{2}, we have

  • for every (qk,ql)Q2(q_{k},q_{l})\in Q^{2}, αi,j,k,l\alpha_{i,j,k,l}\in\mathbb{Q} and αi,j,k,l>0\alpha_{i,j,k,l}>0, and

  • (qk,ql)αi,j,k,l=1.\displaystyle\sum_{(q_{k},q_{l})}\alpha_{i,j,k,l}=1.

The balance equation remains mostly the same as Equation (4). To simplify the notations, we often take Q=[n]={1,2,,n}Q=[n]=\{1,2,\cdots,n\} and will still use qiq_{i} or use terms like “state ii” when referring to a state.

b(x)=(i,j)[n]2(xixj(eiej+(k,l)[n]2αi,j,k,l(ek+el)))b(x)=\sum_{(i,j)\in[n]^{2}}\bigg{(}x_{i}x_{j}\big{(}-e_{i}-e_{j}+\sum_{(k,l)\in[n]^{2}}\alpha_{i,j,k,l}(e_{k}+e_{l})\big{)}\bigg{)} (5)

The ODE associated with a PLPP can be written as

d𝐱dt=b(𝐱),\frac{\mathop{}\!\mathrm{d}\mathbf{x}}{\mathop{}\!\mathrm{d}t}=b(\mathbf{x}), (6)

where 𝐱=(x1(t),,xn(t))n\mathbf{x}=(x_{1}(t),\cdots,x_{n}(t))\in\mathbb{R}^{n} is a variable vector and its ii-th component, xix_{i}, tracks the proportion of the total population in state ii over time tt. We will often call 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}) or 𝐱\mathbf{x} an LPP (PLPP).

A simple observation results directly from the definition of LPP or PLPP.

Observation 7 (“The one trick”).

Let 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}) be an LPP or PLPP, then i[n]xi=1.\displaystyle\sum_{i\in[n]}x_{i}=1.

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 cc in either of the following ways, depending on our needs:

  • c=c1=c(x1++xn)c=c\cdot 1=c(x_{1}+\cdots+x_{n}), or

  • c=c11=c(x1++xn)(x1++xn)c=c\cdot 1\cdot 1=c(x_{1}+\cdots+x_{n})(x_{1}+\cdots+x_{n}).

Observation 8.

The rr-th component of Equation (6) has the form

dxrdt=f(𝐱)2xr,\frac{\mathop{}\!\mathrm{d}x_{r}}{\mathop{}\!\mathrm{d}t}=f(\mathbf{x})-2x_{r}, (7)

where f(𝐱)f(\mathbf{x}) is a quadratic form in +\mathbb{P}^{+}.

An intuitive way to think about equation 7:

  • The term 2xr-2x_{r} represents all reactions that consume xrx_{r}. A complete set of rules for a PP must include all combinations of pairs (xr,xk)(x_{r},x_{k}), or (xk,xr)(x_{k},x_{r}), where kk iterates through all [n][n]. These combinations sum to 2xr-2x_{r}.

  • The f(x)f(x) represents all reactions that produce xrx_{r}. This observation is critical in the constructive proof of our main theorem.

Proof.

Take the xrx_{r} component in Equation (6). We have

dxrdt\displaystyle\frac{\mathop{}\!\mathrm{d}x_{r}}{\mathop{}\!\mathrm{d}t} =j[n](xrxj)+j[n](xrxj)\displaystyle=\sum_{j\in[n]}\bigg{(}-x_{r}x_{j}\bigg{)}+\sum_{j\in[n]}\bigg{(}-x_{r}x_{j}\bigg{)}
+Projr(i,j[n](xixjk,l[n]αi,j,k,l(ek+el))),\displaystyle\quad+\textstyle\mathop{Proj}_{r}\Bigg{(}\sum_{i,j\in[n]}\bigg{(}x_{i}x_{j}\sum_{k,l\in[n]}\alpha_{i,j,k,l}(e_{k}+e_{l})\bigg{)}\Bigg{)},
=2xr+f(𝐱),by Observation 7.\displaystyle=-2x_{r}+f(\mathbf{x}),\quad\text{by Observation \ref{obs:one-trick}.}

where f(𝐱)=Projr(i,j[n](xixjk,l[n]αi,j,k,l(ek+el)))f(\mathbf{x})=\textstyle\mathop{Proj}_{r}\Bigg{(}\sum_{i,j\in[n]}\bigg{(}x_{i}x_{j}\sum_{k,l\in[n]}\alpha_{i,j,k,l}(e_{k}+e_{l})\bigg{)}\Bigg{)} and Projr()\mathop{Proj}_{r}(\cdot) is the rr-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 ν\nu is said to be computable by an LPP (PLPP, LPUP) if there exists an LPP (PLPP, LPUP) such that 𝐱(t)=(x1(t),x2(t),,xn(t))[0,1]n\mathbf{x}(t)=(x_{1}(t),x_{2}(t),\cdots,x_{n}(t))\in[0,1]^{n} and

limtiMxi(t)=ν,\lim_{t\to\infty}\sum_{i\in M}x_{i}(t)=\nu,

where M{1,,n}M\subseteq\{1,\cdots,n\} represents the subset of states marked in 𝐱\mathbf{x}. Moreover, all the states xix_{i} must be initialized to some positive rational ri[0,1]r_{i}\in\mathbb{Q}\cap[0,1], in the sense that limNxi(N)(0)=ri\lim_{N\to\infty}x_{i}^{(N)}(0)=r_{i}, when xi(N)(0)x_{i}^{(N)}(0) is the initial fraction of state ii at the stage when the population is NN.

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 qqqqq\ q^{\prime}\rightarrow q\ q^{\prime} for all qq and qq^{\prime}. 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 XX to be a fraction of the total population NN, 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 XX to have 100 molecules. Any state initialized to a constant amount will be a fraction that approaches zero, as NN grows to infinity. In our definition, such XX will be initialized to have zero molecules for a fixed NN.

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 ν=pq[0,1]\nu=\frac{p}{q}\in[0,1] is a rational number. Lemma 3 of Bournez et al. [6] constructs an LPP with qq states such that each state converges 1q\frac{1}{q} for an exponentially stable equilibrium. We modify their construction to obtain a unimolecular LPP. Let X={X1,,Xq}X=\{X_{1},\dots,X_{q}\} be the state set and the transitions be of the form XiX(imodq)+1X_{i}\rightarrow X_{(i\mod q)+1} (see Figure 3 for a visualization). Then each state will converge to 1q\frac{1}{q}. To compute ν\nu, mark states X1,,XpX_{1},\dots,X_{p}. Thus, there exists a deterministic unimolecular LPP that computes ν\nu. (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 𝒫\mathcal{P} computes some number ν[0,1]\nu\in[0,1]. Then there is a graph GG corresponding to the reactions of 𝒫\mathcal{P} 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 11, GG 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.

Refer to caption
Figure 2: Visualization of transitions in a unimolecular protocol.
Refer to caption
Figure 3: Example of a Functional Graph.

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.

Refer to caption
Figure 4: With ppsim, we can simulate a product protocol with input LPPs 𝐱\mathbf{x} and 𝐲\mathbf{y} that compute 12\frac{1}{\sqrt{2}} and 13\frac{1}{\sqrt{3}}. Note that the factor LPPs originate from [5], and the product LPP is a result of applying Lemma 11. These simulations affirm the closure of LPPs under multiplication.
Lemma 11 (Product of LPP-computable Numbers is LPP-computable).

Let Px{P}_{x} and Py{P}_{y} be LPPs that compute α\alpha and β\beta respectively. Denote their respective state vectors by 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}) and 𝐲=(y1,y2,,ym)\mathbf{y}=(y_{1},y_{2},\cdots,y_{m}), initial configurations by 𝐱(0)\mathbf{x}(0) and 𝐲(0)\mathbf{y}(0), and differential systems by 𝐱\mathbf{x}^{\prime} and 𝐲\mathbf{y}^{\prime}. Assume any differential equation in 𝐱\mathbf{x}^{\prime} or 𝐲\mathbf{y}^{\prime} is a quadratic form. Then there exists an LPP, Pz{P}_{z}, that computes the product αβ\alpha\beta.

Proof.

Let pxi,qxi,pyj,qyj+p_{x_{i}},q_{x_{i}},p_{y_{j}},q_{y_{j}}\in\mathbb{P}^{+}. Then we can write xi=pxixiqxix_{i}^{\prime}=p_{x_{i}}-x_{i}q_{x_{i}} for all xi𝐱x_{i}^{\prime}\in\mathbf{x}^{\prime}. Since xix_{i}^{\prime} is a quadratic form, pxip_{x_{i}} is a quadratic form and qxiq_{x_{i}} is a linear form. This notation generalizes to yj𝐲y_{j}^{\prime}\in\mathbf{y}^{\prime} as well. Introduce new state variables zi,j:=xiyjz_{i,j}:=x_{i}y_{j} for all (xi,yj)𝐱×𝐲(x_{i},y_{j})\in\mathbf{x}\times\mathbf{y} where ×\times is the Cartesian product (view 𝐱\mathbf{x} and 𝐲\mathbf{y} as sets). Then we have the state vector 𝐳=(z1,1,z1,2,z2,1,,zn,m)\mathbf{z}=(z_{1,1},z_{1,2},z_{2,1},\dots,z_{n,m}). Suppose M𝐱𝐱M_{\mathbf{x}}\subset\mathbf{x} and M𝐲𝐲M_{\mathbf{y}}\subset\mathbf{y} are the marked states. For each zi,j=xiyj𝐳z_{i,j}=x_{i}y_{j}\in\mathbf{z}, mark zi,jz_{i,j} if xiM𝐱x_{i}\in M_{\mathbf{x}} and yjM𝐲y_{j}\in M_{\mathbf{y}}. For the initial values, let 𝐳(0)=𝐱(0)𝐲(0)\mathbf{z}(0)=\mathbf{x}(0)\cdot\mathbf{y}(0).

To obtain the differential system 𝐳\mathbf{z}^{\prime}, perform the following steps. First, differentiate zi,j=(xiyj)z_{i,j}=(x_{i}y_{j}). By the chain rule, we have

zi,j=(xiyj)=xiyj+xiyj.z_{i,j}^{\prime}=(x_{i}y_{j})^{\prime}=x_{i}^{\prime}y_{j}+x_{i}y_{j}^{\prime}.

Next, substitute the equations for xix_{i}^{\prime} and yjy_{j}^{\prime}. Then, we have the cubic form,

zi,j=yj(pxixiqxi)+xi(pyjyjqyj).z_{i,j}^{\prime}=y_{j}(p_{x_{i}}-x_{i}q_{x_{i}})+x_{i}(p_{y_{j}}-y_{j}q_{y_{j}}).

Apply the one-trick (Proposition 7) to obtain a homogeneously degree four polynomial such that every term is exactly degree two in variable xx and exactly degree two in variable yy. We have,

zi,j=yj(k=1myk)(pxixiqxi)+xi(k=1nxk)(pyjyjqyj).z_{i,j}^{\prime}=y_{j}\left(\sum\limits_{k=1}^{m}y_{k}\right)(p_{x_{i}}-x_{i}q_{x_{i}})+x_{i}\left(\sum\limits_{k=1}^{n}x_{k}\right)(p_{y_{j}}-y_{j}q_{y_{j}}).

After expanding the polynomial, group the positive and negative terms. Note that we can factor xiyjx_{i}y_{j} from the collection of negative terms, which yields

zi,j=(k=1mykyjpxi+k=1nxkxipyj)(xiyj)(qxik=1myk+qyjk=1nxk).z_{i,j}^{\prime}=\left(\sum\limits_{k=1}^{m}y_{k}y_{j}p_{x_{i}}+\sum\limits_{k=1}^{n}x_{k}x_{i}p_{y_{j}}\right)-(x_{i}y_{j})\left(q_{x_{i}}\sum\limits_{k=1}^{m}y_{k}+q_{y_{j}}\sum\limits_{k=1}^{n}x_{k}\right).

By substituting zi,jz_{i,j} for the factored xiyjx_{i}y_{j}, we have

zi,j=(k=1mykyjpxi+k=1nxkxipyj)zi,j(qxik=1myk+qyjk=1nxk),z_{i,j}^{\prime}=\left(\sum\limits_{k=1}^{m}y_{k}y_{j}p_{x_{i}}+\sum\limits_{k=1}^{n}x_{k}x_{i}p_{y_{j}}\right)-z_{i,j}\left(q_{x_{i}}\sum\limits_{k=1}^{m}y_{k}+q_{y_{j}}\sum\limits_{k=1}^{n}x_{k}\right),

which satisfies condition (i)(i) from Corollary 3.

Let pzi,j=(k=1mykyjpxi+k=1nxkxipyj)p_{z_{i,j}}=\left(\sum_{k=1}^{m}y_{k}y_{j}p_{x_{i}}+\sum_{k=1}^{n}x_{k}x_{i}p_{y_{j}}\right). Without loss of generality, consider pzi,j=k=1mykyjpxip_{z_{i,j}}^{*}=\sum_{k=1}^{m}y_{k}y_{j}p_{x_{i}}. Note that every monomial in pzi,jp_{z_{i,j}}^{*} is of the form xuxvyjykx_{u}x_{v}y_{j}y_{k} where xuxvx_{u}x_{v} is a monomial in pxip_{x_{i}}. Then we can substitute either zu,jzv,kz_{u,j}z_{v,k} or zu,kzv,jz_{u,k}z_{v,j} for each xuxvyjykx_{u}x_{v}y_{j}y_{k} in pzi,jp_{z_{i,j}}^{*}. Since xi2x_{i}^{2} is not a valid monomial of pixp_{i_{x}}, we will not have zi,j2z_{i,j}^{2} in pzi,j{p_{z_{i,j}}^{*}}. Thus, pzi,jp_{z_{i,j}} is a quadratic form in variable zz that satisfies condition (ii)(ii) of Corollary 3.

Let qzi,j=(qxik=1myk+qyjk=1nxk)q_{z_{i,j}}=\left(q_{x_{i}}\sum_{k=1}^{m}y_{k}+q_{y_{j}}\sum_{k=1}^{n}x_{k}\right). Without loss of generality, consider qzi,j=qxik=1mykq_{z_{i,j}}^{*}=q_{x_{i}}\sum_{k=1}^{m}y_{k}. Note that every monomial in qzi,jq_{z_{i,j}}^{*} is of the form xuykx_{u}y_{k}, where xux_{u} is a monomial in qxiq_{x_{i}}. Then we can substitute zu,kz_{u,k} for each xuykx_{u}y_{k} in qzi,jq_{z_{i,j}}^{*}. Thus, we can rewrite zi,jz_{i,j}^{\prime} as

zi,j=pzi,jzi,jqzi,j,z_{i,j}^{\prime}=p_{z_{i,j}}-z_{i,j}q_{z_{i,j}},

where zi,jz_{i,j}^{\prime} 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 αβ\alpha\beta. ∎

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 α\alpha. 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 “ε\varepsilon-trick” and “λ\lambda-trick” (the use of the Greek letters ε\varepsilon and λ\lambda) originates in the proof of Lemma 5 in [6].

Operation 1 (Constant Dilation, “ε\varepsilon-trick”).

Let 𝐱(t)\mathbf{x}(t) be the solution to the ODE 𝐱(t)=p(𝐱(t))\mathbf{x}^{\prime}(t)=p(\mathbf{x}(t)) and ε+\varepsilon\in\mathbb{Q}^{+} a positive constant, then 𝐱(εt)\mathbf{x}(\varepsilon t) is the solution to the ODE

𝐱(t)=εp(𝐱(t)).\mathbf{x}^{\prime}(t)=\varepsilon p(\mathbf{x}(t)).

The operation is essentially a change of variable tεtt\to\varepsilon t 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, tt in the new system corresponds to εt\varepsilon t 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 𝐱(t)\mathbf{x}(t) be the solution to the GPAC 𝐱(t)=p(𝐱(t))\mathbf{x}(t)^{\prime}=p(\mathbf{x}(t)), g(t)g(t) be a GPAC-implementable function, and G(t)=0tg(s)𝑑sG(t)=\int_{0}^{t}g(s)ds, then 𝐱(G(t))\mathbf{x}(G(t)) is the solution to the GPAC

𝐱(t)=p(𝐱(t))g.\mathbf{x}^{\prime}(t)=p(\mathbf{x}(t))\cdot g.

In our construction, we must choose g(t)g(t) such that its integral satisfies

G(t)|t==0g(s)𝑑s=.G(t)|_{t=\infty}=\int_{0}^{\infty}g(s)ds=\infty.

and we call such a G(t)G(t) as “nonterminating time”.

A time dilating operation, as above, controls the flow of time with the function g(t)g(t). More accurately, tt in the new system corresponds to G(t)=0tg(s)𝑑sG(t)=\int_{0}^{t}g(s)ds of the original system. If we want the new system to mimic the old system’s limiting behavior (i.e., to achieve the value limtx1(t)\lim_{t\to\infty}x_{1}(t)), we must guarantee G()=G(\infty)=\infty. 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., g(t)=11+tg(t)=\frac{1}{1+t}. Alternatively, one could ensure gg is bounded from below, i.e., g(t)>c>0g(t)>c>0, for some constant cc.

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 “λ\lambda-trick”).

Let 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}) be a bounded CRN that computes a number α\alpha in [0,1][0,1]. That is, limtx1(t)=α\lim_{t\to\infty}x_{1}(t)=\alpha. 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 tt. We can pick a 0<λ<10<\lambda<1 sufficiently small and a constant c>0c>0 such that

x1+λ(x2++xn)<1c.x_{1}+\lambda(x_{2}+\cdots+x_{n})<1-c.

This is possible since all variables are bounded. Then we

  • make a change of variables: x2λx2,,xnλxnx_{2}\leftarrow\lambda x_{2},\cdots,x_{n}\leftarrow\lambda x_{n}, and

  • introduce a new variable x0(t)x_{0}(t) such that x0(t)+x1(t)++xn(t)=1x_{0}(t)+x_{1}(t)+\cdots+x_{n}(t)=1 by

    1. 1.

      initialing x0(0)=1x_{0}(0)=1 (recall xi(0)=0x_{i}(0)=0 for i=1,,ni=1,\cdots,n), and

    2. 2.

      adding the ODE for x0x_{0}: x0=i=1nxix_{0}^{\prime}=-\sum_{i=1}^{n}x_{i}^{\prime}.

Note that x1x_{1} remains unchanged in the operation, so it still computes α\alpha.

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, x1x_{1} needs to compute some number α\alpha 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 x0x_{0}, such that its derivative cancels all changes to the population size by other variables. That is, x0=i=1nxix^{\prime}_{0}=-\sum_{i=1}^{n}x_{i}^{\prime}.

However, the resulting x0x_{0} is not CRN-implementable in general. As a result, it is not transformable to an LPP. The rationale is clear in the derivative of xix_{i}. In general, xix_{i}^{\prime} has the form

xi=piqixi,where p,q+.x_{i}^{\prime}=p_{i}-q_{i}\cdot x_{i},\quad\text{where $p,q\in\mathbb{P}^{+}$.}

A typical pip_{i} would contain at least one monomial mm. Evidently, x0mx_{0}\not\in m since the variable x0x_{0} is newly introduced. Then mm will contribute to a negative term in x0x_{0}^{\prime} and x0mx_{0}\not\in m, making x0x_{0} 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 x0x_{0} with every xix_{i}^{\prime} and introduce the following operation.

Operation 4 (Balancing Dilation, or “Garbage Collection” (“g-trick”)).

Let 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}) be a CRN-computable system, (i.e., every component xix_{i} is CRN-computable). Then the following operation (multiplying an unknown variable x0x_{0} determined by an ODE) produces a conservative CRN-implementable system.

{xi=(piqixi)x0,for i{1,,n}x0=i=1nxi.\begin{cases}x_{i}^{\prime}=(p_{i}-q_{i}\cdot x_{i})\cdot x_{0},\quad\text{for $i\in\{1,\cdots,n\}$}\\ x_{0}^{\prime}=-\sum_{i=1}^{n}x_{i}^{\prime}.\end{cases}

What makes the operation different from a normal time dilation operation is, the function x0x_{0} 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 λ\lambda-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 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}) be a CRN, then each xix_{i} has the form xi=piqixx_{i}^{\prime}=p_{i}-q_{i}x, where pi,qi+p_{i},q_{i}\in\mathbb{P}^{+}. We in introduce variables (we call them vv-variables) for each monomial as follows:

vi1,,in=x1i1x2i2xnin.v_{i_{1},\cdots,i_{n}}=x_{1}^{i_{1}}x_{2}^{i_{2}}\cdot x_{n}^{i_{n}}.

Specially, v1,0,,0=x1v_{1,0,\cdots,0}=x_{1}, v0,1,0,,0=x2v_{0,1,0,\cdots,0}=x_{2}, and so on. Note that we can rewrite pip_{i} and qiq_{i} in each xix_{i}^{\prime} with the vv-variables and denote them as PiP_{i} and QiQ_{i}. We can see that PiP_{i} and QiQ_{i} are of degree one in terms of the vv-variables.

Consider the system that contains the collection of all vi1,,inv_{i_{1},\cdots,i_{n}}’s. Notice that

vi1,,ik,,in\displaystyle v_{i_{1},\cdots,i_{k},\cdots,i_{n}}^{\prime} =k=1nx1i1xkik1xninxk\displaystyle=\sum_{k=1}^{n}x_{1}^{i_{1}}\cdots x_{k}^{i_{k}-1}\cdots x_{n}^{i_{n}}\cdot x_{k}^{\prime}
=k=1nvi1,,ik1,,in(PkQkxk)\displaystyle=\sum_{k=1}^{n}v_{i_{1},\cdots,i_{k}-1,\cdots,i_{n}}(P_{k}-Q_{k}x_{k})
=k=1nPkvi1,,ik1,,ink=1nQk(xkvi1,,ik1,,in)\displaystyle=\sum_{k=1}^{n}P_{k}v_{i_{1},\cdots,i_{k}-1,\cdots,i_{n}}-\sum_{k=1}^{n}Q_{k}(x_{k}\cdot v_{i_{1},\cdots,i_{k}-1,\cdots,i_{n}})
=k=1nPkvi1,,ik1,,in(k=1nQk)vi1,,ik,,in.\displaystyle=\sum_{k=1}^{n}P_{k}v_{i_{1},\cdots,i_{k}-1,\cdots,i_{n}}-\Big{(}\sum_{k=1}^{n}Q_{k}\Big{)}\cdot v_{i_{1},\cdots,i_{k},\cdots,i_{n}}.

Note that the vv-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 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}), we first apply the λ\lambda-trick to “make room” for a new variable x0x_{0}. That is, we choose a 0<λ<10<\lambda<1 and a constant 0<c<10<c<1, such that x1+λ(x2++xn)<1c.x_{1}+\lambda(x_{2}+\cdots+x_{n})<1-c. Then apply the one-trick and balancing dilation to get a cubic form:

  1. 1.

    Introduce a new variable x0x_{0}

  2. 2.

    Rewrite each pip_{i} (quadratic), qiq_{i} (linear) in xi=piqixix_{i}^{\prime}=p_{i}-q_{i}\cdot x_{i} to forms:

    • for a linear monomial in pip_{i} of the form axja\cdot x_{j}, apply the “one”-trick and rewrite it as axjk=0nxkax_{j}\sum_{k=0}^{n}x_{k}.

    • for a constant term in pip_{i} of the form aa, rewrite it as a(k=0nxk)(k=0nxk)a\cdot(\sum_{k=0}^{n}x_{k})\cdot(\sum_{k=0}^{n}x_{k}).

    • for a constant term aa in qiq_{i}, rewrite it as ak=0nxka\cdot\sum_{k=0}^{n}x_{k}.

    We call the resulting forms PiP_{i} and QiQ_{i} respectively.

  3. 3.

    Apply balancing dilation with x0x_{0}. The new system looks like

    {xi=(PiQixi)x0,for i=1,,nx0=i=1nxi.and {xi(0)=0,for i=1,,nx0(0)=1.\begin{cases}x_{i}^{\prime}=(P_{i}-Q_{i}x_{i})\cdot x_{0},\quad\text{for $i=1,\cdots,n$}\\ x_{0}^{\prime}=-\sum_{i=1}^{n}x_{i}^{\prime}.\end{cases}\quad\text{and }\begin{cases}x_{i}(0)=0,\quad\text{for $i=1,\cdots,n$}\\ x_{0}(0)=1.\end{cases}

    It is a TPP-implementable cubic form system. See the appendix for a full proof.

Proof.

(full)

Let 𝐱=(x1,,xn)\mathbf{x}=(x_{1},\dots,x_{n}) be a quadratic CRN-implementable system. Then we have xi=pixiqix_{i}^{\prime}=p_{i}-x_{i}q_{i} such that pi,qi+p_{i},q_{i}\in\mathbb{P}^{+} for i=1,,ni=1,\dots,n. Since the CRN is quadratic, it follows that deg(pi)2\deg(p_{i})\leq 2 and deg(qi)1\deg(q_{i})\leq 1 for i=1,,ni=1,\dots,n.

First, apply the λ\lambda-trick to shrink variables x2,,xnx_{2},\dots,x_{n}. Choose 0λ10\leq\lambda\leq 1 and a constant 0<c<10<c<1 , such that x1+λ(x2++xn)<1cx_{1}+\lambda(x_{2}+\cdots+x_{n})<1-c. Then perform the change of variables: x2λx2,,xnλxnx_{2}\leftarrow\lambda x_{2},\cdots,x_{n}\leftarrow\lambda x_{n}.

Next, we introduce a new variable x0x_{0} such that i=0nxi=1\sum_{i=0}^{n}x_{i}=1. Use this summation and the “one-trick” to ensure that every term in xix_{i}^{\prime} is quadratic for i=1,,ni=1,\dots,n. Once each x1,,xnx_{1}^{\prime},\dots,x_{n}^{\prime} is a quadratic form, we signify these changes by writing xi=PixiQix_{i}^{\prime}=P_{i}-x_{i}Q_{i} where Pi,Qi+P_{i},Q_{i}\in\mathbb{P}^{+}. Note that PiP_{i} is a quadratic form and QiQ_{i} is a linear form.

We can now perform time dilation with x0x_{0}. As a result, we have the cubic form system,

{xi=(PiQixi)x0,for i=1,,nx0=i=1nxi\begin{cases}x_{i}^{\prime}=(P_{i}-Q_{i}x_{i})\cdot x_{0},\quad\text{for $i=1,\dots,n$}\\ x_{0}^{\prime}=-\sum_{i=1}^{n}x_{i}^{\prime}\end{cases}

where we let x0(0)=1x_{0}(0)=1 and xi(0)=0x_{i}(0)=0 for i=1,,ni=1,\dots,n. Note that Pix0,Qix0+P_{i}x_{0},Q_{i}x_{0}\in\mathbb{P}^{+} and xix_{i} is in every negative term of xix_{i}^{\prime} for i=1,,ni=1,\dots,n. Some algebraic manipulation reveals that

x0=i=1nxi=i=1n(PiQixi)x0=i=1n(Qixix0Pix0).x_{0}^{\prime}=-\sum\limits_{i=1}^{n}x_{i}^{\prime}=-\sum\limits_{i=1}^{n}(P_{i}-Q_{i}x_{i})\cdot x_{0}=\sum\limits_{i=1}^{n}(Q_{i}x_{i}x_{0}-P_{i}x_{0}).

Clearly, Qix0,Pix0+Q_{i}x_{0},P_{i}x_{0}\in\mathbb{P}^{+} and x0x_{0} is in every negative term of x0x_{0}^{\prime}. Thus, 𝐱\mathbf{x}^{\prime} is CRN implementable.

Since x0x_{0} is a factor of every term in the cubic form 𝐱\mathbf{x}^{\prime} , xi3x_{i}^{3} is not a positive term of xix_{i}^{\prime} for i=1,,ni=1,\dots,n. For the case of x0x_{0}^{\prime}, recall that the positive terms of x0x_{0}^{\prime} come from the negative terms of x1,,xnx_{1}^{\prime},\dots,x_{n}^{\prime}. Given that every negative term of xix_{i}^{\prime} will have xix_{i} as a factor, every positive term of x0x_{0}^{\prime} will have at least one xix0x_{i}\neq x_{0} as a factor. Thus, x03x_{0}^{3} cannot occur as a positive term in x0x_{0}^{\prime}.

Hence, we have satisfied Corollary 4 to obtain a TPP-implementable cubic form system. ∎

Remark 14.

Note that in the above proof x0x_{0} is bounded from below, away from zero. We can observe that:

  1. 1.

    The variable x0x_{0} starts from 11 and remains greater than c>0c>0 for all tt. It will not introduce new equilibria.

  2. 2.

    The new system has at most a linear slowdown compared to the old system, since 0tx(0)dt>0tcdt=ct\int_{0}^{t}x(0)\mathop{}\!\mathrm{d}t>\int_{0}^{t}c\mathop{}\!\mathrm{d}t=ct.

The variable x0x_{0} acts like a source, distributing the total mass (sum =1=1) 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 𝐱=(x0,x1,,xn)\mathbf{x}=(x_{0},x_{1},\cdots,x_{n}) be the system resulting from the previous stage that computes a real number α\alpha with initial values x0=1x_{0}=1 and 0 otherwise. We consider the system (zi,j)(i,j)[n+1]2\big{(}z_{i,j}\big{)}_{(i,j)\in[n+1]^{2}} where zi,j=xixjz_{i,j}=x_{i}\cdot x_{j} and [n+1]={0,1,,n}[n+1]=\{0,1,\cdots,n\}. Let z0,0(0)=1z_{0,0}(0)=1 and 0 otherwise. The marked set Mz={z1,j|0jn}M_{z}=\{z_{1,j}|0\leq j\leq n\}. Then we can verify the zz-system is PP-implementable and the sum of the marked variables traces α\alpha. Check the appendix for a full proof. ∎

Proof.

(full)

Let 𝐱=(x0,x1,,xn)\mathbf{x}=(x_{0},x_{1},\dots,x_{n}) be the TPP-implementable cubic form system from Stage 22. Then we have

𝐱={xi=(PiQixi)x0,for i=1,,nx0=i=1nxi\mathbf{x}^{\prime}=\begin{cases}x_{i}^{\prime}=(P_{i}-Q_{i}x_{i})\cdot x_{0},\quad\text{for $i=1,\dots,n$}\\ x_{0}^{\prime}=-\sum_{i=1}^{n}x_{i}^{\prime}\end{cases}

where x1x_{1} computes some α\alpha and the system is initialized such that x0(0)=1x_{0}(0)=1 and 0 otherwise.

We construct our proof based on the “one trick” given by Observation 7,

i=0nxij=0nxj=11=1.\sum_{i=0}^{n}x_{i}\cdot\sum_{j=0}^{n}x_{j}=1\cdot 1=1.

We begin by defining a new variable vector, 𝐳\mathbf{z}. Introduce new variables zi,j=xixjz_{i,j}=x_{i}x_{j} for all (xi,xj)𝐱×𝐱(x_{i},x_{j})\in\mathbf{x}\times\mathbf{x}. To compute α\alpha, define the marked states as Mz={z1,j0jn}M_{z}=\{z_{1,j}\mid 0\leq j\leq n\}. Given 𝐱(0)\mathbf{x}(0), let z0,0(0)=1z_{0,0}(0)=1 and 0 otherwise.

Now, we find 𝐳\mathbf{z^{\prime}}. For all zi,j𝐳z_{i,j}\in\mathbf{z} we have zi,j=(xixj)=xixj+xixjz_{i,j}^{\prime}=(x_{i}x_{j})^{\prime}=x_{i}^{\prime}x_{j}+x_{i}x_{j}^{\prime}, where xi,xj𝐱x_{i}^{\prime},x_{j}^{\prime}\in\mathbf{x}^{\prime}. Recall that 𝐱\mathbf{x}^{\prime} consists of cubic forms. Therefore, xixj+xixjx_{i}^{\prime}x_{j}+x_{i}x_{j}^{\prime} is a quartic form in variable 𝐱\mathbf{x}. It follows from a change of variables from 𝐱\mathbf{x} to 𝐳\mathbf{z} that zi,jz_{i,j}^{\prime} is a quadratic form. For each zi,j𝐳z_{i,j}\in\mathbf{z}, we check conditions (i)(i) and (ii)(ii) of Theorem 3. There are three non-trivial cases.

Case 1: Assume zi,j=xixjz_{i,j}=x_{i}x_{j} such that i0i\neq 0 and j0j\neq 0. Then by the chain rule and substitution of 𝐱\mathbf{x}^{\prime}, we have

zi,j=xixj+xixj=(x0Pixix0Qi)xj+xi(x0Pjxjx0Qj).z_{i,j}^{\prime}=x_{i}^{\prime}x_{j}+x_{i}x_{j}^{\prime}=(x_{0}P_{i}-x_{i}x_{0}Q_{i})\cdot x_{j}+x_{i}\cdot(x_{0}P_{j}-x_{j}x_{0}Q_{j}).

We then distribute and group terms by their sign to obtain:

zi,j=(xjx0Pi+xix0Pj)(xixjx0Qi+xixjx0Qj)z_{i,j}^{\prime}=(x_{j}x_{0}P_{i}+x_{i}x_{0}P_{j})-(x_{i}x_{j}x_{0}Q_{i}+x_{i}x_{j}x_{0}Q_{j})

Note that we can factor (xixj)(x_{i}x_{j}) from every negative term,

zi,j=(xjx0Pi+xix0Pj)(xixj)(x0Qi+x0Qj).z_{i,j}^{\prime}=(x_{j}x_{0}P_{i}+x_{i}x_{0}P_{j})-(x_{i}x_{j})(x_{0}Q_{i}+x_{0}Q_{j}).
zi,j\displaystyle z_{i,j}^{\prime} =(xjx0Pi+xix0Pj)(xixj)(x0Qi+x0Qj)\displaystyle=(x_{j}x_{0}P_{i}+x_{i}x_{0}P_{j})-(x_{i}x_{j})(x_{0}Q_{i}+x_{0}Q_{j})
=(z0,jPi+z0,iPj)zi,j(x0Qi+x0Qj)\displaystyle=(z_{0,j}P_{i}+z_{0,i}P_{j})-z_{i,j}\cdot(x_{0}Q_{i}+x_{0}Q_{j})

and the terms PiP_{i}, PjP_{j}, x0Qix_{0}Q_{i}, and x0Qjx_{0}Q_{j} can be further written into linear form of {zi,j}i,j\{z_{i,j}\}_{i,j}’s. We will not repeat these argument in the rest of the proof, though.

The above implies zi,jz_{i,j} is a factor of every negative term. Also, since x0x_{0} can be factored from every positive term, we cannot have a positive zi,j2z_{i,j}^{2} (recall that i,ji,j are nonzero). Thus, conditions (i)(i) and (ii)(ii) are satisfied.

Case 2: Assume z0,jz_{0,j} such that j0j\neq 0. From the chain rule and substituting equations from 𝐱\mathbf{x}^{\prime}, we have

z0,j=x0xj+x0xj=i=1n(xix0Qix0Pi)xj+x0(x0Pjxjx0Qj)z_{0,j}^{\prime}=x_{0}^{\prime}x_{j}+x_{0}x_{j}^{\prime}=\sum\limits_{i=1}^{n}(x_{i}x_{0}Q_{i}-x_{0}P_{i})\cdot x_{j}+x_{0}\cdot(x_{0}P_{j}-x_{j}x_{0}Q_{j})

Distribute and group terms by their sign to obtain,

z0,j=x02Pj+i=1nxixjx0Qi(xjx02Qj+i=1nx0xjPi)z_{0,j}^{\prime}=x_{0}^{2}P_{j}+\sum\limits_{i=1}^{n}x_{i}x_{j}x_{0}Q_{i}-(x_{j}x_{0}^{2}Q_{j}+\sum\limits_{i=1}^{n}x_{0}x_{j}P_{i})

Note that we can factor (x0xj)(x_{0}x_{j}) from every negative term,

z0,j=x02Pj+i=1nxixjx0Qi(xjx0)(x0Qj+i=1nPi)z_{0,j}^{\prime}=x_{0}^{2}P_{j}+\sum\limits_{i=1}^{n}x_{i}x_{j}x_{0}Q_{i}-(x_{j}x_{0})(x_{0}Q_{j}+\sum\limits_{i=1}^{n}P_{i})

which implies z0,jz_{0,j} is a factor of every negative term. Suppose a positive term in z0,jz^{\prime}_{0,j} has the monomial (x0xj)2(x_{0}x_{j})^{2}. By carefully choosing the change of variable (i.e., choose zj,jz0,0z_{j,j}z_{0,0}, not z0,j2z_{0,j}^{2}), we satisfy condition (ii)(ii). If there is no positive term in z0,jz^{\prime}_{0,j} with the monomial (x0xj)2(x_{0}x_{j})^{2}, then condition (ii)(ii) is met. Then, both conditions (i)(i) and (ii)(ii) are met.

Case 3: Assume z0,0z_{0,0}. With the chain rule and substitution, we have

z0,0=2x0x0=2x0i=1n(x0xiQix0Pi)z_{0,0}^{\prime}=2x_{0}\cdot x_{0}^{\prime}=2x_{0}\cdot\sum\limits_{i=1}^{n}(x_{0}x_{i}Q_{i}-x_{0}P_{i})

Distributing and grouping terms by their sign yields,

z0,0=i=1n(2x02xiQi)i=1n(2x02Pi)z_{0,0}^{\prime}=\sum\limits_{i=1}^{n}(2x_{0}^{2}x_{i}Q_{i})-\sum\limits_{i=1}^{n}(2x_{0}^{2}P_{i})

Since x02x_{0}^{2} can be factored from every negative term, condition (i)(i) is satisfied. Since i=1,,ni=1,\dots,n, it follows that xix0x_{i}\neq x_{0}. Thus, condition (ii)(ii) is satisfied.

In summary, we have defined the states 𝐳\mathbf{z}, marked states M𝐳M_{\mathbf{z}}, initial configuration 𝐳(0)\mathbf{z}(0), and differential system 𝐳\mathbf{z^{\prime}}. Furthermore, for each zi,j𝐳z_{i,j}^{\prime}\in\mathbf{z^{\prime}} we have established: each zi,jz_{i,j}^{\prime} is a quadratic form, zi,jz_{i,j}^{\prime} can be written to avoid a positive zi,j2z_{i,j}^{2} in zi,jz_{i,j}^{\prime}, and the existence of zi,jz_{i,j} in every negative term of zi,jz_{i,j}^{\prime}. Hence, a TPP-implementable cubic form system can be transformed into a PP-implementable system that computes α\alpha.

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 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}) be a PP-implementable quadratic form. We denote the derivative xix_{i} as

xi=piqixi,i=1,2,,n,x_{i}^{\prime}=p_{i}-q_{i}x_{i},\quad{i=1,2,\cdots,n,} (8)

where pip_{i} is a quadratic form and qiq_{i} is a linear form.

We will apply the ε\varepsilon-trick (Operation 1) to shrink the coefficient of the above system, where ε\varepsilon\in\mathbb{Q} is an undetermined parameter. In order to align with the form in Equation (7), we add and subtract a term 2xi2x_{i}. Now the system has the form

xi\displaystyle x_{i}^{\prime} =ε(piqixi)+2xi2xi,i=1,2,,n.\displaystyle=\varepsilon(p_{i}-q_{i}x_{i})+2x_{i}-2x_{i},\quad{i=1,2,\cdots,n.} (9)
=fi(𝐱),denote fi(𝐱)=ε(piqixi)+2xi.\displaystyle=f_{i}(\mathbf{x}),\quad\text{denote $f_{i}(\mathbf{x})=\varepsilon(p_{i}-q_{i}x_{i})+2x_{i}$.} (10)

We then use the one-trick to rewrite fi(𝐱)=ε(piqixi)+2xij=1nxjf_{i}(\mathbf{x})=\varepsilon(p_{i}-q_{i}x_{i})+2x_{i}\sum_{j=1}^{n}x_{j}. Note that the term brings in 2xixj2x_{i}x_{j} for j=1,,nj=1,\cdots,n. We will then pick ε\varepsilon sufficiently small

  1. 1.

    to ensure the 2xixj2x_{i}x_{j} terms dominate the monomials in qxi-qx_{i} such that fi(𝐱)+f_{i}(\mathbf{x})\in\mathbb{P}^{+} for all ii.

  2. 2.

    and to ensure

    i,jk𝐶(xjxk,fi)41andi,j𝐶(xj2,fi)21\frac{\sum_{i,j\not=k}\mathop{C}(x_{j}x_{k},f_{i})}{4}\leq 1\quad\text{and}\quad\frac{\sum_{i,j}\mathop{C}(x_{j}^{2},f_{i})}{2}\leq 1 (11)

    where 𝐶(xjxk,fi)\mathop{C}(x_{j}x_{k},f_{i}) denotes the coefficient of xjxkx_{j}x_{k} in fif_{i}, and i,j,k{1,,n}i,j,k\in\{1,\cdots,n\}.

Next, we construct a rule set for a PLPP. For an ordered pair (xj,xk)(x_{j},x_{k}) and a term αi,j,kxjxk\alpha_{i,j,k}x_{j}x_{k} in fi(𝐱)f_{i}(\mathbf{x}) we do the following:

  • If j=kj=k, add a rule (xj,xj)αi,j,k2(xi,xi);(x_{j},x_{j})\to\frac{\alpha_{i,j,k}}{2}(x_{i},x_{i});

  • otherwise, add two rules (xj,xk)αi,j,k4(xi,xi)(x_{j},x_{k})\to\frac{\alpha_{i,j,k}}{4}(x_{i},x_{i}) and (xk,xj)αi,j,k4(xi,xi);(x_{k},x_{j})\to\frac{\alpha_{i,j,k}}{4}(x_{i},x_{i});

  • In the above rules, if s=i=1nαi,j,k<1s=\sum_{i=1}^{n}\alpha_{i,j,k}<1 for an order pair (k,l)(k,l), we add an idle reaction

    (xj,xk)(1s)(xj,xk);(x_{j},x_{k})\to(1-s)(x_{j},x_{k});

If a term xjxkx_{j}x_{k} appears in fi(𝐱)f_{i}(\mathbf{x}), it implies that the pair (xj,xk)(x_{j},x_{k}) will produce xix_{i}. We use the all-in greedy strategy, that is, we produce two xix_{i}’s and let the pair (xk,xj)(x_{k},x_{j}) do the same. So we need to divide the coefficient αi,j,k\alpha_{i,j,k} by 4 for jkj\not=k; yet, when k=jk=j 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 𝐱=(x1,x2,,xn)\mathbf{x}=(x_{1},x_{2},\cdots,x_{n}) be a quadratic system satisfying i=1nxi=1\sum_{i=1}^{n}x_{i}=1. 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 fi(𝐱)=ε(piqixi)+2xij=1nxjf_{i}(\mathbf{x})=\varepsilon(p_{i}-q_{i}x_{i})+2x_{i}\sum_{j=1}^{n}x_{j}. Consider an arbitrary ordered pair (xj,xk)(x_{j},x_{k}). We need to show that in the construction:

  1. 1.

    The selection of ε\varepsilon satisfying the two conditions is always possible.

  2. 2.

    The rule set generated by the construction forms an PLPP. Specifically, for the ordered pair (xj,xk)(x_{j},x_{k}), we must show that i=1nαi,j,k\sum_{i=1}^{n}\alpha_{i,j,k} =1 and αi,j,k>0\alpha_{i,j,k}>0 for all ii. That is, the αi,j,k\alpha_{i,j,k}’s form a discrete probability measure with j,kj,k fixed.

We break the proof into two cases:

  • Case jkj\not=k: The term xjxkx_{j}x_{k} occurs in fi(𝐱)f_{i}(\mathbf{x}) from two sources.

    • Case 1: xjxkε(piqixi)x_{j}x_{k}\in\varepsilon(p_{i}-q_{i}x_{i}). The coefficients of such terms for all ii must sum to zero, since the system is assumed to be PP-implemetable.

    • Case 2: xjxk2xi(x1++xn)x_{j}x_{k}\in 2x_{i}(x_{1}+\cdots+x_{n}). We have two sources: xjxkx_{j}x_{k} occurs in fj(𝐱)f_{j}(\mathbf{x}) as a term in 2xj(x1+xk++xn)2x_{j}(x_{1}+\cdots x_{k}+\cdots+x_{n}) and similarly in fk(𝐱)f_{k}(\mathbf{x}) as a term in 2xk(x1+xj++xn)2x_{k}(x_{1}+\cdots x_{j}+\cdots+x_{n}).

    The sum of these coefficients is 44. Note that the coefficients are divided by 4 in the construction, which ensures the resulting sum of αi,j,k\alpha_{i,j,k} is one. One can verify that the selection of ε\varepsilon is always possible under this case.

Case j=kj=k: For term xj2x_{j}^{2}, which occurs in fi(𝐱)f_{i}(\mathbf{x}), there are two subcases:

  • iji\not=j: Then xj2εpix_{j}^{2}\in\varepsilon p_{i} and the coefficient must be positive.

  • i=ji=j: Then xj2=xi2εq+2xik=0nxkx_{j}^{2}=x_{i}^{2}\in-\varepsilon q+2x_{i}\sum_{k=0}^{n}x_{k} and coefficient is less than 2. (xj2=xi2x_{j}^{2}=x_{i}^{2} can not occur in εp\varepsilon p since the system is PP-implementable.)

Recall that when constructing the rule set, the coefficients are divided by 2. As a result, generated αi,j\alpha_{i,j}’s are positive and less than 1. Due to the system’s conservative nature, the coefficients xj2x_{j}^{2} in ε(piqixi)\varepsilon(p_{i}-q_{i}x_{i}) for ii’s in {1,,n}\{1,\cdots,n\} will sum to zero. Since the 2xjk=1nxk2x_{j}\sum_{k=1}^{n}x_{k} term introduces a 2xj22x_{j}^{2} term, the resulting coefficient sum for xj2x_{j}^{2} is 22. In the construction, these coefficients are always divided by 2 to generate αi,j\alpha_{i,j} in fi(𝐱)f_{i}(\mathbf{x}). Thus, the i=1nαi,j=1\sum_{i=1}^{n}\alpha_{i,j}=1. One can then verify that the selection of ε\varepsilon is feasible.

In contrast, assume the system is not PP-implementable. Then there is an xi2εpix_{i}^{2}\in\varepsilon p_{i} with a positive coefficient. Once combined with the term 2xi22xik=1nxk2x_{i}^{2}\in 2x_{i}\sum_{k=1}^{n}x_{k}, the sum of coefficients will be greater than two. Then dividing by 2 will generate an αi,i>1\alpha_{i,i}>1, which is not permitted by PLPPs. Hence, the selection of ε\varepsilon is not feasible in this case. ∎

The following theorem can help in transforming a PLPP to an LPP.

Theorem 17 ([6], Lemma 4).

Let ν[0,1]\nu\in[0,1] , and assume that there exists a PLPP computing ν\nu, with rational probabilities. Then there exists a (deterministic) LPP computing ν\nu.

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 π4\frac{\pi}{4}, e1e^{-1}, Euler’s γ\gamma, 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 G=120tcosht𝑑t.G=\frac{1}{2}\int_{0}^{\infty}\frac{t}{\cosh{t}}dt. We have

G\displaystyle G =0tet+et𝑑t,since cosh(t)=et+et2\displaystyle=\int_{0}^{\infty}\frac{t}{e^{t}+e^{-t}}dt,\quad\text{since $cosh(t)=\frac{e^{t}+e^{-t}}{2}$}
=0(tet)11+e2t𝑑t.\displaystyle=\int_{0}^{\infty}(t\cdot e^{-t})\cdot\frac{1}{1+e^{-2t}}dt.

We let

R=tet,E=et,V=e2t1+e2t,R=t\cdot e^{-t},\quad E=e^{-t},\quad V=\frac{e^{-2t}}{1+e^{-2t}},

and

G(t)=0t(tet)11+e2t𝑑t=0tR(1V)𝑑t.G(t)=\int_{0}^{t}(te^{-t})\cdot\frac{1}{1+e^{-2t}}dt=\int_{0}^{t}R\cdot(1-V)dt.

Taking derivatives against tt, we get

{G=R(1V)R=ERE=EV=(1V)2(2E2),{G(0)=0R(0)=0E(0)=1V(0)=12.\begin{cases}G^{\,\prime}=R(1-V)\\ R^{\,\prime}=E-R\\ E^{\,\prime}=-E\\ V^{\,\prime}=(1-V)^{2}\cdot(-2E^{2}),\end{cases}\quad\begin{cases}G(0)=0\\ R(0)=0\\ E(0)=1\\ V(0)=\frac{1}{2}.\end{cases}

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 π4\frac{\pi}{4} 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”) kk-PP with restrictions on reactions (the product of a reaction must either be all black or all white), can compute algebraic numbers such as 352\frac{3-\sqrt{5}}{2} but not rational numbers like 15\frac{1}{5}. 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 α\alpha, 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 λ\lambda-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.