Professional Documents
Culture Documents
10.1007@978 3 030 26807 7
10.1007@978 3 030 26807 7
)
LNCS 11648
Founding Editors
Gerhard Goos
Karlsruhe Institute of Technology, Karlsruhe, Germany
Juris Hartmanis
Cornell University, Ithaca, NY, USA
123
Editors
Chris Thachuk Yan Liu
California Institute of Technology Arizona State University
Pasadena, CA, USA Tempe, AZ, USA
This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
Preface
This volume contains the papers presented at DNA 25: the 25th International
Conference on DNA Computing and Molecular Programming. The conference was
held at the University of Washington in Seattle, Washington, USA during August 5–9,
2019, and was organized under the auspices of the International Society for Nanoscale
Science, Computation, and Engineering (ISNSCE). The DNA conference series aims to
draw together researchers from the fields of mathematics, computer science, physics,
chemistry, biology, and nanotechnology to address the analysis, design, and synthesis
of information-based molecular systems.
Papers and presentations were sought in all areas that relate to biomolecular
computing, including, but not restricted to: algorithms and models for computation on
biomolecular systems; computational processes in vitro and in vivo; molecular
switches, gates, devices, and circuits; molecular folding and self-assembly of
nanostructures; analysis and theoretical models of laboratory techniques; molecular
motors and molecular robotics; information storage; studies of fault-tolerance and error
correction; software tools for analysis, simulation, and design; synthetic biology and
in vitro evolution; and applications in engineering, physics, chemistry, biology, and
medicine. Authors who wished to orally present their work were asked to select one of
two submission tracks: Track A (full paper) or Track B (one-page abstract with
supplementary document). Track B is primarily for authors submitting experimental
results who plan to submit to a journal rather than publish in the conference pro-
ceedings. We received 39 submissions for oral presentations: 19 submissions to
Track A and 20 submissions to Track B. Each submission was reviewed by at least four
reviewers, with an average of five reviewers per paper. The Program Committee
accepted 12 papers for Track A and 13 papers for Track B. Additionally, the Program
Committee reviewed and accepted 61 submissions to Track C (poster) and selected
seven for short oral presentation. This volume contains the papers accepted for
Track A.
To commemorate the 25th anniversary of the conference, Microsoft Research
sponsored a special session on Thursday that included a panel discussion and reception.
The conference concluded with a Molecular Technology Day on Friday consisting of
invited and contributed talks.
We express our sincere appreciation to our invited speakers, Leonard Adleman,
David Baker, Michael Elowitz, Dana Randall, Anne Shiu, and Erik Winfree, our
invited Molecular Technology Day speakers, Kate Adamal, Andy Ellington, Jocelyn
Kishi, and Jeff Nivala, and our panelists. We especially thank all of the authors who
contributed papers to these proceedings, and who presented papers and posters during
the conference. Last but not least, the editors thank the members of the Program
Committee and the additional invited reviewers for their hard work in reviewing the
papers and providing constructive comments to authors.
Steering Committee
Anne Condon (Chair) University of British Columbia, Canada
Luca Cardelli University of Oxford, UK
Masami Hagiya University of Tokyo, Japan
Natasha Jonoska University of South Florida, USA
Lila Kari University of Waterloo, Canada
Chengde Mao Purdue University, USA
Satoshi Murata Tohoku University, Japan
John Reif Duke University, USA
Grzegorz Rozenberg University of Leiden, The Netherlands
Nadrian Seeman New York University, USA
Friedrich Simmel Technical University of Munich, Germany
Andrew Turberfield University of Oxford, UK
Hao Yan Arizona State University, USA
Erik Winfree California Institute of Technology, USA
Program Committee
Chris Thachuk (Co-chair) California Institute of Technology, USA
Yan Liu (Co-chair) Arizona State University, USA
Mark Bathe Massachusetts Institute of Technology, USA
Robert Brijder Hasselt University, Belgium
Yuan-Jyue Chen Microsoft Research, Redmond, USA
Anne Condon University of British Columbia, Canada
Mingjie Dai Harvard University, USA
David Doty University of California, Davis, USA
Andre Estevez-Torres CNRS, France
Elisa Franco University of California, Los Angeles, USA
Cody Geary Aarhus University, Denmark
Anthony J. Genot CNRS, France and University of Tokyo, Japan
Manoj Gopalkrishnan India Institute of Technology, Bombay, India
Elton Graugnard Boise State University, USA
Masami Hagiya University of Tokyo, Japan
Rizal Hariadi Arizona State University, USA
Natasha Jonoska University of South Florida, USA
Lila Kari University of Waterloo, Canada
Yonggang Ke Emory University, USA
Matthew R. Lakin University of New Mexico, USA
Chenxiang Lin Yale University, USA
Satoshi Murata Tohoku University, Japan
viii Organization
Additional Reviewers
Sponsors
Erik Winfree(B)
1 Introduction
Can a cell solve Sudoku? While few would take seriously the prospect of whether
an individual E. coli could beat the puzzle page of the Daily Mail, this question
of principle has significant implications. Sudoku, when generalized, is a par-
ticularly relatable example of an NP-complete problem, and it has been effec-
tively used to illustrate methods to solve constraint satisfaction problems [1,2]
as well as to explore neural computing architectures underlying natural intel-
ligence [3,4]. So our real question is whether 1 cubic micron of biochemistry
could efficiently implement the kinds of algorithms necessary to solve difficult
problems like Sudoku, and if so, how? An answer to this more general question
could be valuable for engineering a future artificial cell that makes the most of
its limited computing resources to get by in the world; it may conceivably also
provide new perspectives on the principles exploited by naturally evolved cells
to solve the problems they encounter during their lives.
?
We will use the P = NP question to frame our discussion [5]. Informally, P
is the class of problems that are solvable in polynomial time (with respect to
c Springer Nature Switzerland AG 2019
C. Thachuk and Y. Liu (Eds.): DNA 25, LNCS 11648, pp. 1–20, 2019.
https://doi.org/10.1007/978-3-030-26807-7_1
2 E. Winfree
Let’s call this programming by recognition: rather than specifying all the
details of an algorithm for how to find a solution, the programmer just provides
a simpler specification for how to recognize a solution. This is in fact a central
idea for constraint logic programming languages, such as Prolog and CLP,
where the programmer concerns himself with what (easy to check) constraints
define the solution that is being sought, and standardized methods are used to
find the solution [6]. Programs in such languages often don’t have guarantees on
run times, but when done carefully, they can often find solutions effectively.
From this perspective, CircuitSatisfiability can be viewed as a very low-
level constraint logic programming language, and along with more powerful gen-
eralizations such as satisfiability modulo theories, Boolean satisfiability solvers
are now used routinely in industry [7–10]. While carefully-crafted deterministic
algorithms remain the dominant general-purpose methods for solving Boolean
constraint problems, for many years a broad class of hard problems were best
solved by surprisingly simple stochastic algorithms that perform biased random
walks through the space of potential solutions [11–14]. This observation posi-
tions stochastic local search as a viable engine to power systems designed using
the programming by recognition paradigm.
There is ample evidence for programming by recognition in biology, suggest-
ing that it provides evolutionary advantages as a system architecture. A classic
example occurs during Eukaryotic cell division, when it becomes necessary to
move one copy of each chromosome to polar opposite sides of the cell. Since
the interior of a cell can be chaotic, this poses the problem of how to find each
chromosome, prior to pushing them into place. Nature’s solution is to grow
microtubules bridging pairs of chromosomes, using a “search and capture” app-
roach [15] whereby microtubules grow in all directions but are stabilized only
when they recognize their proper target. The search involves stochastic explo-
ration and energetically expensive mechanisms such as “dynamic instability”
that alternate fast growth with fast depolymerization, which has been shown to
be a more effective algorithm than a passive and energetically-neutral random
walk of polymer length [16]. Compared to a hypothetical deterministic molec-
ular algorithm for solving the same problem (“take a left at the endoplasmic
reticulum...”), the stochastic “search and capture” algorithm presumably has
the advantages that it is simpler to encode genetically, more robust, and thus
more easily evolvable [17,18]. Moving to a higher level of biological organiza-
tion, a second classic example is learning, which often involves a biased random
walk through parameter space that recognizes when good performance has been
achieved [19,20]. As before, there are advantages: organisms that learn can have
smaller genomes, are more robust, and can evolve faster than organisms with
hard-coded circuity [21]. Indeed, evolution itself exhibits some characteristics of
programming by recognition – if survival is the ultimate form of recognition.
Our interest here is to explore programming by recognition as a paradigm for
engineering circuits within artificial cells that exploit the natural stochasticity
of molecular interactions to provide efficient solutions to hard problems that the
cell might encounter. For simplicity, we ignore the geometric factors present in
4 E. Winfree
the motivating example of cell division and instead focus on well-mixed chemical
reaction networks involving a finite number of species in a finite volume. This
choice is attractive not only for its mathematical simplicity, but also because it
can be considered a programming language for engineering molecular systems
using dynamic DNA nanotechnology [22–25].
We will use the standard model for formal chemical reaction networks (CRNs)
with discrete stochastic semantics for mass-action kinetics [26]. A CRN is spec-
ified by a finite set of species, e.g. {A, B, C, . . . , X, Y, Z} and a finite set of
k k k k
reactions, e.g. {A + B →1 B, X + A →2 C, Y →3 A + C, A →4 B}, where ki are the
stochastic rate constants with respect to an implicitly given reaction volume.
The state of the CRN at time t is given by the discrete counts of each species,
which we will refer to (with a mild abuse of notation) as At , Bt , etc. The propen-
sity ρi of a reaction i at time t gives the instantaneous rate of firing for that
reaction, and may be calculated as the product of ki and the current counts
of each reactant (if all reaction stoichiometries are 1), e.g. ρ1 (t) = k1 At Bt in
the example above. The total propensity ρ = i ρi is the sum over all reac-
tions. This implicitly defines a continuous time Markov chain (CTMC) with an
infinite state space (although, depending on the CRN and initial state, only a
finite subset may be reachable). In the standard stochastic simulation algorithm
(SSA), the time at which the next reaction occurs is chosen from an exponential
distribution with mean 1/ρ, and at this time, the reaction that occurs is reaction
i with probability ρi /ρ. Simulation continues until a fixed time is exceeded, or a
state is reached where ρ = 0.
Since our central thesis is that stochastic chemical kinetics allow surprisingly
effective problem-solving, it is worth reviewing how stochastic chemical kinetics
(appropriate for a finite volume containing discrete counts of each species) differs
from the more familiar deterministic chemical kinetics (which models a hypo-
thetical well-mixed but infinite volume where real-valued concentrations are the
appropriate measure and ordinary differential equations provide the appropriate
dynamics). I will offer six perspectives.
Noisy behavior. The classical view is that stochastic CRNs are just noisy
versions of deterministic CRNs. There are senses in which this is true. For
non-explosive CRNs [27], if the volume V of a stochastic CRN is scaled up
while keeping the initial concentrations of each species constant, then for
chosen time t, the concentrations in the stochastic model approach the con-
centrations in the deterministic model [28]. This is a Central Limit Theorem
result, that is, Xt approaches a Gaussian with coefficient of variation shrink-
ing with V . But it is not a uniform convergence: to ensure that the stochastic
CRN’s concentrations are likely within a certain percentage of the determin-
istic CRN, V may have to grow with t (depending on the specific CRN).
Chemical Reaction Networks and Stochastic Local Search 5
That was only five. The sixth perspective – that stochastic CRNs inher-
ently perform stochastic local search – is developed in the rest of this
paper.
• Each wire in the circuit is named, and for each wire X we use two species,
X0 and X1.
• Initially, and for all time thereafter, there will be one molecule per wire, i.e.
X0t + X1t = 1.
• For each gate Z = g(X, Y ) where g is a Boolean function, the four reactions
are
where Z(0) ≡ Z0, Z(1) ≡ Z1, and all rate constants are identical, say k.
Chemical Reaction Networks and Stochastic Local Search 7
In other words, for each input case for the gate, there are reactions that
catalytically convert an incorrect output species into a correct output species. It
will be convenient to associate full states of the CRN, in which there are exactly
one molecule for each wire, with assignments of Boolean values to each wire, in
the obvious way. We can generalize this to partial assignments, so that e.g. for
circuit input x, Wires[x] refers to any full state of the CRN such that the species
representing input wires have the specified values, while other species have arbi-
trary counts consistent with the one-molecule-per wire constraint. Similarly, for
circuit output y, Wires[y] refers to any full state of the CRN such that the
output species have the specified values, and other species are unconstrained.
Proof. Since c is feedforward, we can order the gates such that their inputs
are always either prior gates or inputs to the circuit. Because each reaction is
catalytic in the gate inputs, once all wires prior to a gate are correct, they will
never change again. That gate will become correct with expected time 1/k. Thus,
all M wires will be correct within expected time O(M/k).
4 Formula Satisfiability
The computer science community has converged not on circuit satisfiability
problems, but on formula satisfiability problems as the standard for Boolean
logic constraint solvers. Circuit satisfiability problems can be translated to for-
mula satisfiability problems with little overhead; in fact, even when limited to
clauses with no more than three literals each – i.e. 3-SAT – the problem is still
NP-complete. Such simple building blocks facilitate analysis and constructions.
Figure 2(A) illustrates how to construct stochastic CRN FormulaSATCRN[f ]
that solves 3-SAT formula f using the same principles as for circuit satisfiabil-
ity, but now using just 2N species and 3M reactions, where f has N variables
and M clauses. A sample run is shown in Fig. 2(B). This CRN has similar mer-
its and demerits as the circuit satisfiability CRN: in theory, it is guaranteed to
eventually find a solution if one exists; in practice, you’re not likely to have the
patience to watch it try to solve a hard problem with 100 variables.
1
The sequence of reactions identified in the proof will have a positive probability of
occurring next, specifically, at least (12M + L)−(N +M ) . This provides an exponential
bound on the expected time to halt, to wit, less than (12M +L)N +M /k +(N +M )/k.
But is that useful?
Chemical Reaction Networks and Stochastic Local Search 9
Fig. 2. (A) Solving 3-SAT problems with stochastic CRNs. Red reactions cor-
respond to the red clause; blue reactions correspond to the blue clause; green reaction
correspond to the green clause. The (N = 20, M = 24) formula illustrated here was
once solved on a DNA computer [44], although variables have been renamed. (B)
Space-time history of a 3-SAT run. Species are arranged vertically; each column
of 40 pixels corresponds to the state of the CRN before or after each reaction fires;
black if the species count is 0, grey if the species count is 1 but that disagrees with the
solution eventually found, white if the species count is 1 and it agrees with the solution
eventually found. At the end of time, the CRN has gone extinct. (Color figure online)
2
A straightforward adaptation of the previous argument works for a closely related
CRN that is identical to WalkSATCRN[f ] except that species tryX0 and tryX1
are conflated as tryX for each variable X. This CRN should work similarly, as the
main difference is merely that a variable being flipped now might spontaneously
revert. But it is not the CRN that I simulated.
12 E. Winfree
there is considerable scatter in the times taken to solve different instances. The
vertical scatter (the CRN time) is due not only to the variability in the problem
instance, but also due to variability in the CRN’s stochastic local search pro-
cess – solving the same large instance multiple times reveals a timing standard
deviation nearly equal to the mean. (In contrast, Mathematica’s solver exhibited
only 3% variation when re-solving the same problem, which was presumably due
to background processes in the operating system.) The CRN simulator clearly
has a substantial overhead: for small (N = 50) problems, the average CRN time
is about a third of a second, while Mathematica solves most problems in little
more than a millisecond. Despite this, the CRN becomes more efficient for larger
problems, eventually out-performing Mathematica on the largest (N = 500)
instances. Here, the CRN is taking on average about 5 minutes, while Mathe-
matica is averaging at over two hours. For this N , the CRN has roughly 10,000
reactions.
Today’s best SAT-solvers can beat random 3-SAT problems with α = 4.267
and N > 5000 in under an hour [9]. I have not tried it, but I don’t presume
the WalkSATCRN[f ] simulation would be anywhere close to being compet-
itive. The take-home message is not that simulating a CRN is a good way to
solve SAT problems – I don’t think it is – but rather that stochastic local search
comes fairly naturally to CRNs, and they are not incredibly bad at it. For a
given SAT problem, the size of the CRN is linear in the number of variables and
clauses (specifically, 4M +2N ) and the volume required to store one molecule per
wire is just O(N ). (Note, however, that for a DNA strand displacement imple-
mentation, one DNA fuel complex would be required for each time a reaction
fires, entailing a ridiculously unrealistic overhead since solving SAT problems
of the scale shown in Fig. 3(B) involves millions or billions of reaction events.
For fuel-efficient SAT-solving CRNs, see the beautiful papers by Thachuk and
colleagues [52–54]; their CRNs effectively implement a brute-force enumeration
method, but using reversible reactions within polynomial volume.)
Fig. 5. Sudoku. Left: The puzzle instance. Given the black digits, the remaining cells
must be filled in such that every 3 × 3 square has all digits 1 . . . 9, as does every row
and every column. Right: The solution to this puzzle, in red. (Color figure online)
6 Sudoku
This paper wouldn’t be complete without a return to the original question of
whether a cell could solve Sudoku. To take a first stab at answering that question,
note that the constraints of Sudoku can be expressed as a SAT formula [1,2].
Unfortunately, at least for the approach I used, the resulting formulas could
not be easily solved by WalkSATCRN[f ] simulations. This is perhaps not too
surprising; while the classical WalkSAT algorithm is effective for hard random
problems and many easy problems, on most “structured” problems, deterministic
algorithms that perform clever depth-first search, like MiniSAT, perform much
better [14].
Can stochastic CRNs also perform efficient depth-first search? It would be
easier – and nearly as effective – to repeatedly take random dives through the
search tree to a leaf, rather than to deterministically traverse each node exactly
once, which would require extra bookkeeping. Such a stochastic depth-first search
would bear some similarity to dynamic instability in microtubules’ search for
chromosomes [15,16]: the microtubule quickly grows in a random direction, mak-
ing random choices as it goes; if it is unsuccessful finding a chromosome, it even-
tually suffers a “catastophe” and rapidly contracts, then starts over... until it
finds a chromosome.
Based on this vision, we can construct a stochastic CRN to solve an arbitrary
Sudoku puzzle (Fig. 5). There are 93 species whose presence indicates that a spe-
cific digit may possibly be in a specific cell; another 93 that indicate it is definitely
not; another 92 that indicate that a cell’s value is known (i.e. only one digit may
be there); more that indicate it is unknown; and some additional bookkeeping
species, including F orward and Reverse. When F orward is present, a set of
reactions quickly enforce logical constraints among the species; more slowly, a
cell with few options will spontaneously choose one, thus descending the search
tree. If a contradiction is noted, a reaction will convert F orward to Reverse,
and the logic bookkeeping will dissolve... to be rebuilt when Reverse switches to
Chemical Reaction Networks and Stochastic Local Search 17
F orward again. The CRN has roughly 35, 000 reactions, and solves all available
Sudoku problems in under half an hour, including the hardest ones on Gordon
Royle’s list [58].
The number of reactions in the Sudoku CRN is within an order of magnitude
of existing whole-cell models of bacteria [59]. So maybe we could conceive of
a bacterial-sized artificial cell that implemented that many reactions. However,
successfully solving hard Sudoku puzzles involves many dives into the search tree
and many millions or billions of reaction events. Even assuming rate constants on
the order of 1 per second, that would take many days or years. E. coli reproduces
in 20 min. So no, it seems that cells are unlikely to be successful solving Sudoku.
7 Discussion
Nonetheless, we may have learned something during this somewhat stochastic
exploration of ideas. Foremost in my mind is that the stochasticity inherent
in CRNs provides a natural engine for stochastic local search and thus pro-
gramming by recognition – the hallmark algorithmic architecture defining NP
problems. The architecture is robust and flexible, pivoting seamlessly from effi-
cient solution of easy problems to relatively efficient solution of hard problems,
naturally accommodating memory, inference, self-healing, and homeostasis with
respect to constraints.
Software. Mathematica packages and notebooks for the CRN simulator, SAT-
solving CRN constructions, and Sudoku solver can be found on the author’s
website [60].
References
1. Simonis, H.: Sudoku as a constraint problem. In: Proceedings of the 4th Interna-
tional Workshop on Modelling and Reformulating Constraint Satisfaction Prob-
lems, vol. 12, pp. 13–27 (2005)
2. Lynce, I., Ouaknine, J.: Sudoku as a SAT problem. In: Proceedings of the 9th
International Symposium on Artificial Intelligence and Mathematics (AIMATH)
(2006)
3. Hopfield, J.J.: Searching for memories, Sudoku, implicit check bits, and the iter-
ative use of not-always-correct rapid neural computation. Neural Comput. 20,
1119–1164 (2008)
4. Jonke, Z., Habenschuss, S., Maass, W.: Solving constraint satisfaction problems
with networks of spiking neurons. Front. Neurosci. 10, 118 (2016)
5. Garey, M.R., Johnson, D.S.: Computers and Intractability. W. H. Freeman and
Company, New York (1979)
18 E. Winfree
6. Jaffar, J., Maher, M.J.: Constraint logic programming: a survey. J. Logic Program.
19, 503–581 (1994)
7. Vardi, M.Y.: Boolean satisfiability theory and engineering. Commun. ACM 57, 5
(2014)
8. Järvisalo, M., Le Berre, D., Roussel, O., Simon, L.: The international SAT solver
competitions. AI Mag. 33, 89–92 (2012)
9. Balyo, T., Heule, M.J.H., Jarvisalo, M.: SAT competition 2016: recent develop-
ments. In: Thirty-First AAAI Conference on Artificial Intelligence (2017)
10. de Moura, L., Bjørner, N.: Z3: an efficient SMT solver. In: Ramakrishnan, C.R.,
Rehof, J. (eds.) TACAS 2008. LNCS, vol. 4963, pp. 337–340. Springer, Heidelberg
(2008). https://doi.org/10.1007/978-3-540-78800-3 24
11. Selman, B., Kautz, H.A., Cohen, B.: Local search strategies for satisfiability testing.
Cliques, Color. Satisf. 26, 521–532 (1993)
12. Selman, B., Kautz, H.A., Cohen, B.: Noise strategies for improving local search.
In: Proceedings of the 12th National Conference on Artificial Intelligence, vol. 94,
pp. 337–343. MIT Press (1994)
13. Hoos, H.H., Stützle, T.: Stochastic Local Search: Foundations and Applications.
Elsevier, Amsterdam (2004)
14. Gomes, C.P., Kautz, H., Sabharwal, A., Selman, B.: Satisfiability solvers. Founda-
tions of Artificial Intelligence 3, 89–134 (2008)
15. Kirschner, M., Mitchison, T.: Beyond self-assembly: from microtubules to morpho-
genesis. Cell 45, 329–342 (1986)
16. Holy, T.E., Leibler, S.: Dynamic instability of microtubules as an efficient way to
search in space. Proc. Nat. Acad. Sci. 91, 5682–5685 (1994)
17. Gerhart, J., Kirschner, M.: Cells, Embryos, and Evolution: Toward a Cellular and
Developmental Understanding of Phenotypic Variation and Evolutionary Adapt-
ability. Blackwell Science, Malden (1997)
18. Kirschner, M., Gerhart, J.: Evolvability. Proc. Nat. Acad. Sci. 95, 8420–8427 (1998)
19. Cauwenberghs, G.: A fast stochastic error-descent algorithm for supervised learning
and optimization. In: Advances in Neural Information Processing Systems, pp.
244–251 (1993)
20. Sebastian Seung, H.: Learning in spiking neural networks by reinforcement of
stochastic synaptic transmission. Neuron 40, 1063–1073 (2003)
21. Hinton, G.E., Nowlan, S.J.: How learning can guide evolution. Complex Syst. 1,
495–502 (1987)
22. Cook, M., Soloveichik, D., Winfree, E., Bruck, J.: Programmability of chemical
reaction networks. In: Condon, A., Harel, D., Kok, J., Salomaa, A., Winfree, E.
(eds.) Algorithmic Bioprocesses. Natural Computing Series, pp. 543–584. Springer,
Heidelberg (2009)
23. Soloveichik, D., Seelig, G., Winfree, E.: DNA as a universal substrate for chemical
kinetics. Proc. Nat. Acad. Sci. 107, 5393–5398 (2010)
24. Chen, Y.-J.: Programmable chemical controllers made from DNA. Nat. Nanotech-
nol. 8, 755 (2013)
25. Srinivas, N., Parkin, J., Seelig, G., Winfree, E., Soloveichik, D.: Enzyme-free nucleic
acid dynamical systems. Science 358, eaal2052 (2017)
26. Gillespie, D.T.: Stochastic simulation of chemical kinetics. Ann. Rev. Phys. Chem.
58, 35–55 (2007)
27. Anderson, D.F., Cappelletti, D., Koyama, M., Kurtz, T.G.: Non-explosivity of
stochastically modeled reaction networks that are complex balanced. Bull. Math.
Biol. 80, 2561–2579 (2018)
Chemical Reaction Networks and Stochastic Local Search 19
28. Kurtz, T.G.: The relationship between stochastic and deterministic models for
chemical reactions. J. Chem. Phys. 57, 2976–2978 (1972)
29. Karp, R.M., Miller, R.E.: Parallel program schemata. J. Comput. Syst. Sci. 3,
147–195 (1969)
30. Johnson, R.F., Dong, Q., Winfree, E.: Verifying chemical reaction network imple-
mentations: a bisimulation approach. Theor. Comput. Sci. 765, 3–46 (2019)
31. Doty, D., Zhu, S.: Computational complexity of atomic chemical reaction networks.
Natural Comput. 17, 677–691 (2018)
32. Magnasco, M.O.: Chemical kinetics is turing universal. Phys. Rev. Lett. 78, 1190–
1193 (1997)
33. Liekens, A.M.L., Fernando, C.T.: Turing complete catalytic particle computers.
In: Almeida e Costa, F., Rocha, L.M., Costa, E., Harvey, I., Coutinho, A. (eds.)
ECAL 2007. LNCS (LNAI), vol. 4648, pp. 1202–1211. Springer, Heidelberg (2007).
https://doi.org/10.1007/978-3-540-74913-4 120
34. Soloveichik, D., Cook, M., Winfree, E., Bruck, J.: Computation with finite stochas-
tic chemical reaction networks. Nat. Comput. 7, 615–633 (2008)
35. Chen, H.-L., Doty, D., Soloveichik, D.: Deterministic function computation with
chemical reaction networks. Natural Comput. 13, 517–534 (2014)
36. Cummings, R., Doty, D., Soloveichik, D.: Probability 1 computation with chemical
reaction networks. Natural Comput. 15, 245–261 (2016)
37. Napp, N.E., Adams, R.P.: Message passing inference with chemical reaction net-
works. In: Advances in Neural Information Processing Systems, pp. 2247–2255
(2013)
38. Gopalkrishnan, M.: A scheme for molecular computation of maximum likelihood
estimators for log-linear models. In: Rondelez, Y., Woods, D. (eds.) DNA 2016.
LNCS, vol. 9818, pp. 3–18. Springer, Cham (2016). https://doi.org/10.1007/978-
3-319-43994-5 1
39. Fett, B., Bruck, J., Riedel, M.D.: Synthesizing stochasticity in biochemical systems.
In: Proceedings of the 44th Annual Design Automation Conference, pp. 640–645.
ACM (2007)
40. Poole, W., et al.: Chemical boltzmann machines. In: Brijder, R., Qian, L. (eds.)
DNA 2017. LNCS, vol. 10467, pp. 210–231. Springer, Cham (2017). https://doi.
org/10.1007/978-3-319-66799-7 14
41. Cardelli, L., Kwiatkowska, M., Laurenti, L.: Programming discrete distributions
with chemical reaction networks. Nat. Comput. 17, 131–145 (2018)
42. Anderson, D.F., Craciun, G., Kurtz, T.G.: Product-form stationary distributions
for deficiency zero chemical reaction networks. Bull. Math. Biol. 72, 1947–1970
(2010)
43. Cappelletti, D., Ortiz-Munoz, A., Anderson, D., Winfree, E.: Stochastic chemical
reaction networks for robustly approximating arbitrary probability distributions.
arXiv preprint arXiv:1810.02854 (2018)
44. Braich, R.S., Chelyapov, N., Johnson, C., Rothemund, P.W.K., Adleman, L.: Solu-
tion of a 20-variable 3-SAT problem on a DNA computer. Science 296, 499–502
(2002)
45. Kirkpatrick, S., Selman, B.: Critical behavior in the satisfiability of random
Boolean expressions. Science 264, 1297–1301 (1994)
46. Selman, B., Kirkpatrick, S.: Critical behavior in the computational cost of satisfi-
ability testing. Artif. Intell. 81, 273–295 (1996)
47. Strzebonski, A.: Mathematica SatisfiabilityQ uses MiniSAT 1.14. StackExchange
and personal communication (2016, 2019). https://mathematica.stackexchange.
com/questions/103726/why-is-satisfiabilitycount-faster-than-satisfiableq
20 E. Winfree
1 Introduction
Ultra-high specificity and sensitivity of hybridization reactions by deoxyribonu-
cleic acid (DNA) leads to a wide variety of useful applications [7,10,12,13,15,
16,18,19,21,26–28,30,31,37]. Particularly interesting use of DNA is to imple-
ment arbitrary chemical reaction networks [6,32,35]. Chemical Reaction Net-
works (CRNs) have been used to understand complex biochemical processes since
they can represent biochemical systems in a simple-yet-formal way. CRNs are
shown to be Turing universal [4,5,29] and therefore, in theory, can serve as a pro-
gramming language for biochemical systems. A CRN consists of a set of reactant
species (R = {R1 , R2 , . . ., RN }) with an initial stoichiometry. These reactants
react via coupled chemical reactions to produce a set of product species (P = {P1 ,
P2 , . . ., PM }). Several dynamic phenomena have been experimentally described
c Springer Nature Switzerland AG 2019
C. Thachuk and Y. Liu (Eds.): DNA 25, LNCS 11648, pp. 21–36, 2019.
https://doi.org/10.1007/978-3-030-26807-7_2
22 S. Shah et al.
and approximated using DNA as a substrate. For example, the molecular con-
sensus protocol by Chen et al. implemented a set of CRNs using DNA to find
the reactant species with the highest population [2,6]. Another interesting appli-
cation includes implementation of the dynamic rock-paper-scissor oscillator by
Srinivas et al. using DNA hybridization and strand displacement properties [35].
Other experimental demonstrations of dynamic system use either RNA poly-
merase and ribonuclease enzymes [17], or polymerase and nicking enzyme [11,20].
Concentration
x
Concentration
X X+X
k1
x* i*
k
X+Y Y+Y2
i y
Y k
W3
i* y*
Time Time
Fig. 1. The basic workflow of DNA systems implementing arbitrary reaction networks.
The desired dynamic behavior can be represented using a set of CRNs. A DNA imple-
mentation of these CRNs can be tuned to approximately behave like the CRNs rep-
resenting the biochemical process. The observed dynamic behavior of DNA systems
mimics the original desired dynamics.
implement any arbitrary CRN since these reactions form the basis. There are
several potential benefits of our CRN design framework. (a) It is simple and less
leaky as compared to toehold-mediated strand displacement since no overlapping
sequence between input and output signals exists, and the polymerase enzyme
is sensitive to 3’ overhangs. (b) It is faster than prior architectures which use
polymerase, nicking and exonuclease together since our designs are polymerase
only. (c) It is modular as we use template CRNs for large-scale applications such
as an autocatalytic amplifier and molecular consensus network. To demonstrate
arbitrary CRNs, we approximate a dynamic oscillator with polymerase-based
DNA design as this requires a very careful calibration of the reaction rates.
All our designs are demonstrated in silico using a system of coupled ordinary
differential equations (ODEs) as it is well-known that the time evolution of a
CRN can be specified by a system of ODEs [1,6,32,40].
(a) t* o* o* o*
t* o*
SD
o* t o t* o*
t o t o
(b) t* o*
t* o*
SD
o* t o t* o*
t o t o
A k
B q2
B
I+Gib i b
i b b
i *
b * i* b*
The simple two-step process used for the unimolecular reaction can be easily
extended to implement a bimolecular reaction. In bimolecular reaction, two set
of inputs A and B combine to produce an output C such that the rate of output
formation depends on the inputs as k[A][B]. A trivial implementation of bimolec-
ular reaction would be to slightly modify unimolecular to design to replace inter-
q1
mediate domain i by input domain b. Then, a two-step reaction A + Gb −→ I
q2
and I + Gio −→ O similar to previous design can act as a bimolecular reaction.
This trivial design has an issue that it expects second input b to be present
in the gated form. This can create a problem, especially, if there are multi-
ple reactions that use b as the input signal. For example, if our system of CRNs
k1 k2
contains A + B −→ C and B −→ D then the input signal B is required in a single-
stranded form in the unimolecular reaction and in the double-stranded form in
the bimolecular reaction. This problem was originally also identified by Solove-
Implementing Arbitrary CRNs Using Strand Displacing Polymerase 27
x* y* i* x yg* i y x yg*
Fig. 5. Linker gates to interconvert a signal strand. (a) A CRN network that reversibly
converts input signal Y between the gated-form and the single-stranded form. The
single-stranded signal Yg is used in all the unimolecular reactions of Y while the gate
complex Gy will be used as input in all the bimolecular reactions. (b) A domain-
level implementation of the DNA-based CRN. All the reactions are relatively fast and
therefore rate constants are not shown.
ichik et al. [32] when they designed a DNA-only CRN system and they proposed
the use of the well-known toehold exchange reaction to reversibly interconvert
input signal B between its two forms [8,24].
In this work, we design a simple set of strand displacement reactions to
implement interconversion of input signal B between its single-stranded and
gated form. Therefore, the final set of CRNs that implements a bimolecular reac-
tion will consist of the third linker step in addition to the two-step process, as
shown in Figs. 4a and 5. The input signal A can bind with gate Gbi and undergo
polymerase-based strand displacement to release the intermediate I. This inter-
mediate strand I binds with the output complex Gic to release output C. The
additional linker step includes reversible reaction whose full implementation is
shown in Fig. 5.
Abstractly the linker reaction converts single-stranded input signal Yg with
help of linker complexes to gate Gy in a reversible fashion. The polymerase
implementation of this CRN is a two-step process where each step uses only
28 S. Shah et al.
All the DNA implementations of the CRN protocols in this work are scaled by
a time factor α and a concentration factor β as the DNA implementations only
work in a certain range of time and concentration. A standard DNA hybridization
experiment operates in the concentration range of 1 nM to 1 mM and in the time
range of a few minutes to several hours [1,6,11,23,25,34,36,39]. Therefore, a set
of coupled ODEs implementing a CRN system with rate k = 1 can be multiplied
by a time factor α = 10−3 and a concentration factor β = 10−8 . This will
bring our DNA implementation of the CRN systems in a realistic range without
altering the behavior of the original system [32]. Unless otherwise stated all the
applications will use these values of k, α and β for simplicity. All the scaling
factors and other rate values are adopted from Soloveichik et al. [32].
Implementing Arbitrary CRNs Using Strand Displacing Polymerase 29
x t a
k
X nX
k/λ
a*
Xi+Ga Ii xi* ti*
Ii+Go X1+X2+...+Xn t1* t2* tn *
a*
x1* x2* xn*
...
(c) 60 x t a a x1 x2 xn
Xo = 1.0x
50
X 6X
Concentration (uM)
40 x1 t
* *
x *
t *
xn tn
* *
X 5X 1 2 2
...
30
X 4X
20 a* x1* x2* ... xn *
X 3X
10 a x1 x2 ... xn
X 2X
0
0 1 2
Time (hour)
5 Applications
The simple CRNs introduced in the previous sections can act as a basis for
large-scale applications. In this section, we use these simple reactions as a tem-
plate and demonstrate several applications as a use case of our polymerase-based
architecture.
(a) beats
beats beats
Rock Scisscor Paper
(c) 11 (d)
10 A 11
B 10
9
Concentration (nM)
C 9
8 8
C (nM)
7 7
6 6
5
5
4
4 3
2
4
3 B (n6 8 10 11
0 0.5 1 1.5 2 2.5 3 3.5 4 M) 10 6 7 8 9
12 2 3 4 5
Time (hours) A (nM)
Fig. 8. Molecular-scale dynamic oscillatory network. (a) A block diagram showing the
abstract principle of a rock-paper-scissor network. (b) Abstract CRNs that implement
the rock-paper-scissor dynamics and a DNA polymerase-based CRN implementation.
Note that the domain-level DNA implementation is not shown here for brevity. (c) An
in silico experiment demonstrating the behavior of the dynamic network. Dotted lines
show the trace of the ideal CRNs. (d) If the DNA-based network is allowed to run
for several epochs, we observe that its behavior slightly diverges from the ideal system
(dotted lines). This is expected as the supporting gates are not infinite.
breaking it, scissors can beat paper by cutting it and paper can beat rock
by covering it. This forms a cyclic system as shown in Fig. 8a whose CRN
representation is shown in Fig. 8b. Three bimolecular autocatalytic reactions
k1 k2 k3
(A + B −→ 2 B, B + C −→ 2 C, C + A −→ 2 A) are required to implement such
a dynamic system. The first CRN produces B by consuming A. By assuming
A and B as scissor and rock respectively, such CRN implements rock beating
scissor by producing more rock while consuming scissor. Similarly, other CRNs
implement scissor beats paper and paper beats rock respectively. Using our tem-
plate reactions, we can easily implement this CRN system. The CRN for DNA
implementation of each bimolecular reaction is shown in Fig. 8b.
An in silico demonstration of the dynamic system implemented using our
DNA polymerase-based framework is shown in Fig. 8c. Each component of the
CRN exists in gated form and single-stranded form through a reversible linker
reaction. Thus γ = 2 for each reaction as all the inputs are used once in uni-
molecular form and once in bimolecular form. Initial input concentrations were
5 nM, 4 nM and 10 nM. All the supporting gates were kept at an excess concen-
tration of λ = 10−3 M and the unlabeled fast reaction rates were 103 . Initially,
the DNA implementation exactly mimics the ideal CRNs (shown as dotted line
in Fig. 8c), however as time progresses, it starts diverging away (refer Fig. 8d)
since the supporting gates get consumed and therefore effective reaction rates
change.
6 Discussion
Our DNA architecture heavily relies on the supporting and linker gates for
approximating ideal CRNs. However, for example, in contrast to the prior
34 S. Shah et al.
a b z PSD a b z b z
a *
b*
z * a
*
b* z*
z*
z z a* b z
z b* PSD
b a
*
a *
b *
z*
z *
a
z* a
Fig. 9. Input signal A primes with the gate complex to produce output signal B and
Z. The computing gate can be replenished by adding the buffered gate shown in the
second reaction. All the supporting gates used in our architecture can be replenished by
adding several such buffered complexes. This can autonomously elongate the longevity
of the DNA systems. (Color figure online)
scheme [32], our linker gate design is wasteful. As the linker and other gates
are consumed, the DNA system starts diverging away from the desired dynam-
ics and eventually stops working. Although we can start with a higher initial
concentration, it is not very desirable since several unwanted reactions occur
at higher concentrations. Upon their consumption, either more gates should be
added externally or a simple buffered gate scheme, as shown in Fig. 9, can be
used. In such buffered systems [24], an additional gate complex (marked in the
red box) will release the used gate (marked in the black box) upon its consump-
tion. Such a system can easily elongate the longevity of our DNA systems as the
supporting gates get replenished autonomously.
7 Conclusion
References
1. Bui, H., Shah, S., Mokhtar, R., Song, T., Garg, S., Reif, J.: Localized DNA
hybridization chain reactions on DNA origami. ACS Nano 12(2), 1146–1155 (2018)
2. Cardelli, L., Csikász-Nagy, A.: The cell cycle switch computes approximate major-
ity. Sci. Rep. 2, 656 (2012)
3. Chandran, H., Gopalkrishnan, N., Phillips, A., Reif, J.: Localized hybridization
circuits. In: Cardelli, L., Shih, W. (eds.) DNA 2011. LNCS, vol. 6937, pp. 64–83.
Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-23638-9 8
4. Chen, H.L., Doty, D., Soloveichik, D.: Deterministic function computation with
chemical reaction networks. Nat. Comput. 13(4), 517–534 (2014)
5. Chen, H.L., Doty, D., Soloveichik, D.: Rate-independent computation in continuous
chemical reaction networks. In: Proceedings of the 5th Conference on Innovations
in Theoretical Computer Science, pp. 313–326. ACM (2014)
6. Chen, Y.J., et al.: Programmable chemical controllers made from DNA. Nat. Nan-
otechnol. 8(10), 755–762 (2013)
7. Cherry, K.M., Qian, L.: Scaling up molecular pattern recognition with DNA-based
winner-take-all neural networks. Nature 559(7714), 370 (2018)
8. Dalchau, N., et al.: Computing with biological switches and clocks. Nat. Comput.
17(4), 761–779 (2018)
9. Eshra, A., Shah, S., Song, T., Reif, J.: Renewable DNA hairpin-based logic circuits.
IEEE Trans. Nanotechnol. 18, 252–259 (2019)
10. Fu, D., Shah, S., Song, T., Reif, J.: DNA-based analog computing. In: Braman,
J.C. (ed.) Synthetic Biology. MMB, vol. 1772, pp. 411–417. Springer, New York
(2018). https://doi.org/10.1007/978-1-4939-7795-6 23
11. Fujii, T., Rondelez, Y.: Predator-prey molecular ecosystems. ACS Nano 7(1), 27–34
(2012)
12. Garg, S., Shah, S., Bui, H., Song, T., Mokhtar, R., Reif, J.: Renewable time-
responsive DNA circuits. Small 14(33), 1801470 (2018)
13. Han, D., et al.: Single-stranded DNA and RNA origami. Science 358(6369),
eaao2648 (2017)
14. Jiang, Y.S., Bhadra, S., Li, B., Ellington, A.D.: Mismatches improve the perfor-
mance of strand-displacement nucleic acid circuits. Angew. Chem. 126(7), 1876–
1879 (2014)
15. Joesaar, A., et al.: DNA-based communication in populations of synthetic proto-
cells. Nat. Nanotechnol. 14, 369 (2019)
16. Johnson-Buck, A., Shih, W.M.: Single-molecule clocks controlled by serial chemical
reactions. Nano Lett. 17(12), 7940–7944 (2017)
17. Kim, J., Winfree, E.: Synthetic in vitro transcriptional oscillators. Mol. Syst. Biol.
7(1), 465 (2011)
18. Kishi, J.Y., Schaus, T.E., Gopalkrishnan, N., Xuan, F., Yin, P.: Programmable
autonomous synthesis of single-stranded DNA. Nat. Chem. 10(2), 155 (2018)
19. Li, J., Johnson-Buck, A., Yang, Y.R., Shih, W.M., Yan, H., Walter, N.G.: Explor-
ing the speed limit of toehold exchange with a cartwheeling DNA acrobat. Nat.
Nanotechnol. 13(8), 723 (2018)
20. Montagne, K., Plasson, R., Sakai, Y., Fujii, T., Rondelez, Y.: Programming an in
vitro DNA oscillator using a molecular networking strategy. Mol. Syst. Biol. 7(1),
466 (2011)
21. Newman, S., et al.: High density DNA data storage library via dehydration with
digital microfluidic retrieval. Nat. Commun. 10(1), 1706 (2019)
36 S. Shah et al.
22. Notomi, T., et al.: Loop-mediated isothermal amplification of DNA. Nucleic Acids
Res. 28(12), e63–e63 (2000)
23. Qian, L., Winfree, E.: Scaling up digital circuit computation with DNA strand
displacement cascades. Science 332(6034), 1196–1201 (2011)
24. Scalise, D., Dutta, N., Schulman, R.: DNA strand buffers. J. Am. Chem. Soc.
140(38), 12069–12076 (2018)
25. Seelig, G., Soloveichik, D., Zhang, D.Y., Winfree, E.: Enzyme-free nucleic acid logic
circuits. Science 314(5805), 1585–1588 (2006)
26. Seo, J., Kim, S., Park, H.H., Nam, J.M., et al.: Nano-bio-computing lipid nano-
tablet. Sci. Adv. 5(2), eaau2124 (2019)
27. Shah, S., Dubey, A., Reif, J.: Programming temporal DNA barcodes for single-
molecule fingerprinting. Nano Lett. 19, 2668–2673 (2019)
28. Shah, S., Dubey, A.K., Reif, J.: Improved optical multiplexing with temporal DNA
barcodes. ACS Synth. Biol. 8(5), 1100–1111 (2019)
29. Shah, S., Gupta, M.: DNA-based chemical compiler (2018). arXiv preprint
arXiv:1808.04790
30. Shah, S., Limbachiya, D., Gupta, M.K.: DNACloud: a potential tool for storing
big data on DNA (2013). arXiv preprint arXiv:1310.6992
31. Shah, S., Reif, J.: Temporal DNA barcodes: a time-based approach for single-
molecule imaging. In: Doty, D., Dietz, H. (eds.) DNA 2018. LNCS, vol. 11145, pp.
71–86. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-00030-1 5
32. Soloveichik, D., Seelig, G., Winfree, E.: DNA as a universal substrate for chemical
kinetics. Proc. Nat. Acad. Sci. 107(12), 5393–5398 (2010)
33. Song, T., et al.: Improving the performance of DNA strand displacement circuits
by shadow cancellation. ACS Nano 12(11), 11689–11697 (2018)
34. Srinivas, N., et al.: On the biophysics and kinetics of toehold-mediated DNA strand
displacement. Nucleic Acids Res. 41(22), 10641–10658 (2013)
35. Srinivas, N., Parkin, J., Seelig, G., Winfree, E., Soloveichik, D.: Enzyme-free nucleic
acid dynamical systems. Science 358(6369), eaal2052 (2017)
36. Teichmann, M., Kopperger, E., Simmel, F.C.: Robustness of localized DNA strand
displacement cascades. ACS Nano 8(8), 8487–8496 (2014)
37. Thubagere, A.J., et al.: A cargo-sorting DNA robot. Science 357(6356) (2017)
38. Walker, G.T., Little, M.C., Nadeau, J.G., Shank, D.D.: Isothermal in vitro amplifi-
cation of DNA by a restriction enzyme/DNA polymerase system. Proc. Nat. Acad.
Sci. 89(1), 392–396 (1992)
39. Wang, B., Thachuk, C., Ellington, A.D., Winfree, E., Soloveichik, D.: Effective
design principles for leakless strand displacement systems. Proc. Nat. Acad. Sci.
115(52), E12182–E12191 (2018)
40. Yordanov, B., Kim, J., Petersen, R.L., Shudy, A., Kulkarni, V.V., Phillips, A.:
Computational design of nucleic acid feedback control circuits. ACS Synth. Biol.
3(8), 600–616 (2014)
Real-Time Equivalence of Chemical
Reaction Networks and Analog Computers
Xiang Huang1 , Titus H. Klinge2 , and James I. Lathrop1(B)
1
Iowa State University, Ames, IA 50011, USA
{huangx,jil}@iastate.edu
2
Drake University, Des Moines, IA 50311, USA
titus.klinge@drake.edu
Abstract. This paper investigates the class RRT CRN of real numbers
that are computable in real time by chemical reaction networks (Huang,
Klinge, Lathrop, Li, Lutz, 2019), and its relationship to general purpose
analog computers. Roughly, α ∈ RRT CRN if there is a chemical reaction
network (CRN) with integral rate constants and a designated species X
such that, when all species concentrations are initialized to zero, X con-
verges to α exponentially quickly. In this paper, we define a similar class
RRT GP AC of real numbers that are computable in real time by general
purpose analog computers, and show that RRT GP AC = RRT CRN using a
construction similar to that of the difference representation introduced
by Fages, Le Guludec, Bournez, and Pouly. We prove this equivalence by
showing that RRT CRN is a subfield of R which solves a previously open
problem. We also prove that a CRN with integer initial concentrations
can be simulated by a CRN with all zero initial concentrations. Using
these results, we give simple and natural constructions showing e and π
are members of RRT CRN , which was not previously known.
1 Introduction
Computing real numbers in real time with a Turing machine was first introduced
by Yamada in the 1960s [22] and was later proven to be equivalent to producing
the first n bits of the fractional part of the number in O(n)-time [15]. It is easy
to see that the rational numbers can be computed in real time, but others are
not as trivial to compute. Some transcendental numbers are known to be real
time computable, such as
∞
λ= 2−n! ,
n=1
This research was supported in part by National Science Foundation Grant 1545028.
c Springer Nature Switzerland AG 2019
C. Thachuk and Y. Liu (Eds.): DNA 25, LNCS 11648, pp. 37–53, 2019.
https://doi.org/10.1007/978-3-030-26807-7_3
38 X. Huang et al.
Recently, Huang, Klinge, Lathrop, Li, and Lutz defined the class RRT CRN
of real time computable real numbers by chemical reaction networks [19]. They
defined a real number α to be in RRT CRN if there is a CRN with a designated
species X that is within 2−t of |α| for all t ≥ 1. Their definition also requires
that all rate constants of the CRN be integral, all species concentrations be
initialized to zero, and all species concentrations be bounded by some constant
β. This definition is closely related to that of Bournez, Fraigniaud, and Koegler’s
large population protocols [3], but differs in key technical aspects. A discussion
of these differences can be found in [19].
Common variants of the chemical reaction network model assume well-mixed
solutions and mass-action kinetics. Small-volume environments such as in vivo
reaction networks are often modeled stochastically with continuous-time Markov
processes, while larger volumes are modeled deterministically with systems of
ordinary differential equations1 . In this paper, we focus on the deterministic
mass-action chemical reaction network which is modeled with autonomous poly-
nomial differential equations. Roughly, a chemical reaction network (CRN) is a
set of reactions of the form
k
X1 + X2 + · · · + Xn −−−→ Y1 + Y2 + · · · + Ym ,
Pouly showed in 2017 that CRNs under deterministic mass action semantics can
simulate GPACs by encoding each variable as the difference of two species con-
centrations [13].
In this paper, we investigate the relationship between real time computable
real numbers by CRNs and general purpose analog computers. We define the
class RRT GP AC of real time computable real numbers by GPACs. Roughly,
α ∈ RRT GP AC if there exists a polynomial initial value problem (PIVP) with
integer coefficients such that, if initialized with all zeros, then all variables are
bounded and one of the variables converges to α exponentially quickly. These
restrictions are analogous to the definition of RRT CRN and ensure that the
PIVP is finitely specifiable and α is computed in real time. We show that
RRT GP AC = RRT CRN by proving that RRT CRN is a subfield of R and using an
extension of the difference representation introduced in [13] that relies on these
closure properties. We also show that the constraint of all zero initial conditions
can be relaxed to integral initial conditions. With these new theorems, we prove
two well-known transcendental numbers e and π are members of RRT CRN . The
proofs and constructions for these transcendental numbers are short and con-
cise, and demonstrate the power of these theorems for generating and proving
real-time CRNs correct.
The rest of this paper is organized as follows. Section 2 introduces relevant
definitions and notations used throughout the paper; Sect. 3 includes the main
theorem of the paper, that RRT GP AC = RRT CRN , along with the proof that
RRT CRN is a field; Sect. 4 includes proofs that e and π are real time computable
by chemical reaction networks using the theorems from Sect. 3; and Sect. 5 pro-
vides some concluding remarks.
2 Preliminaries
Chemical reaction networks have been investigated from the perspective of chem-
istry [12], mathematics [14], and computer science [10], and each field uses
slightly different notation. In this paper we use the notion introduced in [19], and
thus define a chemical reaction network (CRN ) to be an ordered pair N = (S, R)
where S = {Y1 , Y2 , . . . , Yn } is a finite set of species and R is a finite set of reac-
tions. A reaction is a triple ρ = (r, p, k) where r, p ∈ Nn are vectors of reactant
species and product species, respectively, and k ∈ R>0 is the rate constant. We
use ri and pi to denote the ith component of r and p, respectively. We call
Yi ∈ S a reactant of ρ if ri > 0, a product of ρ if pi > 0, and a catalyst of ρ if
ri = pi > 0.
In this paper, we are concerned with deterministic CRNs under mass action
kinetics, and therefore the evolution of a CRN N = (S, R) is governed by a
system of real-valued functions y = (y1 , . . . , yn ) where yi : R≥0 → R≥0 for all
1 ≤ i ≤ n. The value yi (t) is called the concentration of species Yi ∈ S at time
t ∈ [0, ∞). According to the law of mass action, the rate of a reaction ρ = (r, p, k)
is proportional to the rate constant k and the concentrations of the reactants r.
40 X. Huang et al.
The total rate of change of the concentration yi (t) of a species Yi ∈ S is the sum
of the rates of reactions that affect Yi , and thus is governed by the differential
equation
yi (t) = (pi − ri ) · rateρ (t). (2)
(r,p,k)∈R
This system of ODEs, along with an initial condition y(0) ∈ Rn>0 , yields a
polynomial initial value problem (PIVP ) and has a unique solution y(t).
For convenience, we allow alternative species names such as X and Z and
make use of more intuitive notation for specifying reactions. For example, a
reaction ρ = (r, p, k) can be written
k
X + Y −−−→ X + 2Z, (3)
x (t) = 0,
y (t) = −kx(t)y(t)
z (t) = 2kx(t)y(t),
where x(t), y(t), and z(t) are the concentrations of the species X, Y , and Z at
time t. In this paper we use this intuitive notation whenever possible.
Two CRNs can also naturally be combined into one. Given N1 = (S1 , R1 )
and N2 = (S2 , R2 ), we define the join of N1 and N2 to be the CRN
N1 N2 = (S1 ∪ S2 , R1 ∪ R2 ). (4)
The real numbers for which there is a computer (N, X) are called real-time CRN
computable. The set of real-time CRN computable real numbers is denoted by
RRT CRN .
The restriction to integral rate constants ensures that the CRN can be spec-
ified in finitely many bits. Bounded concentrations imposes a limit on the rate
of convergence, which makes the variable t a meaningful measure of time. If
concentrations were unbounded, it is possible to compute a real number arbi-
trarily quickly by catalyzing all reactions with a species whose concentration is
unbounded. Bournez, Graça, and Pouly recently showed that the arc length of
y(t) is a better time complexity metric [4], and bounded concentrations imme-
diately implies the arc length is linear in t, making them equivalent metrics in
this case. The real-time convergence requires that α is computed with t
bits
of accuracy in t units of time, making it analogous to the definition of real time
Turing computation.
The definition of RRT CRN can also be generalized in the following way. Given
two real numbers τ, γ ∈ (0, ∞), we define Rτ,γRT CRN in the same way as RRT CRN
except the real-time convergence constraint (5) is replaced with:
for all t ≥ τ . Proven in [19] but restated here for convenience is the following
lemma:
Lemma 1. RRT CRN = Rτ,γ
RT CRN for all τ, γ ∈ (0, ∞).
The above lemma shows that the definition of RRT CRN is robust to linear
changes to the real-time convergence rate. Thus, it suffices to show that a CRN
computes a real number α exponentially quickly, to prove that α ∈ RRT CRN
without explicitly showing that τ = 1 and γ = ln 2.
Proof. Given a computer (N, Y1 ) for α ∈ R, let y be the PIVP induced by the
deterministic semantics of N from Eq. (2). Note that (N, Y1 ) computes α when
its species concentrations are initialized to zero, therefore y(0) = 0. The fact that
y is also a computer for α immediately follows from the constraints imposed on
N and the fact that if α < 0, a multiplying each ODE by −1 causes y1 (t) to
converge directly to α instead of |α|.
Although the inclusion above is trivial, the fact that RRT GP AC ⊆ RRT CRN is
not so obvious. This is due to deterministic CRNs inducing PIVPs with restricted
forms, namely, the polynomial of each ODE has the structure
where p and q are polynomials over the concentrations of the species. The fact
that negative terms in the ODE for Y must depend on its own concentration
y(t) makes certain GPAC constructions difficult to implement with CRNs.
The rest of this section is devoted to finishing the proof of the main theorem:
RRT GP AC = RRT CRN . To simplify the proof, we first prove that RRT CRN is a
subfield of R which solves an open problem stated in [19]. The proofs of closure
under addition, multiplication, division, and subtraction rely on certain conver-
gence properties. Thus, we first state and prove two lemmas which demonstrate
that certain differential equations immediately yield exponential convergence to
a target real number. Then we prove the four closure properties necessary to
show that RRT CRN is a field using these lemmas. Finally, we conclude with the
proof of the main theorem that RRT GP AC = RRT CRN .
Proof. Assume the hypothesis. The ODE of Eq. (7) can be solved directly using
the integrating factor method and has a solution of the form
x(t) = e−t et f (t)dt. (10)
Real-Time Equivalence of CRNs and GPACs 43
We can now use integration by parts on the integral of Eq. (17) with u(s) = eH(s)
and v (s) = αeαs to obtain
t t
H(s) αs
e (αe ) ds = u(s)v (s)ds
0 0
t t
= u(s)v(s) − v(s)u (s)ds
0 0
t
H(t) αt
=e e −1− eαs h(s)eH(s) ds.
0
Substituting this into Eq. (17) and using the fact that F (t) = αt + H(t), we
obtain t
−F (t) 1 F (t) F (s)
x(t) = e · e −1− h(s)e ds ,
α 0
C2
where C4 = α−1 and C5 = C3 − C4 eα−1 . Thus, we can rewrite Eq. (18):
x(t) − 1 ≤ C2 e−αt 1 + C5 + C4 e(α−1)t = C6 e−αt + C7 e−t
α
where C6 = C2 (1 + C5 ) and C7 = C2 C4 .
It immediately follows that there exist constants γ and τ such that x(t) − a1
is bounded by e−γt for all t ∈ [τ, ∞).
Real-Time Equivalence of CRNs and GPACs 45
Using Lemmas 3 and 4, we now prove that RRT CRN is a field. We split the
four closure properties into the following four lemmas.
Proof. Assume the hypothesis, and let (Nα , X) and (Nβ , Y ) be CRN computers
that compute α and β, respectively. Without loss of generality, we assume that
α, β ≥ 0 and that Nα and Nβ do not share any species.
Now let Z be a new species, and let N = Nα Nβ N
where N
is the CRN
defined by the reactions
1
X −−−→ X + Z
1
Y −−−→ Y + Z
1
Z −−−→ ∅.
, and
Note that the species in Nα and Nβ are unaffected by the reactions of N
the ODE for Z is:
z (t) = x(t) + y(t) − z(t). (19)
Let f (t) = x(t)+y(t). By Lemma 1, without loss of generality, we can assume
that |f (t) − α − β| ≤ e−t for all t ≥ 1. Immediately by Lemmas 3 and 1, we
conclude that α + β ∈ RRT CRN .
Proof. Assume the hypothesis, and let (Nα , X) and (Nβ , Y ) be CRN computers
that compute α and β, respectively Furthermore, we assume that Nα and Nβ do
not share any species. Without loss of generality, we also assume that α, β ≥ 0.
Now let Z be a new species, and let N = Nα Nβ N
where N
is the CRN
defined by the reactions
1
X + Y −−−→ X + Y + Z
1
Z −−−→ ∅.
and
Note that the species in Nα and Nβ are unaffected by the reactions of N
yields the following ODE for Z:
Proof. Assume the hypothesis, and let (Nα , X) be CRN a computer that testifies
to this. Without loss of generality, we also assume that α > 0.
Now let Y be a new species, and let N = Nα N
where N
is the CRN defined
by the reactions
1
∅ −−−→ Y
1
X + Y −−−→ X.
Proof. Assume the hypothesis, and let (Nα , X) and (Nβ , Y ) be CRN computers
that compute α and β, respectively. Furthermore, we assume that Nα and Nβ do
not share any species. Without loss of generality, we also assume that α > β ≥ 0.
Now let Z be a new species, and let N = Nα Nβ N
where N
is the CRN
defined by the reactions
1
∅ −−−→ Z
1
X + Z −−−→ X
1
Y + Z −−−→ Y + 2Z.
and
Note that the species in Nα and Nβ are unaffected by the reactions of N
yields the following ODE for Z:
Let f (t) = x(t) − y(t). By Lemma 1, without out loss of generality, we can
assume that |f (t) − (α − β)| ≤ e−t for all t ≥ 1. By Lemmas 4 and 1, we know
1
that α−β ∈ RRT CRN . By Lemmas 7, we conclude that α − β ∈ RRT CRN .
Proof. This immediately follows from Lemmas 5–8 and the fact that RRT CRN is
non-empty.
y1 = p1 (y1 , . . . , yn ),
y2 = p2 (y1 , . . . , yn ),
..
.
yn = pn (y1 , . . . , yn ).
noting that each p̂i is indeed an integral polynomial over the variables of ŷ. For
each 1 ≤ i ≤ n, we also define the polynomials p̂+ −
i and p̂i by the positive and
+ −
negative terms of p̂i , respectively, whence p̂i = p̂i − p̂i .
We now define ODEs for each variable ui and vi of ŷ,
+
ui = p̂+ −
i − ui vi p̂i + p̂i , (23)
−
+ −
vi = p̂i − ui vi p̂i + p̂i , (24)
therefore if ŷ(0) = 0, we know that yi (t) = ui (t) − vi (t) for all t ∈ [0, ∞).
We now prove that every variable of ŷ is bounded from above by some con-
stant. For the sake of contradiction, assume that either ui or vi is unbounded.
Recall that each variable of y is bounded by some β > 0, and therefore
−β ≤ yi (t) ≤ β for all t ∈ [0, ∞). Since yi (t) = ui (t) − vi (t), it follows that
both ui and vi must be unbounded. However, + this−is
a contradiction since ui and
vi each include the negative terms −ui vi p̂i + p̂i which grow faster than their
positive terms. Thus, ui and vi must both be bounded.
Since each of the ODEs of ŷ can be written in the form x = p − qx where
p and q are polynomials with positive integral coefficients, there exists a CRN
N = (S, R) with species S = {Ui , Vi | 1 ≤ i ≤ n} ∪ {Z} that obey these ODEs.
Because y1 = u1 − v1 , this means that |u1 (t) − v1 (t) − α| ≤ 2−t . By Lemma 4,
it immediately follows that N real time computes α1 with species Z. Finally, we
obtain that α ∈ RRT CRN by closure under reciprocal.
48 X. Huang et al.
Since y(0) ∈ Zn , each ODE ŷi is a polynomial with integral coefficients. We also
note that if ŷi (t) = yi (t) − yi (0) for some t ∈ [0, ∞), then
Thus, if we initialize ŷ(0) = 0, it follows that ŷi (t) = yi (t) − yi (0) for all t ∈
[0, ∞). Since the PIVP y computes α, it follows that the PIVP ŷ computes
α − y1 (0), and therefore α − y1 (0) ∈ RRT GP AC .
Finally, since y1 (0) ∈ Z, it is also in RRT GP AC , and by closure under addition
we conclude that α ∈ RRT GP AC .
We now present concise proofs that the e and π are members of RRT CRN .
Theorem 4. e ∈ RRT CRN .
Proof. By Theorem 3, it suffices to show that there exists a CRN computer with
integral initial conditions that computes e exponentially quickly. Consider the
CRN defined by
1
X −−−→ ∅
1
X + Y −−−→ X
along with the initial condition x(0) = 1 and y(0) = 1. This induces the system
of ODES
2
Concentration
1.5
0.5
0
0 10 20 30 40 50 60 70 80 90 100
Time
Proof. By Theorem 3, it suffices to show that there exists a CRN computer with
integral initial conditions that computes π exponentially quickly. Consider the
CRN defined by
1
W −−−→ ∅
2
W + X + Y −−−→ W + Y
1
W + 2X −−−→ W + 2X + Y
1
W + 2Y −−−→ W + Y
1
W + X −−−→ W + X + Z,
50 X. Huang et al.
with initial condition w(0) = x(0) = 1 and y(0) = z(0) = 0. It is easy to verify
that this CRN induces the following system of ODEs
By examining Eq. (28), it is easy to see that w(t) = e−t , and by examining
Eqs. (29) to (31), we see that we can perform a change of variable from t to
t
u(t) = 0 w(s)ds = 1 − e−t to obtain the equivalent system of ODEs:
x (u) = −2x(u)y(u),
y (u) = x(u)2 − y(u)2 ,
z (u) = x(u).
It is easy to generate the reactions of the explicit CRN that computes π from
an all-zero initial condition. The plot of this CRN is provided in Fig. 2.
Real-Time Equivalence of CRNs and GPACs 51
3.5
Pi_math
V_1
U_1
V_3
3 U_2
V_2
U_3
U_4
V_4
P_r
2.5 P
1.5
0.5
0
0 5 10 15 20 25 30
5 Conclusion
In this paper, we investigated the relationship of the class RRT CRN of real
time computable real numbers with chemical reaction networks and the class
RRT GP AC of real time computable real numbers with general purpose analog
computers. In particular, we proved that RRT GP AC = RRT CRN by first solving
the previously open problem posed in [19] that RRT CRN is a field, and then sim-
ulating the GPAC with a CRN in a similar way to [13]. In particular, we extend
their construction so that our CRN simulation computes the real number α with
a single species instead of the difference of two species concentrations. We prove
this using the reciprocal convergence lemma and the fact that RRT CRN is closed
under reciprocal.
We also used the GPAC equivalence to prove that the restriction to all zero
initial conditions is not necessary and can be relaxed to integral initial conditions.
This led to concise and natural proofs that e and π are in RRT CRN . We should
note that applying the constructions in the proofs of Theorems 2 and 3 leads to
CRNs with a large number of reactions.
We hope future research will uncover techniques to compute numbers such as
e and π more efficiently, as well as research that leads to a better understanding
of the structure of RRT CRN .
References
1. Angluin, D., Aspnes, J., Eisenstat, D., Ruppert, E.: The computational power of
population protocols. Distrib. Comput. 20(4), 279–304 (2007)
2. Badelt, S., Shin, S.W., Johnson, R.F., Dong, Q., Thachuk, C., Winfree, E.: A
general-purpose CRN-to-DSD compiler with formal verification, optimization, and
simulation capabilities. In: Brijder, R., Qian, L. (eds.) DNA 2017. LNCS, vol.
10467, pp. 232–248. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-
66799-7_15
3. Bournez, O., Fraigniaud, P., Koegler, X.: Computing with large populations using
interactions. In: Rovan, B., Sassone, V., Widmayer, P. (eds.) MFCS 2012. LNCS,
vol. 7464, pp. 234–246. Springer, Heidelberg (2012). https://doi.org/10.1007/978-
3-642-32589-2_23
4. Bournez, O., Graça, D.S., Pouly, A.: Polynomial time corresponds to solutions of
polynomial ordinary differential equations of polynomial length. J. ACM 64(6), 38
(2017)
5. Case, A., Lutz, J.H., Stull, D.M.: Reachability problems for continuous chemical
reaction networks. In: Amos, M., Condon, A. (eds.) UCNC 2016. LNCS, vol. 9726,
pp. 1–10. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-41312-9_1
6. Chalk, C., Kornerup, N., Reeves, W., Soloveichik, D.: Composable rate-
independent computation in continuous chemical reaction networks. In: Češka, M.,
Šafránek, D. (eds.) CMSB 2018. LNCS, vol. 11095, pp. 256–273. Springer, Cham
(2018). https://doi.org/10.1007/978-3-319-99429-1_15
7. Chen, H.L., Cummings, R., Doty, D., Soloveichik, D.: Speed faults in computation
by chemical reaction networks. Distrib. Comput. 30(5), 373–390 (2017)
8. Chen, H.-L., Doty, D., Soloveichik, D.: Deterministic function computation with
chemical reaction networks. In: Stefanovic, D., Turberfield, A. (eds.) DNA 2012.
LNCS, vol. 7433, pp. 25–42. Springer, Heidelberg (2012). https://doi.org/10.1007/
978-3-642-32208-2_3
9. Chen, H.L., Doty, D., Soloveichik, D.: Rate-independent computation in continuous
chemical reaction networks. In: Proceedings of the 5th Conference on Innovations
in Theoretical Computer Science, pp. 313–326. ACM (2014)
10. Cook, M., Soloveichik, D., Winfree, E., Bruck, J.: Programmability of chemical
reaction networks. In: Condon, A., Harel, D., Kok, J.N., Salomaa, A., Winfree, E.
(eds.) Algorithmic Bioprocesses. Natural Computing Series, pp. 543–584. Springer,
Heidelberg (2009). https://doi.org/10.1007/978-3-540-88869-7_27
11. Doty, D.: Timing in chemical reaction networks. In: Proceedings of the 25th Sym-
posium on Discrete Algorithms, pp. 772–784 (2014)
12. Epstein, I.R., Pojman, J.A.: An Introduction to Nonlinear Chemical Dynamics:
Oscillations, Waves, Patterns, and Chaos. Oxford University Press, Oxford (1998)
13. Fages, F., Le Guludec, G., Bournez, O., Pouly, A.: Strong turing completeness
of continuous chemical reaction networks and compilation of mixed analog-digital
programs. In: Feret, J., Koeppl, H. (eds.) CMSB 2017. LNCS, vol. 10545, pp. 108–
127. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-67471-1_7
14. Feinberg, M.: Foundations of Chemical Reaction Network Theory. AMS, vol. 202.
Springer, Cham (2019). https://doi.org/10.1007/978-3-030-03858-8
15. Fischer, P.C., Meyer, A.R., Rosenberg, A.L.: Time-restricted sequence generation.
J. Comput. Syst. Sci. 4(1), 50–73 (1970)
16. Graça, D.S.: Some recent developments on shannon’s general purpose analog com-
puter. Math. Logic Q.: Math. Logic Q. 50(4–5), 473–485 (2004)
Real-Time Equivalence of CRNs and GPACs 53
17. Graça, D.S., Costa, J.F.: Analog computers and recursive functions over the reals.
J. Complex. 19(5), 644–664 (2003)
18. Hartmanis, J., Stearns, R.E.: On the computational complexity of algorithms.
Trans. Am. Math. Soc. 117, 285–306 (1965)
19. Huang, X., Klinge, T.H., Lathrop, J.I., Li, X., Lutz, J.H.: Real-time computability
of real numbers by chemical reaction networks. Nat. Comput. 18(1), 63–73 (2019)
20. Kurtz, T.G.: The relationship between stochastic and deterministic models for
chemical reactions. J. Chem. Phys. 57(7), 2976–2978 (1972)
21. Shannon, C.E.: Mathematical theory of the differential analyzer. Stud. Appl. Math.
20(1–4), 337–354 (1941)
22. Yamada, H.: Real-time computation and recursive functions not real-time com-
putable. IRE Trans. Electron. Comput. EC–11(6), 753–760 (1962)
A Reaction Network Scheme
Which Implements Inference
and Learning for Hidden Markov Models
1 Introduction
A stack of tools is emerging to help automate the design process. We can now
compile abstract reaction networks to a set of DNA oligonucleotides that will
implement the dynamics of the network in solution [12]. We can computation-
ally simulate the dynamics of these oligonucleotide molecular systems [13] to
allow debugging prior to experimental implementation. In view of these rapid
advances, the study of reaction networks from the point of view of their compu-
tational capabilities has become even more urgent.
It has long been known that reaction networks can compute any computable
function [14]. The literature has several examples of reaction network schemes
that have been inspired by known algorithms [15–22]. Our group has previously
described reaction network schemes that solve statistical problems like maxi-
mum likelihood [23], sampling a conditional distribution and inference [24], and
learning from partial observations [25]. These schemes exploit the thermody-
namic nature of the underlying molecular systems that will implement these
reaction networks, and can be expressed in terms of variational ideas involving
minimization of Helmholtz free energy [26–28].
In this paper, we consider situations where partial information about the
environment is available to a cell in the form of a sequence of observations. For
example, this might happen when an enzyme is acting processively on a poly-
mer, or a molecular walker [29–31] is trying to locate its position on a grid. In
situations like this, multiple observations are not independent. Such sequences
can not be summarized merely by the type of the sequence [32], i.e., the num-
ber of times various symbols occur. Instead, the order of various observations
carries information about state changes in the process producing the sequence.
The number of sequences grows exponentially with length, and our previously
proposed schemes are algorithmically inadequate. To deal with such situations
requires a pithy representation of sequences, and a way of doing inference and
learning directly on such representations. In Statistics and Machine Learning,
this problem is solved by Hidden Markov Models (HMMs) [33].
HMMs are a widely used model in Machine Learning, powering sequence
analysis applications like speech recognition [34], handwriting recognition, and
bioinformatics. They are also essential components of communication systems
as well as of intelligent agents trained by reinforcement learning methods. In
this article, we describe a reaction network scheme which implements
the Baum-Welch algorithm. The Baum-Welch algorithm is an iterative algo-
rithm for learning HMM parameters. Reaction networks that can do such statis-
tical analysis on sequences are likely to be an essential component of molecular
communication systems, enabling cooperative behavior among a population of
artificial cells. Our main contributions are:
1. In Sect. 2, we describe what the reader needs to know about HMMs and the
Baum-Welch algorithm to be able to follow the subsequent constructions. No
prerequisites are assumed beyond familiarity with matrices and probability
distributions.
2. In Sect. 3, we describe a novel reaction network scheme to learn parameters
for an HMM.
56 A. Singh et al.
α1 α+1,1
θ11 θ22
α1 θ11 ψ1v+1
θ12 H1 H1
α1 θ
12 ψ 1
θ 21ψ
2v 1v +
+1
α 2
H1 H2
θ21
α2 θ22 ψ2v+1
ψ11 ψ12 ψ21 ψ22 H2 H2
V1 V2 V1 V2 α2 α+1,2
v v+1
(a) Hidden Markov Model (b) Forward Algorithm
θ, ψ θ, ψ
β−1,1 β1
θ11 ψ1v β1 Forward Backward
H1 H1
θ12 ψ β 1
1v β
θ 21ψ
2 1v αlg βlg
E-Step
θ22 ψ2v β2
H2 H2
ξlgh γlg
β−1,2 β2
M-Step
v−1 v
θ, ψ
(c) Backward Algorithm (d) Baum-Welch Algorithm
Fig. 1. Learning HMMs from sequences. (a) HMM: The hidden states H1 and
H2 are not directly observable. Instead what are observed are elements V1 , V2 from
the set V = {V1 , V2 } of “visible states.” The parameters θ11 , θ12 , θ21 , θ22 denote
the probability of transitions between the hidden states. The probability of observ-
ing states V1 , V2 depends on the parameters ψ11 , ψ12 , ψ21 , ψ22 as indicated in the
figure. (b) The forward algorithm computes the position l + 1 likelihood αl+1,1 =
αl1 θ11 ψ1vl+1 + αl2 θ21 ψ1vl+1 by forward propagating the position l likelihoods αl1
and αl2 . Here vl , vl+1 ∈ V are the observed emissions at position l and l + 1.
(c) The backward algorithm computes the position l − 1 conditional probability
βl−1,1 = θ11 ψ1vl βl1 + θ12 ψ2vl βl2 by propagating the position l conditional probabilities
βl1 and βl2 backwards. (d) The Baum-Welch Algorithm is a fixed point Expectation-
Maximization computation. The E step calls the forward and backward algorithm as
subroutines and, conditioned on the entire observed sequence (v1 , v2 , . . . , vL ) ∈ V L ,
computes the probabilities γlg of being in states g ∈ H at position l and the proba-
bilities ξlgh of taking the transitions gh ∈ H 2 at position l. The M step updates the
parameters θ and ψ to maximize their likelihood given the observed sequence.
The forward algorithm (Fig. 1b) takes as input an HMM (H, V, θ, ψ, π) and
a length L observation sequence (v1 , v2 , . . . , vL ) ∈ V L and outputs the L × |H|
likelihoods αlh = Pr[v1 , v2 , . . . , vl , xl = h | θ, ψ] of observing symbols v1 , . . . , vl
58 A. Singh et al.
and being in the hidden state h ∈ H at time l. It does so using the following
recursion.
Remark 1. Note that the E-step uses the forward and backward algorithms as
subroutines to first compute the α and β values. Further note that we don’t need
the forward and backward algorithms to return the actual values αlh and βlh . To
be precise, let αl = (αlh )h∈H ∈ RH denote the vector of forward likelihoods at
time l. Then for the E step to work, we only need the direction of αl and not the
magnitude. This is because the numerator and denominator in the updates are
both linear in αlh , and the magnitude cancels out. Similarly, if βl = (βlh )h∈H ∈
RH denotes the vector of backward likelihoods at time l then the E step only
cares about the direction of βl and not the magnitude. This scale symmetry is
a useful property for numerical solvers. We will also make use of this freedom
when we implement a lax forward-backward algorithm using reaction networks
in the next section.
The M step of the Baum-Welch algorithm takes as input the values γ and
ξ that are output by the E step as reconstruction of the dynamics on hidden
states, and outputs new Maximum Likelihood estimates of the parameters θ, ψ
A Reaction Network Scheme Which Implements Inference and Learning 59
that best explain these values. The update rule turns out to be very simple. For
all g, h ∈ H and w ∈ V :
L−1 L
l=1 ξlgh l=1 γlh δw,vl
θgh ← L−1 , ψhw ← L
l=1 f ∈H ξlgf l=1 γlh
1 if w = vl
where δw,vl = is the Dirac delta function.
0 otherwise
Remark 2. Like in Remark 1, note that the M step does not require its inputs
to be the actual values γ and ξ. There is a scaling symmetry so that we only
need the directions of the vectors γ(h) = (γlh )l=1,2,...,L ∈ RL for all h ∈ H and
ξ(g) = (ξlgh )1≤l≤L−1,h∈H ∈ R(L−1)×H for all g ∈ H. This gives us the freedom
to implement a lax E projection without affecting the M projection, and we will
exploit this freedom when designing our reaction network.
where the numbers yX , yX ∈ Z≥0 are the stoichiometric coefficients of species
X on the reactant side and product side respectively. A reaction network
is a pair (S, R) where R is a finite set of S-reactions. A reaction system is a
triple (S, R, k) where (S, R) is a reaction network and k : R → R>0 is called the
rate function.
As is common when specifying reaction networks, we will find it convenient
to explicitly specify only a set of chemical equations, leaving the set of species
to be inferred by the reader.
Fix a reaction system (S, R, k). Deterministic Mass Action Kinetics
describes a system of ordinary differential equations on the concentration vari-
ables {xi (t) | i ∈ S} according to:
ẋi (t) = ka→b (bi − ai ) xj (t)aj
a→b∈R j∈S
60 A. Singh et al.
In this section we will describe a reaction network for each part of the Baum-
Welch algorithm.
Fix an HMM M = (H, V, θ, ψ, π). Pick an arbitrary hidden state h∗ ∈ H
and an arbitrary visible state v ∗ ∈ V . Picking these states h∗ ∈ H and v ∗ ∈ V is
merely an artifice to break symmetry akin to selecting leaders, and our results
hold independent of these choices. Also fix a length L ∈ Z>0 for the observed
sequence.
We first work out in full detail how the forward algorithm of the Baum-
Welch algorithm may be translated into chemical reactions. Suppose a length L
sequence (v1 , v2 , . . . , vL ) ∈ V L of visible states is observed. Then recall that the
forward algorithm uses the following recursion:
– α1h ×
πh∗ ψh∗ v1 = α1h∗ × πh ψhv ∈ H \ {h∗ },
1 for all h
– αlh × g∈H α l−1,g θ gh∗ ψh∗ v
l
= αlh∗ ×
g∈H αl−1,g θ gh ψ hv l
for all h ∈
∗
H \ {h } and l = 2, . . . , L.
This prompts the use of the following reactions for the initialization step:
for all h ∈ H \ {h∗ } and w ∈ V . By design α1h × πh∗ ψh∗ v1 = α1h∗ × πh ψhv1 is the
balance equation for the pair of reactions corresponding to each h ∈ H \ {h∗ }.
Similarly for the recursion step, we use the following reactions:
is the balance equation for the set of reactions corresponding to each (h, l) ∈
H \ {h∗ } × {2, . . . , L}.
The above reactions depend on the observed sequence (v1 , v2 , . . . , vL ) ∈ V L
of visible state. This is a problem because one would have to design different
reaction networks for different observed sequences. To solve this problem we
A Reaction Network Scheme Which Implements Inference and Learning 61
introduce the species Elw with l = 1, . . . , L and w ∈ V . Now with the Elw
species, we use the following reactions for the forward algorithm:
α1h + πh∗ + ψh∗ w + E1w −
→ α1h∗ + πh∗ + ψh∗ w + E1w
α1h∗ + πh + ψhw + E1w −
→ α1h + πh + ψhw + E1w
Table 1. Baum-Welch Reaction Network: The steps and reactions are for all
g, h ∈ H, w ∈ V and l = 1, . . . , L − 1. Notice there are some null reactions of the form
ai Xi → ai Xi , which have no effect on the dynamics, and so can be ignored.
L−1
ξlgh θgh + ξlgh∗ −−→ θgh∗ + ξlgh∗
θgh ← L−1l=1
l=1 f ∈H ξlgf
θgh∗ + ξlgh −−→ θgh + ξlgh
L
l=1 γlh δw,vl
ψhw + γlh + Elv∗ −−→ ψhv∗ + γlh + Elv∗
ψhw ← L
l=1 γlh
ψhv∗ + γlh + Elw −−→ ψhw + γlh + Elw
kα+
αlh + αl−1,g + θih∗ + ψh∗ w + Elw −−lh
−→ α
klh
αlh∗ + αl−1,g + θih∗ + ψh∗ w + Elw αlh αlh∗
α−
klh
αlh∗ + αl−1,g + θgh + ψhw + Elw −−−→
αlh + αl−1,g + θgh + ψhw + Elw α α+ α−
klh = klh = klh
|H| × |V | |H| × |V | |V |
αlh βlh ξlgh
αlh∗ α
klh βlh∗ β
klh ξlh h
∗ ∗
ξ
klgh
Petal
Flower
L L
γlh θgh ψhw
γ
γlh∗ klh θgh∗ θ ψhv∗ ψ
kgh khw
components. In fact, there are obvious disadvantages to the star topology, with
a single point of failure, whereas the ring topology appears more resilient. How
network topology affects basins of attraction, rates of convergence, and emer-
gence of spurious equilibria in our algorithm is a compelling question beyond
the scope of this present work.
Algorithm:
Run the Baum-Welch reaction system with deterministic mass action
kinetics until convergence.
The Baum-Welch reaction network has number of species of each type as follows:
Type π α β θ ψ E γ ξ
Number |H| |H|L |H|L |H|2 |H||V | L|V | |H|L |H|2 (L − 1)
The total number of species is |H| + 3|H|L + |H|2 + |H||V | + L|V | + |H|2 (L − 1)
which is O(L|H|2 + |H||V
| + L|V |). The number of reactions (ignoring the null
reactions of the form ai Xi → ai Xi ) in each part is:
Theorem 2. Every positive fixed point for the Chemical Baum-Welch Algo-
rithm on a Baum-Welch Reaction system (BW (M, h∗ , v ∗ , L), k) with permis-
sible rate k is a fixed point for the Baum-Welch algorithm for the HMM
M = (H, V, θ, ψ, π).
A Reaction Network Scheme Which Implements Inference and Learning 65
Theorem 3. For the Baum-Welch Reaction System (BW (M, h∗ , v ∗ , L), k) with
permissible rates k, if the concentrations of θ and ψ species are held fixed at a
positive point then the Forward, Backward and Expection step reaction systems
on α, β, γ and ψ species converge to equilibrium exponentially fast.
Fig. 3. Simulation of Example 1: Both simulations are started at exactly the same
initial vector. This may not be apparent in the figure because concentration of some
species change rapidly at start in the reaction network.
This is a problem especially for very short sequences, and is probably happening
because in such settings, the best model sets many parameters to zero. When
many species concentrations are set to 0, many reactions get turned off, and the
network gets stuck away from the desired equilibrium. We believe this will not
happen if the HMM generating the observed sequence has nonzero parameters,
and the observed sequence is long enough.
Fig. 4. Simulation of Example 2: Both simulations are started at exactly the same
initial vector. This may not be apparent in the figure because concentration of some
species change rapidly at start in the reaction network.
5 Related Work
In previous work, our group has shown that reaction networks can perform the
Expectation Maximization (EM) algorithm for partially observed log linear sta-
tistical models [25,42]. That algorithm also applies “out of the box” to learning
HMM parameters. The problem with that algorithm is that the size of the reac-
tion network would become exponentially large in the length of the sequence,
so that even examples like Example 1 with an observation sequence of length
25 would become impractical. In contrast, the scheme we have presented in this
paper requires only a linear growth with sequence length. We have obtained the
savings by exploiting the graphical structure of HMMs. This allows us to com-
pute the likelihoods α in a “dynamic programming” manner, instead of having
to explicitly represent each path as a separate species.
Napp and Adams [20] have shown how to compute marginals on graph-
ical models with reaction networks. They exploit graphical structure by
mimicking belief propagation. Hidden Markov Models can be viewed as
a special type of graphical model where there are 2L random variables
X1 , X2 , . . . , XL , Y1 , Y2 , . . . , YL with the X random variables taking values in H
and the Y random variables in V . The X random variables form a Markov
chain X1 X2 . . . XL . In addition, there are L edges from Xl to Yl for
l = 1 to L denoting observations. Specialized to HMMs, the scheme of Napp and
Adams would compute the equivalent of steady state values of the γ species,
performing a version of the E step. They are able to show that true marginals
are fixed points of their scheme, which is similar to our Theorem 1. Thus their
work may be viewed as the first example of a reaction network scheme that
exploits graphical structure to compute E projections. Our E step goes further
by proving correctness as well as exponential convergence. Their work also raises
the challenge of extending our scheme to all graphical models.
Poole et al. [43] have described Chemical Boltzmann Machines, which are
reaction network schemes whose dynamics reconstructs inference in Boltzmann
68 A. Singh et al.
6 Discussion
We have described a one-pot one-shot reaction network implementation of the
Baum-Welch algorithm. Firstly, this involves proposing a reaction system whose
positive fixed points correspond to equilibria of the Baum-Welch Algorithm. Sec-
ondly, this involves establishing the conditions under which convergence of solu-
tions to the equilibria can be accomplished. Further, from a practical perspec-
tive, it is essential to obtain an implementation that does not rely on repeated
iteration of a reaction scheme but only requires to be run once.
As we observe in Remark 3, there is a whole class of reaction networks that
implements the Baum-Welch algorithm. We have proposed one such network and
are aware that there are other networks, potentially with more efficient dynam-
ical and analytical properties than the one proposed here. Finding and charac-
terizing efficient reaction networks that can do complicated statistical tasks will
likely be of future concern.
We have only discussed deterministic dynamical properties of the network.
However, in realistic biological contexts one might imagine that the network is
A Reaction Network Scheme Which Implements Inference and Learning 69
implemented by relatively few molecules such that stochastic effects are signifi-
cant. Consequently, the study of the Baum-Welch reaction system under stochas-
tic mass-action kinetics is likely to be of interest.
Lastly, we have mentioned the Viterbi algorithm, but have made no attempt
to describe how the maximum likelihood sequence can be recovered from our
reaction network. This decoding step is likely to be of as much interest for
molecular communication systems and molecular multi-agent systems as it is
in more traditional domains of communications and multi-agent reinforcement
learning. Because of the inherent stochasticity of reaction networks, there might
even be opportunities for list decoding by sampling different paths through the
hidden states that have high probability conditioned on the observations. This
might give an artificial cell the ability to “imagine” different possible realities,
and act assuming one of them to be the case, leading to an intrinsic stochasticity
and unpredictability to the behavior.
A Appendix
A.1 Comparing Points of Equilibria
We will now prove Theorem 1. For the sake of convenience, we first recall the
statement.
Theorem 1. Every fixed point of the Baum-Welch algorithm for an HMM
M = (H, V, θ, ψ, π) is a fixed point for the corresponding Chemical Baum-Welch
Algorithm with permissible rates k.
Proof. Consider a point Φ = (α , β , γ , ξ , θ , ψ ) with α , β , γ ∈ RL×H
≥0 , ξ ∈
, θ ∈ RH×H and ψ ∈ RH×V
(L−1)×H×H
R≥0 ≥0 ≥0 . If Φ is a fixed point of Baum-Welch
Algorithm then it must satisfy:
– α1h = πh ψhv 1
for all h ∈ H. Then for the chemical Baum-Welch Algorithm
we have
α̇1h Φ = k1h
α
α1h∗ πh ψhv 1
− α1h πh∗ ψh ∗ v1 = 0
for all h∈ H \ {h∗ } and α̇1h∗ Φ = − h =h∗ α̇1h Φ = 0.
– αlh = g∈H αl−1,g θgh ψhvl for all h ∈ H and l = 2, . . . , L. Then for the
chemical Baum-Welch Algorithm we have
⎛ ⎞
α̇lh Φ = klh
α ⎝
αlh∗
αl−1,g
θgh
ψhv l
− αlh
αl−1,g
θgh
∗ ψh∗ v
l
⎠=0
g∈H g∈H
for allh ∈ H \ {h∗ } and l = 2, . . . , L and α̇lh∗ Φ = − h =h∗ α̇lh Φ = 0.
– βlh = g∈H θhg ψgv β
l+1 l+1,g
for all h ∈ H and l = 1, . . . , L − 1. Then for the
chemical Baum-Welch Algorithm we have
⎛ ⎞
β̇lh Φ = klh
β ⎝
βlh∗ θh ∗ g ψgv
β
l+1 l+1,g
− βlh
θhg ψgv
β
l+1 l+1,g
⎠=0
g∈H g∈H
for all h ∈ H \ {h∗ } and l = 1, 2, . . . , L − 1 and β̇lh∗ Φ = − h =h∗ β̇lh Φ = 0.
70 A. Singh et al.
α β
– γl (h) = lh αlh
for all h ∈ H and l = 1, 2, . . . , L − 1. Then for the
g∈H lg βlg
chemical Baum-Welch Algorithm we have
γ
γ̇lh = klh (γlh∗ αlh βlh − γlh αlh∗ βlh∗ ) = 0
for all h ∈ H \ {h∗ } and l = 1, 2, . . . , L − 1 and γ̇lh∗ = − h =h∗ γ̇lh = 0.
αlg θgh
ψhv
βl+1,h
– ξl (g, h) = l+1
for all g, h ∈ H and l = 1, . . . , L − 1. Then for
f ∈H αlf βlf
the chemical Baum-Welch Algorithm we have
ξ˙lgh Φ = klgh
ξ
ξlh
∗ h∗ αlg θgh ψhv β
l+1 l+1,h
− ξ
α
∗ θ
lgh lh h h
∗ ∗ ψ
∗ β
h vl+1 l+1,h∗ =0
for all g, h ∈ H × H \ {(h∗ , h∗ )} and l = 1, . . . , L − 1 and ξ˙lh∗ h∗ Φ =
− (g,h) =(h∗ ,h∗ ) ξ˙lgh Φ = 0.
L−1
ξ (g,h)
– θgh = l
L−1l=1 for all g, h ∈ H. Then for the chemical Baum-Welch
l=1 f ∈H ξl (g,f )
Algorithm we have
L−1 L−1
θ̇gh Φ = kgh
θ
θgh∗
ξlgh −
θgh ξl (g, h∗ ) =0
l=1 l=1
for all g ∈ H and h ∈ H \ {h∗ } and θ̇gh∗ Φ = − h =h∗ θ̇gh Φ = 0.
L
γ (h)δ
w,vl
– ψhw L l
= l=1 for all h ∈ H and w ∈ V . Then for the chemical Baum-
l=1 γl (h)
Welch Algorithm we have
L−1 L−1
θ̇gh = kgh θgh∗
θ
Φ
ξlgh − θgh ∗
ξl (g, h ) = 0
l=1 l=1
for all h ∈ H and w ∈ V \ {v ∗ } and ψ̇hw∗ Φ = − w =w∗ ψ̇hw Φ = 0.
So Φ is fixed point of the chemical Baum-Welch Algorithm.
We will now prove Theorem 2. For the sake of convenience, we first recall the
statement.
Theorem 2. Every positive fixed point for the Chemical Baum-Welch Algorithm
on a Baum Welch Reaction system (BW (M, h∗ , v ∗ , L), k) with permissible rate k
is a fixed point for the Baum-Welch algorithm for the HMM M = (H, V, θ, ψ, π).
Proof. Consider a positive point Φ = (α , β , γ , ξ , θ , ψ ) with α , β , γ ∈ RL×H
>0 ,
(L−1)×H×H H×H H×V
ξ ∈ R>0 , θ ∈ R>0 and ψ ∈ R>0 . If Φ is a fixed point for the
Chemical Baum-Welch Algorithm then we must have:
– α̇1h Φ = 0 for all h ∈ H. This implies α1h
× πh∗ ψh ∗ v1 = α1h
∗ × πh ψhv
1
∗
for all h ∈ H \ h . Since Φ is positive, this implies
f ∈H α1f
α1h = πh ψhv1 for all h ∈ H
f ∈H πf ψf v1
A Reaction Network Scheme Which Implements Inference and Learning 71
Φ = 0 for all h ∈ H and
– α̇lh l = 2, . . . , L. This implies αlh ×
α θ ψ
g∈H l−1,g gh∗ h∗ vl = αlh∗ × α θ
g∈H l−1,g gh hvl ψ for all h ∈ H \
{h∗ } and l = 2, . . . , L. Since Φ is positive, this implies
⎛ ⎞
f ∈H αlf
αlh =⎝ αl−1,g θgh
ψhv ⎠
for all h ∈ H and l = 2, . . . , L
f,g∈H αl−1,g θgf ψf vl
l
g∈H
– β̇lh Φ = 0 for all h ∈H and l = 1, . . . , L. This implies βlh
× g∈H θhg
∗
ψgvl+1 βl+1,g = βlh∗ × g∈H θh∗ g ψgvl+1 βl+1,g for all h ∈ H \ {h } and l =
1, . . . , L − 1. Since Φ is positive, this implies
⎛ ⎞
f ∈H βlf
βlh = ⎝ θhg ψgv βl+1,g ⎠ for all h ∈ H and l = 1, . . . , L − 1
g∈H
l+1
f,g∈H θf g ψgv
βl+1,g
l+1
– γ̇lh Φ = 0 for all h ∈ H and l = 1, . . . , L. This implies γl (h) × αlh
∗ βlh∗ =
∗ ∗
γl (h ) × αlh βlh for all h ∈ H \ {h } and l = 1, 2, . . . , L − 1. Since Φ is
positive, this implies
αlh
βlh
γlh = γlg for all h ∈ H and l = 1, 2, . . . , L − 1
α
g∈H lg lg β
g∈H
– ξ˙lgh Φ = 0 for all g, h ∈ H and l = 1, . . . , L − 1. This implies ξl (g, h) ×
αlh ∗ θh∗ h∗ ψh∗ v β
l+1 l+1,h
∗ ∗
∗ = ξl (h , h ) × αlg θgh ψhv β
l+1 l+1,h
for all g, h ∈ H ×
∗ ∗
H \ {(h , h )} and l = 1, . . . , L − 1. Since Φ is positive, this implies
⎛ ⎞
αlg θgh
ψhv β
l+1 l+1,h
ξlgh = ⎝
⎠ ξlef for all g, h ∈ H × H and l = 1, . . . , L − 1
e,f ∈H αlf θef ψf vl+1 βl+1,f e,f ∈H
L−1
– θ̇gh Φ = 0 for all g, h ∈ H. This implies θgh
× l=1 ξl (g, h∗ ) = θgh
∗ ×
L−1 ∗
l=1 ξl (g, h) for all g ∈ H and h ∈ H \ {h }. Since Φ is positive, this
implies
L−1
l=1 ξlgh
θgh = L−1 θgf for all g ∈ H and h ∈ H
f ∈H ξ
l=1 lgf f ∈H
L
– ψ̇hw Φ = 0 for all h ∈ H and w ∈ V . This implies ψhw
× l=1 γl (h)δv∗ ,vl =
L ∗
∗ ×
ψhv w,vl for all h ∈ H and w ∈ V \ {v }. Since Φ is positive,
l=1 γl (h)δ
Elv = δv,vl and v∈V δv,vl = 1 this implies
L
l=1 γlh δw,vl
ψhw = L ψhv for all h ∈ H and w ∈ V
l=1 γlh v∈V
In this section we will prove Theorems 3 and 4, but first we will state and prove
two useful lemmas.
Now we revisit the observation that every reaction in the Baum-Welch reac-
tion network is a monomolecular transformation catalyzed by a set of species. For
A Reaction Network Scheme Which Implements Inference and Learning 73
ẋ = A(t)x. (2)
n
Note that the column sums of A(t) are zero, implying that i=1 xi is conserved.
Let A(t) be the matrix as defined in Eq. 1. And let A be the matrix obtained with
k inserted for k(t) in the matrix A(t) that is, A = limt→∞ A(t).
Then solutions of ODE system ẋ = A(t)x starting at x(0) ∈ Rn≥0 converges
exponentially fast towards the equilibrium a ∈ Rn>0 of the ODE system ẋ = Ax
starting at x(0) ∈ Rn≥0 , that is, there exists γ > 0 and K > 0 such that
Proof. We will first rephrase the ODE system such that standard theory is appli-
cable. Let rank of A be n − r. Let W be as defined in Lemma 1, that is, W be
74 A. Singh et al.
with C = A11 − A12 W and D = A12 . We call this as the reduced ODE system.
Note that this reduced system has only n − r variables and that the conservation
laws are built directly into it. This implies that the differential equation changes
if T is changed. The role of this construction is so that we can work only with
the non-zero eigenvalues of the A.
As we also have W A(t) = 0 for all t ≥ 0, the ODE ẋ = A(t)x can also be
similarly reduced to
x̂˙ = C(t)x̂ + D(t)T, (5)
with C(t) = A11 (t) − A12 (t)W and D(t) = A12 (t), where analogous to A11 , we
define A11 (t) to be the top-left (n−r)×(n−r) sub-matrix of A(t) and analogous
to A12 , we define A12 (t) to be the top-right (n − r) × r sub-matrix of A(t).
Now if a is the equilibrium of the ODE system ẋ = Ax starting at x(0),
then â = (a1 , . . . , an−r ) is an equilibrium of the reduced ODE system x̂˙ =
C x̂ + DT starting at x̂(0) = (x1 (0), . . . , xn−r (0)). Suppose we are able to prove
that solutions of reduced ODE x̂˙ = C(t)x̂ + D(t)T starting at x̂(0) converges
exponentially fast towards â then because of the conservation laws x̃ = T −
W x̂, we would also have that solutions of ẋ = A(t)x starting at x(0) converges
exponentially fast towards a. So henceforth, we will work only with the reduced
A Reaction Network Scheme Which Implements Inference and Learning 75
ODE systems. For notational convenience, we will drop the hats off x̂ and â and
simply refer to them as x and a respectively.
By subtracting and adding terms to the reduced ODE system (in Eq. 5), we
have
ẋ = C(t)x + D(t)T
= Cx + DT + (C(t) − C)x + (D(t) − D)T.
Now A as defined (see Eq. 1 with k inserted for k(t)) would form a Laplacian
matrix over a strongly connected graph and so it follows that all the eigenvalues
of A are either zero or have negative real part. And using C = A11 − A12 W
and Lemma 1 it follows that all eigenvalues of C have negative real part. Hence
it follows that
|| eCt || ≤ K2 e−γ2 t ,
where 0 < γ2 < −(λ1 ) and K2 > 0. Here λ1 is the eigenvalue of C with the
largest real part.
The matrices C(t) and D(t) are linear in k(t). And as k(t) converges expo-
nentially fast towards k, it follows that the matrices C(t) and D(t) converge
exponentially fast towards C and D respectively. Hence it follows that
where
– || (C0 (t) − C) || || x(t) || ≤ K3 e−γ3 t for some K3 , γ3 > 0 as C(t) converges
exponentially
n fast towards C and x(t) is bounded (as in the original ODE
i=1 x i is conserved), and
– || (D0 (t) − D) || || T || ≤ K4 e−γ4 t for some K4 , γ4 > 0 as D(t) converges
exponentially fast towards D, and
– K5 = 12 max(K3 , K4 ) and γ5 = min(γ3 , γ4 ).
Collecting all terms we have for all t ≥ 0,
t
−γ2 t
|| y(t) || ≤ || y(0) || K2 e + K2 e−γ2 (t−s) × K5 e−γ5 s ds
0
t
−γ0 t
≤ K0 e + K0 e−γ0 t ds
0
= K0 e−γ0 t (1 + t)
≤ Ke−γt
by choosing K0 = max (K2 K5 , || y(0) || K2 ) and γ0 = min(γ1 , γ2 ). In the last line
γ is chosen such that 0 < γ < γ0 and K is sufficiently large. Since y(t) = x(t) − a
we have,
|| x(t) − a || ≤ Ke−γt ,
as required.
We will now prove Theorem 3. For the sake of convenience, we first recall the
statement.
Theorem 3. For the Baum Welch Reaction System (BW (M, h∗ , v ∗ , L), k) with
permissible rates k, if the concentrations of θ and ψ species are held fixed at a
positive point then the Forward, Backward and Expection step reaction systems
on α, β, γ and ψ species converge to equilibrium exponentially fast.
Proof. It follows by repeated use of Lemma 2. For l = 1 the forward reaction
network can be interpretated as the following molecular reactions:
hπ ∗ψ ∗ E1w
α1h −−−−h−−
w
−−→ α1h∗
πh ψhw E1w
α1h∗ −−−−−−−→ α1h
for all h ∈ H \ {h∗ } and w ∈ V , as they are dynamically equivalent. Here the
effective rate constants (πh∗ ψh∗ w E1w or πh ψhw E1w ) are independent of time
and so the conditions of Lemma 2 are fulfilled. Thus this portion of the reaction
network converges exponentially fast.
The rest of the forward reaction network can be similarly interpretated as
the following molecular reactions:
αl−1,g θgh∗ ψh∗ w Elw
αlh −−−−−−−−−−−−−→ αlh∗
αl−1,g θgh ψhw Elw
αlh∗ −−−−−−−−−−−→ αlh
A Reaction Network Scheme Which Implements Inference and Learning 77
where K is some suitably large constant. We can further observe that αl (t)βl (t)
converges exponentially fast towards al bl at rate γ = min(γa , γb ), where γa
and γb , respectively, are the exponential convergence rates of αl (t) and βl (t). A
similar argument goes for the products of the form αl (t)βl+1 (t). And thus the
expectation reaction network, also converges exponentially fast.
We will now prove Theorem 4. For the sake of convenience, we first recall the
statement.
Theorem 4. For the Baum Welch Reaction System (BW (M, h∗ , v ∗ , L), k) with
permissible rates k, if the concentrations of α, β, γ and ξ species are held fixed at
a positive point then the Maximization step reaction system on θ and ψ converges
to equilibrium exponentially fast.
Proof. Exponential convergence of the maximisation network follows by a similar
layer by layer inductive use of Lemma 2.
References
1. Soloveichik, D., Seelig, G., Winfree, E.: DNA as a universal substrate for chemical
kinetics. Proc. Natl. Acad. Sci. 107(12), 5393–5398 (2010)
2. Srinivas, N.: Programming chemical kinetics: engineering dynamic reaction net-
works with DNA strand displacement. Ph.D. thesis, California Institute of Tech-
nology (2015)
3. Qian, L., Soloveichik, D., Winfree, E.: Efficient turing-universal computation with
DNA polymers. In: Sakakibara, Y., Mi, Y. (eds.) DNA 2010. LNCS, vol. 6518, pp.
123–140. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-18305-
8 12
4. Cardelli, L.: Strand algebras for DNA computing. Nat. Comput. 10, 407–428 (2011)
5. Lakin, M.R., Youssef, S., Cardelli, L., Phillips, A.: Abstractions for DNA circuit
design. J. R. Soc. Interface 9(68), 470–486 (2011)
78 A. Singh et al.
6. Cardelli, L.: Two-domain DNA strand displacement. Math. Struct. Comput. Sci.
23, 02 (2013)
7. Chen, Y.-J., et al.: Programmable chemical controllers made from DNA. Nat. Nan-
otechnol. 8(10), 755–762 (2013)
8. Lakin, M.R., Stefanovic, D., Phillips, A.: Modular verification of chemical reaction
network encodings via serializability analysis. Theor. Comput. Sci. 632, 21–42
(2016)
9. Srinivas, N., Parkin, J., Seelig, G., Winfree, E., Soloveichik, D.: Enzyme-free nucleic
acid dynamical systems. Science 358, 6369 (2017)
10. Cherry, K.M., Qian, L.: Scaling up molecular pattern recognition with DNA-based
winner-take-all neural networks. Nature 559, 7714 (2018)
11. Zechner, C., Seelig, G., Rullan, M., Khammash, M.: Molecular circuits for dynamic
noise filtering. Proc. Natl. Acad. Sci. 113(17), 4729–4734 (2016)
12. Badelt, S., Shin, S.W., Johnson, R.F., Dong, Q., Thachuk, C., Winfree, E.: A
general-purpose CRN-to-DSD compiler with formal verification, optimization, and
simulation capabilities. In: Brijder, R., Qian, L. (eds.) DNA 2017. LNCS, vol.
10467, pp. 232–248. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-
66799-7 15
13. Lakin, M.R., Youssef, S., Polo, F., Emmott, S., Phillips, A.: Visual DSD: a design
and analysis tool for DNA strand displacement systems. Bioinformatics 27(22),
3211–3213 (2011)
14. Hjelmfelt, A., Weinberger, E.D., Ross, J.: Chemical implementation of neural net-
works and Turing machines. Proc. Natl. Acad. Sci. 88(24), 10983–10987 (1991)
15. Buisman, H.J., ten Eikelder, H.M.M., Hilbers, P.A.J., Liekens, A.M.L.: Computing
algebraic functions with biochemical reaction networks. Artif. Life 15(1), 5–19
(2009)
16. Oishi, K., Klavins, E.: Biomolecular implementation of linear I/O systems. IET
Syst. Biol. 5(4), 252–260 (2011)
17. Soloveichik, D., Cook, M., Winfree, E., Bruck, J.: Computation with finite stochas-
tic chemical reaction networks. Nat. Comput. 7(4), 615–633 (2008)
18. Chen, H.-L., Doty, D., Soloveichik, D.: Deterministic function computation with
chemical reaction networks. Nat. Comput. 13(4), 517–534 (2014)
19. Qian, L., Winfree, E.: Scaling up digital circuit computation with DNA strand
displacement cascades. Science 332(6034), 1196–1201 (2011)
20. Napp, N.E., Adams, R.P.: Message passing inference with chemical reaction net-
works. In: Advances in Neural Information Processing Systems, pp. 2247–2255
(2013)
21. Qian, L., Winfree, E., Bruck, J.: Neural network computation with DNA strand
displacement cascades. Nature 475(7356), 368–372 (2011)
22. Cardelli, L., Kwiatkowska, M., Whitby, M.: Chemical reaction network designs for
asynchronous logic circuits. Nat. Comput. 17(1), 109–130 (2018)
23. Gopalkrishnan, M.: A scheme for molecular computation of maximum likelihood
estimators for log-linear models. In: Rondelez, Y., Woods, D. (eds.) DNA 2016.
LNCS, vol. 9818, pp. 3–18. Springer, Cham (2016). https://doi.org/10.1007/978-
3-319-43994-5 1
24. Virinchi, M.V., Behera, A., Gopalkrishnan, M.: A stochastic molecular scheme for
an artificial cell to infer its environment from partial observations. In: Brijder, R.,
Qian, L. (eds.) DNA 2017. LNCS, vol. 10467, pp. 82–97. Springer, Cham (2017).
https://doi.org/10.1007/978-3-319-66799-7 6
A Reaction Network Scheme Which Implements Inference and Learning 79
25. Viswa Virinchi, M., Behera, A., Gopalkrishnan, M.: A reaction network scheme
which implements the EM algorithm. In: Doty, D., Dietz, H. (eds.) DNA 2018.
LNCS, vol. 11145, pp. 189–207. Springer, Cham (2018). https://doi.org/10.1007/
978-3-030-00030-1 12
26. Amari, S.: Information Geometry and Its Applications. Springer, Tokyo (2016).
https://doi.org/10.1007/978-4-431-55978-8
27. Csiszár, I., Matus, F.: Information projections revisited. IEEE Trans. Inf. Theor.
49(6), 1474–1490 (2003)
28. Jaynes, E.T.: Information theory and statistical mechanics. Phys. Rev. 106, 4
(1957)
29. Shin, J.-S., Pierce, N.A.: A synthetic DNA walker for molecular transport. J. Am.
Chem. Soc. 126(35), 10834–10835 (2004)
30. Reif, J.: The design of autonomous DNA nano-mechanical devices: walking and
rolling DNA. In: DNA Computing, pp. 439–461 (2003)
31. Sherman, W., Seeman, N.: A precisely controlled DNA biped walking device. Nano
Lett. 4, 1203–1207 (2004)
32. Cover, T.M., Thomas, J.A.: Elements of Information Theory. Wiley, New York
(2012)
33. Rabiner, L.R.: A tutorial on hidden Markov models and selected applications in
speech recognition. Proc. IEEE 77(2), 257–286 (1989)
34. Juang, B.H., Rabiner, L.R.: Hidden Markov models for speech recognition. Tech-
nometrics 33(3), 251–272 (1991)
35. Feinberg, M.: On chemical kinetics of a certain class. Arch. Rational Mech. Anal
46, 1–41 (1972)
36. Horn, F.J.M.: Necessary and sufficient conditions for complex balancing in chemical
kinetics. Arch. Ration. Mech. Anal. 49, 172–186 (1972)
37. Feinberg, M.: Lectures on chemical reaction networks (1979). http://www.che.eng.
ohio-state.edu/FEINBERG/LecturesOnReactionNetworks/
38. Gopalkrishnan, M.: Catalysis in reaction networks. Bull. Math. Biol. 73(12), 2962–
2982 (2011)
39. Anderson, D.F., Craciun, G., Kurtz, T.G.: Product-form stationary distributions
for deficiency zero chemical reaction networks. Bull. Math. Biol. 72(8), 1947–1970
(2010)
40. Tu, B.P., McKnight, S.L.: Metabolic cycles as an underlying basis of biological
oscillations. Nat. Rev. Mol. Cell Biol. 7, 9 (2006)
41. McLachlan, G., Krishnan, T.: The EM Algorithm and Extensions, vol. 382. Wiley,
Hoboken (2007)
42. Singh, A., Gopalkrishnan, M.: EM algorithm with DNA molecules. In: Poster Pre-
sentations of the 24th Edition of International Conference on DNA Computing and
Molecular Programming (2018)
43. Poole, W., et al.: Chemical Boltzmann machines. In: Brijder, R., Qian, L. (eds.)
DNA 2017. LNCS, vol. 10467, pp. 210–231. Springer, Cham (2017). https://doi.
org/10.1007/978-3-319-66799-7 14
44. Roweis, S., Ghahramani, Z.: A unifying review of linear Gaussian models. Neural
Comput. 11(2), 305–345 (1999)
45. Maass, W.: On the computational power of winner-take-all. Neural Comput.
12(11), 2519–2535 (2000)
46. Kappel, D., Nessler, B., Maass, W.: STDP installs in winner-take-all circuits an
online approximation to hidden Markov model learning. PLoS Comput. Biol. 10,
3 (2014)
Efficient Parameter Estimation for DNA
Kinetics Modeled as Continuous-Time
Markov Chains
1 Introduction
Nucleic acid kinetic simulators [9,29,34,35] aim to predict the kinetics of inter-
acting nucleic acid strands, such as the rate of a reaction or the sequence of inter-
actions between the strands. These simulators are desirable for building nucleic
acid-based devices whose nucleic acid sequences need to be carefully designed to
control their behaviour. For example, neural networks can be realized in DNA
using strand displacement reactions [6]. However, the rates of reactions vary by
several orders of magnitude depending on sequence and conditions and are hard
to predict, making the design of artifacts challenging. Accurate kinetic simula-
tors would allow many, though not all, unanticipated design flaws to be identified
prior to conducting wet-lab experiments, and would allow more complex molec-
ular devices to be designed and successfully implemented with fewer deficiencies
needing to be debugged experimentally.
Because of these pressing needs, there has been great progress on simula-
tors that can model the kinetics of interacting nucleic acid strands. The sim-
ulators range from coarse-grained models that consider large rearrangements
of the base pairs [34,35], and often factor in tertiary structure, to elementary
step models that consider the forming or breaking of a single base pair [9,29],
and to molecular dynamics models that follow the three-dimensional motion of
the polymer chains [27,31]. Elementary step models are of interest to us here
because they are computationally more efficient than molecular dynamics, yet
they also can represent and thus discover unexpected sequence-dependent sec-
ondary structures within intermediate states. Continuous-time Markov chains
(CTMCs) play a central role in modeling nucleic acid kinetics with elementary
steps, such as Kinfold [9] and Multistrand [28,29]. States of the CTMCs corre-
spond to secondary structures and have exponentially distributed holding times,
and transitions between states correspond to forming or breaking of a single
base pair. Nucleic acid kinetic models [24,42], along with nucleic acid thermal
stability models [2,17,38,39], specify the rate of transition between states and
the holding time of states. These simulators can stochastically sample paths
(sequences of states from an initial to a target state) and trajectories (sequences
of states from an initial to a target state, along with the times to transition
between successive states). The mean first passage time (MFPT) from an initial
to a target state can be estimated from sampled trajectories. The first passage
time of a trajectory is the first time that the trajectory occupies the target state.
Kinetic rates, such as the rate constant of a reaction [28], can then be derived
from such estimates.
Our work addresses two challenging tasks in accurately predicting the MFPT
of a reaction’s CTMC, in the full state space of all non-pseudoknotted1 secondary
structures. The first task is to estimate the MFPT of a reaction’s CTMC, given
a calibrated kinetic model. The second task is to calibrate parameters of kinetic
1
A pseudoknot is a secondary structure that has at least two base pairs in which one
nucleotide of a base pair is intercalated between the two nucleotides of the other
base pair.
82 S. Zolaktaf et al.
models; even though thermal stability models are well calibrated [3,23], param-
eters of kinetic models, which affect the rate of transition between states and
consequently holding times of states, are not well calibrated [42]. These tasks are
challenging, particularly for multistranded DNA kinetics, because when nucleic
acid strands interact, they are prone to the formation of many metastable sec-
ondary structures due to stochastic formation and breakage of base pairs. The
number of possible secondary structures nucleic acids can form may be exponen-
tially large compared to the number of nucleotides the strands contain. More-
over, to make accurate estimations, many sampled trajectories might be required,
which might be time-consuming to obtain (see Sect. 4). In this work, we make
progress on these tasks, by focusing on the Multistrand kinetic simulator [28,29]
(described in Sect. 2.1), that is used to analyze the folding kinetics of multiple
interacting nucleic acid strands and models the kinetics as CTMCs with elemen-
tary steps. In the rest of this section, first, we describe related work for MFPT
estimation and our contributions. Then, we describe related work for calibrating
kinetic models based on MFPTs and our contributions.
2 Preliminaries
The Multistrand kinetic simulator [28,29] models the kinetics of multiple inter-
acting nucleic acid strands as a CTMC. A state of the CTMC represents a system
microstate, in other words, the configuration of the strands in the fixed volume
that we simulate. A system microstate is a collection of complex microstates. A
complex microstate is a set of strands connected by base pairing (secondary struc-
tures). In Multistrand, all possible secondary structures are permitted except for
pseudoknots. Multistrand defines the energy of a state as the sum of the standard
free energy for each complex, which is determined with Multistrand’s nucleic acid
thermal stability model. Transitions between states correspond to the forming
or breaking of a single base pair. For example, in Fig. 1, state t can transition to
states s and u. The transition rate kts from state t to state s is determined by
the energy of the states and a nucleic acid kinetic model.
kst ktu
kts kut
st at e s st at e t st at e u
Fig. 1. State t can transition to states s and u by breaking or forming a single base
pair, respectively. The reverse transitions are also possible.
Efficient Parameter Estimation for DNA CTMC Kinetics 85
We experiment with the Metropolis [24] and the Arrhenius [42] kinetic mod-
els that are implemented in the Multistrand software. The Metropolis kinetic
model has two free parameters kuni and kbi that distinguish between unimolec-
ular and bimolecular transitions, respectively. In the Arrhenius kinetic model,
transition rates additionally depend on the local context of the base pair that is
forming or breaking. The model differentiates between seven different half con-
texts C = {stack, loop, end, stack+loop, stack+end, loop+end, stack+stack}. For
example, in Fig. 1, in the transition from state t to state s, the half contexts of
the base pair that is breaking are a stack and a loop. An Arrhenius rate con-
stant Al and an activation energy El are associated with each half context l. The
model also has a bimolecular scaling constant α. In total, the model has 15 free
parameters.
To sample paths and trajectories for a reaction, experimental conditions need
to be determined, such as the sequence of the strands, the temperature, the
concentration of Na+ and Mg2+ cations, and the initial concentration of the
strands. We adopt the trajectory mode of Multistrand for all reactions of our
dataset. In this mode, SSA is implemented to simulate trajectories over the
CTMC of a reaction, starting in an initial state and halting when the reaction
is over, and to estimate the MFPT. For helix association and hairpin closing
reactions, all trajectories start from the state where no base pairs are formed
and end at the state where the duplex is fully formed. For hairpin opening and
helix dissociation the start and end states are reversed. Given the estimated
MFPT τ̂ r of reaction r, as computed over several trajectories, the reaction rate
constant of reaction r is computed as
1
r r first order reaction
k̂ = τ̂ 1 , (1)
τ̂ r ur second order reaction
2. At a jump from the current state si , SSA samples the next state si+1 from
the outgoing transition probabilities of state si , in other words, p(si , s) =
k si s
ks , si = s.
i
3 Methodology
2
For our purpose here, we are only interested in the MFPT, so the smaller variance
is good. In other contexts, the full distribution of FPTs will be of interest, and for
that purpose only SSA, but not RVSSA, will be appropriate.
Efficient Parameter Estimation for DNA CTMC Kinetics 87
Let P be a path of length Z from state s to state t, with expected holding times
T 1 , ..., T Z−1 , obtained by using RVSSA with initial state s, and ending the first
time that state t is sampled. In RVSSA, we compute the MFPT of the path as
Z−1
Y RVSSA = T i. (3)
i=1
For an unbiased estimator, the expected mean squared error (MSE) of the
estimator is equal to the variance of the estimator [36]. Consequently, RVSSA
has a smaller MSE than SSA and requires fewer sampled paths to estimate the
MFPT,
1 1
E[(τ̂N
RVSSA
− τ )2 ] = Var(Y RVSSA ) < Var(F SSA ) = E[(τ̂N
SSA
− τ )2 ]. (6)
N N
expectation of the moment conditions is zero at the true value of the parame-
ters. Given a column vector g of moment conditions and its transpose gT , the
GMM method seeks the true parameter set θ∗ as
This can be recognized as the least mean squared error (MSE) parameter set.
In our experiments (described in Sect. 4.3), we seek a parameter set that
minimizes the GMM estimator. However, we also considered using the negative
of Eq. (14) from our previous work [42], where g r (θ) is defined to be normally
distributed with an unbiased mean and variance σ 2 , and a small L2 regularization
term is also defined. With this objective function, the predictive quality of the
fixed path ensemble inference (FPEI) approach, which we describe later on, only
slightly changes for our dataset.
Efficient Parameter Estimation for DNA CTMC Kinetics 89
where the transition rates of the CTMC depend on the parameter set θm
and the path is obtained with θ0 . Because of the condensed representation,
this formula is not literally computed, but rather a mathematically equiva-
lent one with fewer terms is computed. Given N fixed paths obtained with
θ0 , we estimate the MFPT of the CTMC that is parameterized with θm as
N
τ̂N
FPEI
(θm ) = N1 n=1 YnFPEI (θm ).
With fixed paths, the MFPT estimates are biased and the learned parameter
set might not perform well in the full state space where other paths are possible.
Therefore, to reduce the bias and to ensure that the ensemble of paths is a
fair sample with respect to the optimized parameters, we alternate between
minimizing the error of prediction on fixed paths, and resampling new paths and
90 S. Zolaktaf et al.
Algorithm 1. SSAI
θ ← θ0 // Choose initial parameter set θ0
Initialize the simplex in the Nelder-Mead algorithm using θ and its
perturbations
while stopping criteria not met do
// See Section 4.3 for our stopping criteria
θ ← Retrieve a parameter set from the Nelder-Mead algorithm
Update the free parameters of the kinetic model with θ
foreach reaction r ∈ dataset D do
foreach n=1,2,...,N do
Sample a trajectory Pn using SSA and calculate its FPT using
Eq. 2
Calculate the MFPT of the reaction using the FPTs of the trajectories
Calculate the GMM function in Eq. 9 using the MFPT of the reactions
Update the simplex in the Nelder-Mead algorithm based on the GMM
function
Algorithm 2. FPEI
θ ← θ0 // Choose initial parameter set θ0
while stopping criteria not met do
// See Section 4.3 for our stopping criteria
Update the free parameters of the kinetic model with θ
foreach reaction r ∈ dataset D do
foreach n=1,2,...,N do
Sample a path Pn using RVSSA
Condense path Pn for the reaction
Initialize the simplex in the Nelder-Mead algorithm using θ and its
perturbations
while stopping criteria not met do
θ ← Retrieve a parameter set from the Nelder-Mead algorithm
Update the free parameters of the kinetic model with θ
foreach reaction r ∈ dataset D do
foreach n=1,2,...,N do
Calculate the MFPT of path Pn using Eq. 10
Calculate the MFPT of the reaction using the MFPTs of the paths
Calculate the GMM function in Eq. 9 using the MFPT of the reactions
Update the simplex in the Nelder-Mead algorithm based on the GMM
function
the relative likelihood of the path given the new and the initial parameter sets
L̃(θm ) = L(θ m)
L(θ0 ) , where L(θm ) is the likelihood of P under parameter assignment
Z−1 ks s (θm ) − ks s (θm )T i (θm )
θm . For RVSSA, L(θm ) = i=1 i i+1 e s∈S i , and we esti-
s∈S ksi s (θm )
N
mate the MFPT as τ̂N (θm ) = N L̃ (θ ) n=1 L̃n (θm )Yn
FPEI 1 FPEI
(θm ). In our
n=1 n m
experiments, this approach performed poorly, since the effective sample size of
the relative likelihoods was small.
4 Experiments
To evaluate the performance of RVSSA for MFPT estimation and FPEI for
parameter estimation, in the full state space of all non-pseudoknotted secondary
structures of each reaction, we augment the Multistrand kinetic simulator [28,29]
and we conduct computational experiments. Our dataset and framework are
available at https://github.com/DNA-and-Natural-Algorithms-Group/FPEI.
4.1 Dataset
To evaluate the performance of RVSSA and FPEI, we use 21 experimentally
determined reaction rate constants published in the literature, including hairpin
closing [5], hairpin opening [5], helix association [16,37], and helix dissociation
with and without mismatches [7]. The dataset is summarized in Table 1. Each
reaction of the dataset is annotated with a temperature and the concentration
of Na+ , which affect the transition rates in the kinetic models that we use.
Fig. 2. The MFPT and 95% confidence interval of SSA and RVSSA, where the kinetic
model is parameterized with θ0 . In both (a) and (b), RVSSA and SSA are using
the same sampled paths. In (a), RVSSA and SSA have similar variance. The average
computation time per sampled path, defined as the total computation time divided by
the total number of sampled paths, is 3 × 102 s. In (b), RVSSA has a lower variance
than SSA. The average computation time per sampled path is 0.5 s.
92 S. Zolaktaf et al.
(a) Reaction no. 16 (b) Reaction no. 20 (c) Reaction no. 16 (d) Reaction no. 20
Fig. 3. Histogram of the length of 100 random paths obtained with RVSSA for (a)
reaction no. 16 and (b) reaction no. 20. Histogram of the number of bimolecular join
transitions of the random paths for (c) reaction no. 16 and (d) reaction no. 20. Snapshot
of the i-th state visited, dot-parentheses notation and jump times for a random path
obtained with RVSSA for (e) reaction no. 16 and (f ) reaction no. 20. The jump time
at state i is equal to the jump time at state i − 1 plus the holding time of state i − 1.
The green highlighting indicates where a bimolecular step occurs. (Color figure online)
RVSSA has a lower variance than SSA for reactions no. 20 and 21, but performs
similar to SSA for other reactions in Table 1.
divided by the total number of iterations. Figure 5 shows the MSE and average
computation time per iteration when the entire dataset is used. Reactions no.
20–21 are excluded in parameter estimation because of our uncertainty in our
interpretation of the reported measurements. For reactions no. 1–15, FPEI and
SSAI use 200 paths and 200 trajectories, respectively. For reactions no. 16–19,
where simulations are more time-consuming, FPEI and SSAI use 20 paths and
20 trajectories, respectively.
We conduct distinct experiments by starting with two sets of initial param-
eters, where paths and trajectories are generated in a reasonable time. In one
group of experiments (Figs. 4a, c, e, g, and 5a), we initialize the simplex in
the Nelder-Mead algorithm with the Arrhenius initial parameter set [32,42],
in other words, θ0 = {Al = 468832.1058 s−1/2 , El = 3 kcal mol−1 | ∀l ∈
C} ∪ {α = 0.0402 M−1 } and its perturbations (in each perturbation, a parame-
ter is multiplied by 1.05). In FPEI, we also use θ0 to generate fixed paths. In
another set of experiments (Figs. 4b, d, f, h, and 5b), we adapt parameter set
θ0 = {Al = 468832.1058 s−1/2 , El = 2 kcal mol−1 | ∀l ∈ C} ∪ {α = 0.0402 M−1 }
from θ0 to increase the initial MSE in all experiments. We initialize the simplex
in the Nelder-Mead algorithm with θ0 and its perturbations (in each perturba-
tion, a parameter is multiplied by 1.05). In FPEI, we also generate fixed paths
with θ0 . In SSAI, we run the optimization until a limit on the number of itera-
tions is reached or until a time limit is reached, which ever comes first. We also
use this as the first stopping criteria in FPEI. In FPEI, to reduce the bias and to
ensure that the ensemble of paths is a fair sample with respect to the optimized
parameters, occasionally, the fixed paths are rebuilt from scratch and the opti-
mization restarts. To this end, we set the second stopping criteria in FPEI to 200
iterations or 200 function evaluations of the Nelder-Mead algorithm, whichever
comes first. Note that this empirical value is subject to change for different exper-
iments. We could improve the method, by investigating a more robust way of
when to update the paths. For example, we could compare the performance of
SSA with the fixed paths in shorter intervals and update the fixed paths when
their predictive quality diverges from SSA. During the optimization, we use an
infinite value for parameter sets that have rates that are too slow or too fast; we
bound downhill unimolecular and bimolecular rates (Eq. (7) and Eq. (8) of [42])
in [1 × 104 , 1 × 109 ] s−1 and in [1 × 104 , 1 × 109 ] M−1 s−1 , respectively.
In Figs. 4d–h, FPEI reaches a minimal MSE more quickly than SSAI; con-
sider the average computation time per iteration multiplied by the number of
iterations to reach a minimal MSE. However, in Figs. 4a–c, SSAI reaches a mini-
mal MSE more quickly than FPEI. This is because in Figs. 4d–h, the number of
unique states is significantly smaller than the length of the paths. For example,
in Fig. 4h, in the first set of fixed paths, the average length of a path is more
than 2.3 × 107 , whereas the average number of unique states and transitions is
less than 1.5 × 105 and 5.6 × 105 , respectively. In Fig. 4a, the average length of a
path is 4.6 × 102 , whereas the average number of unique states and transitions
is 1.3 × 102 and 2.4 × 102 , respectively. In Figs. 4e and f, which are slow disso-
ciation reactions, compared to SSAI, FPEI speeds up parameter estimation by
Efficient Parameter Estimation for DNA CTMC Kinetics 95
Fig. 4. The MSE of SSAI and FPEI on different types of reactions from Table 1. The
average computation time per iteration is shown in the label of each method. The
markers show the MSE when trajectories are rebuilt from scratch using the learned
parameter set from FPEI. In Figs. 4e–h, the SSAI traces stop at earlier iterations than
the FPEI traces, even though SSAI was allocated more time than FPEI.
96 S. Zolaktaf et al.
more than a factor of three. In Figs. 4g–h, compared to SSAI, FPEI speeds up
parameter estimation by more than a factor of two. Also, the speed of FPEI in
all the figures could be improved with a better implementation of the method;
in our implementation, in the first iteration, computing neighbor states of all
states in a fixed condensed path is slow, whereas the later iterations which reuse
the fixed condensed paths are much faster than SSAI.
In Figs. 5a and b, where reactions no. 1–19 are all used in the optimization,
FPEI speeds up parameter estimation, by more than a factor of two compared
to SSAI. In Fig. 5a, FPEI reaches an MSE of 0.15 in 1.2 × 106 s, whereas SSAI
reaches an MSE of 0.39 in the same time. In Fig. 5b, FPEI reaches an MSE of
0.43 in 1.3 × 106 s, whereas SSAI reaches an MSE of 3.72 in the same time.
Fig. 5. As in Fig. 4, but reactions no. 1–19 are all used as the dataset.
5 Discussion
In this work, we show how to use RVSSA to estimate the MFPT of a reaction’s
CTMC. In our experiments, RVSSA has a lower variance than SSA in estimating
the MFPT of a reaction’s CTMC, when in the sampled paths there exists a small
number of states that have large expected holding times compared to other states.
Furthermore, we show how to use FPEI along with a GMM estimator and the
Nelder-Mead algorithm to estimate parameters for DNA kinetics modeled as
CTMCs. In FPEI, we use RVSSA instead of SSA, since the MFPT estimator
produced by RVSSA has a lower variance. In FPEI, we use fixed condensed
paths because sampling new paths for every parameter set is computationally
expensive. Since using fixed paths leads to biased estimates, we alternate between
minimizing the error of prediction on fixed paths, and resampling new paths and
restarting the optimization method. FPEI speeds up computations when the
number of unique states is significantly smaller than the length of sampled paths.
In our experiments on a dataset of DNA reactions, FPEI speeds up parameter
estimation compared to using SSAI, by more than a factor of three for slow
reactions. Also, in our experiments, for reactions with large state spaces, it speeds
up parameter estimation by more than a factor of two.
Efficient Parameter Estimation for DNA CTMC Kinetics 97
FPEI can be applied to reactions modeled as CTMCs, when the fixed paths
can be produced in a timely manner. Generating paths for FPEI could be compu-
tationally expensive for slow reactions, such as helix dissociation from Morrison
and Stols [25]. The runtime also depends on the parameter set that is used.
It would be helpful to make FPEI applicable for such reactions, by speeding
up the generation of the fixed paths, for example, with importance sampling
approaches [13].
Finally, in this work, we evaluated FPEI in the context of DNA reactions. It
would be useful to adopt and evaluate FPEI in other CTMC models [9,34,35],
and other domains that require estimating MFPTs in CTMCs, such as protein
folding.
References
1. Andrieu, C., Roberts, G.O.: The pseudo-marginal approach for efficient Monte
Carlo computations. Ann. Stat. 37, 697–725 (2009)
2. Andronescu, M., Aguirre-Hernandez, R., Condon, A., Hoos, H.H.: RNAsoft: a suite
of RNA secondary structure prediction and design software tools. Nucleic Acids
Res. 31, 3416–3422 (2003)
3. Andronescu, M., Condon, A., Hoos, H.H., Mathews, D.H., Murphy, K.P.: Computa-
tional approaches for RNA energy parameter estimation. RNA 16(12), 2304–2318
(2010)
4. Barton, R.R., Ivey Jr., J.S.: Nelder-Mead simplex modifications for simulation
optimization. Manag. Sci. 42(7), 954–973 (1996)
5. Bonnet, G., Krichevsky, O., Libchaber, A.: Kinetics of conformational fluctuations
in DNA hairpin-loops. Proc. Natl. Acad. Sci. 95(15), 8602–8606 (1998)
6. Cherry, K.M., Qian, L.: Scaling up molecular pattern recognition with DNA-based
winner-take-all neural networks. Nature 559(7714), 370 (2018)
7. Cisse, I.I., Kim, H., Ha, T.: A rule of seven in Watson-Crick base-pairing of mis-
matched sequences. Nat. Struct. Mol. Biol. 19(6), 623 (2012)
8. Doucet, A., Johansen, A.M.: A tutorial on particle filtering and smoothing: fifteen
years later. Handb. Nonlinear Filter. 12(656–704), 3 (2009)
9. Flamm, C., Fontana, W., Hofacker, I.L., Schuster, P.: RNA folding at elementary
step resolution. RNA 6, 325–338 (2000)
10. Georgoulas, A., Hillston, J., Sanguinetti, G.: Unbiased Bayesian inference for pop-
ulation Markov jump processes via random truncations. Stat. Comput. 27(4), 991–
1002 (2017)
11. Gillespie, D.T.: Exact stochastic simulation of coupled chemical reactions. J. Phys.
Chem. 81(25), 2340–2361 (1977)
12. Golightly, A., Wilkinson, D.J.: Bayesian parameter inference for stochastic bio-
chemical network models using particle Markov chain Monte Carlo. Interface Focus
1(6), 807–820 (2011)
13. Hajiaghayi, M., Kirkpatrick, B., Wang, L., Bouchard-Côté, A.: Efficient continuous-
time Markov chain estimation. In: International Conference on Machine Learning,
pp. 638–646 (2014)
14. Hansen, L.P.: Large sample properties of generalized method of moments estima-
tors. Econ. J. Econ. Soc. 50, 1029–1054 (1982)
15. Hansen, L.P., Heaton, J., Yaron, A.: Finite-sample properties of some alternative
GMM estimators. J. Bus. Econ. Stat. 14(3), 262–280 (1996)
98 S. Zolaktaf et al.
16. Hata, H., Kitajima, T., Suyama, A.: Influence of thermodynamically unfavorable
secondary structures on DNA hybridization kinetics. Nucleic Acids Res. 46(2),
782–791 (2017)
17. Hofacker, I.L.: Vienna RNA secondary structure server. Nucleic Acids Res. 31(13),
3429–3431 (2003)
18. Hordijk, A., Iglehart, D.L., Schassberger, R.: Discrete time methods for simulating
continuous time Markov chains. Adv. Appl. Probab. 8(4), 772–788 (1976)
19. Horváth, A., Manini, D.: Parameter estimation of kinetic rates in stochastic reac-
tion networks by the EM method. In: 2008 International Conference on BioMedical
Engineering and Informatics, vol. 1, pp. 713–717. IEEE (2008)
20. Lehmann, E.L., Casella, G.: Theory of Point Estimation. Springer, New York
(2006)
21. Loskot, P., Atitey, K., Mihaylova, L.: Comprehensive review of models and methods
for inferences in bio-chemical reaction networks. arXiv preprint arXiv:1902.05828
(2019)
22. Lück, A., Wolf, V.: Generalized method of moments for estimating parameters of
stochastic reaction networks. BMC Syst. Biol. 10(1), 98 (2016)
23. Mathews, D.H., Sabina, J., Zuker, M., Turner, D.H.: Expanded sequence depen-
dence of thermodynamic parameters improves prediction of RNA secondary struc-
ture. J. Mol. Biol. 288(5), 911–940 (1999)
24. Metropolis, N., Rosenbluth, A.W., Rosenbluth, M.N., Teller, A.H., Teller, E.: Equa-
tion of state calculations by fast computing machines. J. Chem. Phys. 21(6), 1087–
1092 (1953)
25. Morrison, L.E., Stols, L.M.: Sensitive fluorescence-based thermodynamic and
kinetic measurements of DNA hybridization in solution. Biochemistry 32, 3095–
3104 (1993)
26. Nelder, J.A., Mead, R.: A simplex method for function minimization. Comput. J.
7(4), 308–313 (1965)
27. Ouldridge, T.E., Louis, A.A., Doye, J.P.: Structural, mechanical, and thermody-
namic properties of a coarse-grained DNA model. J. Chem. Phys. 134(8), 02B627
(2011)
28. Schaeffer, J.M.: Stochastic simulation of the kinetics of multiple interacting nucleic
acid strands. Ph.D. thesis, California Institute of Technology (2012)
29. Schaeffer, J.M., Thachuk, C., Winfree, E.: Stochastic simulation of the kinetics of
multiple interacting nucleic acid strands. In: Phillips, A., Yin, P. (eds.) DNA 2015.
LNCS, vol. 9211, pp. 194–211. Springer, Cham (2015). https://doi.org/10.1007/
978-3-319-21999-8 13
30. Schnoerr, D., Sanguinetti, G., Grima, R.: Approximation and inference methods
for stochastic biochemical kinetics–a tutorial review. J. Phys. Math. Theor. 50(9),
093001 (2017)
31. Schreck, J.S., et al.: DNA hairpins destabilize duplexes primarily by promoting
melting rather than by inhibiting hybridization. Nucleic Acids Res. 43(13), 6181–
6190 (2015)
32. Srinivas, N., et al.: On the biophysics and kinetics of toehold-mediated DNA strand
displacement. Nucleic Acids Res. 41, 10641–10658 (2013)
33. Suhov, Y., Kelbert, M.: Probability and Statistics by Example: Volume 2, Markov
Chains: A Primer in Random Processes and Their Applications, vol. 2. Cambridge
University Press, Cambridge (2008)
34. Šulc, P., Romano, F., Ouldridge, T.E., Rovigatti, L., Doye, J.P., Louis, A.A.:
Sequence-dependent thermodynamics of a coarse-grained DNA model. J. Chem.
Phys. 137(13), 135101 (2012)
Efficient Parameter Estimation for DNA CTMC Kinetics 99
35. Tang, X., Kirkpatrick, B., Thomas, S., Song, G., Amato, N.M.: Using motion
planning to study RNA folding kinetics. J. Comput. Biol. 12(6), 862–881 (2005)
36. Wackerly, D., Mendenhall, W., Scheaffer, R.L.: Mathematical Statistics with Appli-
cations. Cengage Learning, Boston (2014)
37. Wetmur, J.G.: Hybridization and renaturation kinetics of nucleic acids. Annu. Rev.
Biophys. Bioeng. 5(1), 337–361 (1976)
38. Xu, Z.Z., Mathews, D.H.: Experiment-assisted secondary structure prediction with
RNAstructure. In: Turner, D., Mathews, D. (eds.) RNA Structure Determination:
Methods and Protocols, pp. 163–176. Humana Press, New York (2016)
39. Zadeh, J.N., et al.: NUPACK: analysis and design of nucleic acid systems. J. Com-
put. Chem. 32, 170–173 (2011)
40. Zhang, D.Y., Winfree, E.: Control of DNA strand displacement kinetics using
toehold exchange. J. Am. Chem. Soc. 131, 17303–17314 (2009)
41. Zhang, J.X., et al.: Predicting DNA hybridization kinetics from sequence. Nat.
Chem. 10(1), 91 (2018)
42. Zolaktaf, S., et al.: Inferring parameters for an elementary step model of DNA
structure kinetics with locally context-dependent arrhenius rates. In: Brijder, R.,
Qian, L. (eds.) DNA 2017. LNCS, vol. 10467, pp. 172–187. Springer, Cham (2017).
https://doi.org/10.1007/978-3-319-66799-7 12
New Bounds on the Tile Complexity
of Thin Rectangles at Temperature-1
1 Introduction
such a rectangle thin). They proved that the size of the smallest set of tiles that
uniquely self-assemble
1 into
1
(i.e., the tile complexity of) a thin k × N rectangle is
O N k + k and Ω Nkk at temperature-2. Their lower bound actually applies
to all tile sets (temperature-1, temperature-2, etc.) but their upper bound con-
struction requires temperature-2 and does not work correctly at temperature-1.
In this paper, we continue the line of research into the tile complexity of thin
rectangles, initiated by Aggarwal, Cheng, Goldwasser, Kao, Moisset de Espanés
and Schweller, but exclusively for temperature-1 tile self-assembly.
The main results of this paper are bounds on the tile complexity of thin rectan-
gles at temperature-1. We give an improved lower bound for the tile complexity
of 2D thin rectangles as well as a non-trivial upper bound for the tile complexity
of just-barely 3D thin rectangles. Intuitively, a just-barely 3D thin rectangle is
like having at most two 2D thin rectangles stacked up one on top of the other.
We prove two main results: one negative (lower bound) and one positive (upper
bound). Our main negative result gives a new and improved asymptotic lower
bound on the tile complexity of a 2D thin rectangle at temperature-1, without
assuming unique production of the terminal assembly (unique self-assembly).
Currently, the best upper bound for the tile complexity of a k × N rectangle
for temperature-1 tile sets is N +k −1, and is obtained via a straightforward gen-
eralization of the “Comb construction” by Rothemund and Winfree (see Fig. 2b
of [12]). So, while Theorem 1 currently does not give a tight bound, its proof tech-
nique showcases a novel application of Catalan numbers to proving lower bounds
for temperature-1 self-assembly in 2D, and could be of independent interest.
Our main positive result is the first non-trivial upper bound on the tile com-
plexity of just-barely 3D thin rectangles.
We say that our main positive result is the first non-trivial upper bound
because a straightforward generalization of the aforementioned Comb construc-
tion would give an upper bound of O (N + k) on the tile complexity of a just-
barely 3D k × N thin rectangle.
New Bounds on the Tile Complexity of Thin Rectangles at Temperature-1 103
inspired by but requires a substantially different proof technique from theirs. Our
construction, like theirs, uses a just-barely 3D counter, the base of which depends
on the dimensions of the target rectangle, but unlike theirs, ours self-assembles
in a zig-zag manner and the digits of the counter are encoded geometrically,
vertically-oriented and in binary.
2 Preliminaries
γ(x ) = α(x ), for all x ∈ dom β, γ(x ) = β(x ), and γ(x ) is undefined at any
point x ∈ Zd \ (dom α ∪ dom β).
An assembly is a connected, non-empty configuration, i.e., a partial function
α : Zd T such that Gbdom α is connected and dom α
= ∅. Given τ ∈ Z+ , α
is τ -stable if every cut-set of Gbα has weight at least τ , where the weight of an
edge is the strength of the glue it represents.1 When τ is clear from context, we
say α is stable. Given two assemblies α, β, we say α is a subassembly of β, and
we write α β, if dom α ⊆ dom β and, for all points p ∈ dom α, α(p) = β(p).
A d-dimensional tile assembly system (TAS) is a triple T = (T, σ, τ ), where
T is a tile set, σ : Zd T is the finite, τ -stable, seed assembly, and τ ∈ Z+ is
the temperature.
Given two τ -stable assemblies α, β, we write α →T1 β if α β and |dom β \
dom α| = 1. In this case we say α T -produces β in one step. If α →T1 β,
dom β \ dom α = {p},and t = β(p), we write β = α + (p → t). The T -frontier
of α is the set ∂ T α = α→T β (dom β \ dom α), i.e., the set of empty locations at
1
which a tile could stably attach to α. The t-frontier of α, denoted ∂tT α, is the
T T
subset of ∂ α defined as p ∈ ∂ α α →1 β and β(p) = t . T
Let AT denote the set of all assemblies of tiles from T , and let AT<∞ denote
the set of finite assemblies of tiles from T . A sequence of k ∈ Z+ ∪ {∞} assem-
blies α = (α0 , α1 , . . .) over AT is a T -assembly sequence if, for all 1 ≤ i < k,
αi−1 →T1 αi . The result of an assembly sequence α, denoted as res(α), is the
unique limiting assembly (for a finite sequence, this is the final assembly in the
sequence).
We write α →T β, and we say α T -produces β (in 0 or more steps), if there
is a T -assembly sequence α0 , α1 , . . . of length k = |dom β \ dom α| + 1 such that
(1) α = α0 , (2) dom β = 0≤i<k dom αi , and (3) for all 0 ≤ i < k, αi β. If k
is finite then it is routine to verify that β = αk−1 .
We say α is T -producible if σ →T α, and we write A[T ] to denote the set of
T -producible assemblies.
An assembly α is T -terminal if α is τ -stable and ∂ T α = ∅. We write A [T ] ⊆
A[T ] to denote the set of T -producible, T -terminal assemblies. If |A [T ]| = 1
then T is said to be directed.
In general, a d-dimensional shape is a set X ⊆ Zd . We say that a TAS T self-
assembles X if, for all α ∈ A [T ], dom α = X, i.e., if every terminal assembly
produced by T places a tile on every point in X and does not place any tiles on
points in Zd \ X. We say that a TAS T uniquely self-assembles X if A [T ] = {α}
and dom α = X.
In the spirit of [12], we define the tile complexity of a shape X at temper-
τ
ature τ , denoted by KSA (X), as the minimum number of distinct tile types
of any TAS in which it self-assembles, i.e., KSA τ
(X) = min {n | T = (T, σ, τ ) ,
|T | = n and X self-assembles in T }. The directed tile complexity of a shape X
at temperature τ , denoted by KUτ SA (X), is the minimum number of distinct
1
A cut-set is a subset of edges in a graph which, when removed from the graph,
produces two or more disconnected subgraphs. The weight of a cut-set is the sum of
the weights of all of the edges in the cut-set.
New Bounds on the Tile Complexity of Thin Rectangles at Temperature-1 105
tile types of any TAS in which it uniquely self-assembles, i.e., KUτ SA (X) =
min {n | T = (T, σ, τ ) , |T | = n and X uniquely self-assembles in T }.
3 Lower Bound
In this section, we prove Theorem 1, which is a lower bound on the tile complexity
of 2D rectangles. So, going forward, let k, N ∈ N. We say that Rk,N 2
is a 2D k ×N
rectangle if Rk,N = {0, 1, . . . , N − 1} × {0, 1, . . . , k − 1}. Throughout this section,
2
2
we will denote Rk,N as simply Rk,N . Our lower bound relies on the following
observation regarding temperature-1 self-assembly.
To prove our lower bound, we will use a variation of the Window Movie Lemma
(WML) by Meunier, Patitz, Summers, Theyssier, Winslow and Woods and a
corollary thereof. In this subsection, we review standard notation [10] for and
give the statements of the variation that we use in our lower bound proof.
A window w is a set of edges forming a cut-set of the full grid graph of
Zd . Given a window w and an assembly α, a window that intersects α is a
partitioning of α into two configurations (i.e., after being split into two parts,
each part may or may not be disconnected). In this case we say that the window
w cuts the assembly α into two configurations αL and αR , where α = αL ∪ αR .
Given a window w, its translation by a vector Δ, written w + Δ is simply the
translation of each one of w’s elements (edges) by Δ.
For a window w and an assembly sequence α, we define a glue win-
dow movie M to be the order of placement, position and glue type for each
glue that appears along the window w in α. Given an assembly sequence α
and a window w, the associated glue window movie is the maximal sequence
Mα ,w = (v 1 , g1 ) , (v 2 , g2 ) , . . . of pairs of grid graph vertices v i and glues gi ,
given by the order of the appearance of the glues along window w in the assem-
bly sequence α. Furthermore, if m glues appear along w at the same instant
(this happens upon placement of a tile which has multiple sides touching w)
then these m glues appear contiguously and are listed in lexicographical order
106 D. Furcy et al.
Fig. 1. An assembly, a simple path and the various types of glue window movies.
with indices c0 and c1 , satisfying |cσ − c0 | < |cσ − c1 |, and such that either c0 or
c1 (or both) are in between cσ and the furthest (from σ) extreme column. Since
s is a simple path from the location of σ to some location in the extreme column
of Rk,N that is furthest from σ, s crosses between c0 and c1 through e crossing
edges in Gbρ , where 1 ≤ e ≤ k and e is odd, visiting a total of 2e endpoints.
The endpoint of a crossing edge in column c0 (c1 ) is its near (far) endpoint. A
crossing edge points away from (towards) the seed if its near endpoint is visited
first (second).
Observe that the first and last crossing edges visited by s must point away
from the seed but each crossing edge that points away from the seed (except the
last crossing edge) is immediately followed by a corresponding crossing edge that
points towards the seed, when skipping the part of s that connects them without
going through another crossing edge in between them. Assume that the rows of
Rk,N are assigned an index from 1 (top) to k (bottom). Let E ⊆ {1, . . . , k} be
such that |E| = e and f ∈ E and l ∈ E be the row indices of the first and last
crossing edges visited, respectively. We define a near (far) crossing pairing over
E starting at f ∈ E (ending at l ∈ E) as a set of p = e−1 2 non-overlapping pairs
of elements in E\{f } (E\{l}), where each pair contains (the row indices of) one
crossing edge pointing away from the seed and its corresponding crossing edge
pointing towards the seed. See Fig. 2 for examples of the previous definitions.
For counting purposes pertaining to a forthcoming argument, we establish an
injective mapping from near crossing pairings over E to strings of balanced
parentheses of length e − 1.
108 D. Furcy et al.
Lemma 2. There exists an injective function from the set of all near crossing
pairings over E starting at f into the set of all strings of 2p balanced parentheses.
Proof. Given a near crossing pairing P with p pairs, build a string x with 2p
characters indexed from 1 to 2p going from left to right, as follows. For each
element {a, b} of P , with a < b and assuming a is the i-th lowest row index and
b is the j-th lowest row index in E\{f }, place a left parenthesis at index i and
a right parenthesis at index j.
Corollary 2. There exists an injective function from the set of all far crossing
pairings over E ending at l into the set of all strings of 2p balanced parentheses.
The three previous steps are depicted in Fig. 2b. We purposely allow choosing
l = f because our intention is to upper bound the number of ways to select and
order the endpoints
2p of the crossing edges. Moreover, l = f when e = 1. Denote
as Cp = p+1
1
p the pth Catalan number (indexed starting at 0).
The two previous steps are depicted in Fig. 2c. At this point, we have chosen
the locations and connectivity pattern of all the crossing edges. We now show
that there is at most one way in which both endpoints of every crossing edge
may be visited by s, subject to the constraints imposed by the previous steps.
6. Let Ij (r) be the index i, such that xj [i] corresponds to the crossing edge
with row index r. The following greedy algorithm attempts to build a path
110 D. Furcy et al.
π of locations that (1) starts at the near endpoint of the first crossing edge,
(2) ends at the far endpoint of the last crossing edge and (3) visits only
the endpoints of the crossing edges while following the balanced parenthesis
pairings of both x0 and x1 .
1 Initialize π = ((c0 , f ) , (c1 , f )) to be a sequence of locations, j = 1 and
r = f , where r stands for “row number” and j stands for the current
side, near (0) or far (1).
2 while r
= l do
3 Let r be the unique row index of the crossing edge, such that, Ij (r)
and Ij (r ) are paired.
4 Set r = r .
5 Append (cj , r) to π.
6 Set j = (j + 1) mod 2.
7 Append (cj , r) to π.
First, note that no endpoint can be visited more than once, so the algorithm
always terminates. Second, note that, when the algorithm terminates, either
|π| = 2e (see Fig. 2d) or |π| < 2e (see Fig. 3). However, regardless of its
length, π is the unique sequence of endpoints of crossing edges that can be
visited by any simple path starting at (c0 , f ), ending at (c1 , l) and following
the balanced parenthesis pairings of both x0 and x1 . The uniqueness of π
follows from the uniqueness of r , given r, based on the balanced parenthesis
pairings of both x0 and x1 .
Fig. 3. A “bad” sample run of the counting procedure. Here, x0 = (())() and x1 =
()()(). With f = 12, l = 2 and E = {2, 4, 5, 6, 8, 10, 12}, there is no valid π (crossing
edges 4 and 5 are skipped, assuming the pairs of parentheses are faithfully followed),
so the algorithm terminates with |π| = 10 < 2e = 14.
1
2p2
By the above counting procedure, there are at most ke e p+1 p · 1 ways
to select and order the endpoints of the crossing edges between an arbitrary pair
of consecutive columns c0 and c1 as they are visited by a simple path.
Proof. Let
G1 be the set of glues of (the tile types in) T . It suffices to show that
|T | = Ω N k . Since s is the longest path in Gbρ , from the location of σ to some
location in an extreme column of Rk,N , by Lemma 3, if N > 2·|G|k ·23k+2 ·k, then
there exists a window w, along with vectors Δ1 and Δ2 , such that, Δ1
= 0 ,
Δ2
= 0 and Δ1
= Δ2 and satisfying Mα ,w s = (Mα ,w+Δ 1 s) − Δ1 and
Mα ,w+Δ 1 s = (Mα ,w+Δ 2 s) − Δ2 . Without loss of generality, assume that
w and w + Δ1 are on the same side of σ and w + Δ1 is to the left of w.
Assume that w partitions α into αL and αR and w + Δ1 partitions β = α
into βL and βR . Then, by Corollary 1, βL (αR + Δ1 ) ∈ A[T ]. Since Δ1
= 0 ,
dom (βL (αR + Δ1 )) \Rk,N
= ∅. In other words, T produces some assembly that
places at least one tile at a location that is not an element of Rk,N . Therefore,
it must hold that N ≤ 2 · |G|k · 23k+2 · k, which implies that |G|k ≥ 23k+3
N
·k
, and
N k1 1 1
|G|
thus |G| ≥ 23k+3 ·k ≥ 6k k 1 = 128 . Finally, note that |T | ≥ 4 and it
Nk Nk
1 (2 ·2 ) k
follows that |T | = Ω N k .
Note that the main technique for the proof of Theorem 1 does not hold in
3D because Lemma 2 requires planarity.
112 D. Furcy et al.
4 Upper Bound
In this section, we give a construction for a singly-seeded TAS in which a suffi-
ciently large just-barely 3D rectangle uniquely self-assembles. Going forward, we
3
say that Rk,N ⊆ Z3 is a 3D k × N rectangle if {0, 1, . . . , N − 1} × {0, 1, . . . , k −
1} × {0} ⊆ Rk,N3
⊆ {0, 1 . . . , N − 1} × {0, 1 . . . , k − 1} × {0, 1}. For the sake of
3
clarity of presentation, we represent Rk,N vertically.
Following standard presentation conventions for “just-barely” 3D tile self-
assembly, we use big squares to represent tiles placed in the z = 0 plane and
small squares to represent tiles placed in the z = 1 plane. A glue between a z = 0
tile and a z = 1 tile is denoted as a small black disk. Glues between z = 0 tiles
are denoted as thick lines. Glues between z = 1 tiles are denoted as thin lines.
The following is our main positive result.
1
= O N 3 + log N .
k
Theorem 2. KU1 SA Rk,N 3
The general idea of our construction is inspired by, but substantially different
from, a similar construction by Aggarwal, Cheng, Goldwasser, Kao, Moisset de
Espanés and Schweller [2] for the self-assembly of two-dimensional k × N thin
rectangles at temperature-2. The basic idea of our construction for Theorem 2 is
to use a counter, the base of which is a function of k and N . Then, we initialize the
counter with a certain starting value and have it increment until its maximum
value, at which point it rolls over to all 0’s and the assembly goes terminal.
See Fig. 4 for an example of our construction shown at two different levels of
granularity.
Since the height (number of tile rows) of each logical row in the counter
depends on k and
N, 1we
must choose its starting value carefully.
Therefore, let
N −3l−1
d = k3 , m = N d
5 , l = log m + 1, s = m d
− 3l+2 , c = k mod 3,
and r = N + 1 mod 3l + 2, where d is the number of digits in the counter, m
is the numerical base of the counter, l is the number of bits needed to represent
each digit in the counter’s value plus one for the “left edge”, s is the numerical
start of the counter, and c and r are the number of tile columns and tile rows,
respectively, that must be filled in after and outside of the counter. Each digit
of the counter requires a width of 3 tiles, which has a direct relation with the
tile complexity of the construction. The values of m and s are chosen such that
the counter stops just before reaching a height of N tiles, at which point, the
assembly is given a flat “roof”. For example, in Fig. 4, we have d = 3, m = 3,
l = 3, s = 23, c = 2, and r = 2.
A gadget is a group of tiles that perform a specific task as they self-assemble.
Gadgets are referred to by a name like Gadget. We define the tile set for our
construction that proves Theorem 2 via a series of gadgets. All gadgets are
depicted in a corresponding figure, where the input glue is explicitly specified by
an arrow, output glues are inferred and glues internal to the gadget are configured
to ensure unique self-assembly within the gadget. We say that a gadget is general
if its input and output glues are undefined. From general gadgets, we create
New Bounds on the Tile Complexity of Thin Rectangles at Temperature-1 113
specific gadgets in which all of the glues are defined. We define a gadget unit as
a collection of gadgets with a singular purpose, like incrementing the value of
a counter. In the rest of this section, we define all of the general gadgets, from
which all of the specific gadgets that comprise all of the gadget units of our
construction are created.
Fig. 6. The Counter gadget unit. A row of units shares half of its space with the row
above and the other half of its space with the row below.
116 D. Furcy et al.
1
tile types in the Counter unit in our construction is O N 3
k
and see Fig. 7
for an example.
construction is O N 3 .
k
5 Future Work
It is
well-known that the tile complexity of a 2D N × N square at temperature-2
is O logloglogNN . More formally, for an N × N square SN 2
= SN = {0, 1, . . . , N −
1} × {0, 1, . . . , N − 1}, KU2 SA (SN ) = O logloglogNN [1]. However, it is conjec-
tured [8] that KU1 SA (SN ) = 2N − 1, meaning that a 2D N × N square does
New Bounds on the Tile Complexity of Thin Rectangles at Temperature-1 117
Fig. 8. The Return Row gadget unit. Fig. 9. The Roof gadget unit.
118 D. Furcy et al.
References
1. Adleman, L.M., Cheng, Q., Goel, A., Huang, M.-D.: Running time and program
size for self-assembled squares. In: STOC, pp. 740–748 (2001)
2. Aggarwal, G., Cheng, Q., Goldwasser, M.H., Kao, M.-Y., de Espanés, P.M.,
Schweller, R.T.: Complexities for generalized models of self-assembly. SIAM J.
Comput. 34, 1493–1515 (2005)
3. Barish, R.D., Schulman, R., Rothemund, P.W., Winfree, E.: An information-
bearing seed for nucleating algorithmic self-assembly. Proc. Nat. Acad. Sci.
106(15), 6054–6059 (2009)
4. Cook, M., Fu, Y., Schweller, R.: Temperature 1 self-assembly: deterministic assem-
bly in 3D and probabilistic assembly in 2D. In: Proceedings of the 22nd Annual
ACM-SIAM Symposium on Discrete Algorithms (2011)
5. Doty, D., Patitz, M.J., Summers, S.M.: Limitations of self-assembly at temperature
1. Theor. Comput. Sci. 412, 145–158 (2011)
6. Furcy, D., Micka, S., Summers, S.M.: Optimal program-size complexity for self-
assembled squares at temperature 1 in 3D. Algorithmica 77(4), 1240–1282 (2017)
7. Furcy, D., Summers, S.M.: Optimal self-assembly of finite shapes at temperature
1 in 3D. Algorithmica 80(6), 1909–1963 (2018)
8. Manuch, J., Stacho, L., Stoll, C.: Two lower bounds for self-assemblies at temper-
ature 1. J. Comput. Biol. 17(6), 841–852 (2010)
9. Mao, C., LaBean, T.H., Relf, J.H., Seeman, N.C.: Logical computation using algo-
rithmic self-assembly of DNA triple-crossover molecules. Nature 407(6803), 493–
496 (2000)
10. Meunier, P.-E., Patitz, M.J., Summers, S.M., Theyssier, G., Winslow, A., Woods,
D.: Intrinsic universality in tile self-assembly requires cooperation. In: Proceedings
of the 25th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pp.
pp. 752–771 (2014)
11. Meunier, P.-É., Woods, D.: The non-cooperative tile assembly model is not intrin-
sically universal or capable of bounded turing machine simulation. In: Proceedings
of the 49th Annual ACM SIGACT Symposium on Theory of Computing, STOC
2017, Montreal, 19–23 June 2017, pp. 328–341 (2017)
New Bounds on the Tile Complexity of Thin Rectangles at Temperature-1 119
1 Introduction
Our ability to understand and control matter at the scale of molecules conjures
a future where we can engineer our own materials, interact with biological net-
works to cure their malfunctions, and build molecular computers and nanoscale
Research supported by European Research Council (ERC) under the European Union’s
Horizon 2020 research and innovation programme (grant agreement No 772766,
Active-DNA project), and Science Foundation Ireland (SFI) under Grant number
18/ERCS/5746.
1
Actually, deterministic tile assembly systems map directly to deterministic finite
automata.
122 P.-É. Meunier and D. Regnault
Due to the proximity with finite automata, a first intuition to prove the
weakness of this model is that we can try to “pump” parts of an assembly
between two tiles of equal type, resulting in infinite, periodic paths. However,
this is not always possible, where an attempt to pump would result in a glue
mismatch, which would block the growth. This conflict leads to consider three
variants of this model: the case without mismatch where any assembly using at
least twice the same tile type is pumpable, the directed case where conflicts can
occur but where a tile assembly will always produce the same terminal assembly
and the non-directed case where a tile assembly will not always produce the
same terminal assembly.
Before this paper, a single positive construction was known, in which for
all ε, a tileset Tε could build multiple assemblies, all of Manhattan diameter
(2 − ε)|Tε | (this means in particular that Tε cannot build any infinite assembly).
Even though that result was the first example of an algorithmic construction,
the term “algorithm” in that case is to be taken in an extremely weak sense
of a program whose running time is larger than its size. Indeed, the resulting
assemblies were only a constant factor bigger than the program size, perhaps
analogous to a program that calls the same function twice.
Here, we show a way to build an assembly of width Θ(n log n) with only n
different tile types, using the two dimensions to build a “controlled loop”:
Theorem 1. For all t ≥ 0, there is a tile assembly system T = (T, σ, 1), where
|σ| = 1, |T | ≥ t, and all assemblies α ∈ A [T ] are of horizontal span w =
Θ(|T | log |T |) and height less than |T |, and contain the same path P of width w.
Our construction relies on non-directedness in such a crucial way that it leads
us to conjecture that the expressiveness of the non-directed case is stronger than
the directed one. Moreover, it also shows that there no “trivial” pumping lemma
since the proof of such a result would have to deal with our construction. How-
ever, there are strong reasons to believe that 2D noncooperative tile assembly
is not capable of performing Turing computation, since it is in particular not
capable of simulating Turing machines inside a rectangle [13], which is the only
known form of Turing computation in tile assembly.
The abstract tile assembly model was introduced by Winfree [21]. In this paper
we study a restriction of this model called the temperature 1 abstract tile assem-
bly model, or noncooperative abstract tile assembly model. For a more detailed
definition of the full model, as well as intuitive explanations, see for exam-
ple [16,18].
Non-cooperatively Assembling Large Structures 123
A tile type is a unit square with four sides, each consisting of a glue type and
a nonnegative integer strength. Let T be a finite set of tile types. The sides of a
tile type are respectively called north, east, south, and west.
An assembly is a partial function α : Z2 T where T is a set of tile types
and the domain of α (denoted dom(α)) is connected. We let AT denote the set
of all assemblies over the set of tile types T . In this paper, two tile types in an
assembly are said to bind (or interact, or are stably attached ), if the glue types
on their abutting sides are equal, and have strength ≥1. An assembly α induces
a weighted binding graph Gα = (V, E), where V = dom(α), and there is an edge
{a, b} ∈ E if and only if the tiles at positions a and b interact, and this edge
is weighted by the glue strength of that interaction. The assembly is said to be
τ -stable if every cut of Gα has weight at least τ . A tile assembly system is a
triple T = (T, σ, τ ), where T is a finite set of tile types, σ is a τ -stable assembly
called the seed, and τ ∈ N is the temperature.
Given two τ -stable assemblies α and β, we say that α is a subassembly of
β, and write α β, if dom(α) ⊆ dom(β) and for all p ∈ dom(α), α(p) = β(p).
We also write α →T1 β if we can obtain β from α by the binding of a single tile
type, that is: α β, |dom(β) \ dom(α)| = 1 and the tile type at the position
dom(β) \ dom(α) stably binds to α at that position. We say that γ is producible
from α, and write α →T γ if there is a (possibly empty) sequence α1 , α2 , . . . , αn
where n ∈ N ∪ {∞}, α = α1 and αn = γ, such that α1 →T1 α2 →T1 . . . →T1 αn .
A sequence of n ∈ Z+ ∪ {∞} assemblies α0 , α1 , . . . over AT is a T -assembly
sequence if, for all 1 ≤ i < n, αi−1 →T1 αi .
The set of productions, or producible assemblies, of a tile assembly system
T = (T, σ, τ ) is the set of all assemblies producible from the seed assembly σ
and is written A[T ]. An assembly α is called terminal if there is no β such that
α →T1 β. The set of all terminal assemblies of T is denoted A [T ].
In this paper, we consider that τ = 1. Thus, we make the simplifying assump-
tion that all glue types have strength 0 or 1: it is not difficult to see that this
assumption does not change the behavior of the model (if a glue type g has
strength sg ≥ 1, in the τ = 1 model then a tile with glue type g binds to a
matching glue type on an assembly border irrespective of the exact value of sg ).
Consider an assembly α which is producible by a tile assembly system at tem-
perature 1, since only one glue of strength 1 is needed to stably bind a tile type
to an assembly then any path of the binding graph of α can grow if it is bind to
the seed. Thus at temperature 1, it is more pertinent to consider path instead of
assembly. Now, we introduce definitions which are useful to study temperature 1.
Let T be a set of tile types. A tile is a pair ((x, y), t) ∈ Z2 × T where (x, y) is
a position and t is a tile type. Intuitively, a path is a finite or one-way-infinite
simple (non-self-intersecting) sequence of tiles placed on points of Z2 so that
each tile in the sequence interacts with the previous one, or more precisely:
124 P.-É. Meunier and D. Regnault
– for all Pj and Pj+1 defined on P it is the case that tj and tj+1 interact, and
– for all Pj , Pk such that j
= k it is the case that (xj , yj )
= (xk , yk ).
2
Intuitively, although producible paths are not assemblies, any producible path P
encodes an unambiguous description of how to grow asm(P ) from the seed σ, accord-
ing to the order of the sequence P , to produce the assembly σ ∪ asm(P ).
Non-cooperatively Assembling Large Structures 125
Fig. 1. In our examples, we consider k = 4 and n = 10. The seed (in white) is at
position (0, 0) and we represent the path S (4,4) = GO4 B 4 R(4,4) . This path is producible
by T (k,n) and this figure contains exactly one occurrence of each tile type of T (k,n) .
The height of S (4,4) is hk − 1 and its width is 2n − 1. The tiles of O4 and R(4,4) with
a glue on their east side are marked by a black dot. (Color figure online)
Non-cooperatively Assembling Large Structures 127
Fact 4. For any k, n ∈ N, for any 1 ≤ j ≤ i ≤ k and for any position (x, y)
occupied by:
– a tile of G, we have 1 ≤ x ≤ n and 0 ≤ y ≤ 1;
– a tile of Oi , we have x = n − 1 and 2 ≤ y ≤ hi − 1;
– a tile of B i , we have n ≤ x ≤ 2n − 1 and hi − 2 ≤ y ≤ hi − 1;
– a tile of R(i,j) , we have x = n and hi − hj + hj−1 ≤ y ≤ hi − 3 (for j = i, we
have hi−1 ≤ y ≤ hi − 3).
The paths (S (i,j) )1≤j≤i≤k will be used to characterize all the paths producible
by T (k,n) . To achieve this goal, we need to know the positions of the free glues
on these paths (see Fig. 1). These glues can be deduced from the free glues of
S (i,i) .
Non-cooperatively Assembling Large Structures 129
Fig. 2. The path S (1,1) = GO1 B 1 = D1 (for k = 4 and n = 10). The south glue of its
last tile does a mismatch. Thus, this path is a dead-end. (Color figure online)
Lemma 6. For any k, n ∈ N and for any 1 ≤ i ≤ k, the free glues of S (i,i) are:
– the north glue ohi −2 of the tile Ohi −3 whose position is (n − 1, hi − 1) if i < k;
– for all 1 ≤ i ≤ i − 1 the east glue b0 of the tile Ohi −3 whose position is
(n − 1, hi −1 );
(i,i)
– for all 2 ≤ j ≤ i the east glue g0 of the tile Rhj −hj−1 −3 whose position is
(n, hi − hj + hj−1 );
(i,i)
– the south glue rhi −hi−1 −2 of the tile Rhi −hi−1 −3 whose position is (n, hi−1 ) if
1 < i < k.
Proof. Pretty straightforward, except for the special case where i = 1 (see Fig. 2)
the last tile of GO1 B 1 R(1,1) is the last tile of B 1 . Nevertheless, the south glue
of the tile B2n−1
1
whose position is (n, 2) is not free because of a mismatch with
the tile Gn whose position is (n, 1) and which has no glue on its north side.
A corollary of this lemma is that S (1,1) is a dead-end (see Fig. 2). Also, for
all 2 ≤ j ≤ i ≤ k, let − →
v (i,j) be the vector (n, hi − hj + hj−1 ) and since the last
tile of S (i,j)
is (n, hi − hj + hj−1 ) and since the type of its east east glue is g0
then for all P producible by T (k,n) , if S (i,j) (G0 + − →
v (i,j) ) is a prefix of P then P
can be written S (i,j)
P where P − v →
− (i,j)
is a path producible by T (k,n) .
Fact 7. For any k, n ∈ N and for any path P producible by T (k,n) , either P is
a prefix of GOk or there exists 1 ≤ i ≤ k such that GOi B0i is a prefix of P .
There are only k different prefixes for a producible path with is large enough.
Now, let’s look at how these different prefixes can grow. For all 1 ≤ i ≤ k, by
attaching tiles to the end of GOi B0i , this path will always grow into GOi B i .
130 P.-É. Meunier and D. Regnault
Fig. 3. The path D3 for k = 4 and n = 10. This path is obtained by attaching red tiles
to GO3 B 3 until a conflict occurs with G. For all 1 ≤ i < k, the path Di is a dead-end.
The path Dk is a special case since it is equal to S (k,k) (see Fig. 1) whose last tile has
a free glue on its east side. (Color figure online)
Fact 8. For any k, n ∈ N and for any path P producible by T (k,n) , there exists
1 ≤ i ≤ k such that either:
– P is a prefix of Di ;
– there exists 2 ≤ j ≤ i such that S (i,j) (G0 + −
→
v (i,j) ) is a prefix of P .
Moreover, for all 1 ≤ i < k, Di is a dead-end.
Now, we have obtained k−1 different prefixes which are dead-end and (k−1)2
prefixes which are not. Now, let’s look at how these different prefixes can grow.
Consider 2 ≤ j ≤ i ≤ k and by attaching tiles to the end of S (i,j) , this path will
always grow into S (i,j) (G + −
→
v (i,j) ) (this assembly is producible by T (k,n) since
G+ v→
− (i,j)
is east of O and R(i,j) , north of G and south of B i (see Lemma 4)).
i
Non-cooperatively Assembling Large Structures 131
The last tile of this path is ((2n − 1, hi − hj + hj−1 + 1), gn+1 ) and this path can
keep growing to the north by attaching orange tiles at its end. We define the
path D(i,j) as the path obtained by attaching orange tiles to S (i,j) (G + − →v (i,j) )
until it is no more possible to do so (see Fig. 4). The last tile of this path is
((2n − 1, hi − 3), ohj −hj−1 −5 ) since it not possible to add an orange tile because
of a mismatch with the tile Bni = ((2n − 1, hi − 2), bn ). Moreover if j > 2, this
path is a dead-end because the last tile of this path has no east glue. Also,
GOj + − →
v (i,j) cannot be a prefix of P and by applying Lemma 7 to P − − →v (i,j)
(i,j)
we obtain that either P is a prefix of D or there exists 1 ≤ i < j such that
S (i,j) (GOi B0i ) + −
→
v (i,j) is a prefix of P . These observations are summarized in
the following fact.
Fig. 4. The path D(3,3) (on the left) and D(3,2) (on the right) for k = 4 and n = 10.
These paths are obtained by attaching blue and orange tiles to S (3,3) and S (3,2) until
a conflict occurs with B 3 . For all 2 < j ≤ i ≤ k, the path D(i,j) is a dead-end. (Color
figure online)
Fact 9. For any k, n ∈ N and for any path P producible by T (k,n) , there exists
1 ≤ i ≤ k such that either:
– P is a prefix of Di ;
– there exists 2 ≤ j ≤ i such that either:
• P is prefix of D(i,j) ;
• there exists 1 ≤ i < j such that S (i,j) (GOi B0i + −
→
v (i,j) ) is a prefix of P .
Consider a path P producible by T (k,n) then Fact 9 gives us a hint to the struc-
ture of P . Indeed, this path is made of several paths S (i1 ,j1 ) , S (i2 ,j2 ) , S (i3 ,j3 ) , . . .
which are glued together up to some translations (see Fig. 5). The index i (resp.
j) represents which east glue of an orange (resp. red) tile is used. Moreover,
Fact 9 also implies that i1 < i2 < i3 < . . . and thus eventually one the three
kinds of dead-end S (1,1) , Di , D(i,j) (for some 2 ≤ j ≤ i ≤ k) will grow up to
some translation and the path will become a dead-end too. We use this sketch
of proof to show that the width and height of any producible path is bounded.
Lemma 10. For any k, n ∈ N and for any path P producible by T (k,n) , if there
exists 1 ≤ i ≤ k such that GOi B0i is a prefix of P then P0 is its southernmost and
westernmost tile and its height is hi − 1 and its width is bounded by (i + 1)n − 1.
This result and Fact 7 imply that we are working on an area of the plane
delimited by 0 ≤ x ≤ (k + 1)n − 1 and 0 ≤ y ≤ hn+1 and that for any path P
producible by T (k,n) , its first tile is the westernmost and southernmost one.
Corollary 11. For any k, n ∈ N and for any terminal assembly α ∈ A [T (k,n) ],
the height of α is bounded by hn+1 and its width is bounded by (k + 1)n − 1.
Now, we aim to assemble the largest path possible (see Fig. 6). Note that, for
all 1 ≤ i ≤ k, the last tile of the path S (i,i) is at distance n to the east of its first
tile (this property is due to the definition of the green tiles). Thus, if we manage
to glue k paths together, we will obtain a path whose width is (k + 1)n − 1.
This is the path we are looking for. Formally, we define the path L1 as S (1,1)
and for all 2 ≤ i ≤ k, we define Li as S (i,i) (Li−1 + − →
v (i,i) ). We remind that
→
−v (i,i)
= (n, hi−1 ). Now, we show that this sequence of tiles is a path producible
by T (k,n) .
Fig. 6. The path L4 , for k = 4 and n = 10. This path is the largest one pro-
ducible by T (k,n) and it appears in any terminal assembly. It is made of the paths
S (4,4) , S (3,3) , S (2,2) and S (1,1) which are glued together up to some translations. (Color
figure online)
Non-cooperatively Assembling Large Structures 135
Lemma 13. For any k, n ∈ N and for any terminal assembly α ∈ A [T (k,n) ],
Lk is a subassembly of α.
Fig. 7. Graphical representation of the step of recurrence of the proof of Lemma 13 for
k = 4, n = 10 and i = 3. We represent here a prefix of L3 , note that the remaining
suffix of L3 is in the stripe defined by h2 ≤ y ≤ 2h2 − 1. If a path producible by T (k,n)
creates a conflict with L3 then it has to fork from this prefix by one of its free glue. We
represent the five possible cases and give the main argument to deal with each case.
(Color figure online)
136 P.-É. Meunier and D. Regnault
Lemma 14. For all k ∈ N, there exists a path P producible by a tile assembly
system (T , σ, 1) such that:
– |T | = 8hk − hk−1 − 1;
– the width of P is Θ(|T | log3 (|T |));
– for any terminal assembly α ∈ A [T ], asm(P ) is a subassembly of α and the
width and height of α are bounded by Θ(|T | log3 (|T |)).
Proof. Consider k, n ∈ N and the tile assembly system T (k,n) , its set of tile types
is made of 1 tiles types for the seed, n+2 green tiles types, hk −2 orange tile types,
2n blue tile types, hk − hk−1 − 2 red tile types. Thus, we have |T (k,n) | = 3n +
2hk −hk−1 −1. By setting n = 2hk , we obtain that |T (k,n) | = 8hk −hk−1 −1 ≤ 4n.
Non-cooperatively Assembling Large Structures 137
4 Open Questions
Three questions arise from this article. The first one is to improve our construc-
tion by increasing its width or to prove its optimality. The second question is to
characterize the tile assembly systems whose terminal assemblies are finite: is it
possible to build larger finite terminal assembly without relying on this method?
The third question is to investigate if this construction can be achieved in the
directed case: either the directed case is more complex than initially though or
there is a difference in complexity between the directed and non-directed case.
References
1. Cannon, S., et al.: Two hands are better than one (up to constant factors).
In: STACS: Proceedings of the Thirtieth International Symposium on Theoret-
ical Aspects of Computer Science, pp. 172–184. LIPIcs (2013). arxiv preprint:
arXiv:1201.1650
2. Cook, M., Fu, Y., Schweller, R.T.: Temperature 1 self-assembly: deterministic
assembly in 3D and probabilistic assembly in 2D. In: SODA: Proceedings of the
22nd Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 570–589 (2011).
arxiv preprint: arXiv:0912.0027
3. Demaine, E.D., et al.: One tile to rule them all: simulating any tile assembly sys-
tem with a single universal tile. In: Esparza, J., Fraigniaud, P., Husfeldt, T.,
Koutsoupias, E. (eds.) ICALP 2014. LNCS, vol. 8572, pp. 368–379. Springer,
Heidelberg (2014). https://doi.org/10.1007/978-3-662-43948-7 31. arxiv preprint:
arXiv:1212.4756
4. Doty, D., Lutz, J.H., Patitz, M.J., Schweller, R.T., Summers, S.M., Woods, D.:
The tile assembly model is intrinsically universal. In: FOCS: Proceedings of the
53rd Annual IEEE Symposium on Foundations of Computer Science, pp. 439–446.
IEEE, October 2012. arxiv preprint: arXiv:1111.3097
138 P.-É. Meunier and D. Regnault
19. Soloveichik, D., Winfree, E.: Complexity of self-assembled shapes. SIAM J. Com-
put. 36(6), 1544–1569 (2007)
20. Thubagere, A.J., et al.: A cargo-sorting DNA robot. Science 357(6356), eaan6558
(2017)
21. Winfree, E.: Algorithmic self-assembly of DNA. Ph.D. thesis, California Institute
of Technology, June 1998
22. Winfree, E.: Simulations of computing by self-assembly. Technical report, Caltech
CS TR:1998.22, California Institute of Technology (1998)
23. Yurke, B., Turberfield, A.J., Mills, A.P., Simmel, F.C., Neumann, J.L.: A DNA-
fuelled molecular machine made of DNA. Nature 406(6796), 605–608 (2000)
Simulation of Programmable Matter
Systems Using Active Tile-Based
Self-Assembly
John Calvin Alumbaugh1 , Joshua J. Daymude2 , Erik D. Demaine3 ,
Matthew J. Patitz1(B) , and Andréa W. Richa2
1
Department of Computer Science and Computer Engineering,
University of Arkansas, Fayetteville, AR, USA
mpatitz@self-assembly.net
2
Computer Science, CIDSE, Arizona State University, Tempe, AZ, USA
{jdaymude,aricha}@asu.edu
3
MIT Computer Science and Artificial Intelligence Laboratory,
Cambridge, MA, USA
edemaine@mit.edu
1 Introduction
Theoretical models of self-assembling systems are mathematical models that
allow for the exploration of the limits of bottom-up construction and self-
Daymude and Richa are funded in part by the National Science Foundation under
awards CCF-1422603, CCF-1637393, and CCF-1733680. Alumbaugh and Patitz are
funded in part by National Science Foundation Grants CCF-1422152 and CAREER-
1553166.
c Springer Nature Switzerland AG 2019
C. Thachuk and Y. Liu (Eds.): DNA 25, LNCS 11648, pp. 140–158, 2019.
https://doi.org/10.1007/978-3-030-26807-7_8
Simulating Programmable Matter with Self-Assembly 141
assembly via simple (usually square) tiles. There are a wide variety of tile-
based models of self-assembly (e.g., [13,14,16,17,20–22]), each with differing
constraints and dynamics, resulting in great variations in the relative powers
between systems. One of the easiest ways to evaluate their relationships is to
use notions of simulation to attempt to simulate one model by another, and this
has led to the creation of a “complexity hierarchy” of self-assembly models and
categories of systems [8,12,15,18,23].
Another category of theoretical models attempts to capture the dynamics
of so-called programmable matter, in which small and simple, but dynamic and
mobile, components are able to interact with each other to form structures,
perform tasks and computations, etc. [7,24].
This paper attempts to bridge the divide between these categories of mod-
els, showing how self-assembling tiles can mimic the behaviors of programmable
matter. Specifically, we demonstrate how the recently introduced Tile Automata
(TA) model [5] can be used to simulate the amoebot model [7]. In the TA model,
the fundamental components are unit square tiles which form structures by
attaching and forming bonds, and can also change states based on their own
states and those of their neighbors, causing them to be able to form new bonds
or to remove existing bonds. The basic components in the amoebot model are
particles which can also change their states based on the current states of them-
selves and their neighbors, but which can also move via series of expansions
and contractions. While the components of both models rely only upon local
information and communication, the design goals of their systems tend to dif-
fer fundamentally. The main goal of TA systems is to self-assemble into target
structures, but amoebot systems have been used to solve system-level problems
of movement and coordination (e.g., shape formation [9], object coating [10],
leader election [6], gathering [4], bridging gaps [2], etc.). We present a construc-
tion in which constant-sized assemblies of TA tiles, called macrotiles, assemble
and disassemble following the rules of the TA model and are able to simulate
the behaviors of individual amoebot particles. Via carefully designed processes
of building and breaking apart assemblies, they are collectively able to correctly
simulate the full dynamics of amoebot systems. We thus show how the dynamics
of systems of self-assembling tiles with the ability to form and break bonds can
be harnessed to faithfully simulate the dynamics of collections of programmable
matter particles capable of local communication and motion. Not only does
this provide a way to connect and leverage existing results across models, this
also provides a new paradigm for designing systems to accomplish the goals of
programmable matter. It additionally allows amoebots to serve as a higher-level
abstraction for designing systems exhibiting complex behaviors of programmable
matter but with a translation to implementation in TA.
The paper is organized as follows. Section 2 presents a high-level definition of
the TA model, and Sect. 3 provides a full mathematical definition for the amoebot
model. (We note that this is the first full mathematical definition for the amoebot
model and thus is also a contribution of this paper.) Section 4 gives the formal
definition, preliminaries, and overview of the simulation of the amoebot model
142 J. C. Alumbaugh et al.
by TA, while Sect. 5 gives more of its details. A brief discussion and conclusion
are given in Sect. 6. Due to space constraints, not all details are contained in this
version. Please see [1] for an additional Technical Appendix containing a more
rigorous definition of the TA model, as well as low-level technical details about
the construction.
The Tile Automata model seeks to connect and evaluate the differences between
some of the seemingly disparate models of tile-based self assembly by combining
components of the Two Handed Assembly Model (2HAM) of self-assembly with a
rule set of local state changes that are similar to asynchronous cellular automata.
This section provides an overview of the TA model which is sufficient for the
purposes of this paper, however a more thorough and detailed definition of the
TA model is available in the technical appendix, which is based on [5] (Fig. 1).
Fig. 1. Example of a TA system. The five components that define a TA system con-
stitute the left and middle columns of this figure, while the rightmost boxes indicate
producible and terminal assemblies.
The Tile Automata Model has many similarities with other tile based self
assembly systems. Tiles, the fundamental units of this model that interact with
one another, use only local information, in this case the state of their neighbors.
Tiles exist as a stateful unit square centered on a point on the square lattice
over the integers in two dimensions, so that a tile’s coordinates (x, y) ∈ Z2 . Tiles
may form bonds with adjacent neighbors via attaching to one another according
to the affinity function, which defines a set of two states and either a vertical
or horizontal relative orientation (denoted as ⊥ and , respectively) as well as
Simulating Programmable Matter with Self-Assembly 143
Fig. 2. Depiction of signal S being passed down a wire. The W tiles represent wires in
their default state, and the grey tiles above and below the wire are filler tiles. Starting
in state in (a) and a transition rule (SW SS), the signal propagates down the wire
in (b) and (c).
One of the most useful aspects of the Tile Automata model is the tiles’ ability
to transition states based on local information. This capability makes commu-
nication from one group of tiles to another, non-adjacent group easy, with a
structure we will call a wire. A wire in TA is a contiguous line of tiles from one
group of tiles to another, usually surrounded by inert filler tiles so as to avoid
interference with the signal being transmitted. (See Fig. 2 for an example.)
can occupy and E is the set of all atomic movements a particle can make. Each
node in V can be occupied by at most one particle at a time. This work further
assumes the geometric amoebot model where G = GΔ , the triangular lattice with
nearest neighbor connectivity (see Fig. 3a). This lattice is preferred for work in
the 2D plane, as it allows for a maximum of nearest neighbor connectivity for
particles moving step wise around the perimeter of the particle swarm. Particles
attempting to move around a “corner” of a particle swarm risk disconnection
with the neighborhood implied by nearest neighbor connectivity on the square
lattice. Each particle occupies either a single node in V (i.e., it is contracted ) or
a pair of adjacent nodes in V (i.e., it is expanded ), as in Fig. 3b. Two particles
occupying adjacent nodes of GΔ are neighbors. We further will define a group of
particles as a particle system.
Fig. 3. (a) A section of the triangular lattice GΔ (black) and its dual, the hexagonal
tiling (gray). (b) Expanded and contracted particles (black dots) on GΔ (gray lattice).
Particles with a black line between their nodes are expanded. (c) Two particles with
different orientations. The expanded particle’s tail port would be 6 if its head were the
upper node; the contracted particle’s tail port is ε.
Each particle keeps a collection of ports—one for each edge incident to the
node(s) it occupies—that have unique labels from its own perspective. Con-
tracted particles have six ports while expanded particles have ten (see Fig. 3c).
The particles are assumed to have a common sense of clockwise direction (a.k.a.
chirality), but do not share a coordinate system or global compass. Thus, par-
ticles can label their ports in clockwise order starting from a local direction 0,
but may have different orientations in O = {0, 1, ..., 5} encoding their offsets for
local direction 0 from global direction 0 (to the right).
For example, in Fig. 3c, the particle on the right has orientation 0 (i.e., it
agrees with the global compass) while the particle on the left has orientation 4
(i.e., its local direction 0 is global direction 4). When a particle expands, it keeps
its port labeling consistent by assigning label 0 to a port facing local direction
0 and then labeling the remaining ports in clockwise order.1 In this way, it can
recover its original labeling when it later contracts. A particle p communicates
1
Note that there may be ambiguity in choosing a port facing local direction 0; e.g.,
in Fig. 3c, both port 0 and port 8 face local direction 0. In this case, the port facing
local direction 0 and “away” from the particle is labeled 0.
Simulating Programmable Matter with Self-Assembly 145
with a neighbor q by placing a flag from the constant-size alphabet Σ on its port
facing q. This can be thought of as p sending a message for q to read when q is
next activated. Conversely, p receives information from q by reading the flag q
has placed on its port facing p. The flag alphabet Σ is assumed to contain the
“empty flag” to be used when no information is being communicated.
Particles move via a series of expansions and contractions: a contracted par-
ticle can expand into an unoccupied adjacent node to become expanded, and
may then contract to occupy a single node once again. An expanded particle’s
head is the node it last expanded into and the other node it occupies is its tail ;
a contracted particle’s head and tail are the same. If an expanded particle con-
tracts into its head node, it has moved. Otherwise, contracting back into its tail
node can be thought of as the particle exploring a potential location to which it
could expand but deciding not to over the course of two activations. Neighboring
particles can coordinate their movements in a handover, which can occur one of
two ways. A contracted particle p can “push” an expanded neighbor q by expand-
ing into one of the nodes occupied by q, forcing q to contract. Alternatively, an
expanded particle q can “pull” a contracted neighbor p by contracting, forcing
p to expand into the node it is vacating. During its movements, each particle
maintains a tail port in T = {0, 1, . . . , 9} ∪ {ε} denoting the port furthest from
its head if it is expanded or ε if it is contracted (see Fig. 3c). This information
serves as the particle’s memory about whether or not it is expanded, and, if so,
what direction its tail is relative to its head.
More formally, the set of all possible movements is M = {idle} ∪ {expandi :
i ∈ 0, 1, . . . , 5} ∪ {contracti : i ∈ 0, 1, ..., 9} ∪ {handoveri : i ∈ 0, 1, ..., 5}. An
idle move simply means the particle does not move. If a particle p performs
expandi , p expands into the node its i-th port faces only if p is contracted and
that node is unoccupied. If a particle p performs contracti , p contracts out of
the node incident to its i-th port only if p is expanded. The handoveri moves are
not push or pull handover specific, nor do they actually perform the handover
movements described above. Instead, a particle p performs handoveri when it
initiates a handover with the neighbor its i-th port faces, say q. This initiation
only succeeds if a neighboring particle q actually exists and p is contracted
while q is expanded (or vice versa). To aid in executing the initiated handover—
which will be described shortly—each particle keeps an expansion direction in
E = 0, 1, ..., 5 ∪ {} denoting the local direction it would like to expand in or
if no expansion is needed.
The amoebot model assumes that particle systems progress by individual
particles performing atomic actions asynchronously, where each particle inde-
pendently and continuously executes its own instance of the given algorithm at
potentially varying speeds. Assuming any conflicts that may arise in this con-
current execution are resolved—as is the case in the amoebot model, see [7]—a
classical result under the asynchronous model states that there is a sequential
ordering of atomic actions producing the same end result. Thus, we assume there
is an activation scheduler responsible for activating exactly one particle at a time.
This scheduler is assumed to be fair : each particle is assumed to be activated
146 J. C. Alumbaugh et al.
δ : Q × Σ 10 × T × E → P(Q × Σ 10 × T × E × M ).
For a given algorithm under the amoebot model, Q is a constant-size set
of particle states while the flag alphabet Σ, the tail ports T , the expansion
directions E, and the movements M are as defined above. The transition function
δ allows a particle to use its state, its neighbors’ flags facing it, its tail port, and
its expansion direction to update these values and decide whether to move. If δ
maps a unique input to multiple outputs, one output set is chosen arbitrarily. δ
largely depends on the algorithm being executed; here, we describe a few general
rules for δ our simulation will consider. Suppose that δ(q, (f0 , f1 , . . . , f9 ), t, e) =
(q , (f0 , f1 , . . . , f9 ), t , e , m ).
1. Suppose p is chosen by the scheduler. Based on its state, its neighbors’ flags
facing it, its tail port indicating it is expanded, and its (empty) expansion
direction, suppose δ returns m = handoveri . δ must also set fi to a handover
flag indicating that p has initiated a handover with its neighbor.
2
Note that this forced scheduling is simply a result of our formalism and does not
alter or subvert the underlying asynchrony assumed by the amoebot model.
Simulating Programmable Matter with Self-Assembly 147
In this section, we present our main result, which is a construction that takes
as input an amoebot system and which outputs a Tile Automata system that
simulates it. However, we must first define what we mean by the term “simulate”
in this context.
must be isomorphic to the triangular grid graph (i.e. the graph of the triangular
grid where each intersection is a node). This means each macrotile has the same
6-neighbor neighborhood as nodes in the triangular grid graph (see Fig. 4).
Let v be the coordinates of a node in GΔ , and let mv be the macrotile location
which corresponds to it. Given Tile Automata system Γ and its set of producible
assemblies PRODΓ , for assembly A ∈ PRODΓ , let α ∈ A be a positioned assembly
of A, and let α|mv be the (possibly empty) subassembly of α contained in the
locations of mv . Given Γ and an amoebot system A = (Q, Σ, δ, P, σ), a macrotile
representation function R, from Γ to A, is a function which takes as input the
portion of an assembly contained within a single macrotile locations, and which
returns either information about the configuration of an amoebot particle from
P , or (which maps to empty space). That is, given some α|mv , R(α|mv ) ∈
{(t, e, o, q, (f0 , f1 , ..., f9 )) | t ∈ T , o ∈ O, q ∈ Q, e ∈ E, and fi ∈ Σ} ∪ {}, where
t ∈ T is the relative direction of a particle’s tail from its head, o ∈ O is its
orientation offset, q ∈ Q is its state, and each fi ∈ Σ, for 0 ≤ i < 9, is the flag
in its ith port. An assembly representation function, or simply representation
function, R∗ from Γ to A takes as input an entire positioned assembly of Γ
and applies R to every macrotile location and returns a corresponding amoebot
system configuration from C(P ).
For a positioned assembly α ∈ PRODΓ such that R∗ (α) = α ∈ C(P ), α
is said to map cleanly to α under R∗ if for all non empty blocks α|mv ∈
dom α, v ∈ dom α or v ∈ dom α for some v = v + u where u ∈
{(1, 0), (0, 1), (−1, 0), (0, −1), (−1, 1), (1, −1)}. In other words, α may have tiles
in a macrotile location representing a particle in α , or empty space in α but
only if that position is adjacent to a particle in α . We call such growth “around
the edges” of α fuzz and thus restrict it to be adjacent to macrotiles representing
particles.
Note that the following definitions of follows, models, and simulates, as well as
the previous definitions of macrotiles, fuzz, etc. are based upon similar definitions
used to prove results about simulation and intrinsic universality in [8,12,18,19]
and several other papers.
Definition 1 (A follows Γ ). Given Tile Automata system Γ , amoebot system
A, and assembly representation function R∗ from Γ to A, we say that A follows
Γ (under R), and we write A R Γ , if α →Γ β, for α, β ∈ PRODΓ , implies that
R∗ (α) →A ∗
∗ R (β).
of the possible next configurations that α could transition into from α, which
results in an assembly in Γ that maps to that next step.
Definition 3 (Γ simulates A). Given Tile Automata system Γ , amoebot sys-
tem A, and assembly representation function R∗ from Γ to A, if A R Γ and
Γ |=R A, we say that Γ simulates A under R.
With the definition of what it means for a Tile Automata system to simulate
an amoebot system, we can now state our main result.
Theorem 1. Let A be an arbitrary amoebot system. There exists a Tile
Automata system Γ and assembly representation function R∗ from Γ to A such
that Γ simulates A under R. Furthermore, the simulation is at scale factor 100.
To prove Theorem 1, we let A = (Q, ΣA , δ, P, σ) be an arbitrary amoe-
bot system. We will now show how to construct a Tile Automata system
Γ = (ΣΓ , Λ, Π, Δ, τ ) such that Γ simulates A at scale factor 100. The rest
of this section contains details of our construction.
Timing Tiles - Individual tiles in Γ that diffuse into specific slots in the particle
macrotiles that “start” that particle’s turn, and disconnect after the turn is
finished. Timing tiles are inert except for connecting to a central clock tile, and
serve as the “asynchronous clock” for our simulation.
Tiles - Individual tiles in Γ that attach to the available flag tiles of macrotiles
with non-full neighborhoods who are querying or attempting to lock their neigh-
borhood flags. tiles can only attach to the exposed end of a wire displaying
a lock or query signal flag. After attaching, they serve only to undergo a single
state transition, which indicates to the wire end that there exists no neighbor
there. After this transition, the wire propagates this information back to its clock
bank and the tile detaches.
Floating Macrotile - These macrotiles (“floats”), will represent (portions of)
particles in A but are not connected to the swarm. They attach to valid sites
along the perimeter and simulate the “head” of an expanding particle.
Configuration Tile - After macrotiles complete their turn, they combine
all values of their configuration of which they are aware (q ∈ Q, e ∈
E, (f0 , f1 , ..., f9 ∈ Σ 10 ), t ∈ T ) into a single tile proximal to the clock bank
called the Configuration Tile. When a macrotile is engaging in an expansion or
handover move, the configuration tile is used by the representation function R
to map the active macrotile to its previous configuration, until the transition
completes. An active macrotile engaged in these moves will be mapped by its
configuration tile until it’s no longer displaying a flag indicating it is engaged in
either an expansion or handover on any of its wires, ensuring the simulation of
an atomic move. (For a more complete explanation, see appendix B of [1]s.)
5 Simulation of Movement
Before the simulation begins, given A with initial configuration σ, we pro-
duce Λ for Γ which consists of a connected configuration of macrotiles, each
macrotile mapping to a corresponding particle in σ under R. To capture the
asynchronous nature of amoebot particle activations, we utilize timing tile diffu-
sion into macrotiles to “activate” them for their turns. After attachment, the tile
Simulating Programmable Matter with Self-Assembly 153
sends a signal to the central clock to start its turn. After a given macrotile has
started its turn and has successfully locked its neighborhood, it gathers all infor-
mation necessary for its transition function via wire-propagated signals (detailed
in the technical appendix). To ensure that the transition function affected by
macrotiles is isomorphic to the transition function affected by A, we combine
all of the flags, e and t values (resulting in a |Σ 10 | ∗ |t| ∗ |e| increase in state
complexity for clock tiles) into the tile to the left of the central clock tile. Once
this value is at that tile, the central clock tile, which holds the state, undergoes
a state transition defined in the construction of Δ.
Once the new state, flags, and move are produced, the particle propagates its
flags down their respective wires and in the case that handoveri is returned for
the value of m, the particle additionally sends a signal (detailed in the technical
appendix) to its ith neighbor to ensure that the neighbor has the proper orien-
tation to facilitate that move. For expandi , the active macrotile sends a signal
down the wire in the ith direction that allows a float to attach to that edge.
After connection of a float, the active macrotile further sends a CopySignal
to the newly attached float so the new float can copy the states and relevant
flags of the expanding macrotile and fully become the head. The float sends an
AcknowledgementSignal after it is displaying the proper state and flags, which
tells the newly expanded macrotile that it’s safe to unlock its neighborhood.
For contracti , the expanded macrotile sends a Detach signal to the macrotile
that contains the ith port. After detachment, the recently contracted macrotile
unlocks its neighborhood. For idle, states and flags may be updated, but no
change to the orientation of the simulated particles occurs. Once a macrotile
executing an idle move changes its state and sends the new flags to its flag tiles,
it unlocks its neighborhood and ends its turn. Figure 7 depicts the series of steps
of a move containing a handover, which is described in the following section.
154 J. C. Alumbaugh et al.
Fig. 7. (1) The initial configuration of a subset of a valid swarm. Note that only A has a
purple timing tile to the right of its Central Clock tile. (2) The flow of the LockSignali
sent out from A’s CC tile. (3) The responses from A’s wires flow back to the CC tile.
Unoccupied edges allow for the attachment of yellow epsilon tiles, which indicate to
a given wire that it has no macrotile neighbor. A has no neighbors attempting their
own move, and is safe to continue its move. (4) A is attempting to execute a handover,
and so must check to ensure that the subordinate particle it intends to use is in the
proper configuration. It sends out a handoverConf irmi signal, to which B responds
with an Acknowledgement signal containing B’s t value. (5) Since B is in the proper
configuration to enable a handoverP ushi , A continues by sending a handoverP ushi
signal to the subordinate macrotile it wants to take over. The subordinate macrotile Bt
strips the flags, state, and new t value pertinent to itself and propagates the remaining
new flags, state and t value to its other half Bh . (6) Bh alters its state and flags in
response to the signal it has just received and sends back an acknowledgement signal
to its tail. As this signal travels through the shared wires between Bh and Bt , it clears
the handover flags which indicate to the representation function that it should check
those macrotiles’ configuration tile for information instead of flags and the CC tile for
the state. The clearing of these flags is the event that precipitates the transition of
the representation of the macrotile displaying them, so that R∗ (α) = R∗ (β), where
α and β are the macrotile before and after this step. (7) Finally, At receives the
acknowledgement signal propagated from what now maps to Ah , so it sends out a final
U nlock signal to all of its neighborhood and A ends the turn by the CC undergoing
a transition with the timing tile, rendering it inert and without affinities, thereby
detaching it. (Color figure online)
Simulating Programmable Matter with Self-Assembly 155
5.1 handover
The Amoebots model defines a move called the handoveri , which allows two
neighboring particles, one expanded and one contracted, to simultaneously con-
tract from and expand into the same grid location. This move can be initiated by
either particle, and involves the initiating particle’s neighbor in the ith direction.
There are four possibilities for handover contracts: A contracted particle can
expand into a spot previously occupied by a head, a contracted particle can
expand into a spot previously occupied by a tail, an expanded particle can con-
tract and “force” its neighbor into expanding into wherever its head is currently
located, and an expanded particle can contract and “force” its neighbor into
expanding into wherever its tail is currently located. It’s necessary that both
moves happen simultaneously to enable certain actions such as moving a col-
lection of particles through a static tunnel of width one. For any handoverP ull
movement, the initiating particle must be expanded and the subordinate particle
contracted, while for any handoverP ush movement, the reverse is true (Fig. 8).
All moves involve locking down the active particle’s neighborhood. Since
handoveri necessarily changes the orientation of both the initiating and sub-
ordinate particles, it is necessary to lock down the respective neighbor-
hoods of all particles involved. Thus, the handoverP ulli movement requires a
P rogressiveLockdownSignali to be sent to the subordinate particle(s) to be fur-
ther propagated to their respective neighborhoods. Note, that for the duration
of the execution of a handover move, a handoveri flag will be displayed, ensuring
that the macrotile maps to its previous configuration under the representation
function R until the handoveri or expandi flags are cleared from the macrotiles’
respective ports. This ensures that we have smooth transitions for macrotiles
mapping to the atomic transitions of amoebots.
Handover moves in our simulation occur after the initiating particle has
locked down its own neighborhood, checked to ensure move validity with the
handoveri signal, and further sent a P rogressiveLockdownSignali to each sub-
ordinate particle. The initiating particle ensures that the configuration of expan-
sions and contractions are appropriate for the move it is attempting, and then
sends a signal to the macrotile that will be passed from one particle to another.
This signal contains the new state and flags for the subordinate macrotile(s).
Once these fields are updated, and the handoveri flags are cleared from the
156 J. C. Alumbaugh et al.
macrotiles’ wires, the macrotile that changed state is considered to be the head
of the newly expanded particle, which sends an acknowledgement signal back
to the initiating macrotile. Macrotiles engaged in a handoveri move are mapped
by R via their configuration tiles until they clear the flags, after which they
revert to the normal mode of operation for R, which checks a macrotile’s central
clock tile and the subordinate clock tile to the immediate west. After receiving
the acknowledgement of successful transition, the initiating macrotile sends out
unlock signals to its neighborhood (which necessarily propagate from subordi-
nate particles to their respective neighborhoods as well), and finally the initiating
macrotile detaches its timing tile, ending the turn.
6 Conclusion
We have presented a simulation construction in which an amoebots system can
be simulated by a collection of Tile Automata macrotiles. The mechanisms by
which particle movement is simulated were discussed as well, such as how the
atomic actions of the amoebots model were replicated within the simulation
without threat of interruption via state transitions. We hope this fits into a larger
schema of comparing the power of various computational models by simulation.
References
1. Alumbaugh, J.C., Daymude, J.J., Demaine, E.D., Patitz, M.J., Richa, A.W.: Simu-
lation of programmable matter systems using active tile-based self-assembly. Tech-
nical Reports 1906.01773, Computing Research Repository (2019). http://arxiv.
org/abs/1906.01773
2. Andrés Arroyo, M., Cannon, S., Daymude, J.J., Randall, D., Richa, A.W.: A
stochastic approach to shortcut bridging in programmable matter. Nat. Comput.
17(4), 723–741 (2018)
3. Berman, S., Fekete, S.P., Patitz, M.J., Scheideler, C.: Algorith-
mic foundations of programmable matter (dagstuhl seminar 18331).
Dagstuhl Rep. 8(8), 48–66 (2019). https://doi.org/10.4230/DagRep.8.8.48.
http://drops.dagstuhl.de/opus/volltexte/2019/10235
4. Cannon, S., Daymude, J.J., Randall, D., Richa, A.W.: A Markov chain algorithm
for compression in self-organizing particle systems. In: Proceedings of the 2016
ACM Symposium on Principles of Distributed Computing, pp. 279–288, PODC
2016. ACM, New York (2016)
5. Chalk, C., Luchsinger, A., Martinez, E., Schweller, R., Winslow, A., Wylie, T.:
Freezing simulates non-freezing tile automata. In: Doty, D., Dietz, H. (eds.) DNA
2018. LNCS, vol. 11145, pp. 155–172. Springer, Cham (2018). https://doi.org/10.
1007/978-3-030-00030-1 10
6. Daymude, J.J., Gmyr, R., Richa, A.W., Scheideler, C., Strothmann, T.: Improved
leader election for self-organizing programmable matter. In: Fernández Anta, A.,
Jurdzinski, T., Mosteiro, M.A., Zhang, Y. (eds.) ALGOSENSORS 2017. LNCS,
vol. 10718, pp. 127–140. Springer, Cham (2017). https://doi.org/10.1007/978-3-
319-72751-6 10
7. Daymude, J.J., Hinnenthal, K., Richa, A.W., Scheideler, C.: Computing by pro-
grammable particles. In: Flocchini, P., Prencipe, G., Santoro, N. (eds.) Distributed
Computing by Mobile Entities: Current Research in Moving and Computing.
LNCS, vol. 11340, pp. 615–681. Springer, Cham (2019). https://doi.org/10.1007/
978-3-030-11072-7 22
8. Demaine, E.D., Patitz, M.J., Rogers, T.A., Schweller, R.T., Summers, S.M.,
Woods, D.: The two-handed tile assembly model is not intrinsically universal. In:
Fomin, F.V., Freivalds, R., Kwiatkowska, M., Peleg, D. (eds.) ICALP 2013. LNCS,
vol. 7965, pp. 400–412. Springer, Heidelberg (2013). https://doi.org/10.1007/978-
3-642-39206-1 34
9. Derakhshandeh, Z., Gmyr, R., Richa, A.W., Scheideler, C., Strothmann, T.: Uni-
versal shape formation for programmable matter. In: Proceedings of the 28th ACM
Symposium on Parallelism in Algorithms and Architectures SPAA, pp. 289–299.
2016. ACM, New York (2016)
10. Derakhshandeh, Z., Gmyr, R., Richa, A.W., Scheideler, C., Strothmann, T.: Uni-
versal coating for programmable matter. Theor. Comput. Sci. 671, 56–68 (2017)
11. Derakhshandeh, Z., Richa, A., Dolev, S., Scheideler, C., Gmyr, R., Strothmann, T.:
Brief announcement: amoebot-a new model for programmable matter. In: Annual
ACM Symposium on Parallelism in Algorithms and Architectures, pp. 220–222.
Association for Computing Machinery (2014)
158 J. C. Alumbaugh et al.
12. Doty, D., Lutz, J.H., Patitz, M.J., Schweller, R.T., Summers, S.M., Woods, D.:
The tile assembly model is intrinsically universal. In: 2012 Proceedings of the
53rd Annual IEEE Symposium on Foundations of Computer Science, pp. 302–310.
FOCS (2012)
13. Fekete, S.P., Hendricks, J., Patitz, M.J., Rogers, T.A., Schweller, R.T.: Universal
computation with arbitrary polyomino tiles in non-cooperative self-assembly. In:
2015 Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete
Algorithms (SODA 2015), San Diego, CA, USA, pp. 148–167, 4–6 January 2015
14. Gilbert, O., Hendricks, J., Patitz, M.J., Rogers, T.A.: Computing in continuous
space with self-assembling polygonal tiles. In: 2016 Proceedings of the Twenty-
Seventh Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2016),
Arlington, VA, USA, pp. 937–956, 10–12 January 2016
15. Hendricks, J., Padilla, J.E., Patitz, M.J., Rogers, T.A.: Signal transmission across
tile assemblies: 3D static tiles simulate active self-assembly by 2D signal-passing
tiles. In: Soloveichik, D., Yurke, B. (eds.) DNA 2013. LNCS, vol. 8141, pp. 90–104.
Springer, Cham (2013). https://doi.org/10.1007/978-3-319-01928-4 7
16. Hendricks, J., Patitz, M.J., Rogers, T.A., Summers, S.M.: The power of duples
(in self-assembly): it’s not so hip to be square. Theor. Comput. Sci. 743, 148–166
(2015)
17. Kao, M.-Y., Schweller, R.: Randomized self-assembly for approximate shapes.
In: Aceto, L., Damgård, I., Goldberg, L.A., Halldórsson, M.M., Ingólfsdóttir, A.,
Walukiewicz, I. (eds.) ICALP 2008. LNCS, vol. 5125, pp. 370–384. Springer, Hei-
delberg (2008). https://doi.org/10.1007/978-3-540-70575-8 31
18. Meunier, P.E., Patitz, M.J., Summers, S.M., Theyssier, G., Winslow, A., Woods,
D.: Intrinsic universality in tile self-assembly requires cooperation. In: 2014 Pro-
ceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA 2014),
Portland, OR, USA, pp. 752–771, 5–7 January 2014
19. Meunier, P., Woods, D.: The non-cooperative tile assembly model is not intrin-
sically universal or capable of bounded turing machine simulation. In: 2017 Pro-
ceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing,
STOC 2017, Montreal, QC, Canada, pp. 328–341, 19–23 June 2017
20. Padilla, J.E., Patitz, M.J., Schweller, R.T., Seeman, N.C., Summers, S.M., Zhong,
X.: Asynchronous signal passing for tile self-assembly: Fuel efficient computation
and efficient assembly of shapes. Int. J. Found. Comput. Sci. 25(4), 459–488 (2014)
21. Patitz, M.J., Schweller, R.T., Summers, S.M.: Exact shapes and turing universality
at temperature 1 with a single negative glue. In: 2011 Proceedings of the 17th
International Conference on DNA Computing and Molecular Programming, pp.
175–189. DNA (2011)
22. Winfree, E.: Algorithmic self-assembly of DNA. Ph.D. thesis, California Institute
of Technology, June 1998
23. Woods, D.: Intrinsic universality and the computational power of self-assembly.
Philos. Trans. R. Soc. Lond. A: Math. Phys. Eng. Sci. 373(2046), 1–13 (2015)
24. Woods, D., Chen, H.L., Goodfriend, S., Dabby, N., Winfree, E., Yin, P.: Active
self-assembly of algorithmic shapes and patterns in polylogarithmic time. In: Pro-
ceedings of the 4th Conference on Innovations in Theoretical Computer Science,
ITCS 2013, pp. 353–354. ACM, New York (2013)
Combined Amplification and Molecular
Classification for Gene Expression
Diagnostics
1 Introduction
Detection and quantification of RNA molecules in blood or tissue can be a
powerful tool for disease diagnosis. Although detection of a single, differentially
expressed molecular marker might be ideal, such a distinctive marker may not
exist for a disease state of interest. Instead, a diagnostic decision may have to be
c Springer Nature Switzerland AG 2019
C. Thachuk and Y. Liu (Eds.): DNA 25, LNCS 11648, pp. 159–173, 2019.
https://doi.org/10.1007/978-3-030-26807-7_9
160 G. Gowri et al.
based on panels of differentially expressed genes and may require careful weigh-
ing of the contributions of each gene in the panel. The conventional workflow
for building such multi-gene classifiers consists of experimentally measuring gene
expression in different “states” (e.g. healthy and disease) using microarrays or
high-throughput sequencing, followed by training of a computational classifier
that learns to assign labels to the samples based on differences in gene expression
between those states. Once the classifier is trained it can be used to label pre-
viously unseen samples based on their gene expression profiles, thus providing
a powerful tool for aiding diagnostics decisions. For example, an in silico whole
blood gene expression classifier has been developed to distinguish bacterial infec-
tions, viral infections, and non-infectious disease [1]. Similarly, an in silico blood
platelet gene expression classifier has been developed to distinguish six different
types of cancer [2]. Both of these classifiers were trained using support vector
machine (SVM) methods, and each involved more than 100 features (i.e. differ-
entially expressed genes) [1,2]. These examples provide proof-of-principle for the
power of a diagnostic approach based on analysing multi-gene panels but the
complexity and cost of gene expression classification has limited its implemen-
tation to a research setting and to a small subset of clinical problems.
Using molecular computation to implement a disease classifier could over-
come some of the limitations of existing technologies. In such an approach, the
molecular diagnostic “computer” could be mixed with the patient sample, per-
form an analysis of the sample through a sequence of molecular interactions
and then summarize the result into an easy-to-interpret signal that represents
the diagnosis. If realized, such an approach could accelerate the diagnosis by
simplifying the measurement process and eliminating the need for separate com-
putational analysis.
DNA-based circuits have long been proposed as a platform for performing
gene expression diagnostics [3]. In our own previous work, we demonstrated a
platform to translate a linear classifier into a DNA strand displacement circuit
that can operate on a set of RNA inputs and classify a sample by calculating a
weighted sum over those inputs [4]. However, our work was limited to a proof-of-
principle implementation with in vitro transcribed RNA since the concentration
of RNA molecules in biological samples is significantly below the detection limit
of that assay.
In this work, we propose a method for combining targeted RNA amplifi-
cation and molecular classification for gene expression diagnostics. We begin
by proposing a classifier design that combines computation with enzymatic
amplification (Sect. 2). In our approach, molecular probes are used to assign
weights to each RNA feature in the classifier and PCR-based amplification is
used to amplify the signal resulting from each probe. The workflow for such an
approach is shown in Fig. 1. We then demonstrate a computational approach,
starting from gene expression data, for learning a sparsely-featured classifier
that is well-suited for molecular implementation (Sect. 3). However, this formal
framework assumes that molecular classifier components behave ideally, while
in practice nucleic acid amplification mechanisms are biased, i.e. different probe
Combined Amplification and Molecular Classification 161
sequences get amplified to varying degrees which distorts the classification result
(Sect. 4). We then explore the effects of amplification bias and developed strate-
gies to mitigate amplification bias and maintain classification accuracy. First, we
explore a strategy for averaging over multiple probes, each with an unknown bias
(Sect. 5). Although successful to an extent, we will argue that this naive strat-
egy is impractical because of the large number of probes required. Moreover,
because in practice the amplification bias is consistent across samples, it is pos-
sible to actually measure the probe bias and incorporate that information into
the classifier design. Second, we thus ask whether accurate classification can be
achieved if individual probes are biased but well-characterized (Sect. 6). We will
show that this approach results in a more compact molecular implementation of
the classifier but that classification accuracy is still limited compared to an ideal
classifier. Finally, we develop an approach wherein each weight associated with
a transcript is implemented by just two competing probes, one associated with
a negative and the other with a positive weight (Sect. 7). We show that even
with biased probes any target value of the weight can be closely approximated
as long as we have precise control over probe concentrations. We validate each
of our designs by simulating molecular classification of gene expression profiles
in the context of cancer and infectious disease diagnostics. Our results indicate
that probe characterization and subsequent selection enable the construction
of sensitive, accurate and cost-effective molecular classifiers for gene expression
diagnostics.
Here, we lay out a strategy for creating a molecular classifier with a built-in
amplification mechanism. We first review our earlier classifier design that pro-
vides that basis for our work and then discuss how an enzymatic amplification
step can be used to dramatically increase the specificity of the earlier approach.
In the molecular classifiers reported in [4], the magnitude of a weight associ-
ated with a transcript is implemented by the number of probes designed to target
that transcript; an identity domain appended to the hybridization domain indi-
cates the sign of a each probe and thus of each weight. The total concentration
of all positive (negative) identity domains thus represents the sum of all positive
(negative) weights in the system. Identity domains interact with a downstream
DNA circuit that performs subtraction through pairwise annihilation of positive
and negative signal [4,5]. The remaining signal is converted to fluorescent out-
put. Alternatively, if reporter constructs labeled with distinct fluorophores are
used to separately read out the concentrations of positive and negative identity
domains, the subtraction can be performed in silico. In either case, this approach
requires weights to be small (<10) integers, because each unit weight requires a
unique binding site on a transcript. This design is demonstrated in Fig. 2. More-
over, in this framework, the output signal has similar magnitude to the input
signal, so sensitivity is low, and not sufficient for clinical disease diagnostics.
162 G. Gowri et al.
Fig. 1. Workflow for combined amplification and classification of RNA samples. An in-
silico classifier is trained and validated on publicly available gene expression data. Then,
multiple probes are designed and synthesized to target the set of genes in the classifier.
This set of probes is amplified using an RNA sample with known gene expression data.
Using next-generation sequencing, the number of amplified probes can be counted in
batch in order to determine probe specific amplification bias. Subsequently, this data
informs a design for molecular classifier that will implement the desired classification
model.
a pair bind neighboring sites on an mRNA target such that they create a con-
tiguous sequence with a nick at the center. Adjacent probes are then ligated
together. Importantly, ligation can only occur if probes are bound to the RNA.
Each probe also contains universal amplification overhangs. PCR amplification
of the ligated probes enables accurate amplification of low total RNA amounts
(10 nanograms) for gene expression quantification using next-generation sequenc-
ing. Because only ligated probes can be efficiently amplified and because ligation
requires the RNA template, RASL is specific and quantitative method for RNA
detection.
A molecular classifier using RASL probes is shown in Fig. 3b. Different inte-
ger weights can be implemented by varying the number of probes per transcript.
To implement positive and negative weights, each probe also contains a sequence
barcode that triggers either a green or red fluorescent reporter during amplifi-
cation. The difference between the aggregate fluorescent signals from the two
channels is the classification output.
Amplification by RASL is consistent across samples, but is inconsistent
within samples, such that certain probes are amplified with greater propen-
sity than others [12]. As a result, n probes will not necessarily yield n times as
large a signal as a single probe representing unit weight, so molecular classifiers
designed with the approach of [4] will not behave similarly to the in silico clas-
sifier upon amplification. Below we discuss how such bias can be accounted for
in the classifier design.
164 G. Gowri et al.
Fig. 3. Overview of existing RASL-seq and our modified method for molecular classifi-
cation. In panel A, the standard RASL-seq protocol for targeted gene expression count-
ing using next-generation sequencing is shown. Multiple probe pairs are hybridized to
their RNA targets followed by ligation of gaps. The yellow circled P’s indicate the 5’
phosphates required for ligation. The ligated products can be amplified using common
primers and then used as input for next generation sequencing. Sequencing data is then
used for gene expression analysis. In panel B, the protocol for molecular classification
using RASL is shown. Our modified RASL probes contain a positive or negative bar-
code (red or green domain) associated with each probe. The number of probes that
bind to each transcript can be varied to tune the effective amplification weight on each
transcript. During amplification, two fluorescent reporters (FAM and ROX) are trig-
gered based on the presence of each barcode. This fluorescent signal can then determine
the classification outcome for a given sample. (Color figure online)
differentiates between bacterial infections and viral infections from whole blood
RNA samples, similar to that previously implemented as a molecular classifier
for in vitro use [4]. We also created a sparsely-featured classifier that discrimi-
nates between cancer and healthy patients based on platelet RNA samples. Both
classifiers were tested on validation sets that were disjoint from the training sets,
and consisted of approximately 16 the number of samples of the training sets, cor-
responding to validation sets of 35 and 56 samples respectively. The accuracy
of the classifiers on the validation set will henceforth be referred to as model
accuracy, and are shown in Table 1.
be the set of amplification factors of the probes used to implement desired weight
|t| of a transcript t ∈ T , where each pti represents the amplification factor of the
i-th probe targeting transcript t. We will define the effective weight of a target
transcript t as
c∗|t|
Wt = pti
i=1
The effective weight is the weight implemented by the molecular classifier after
amplification. Using the approximation that amplification factors are distributed
Combined Amplification and Molecular Classification 167
Wt ≈ c ∗ |t| ∗ 2μ
In order to implement the desired classifier, the effective weights do not need to
be the same as the desired weights – constantly scaled weights will yield identical
classification results. As a result, if the effective weights have the same relative
values as the desired weights, the implementation can be considered successful.
We see that for any pair of transcripts u, v ∈ T ,
Wu c ∗ |u| ∗ 2n |u|
≈ n
=
Wv c ∗ |v| ∗ 2 |v|
Our goal is to select subsets of probes St for all transcripts t ∈ T that yield
Wu |u| 2
min ( − )
Wv |v|
u,v∈T
of weights, so it seems likely that the optimal selection of probes would yield
desired classifier behavior. However, the large solution space also makes identify-
ing the solution challenging. In order to estimate the accuracy of this approach
analogously to Fig. 6, with 500 simulations of randomly biased probes, it is not
feasible to search the entire solution space. Instead, for each transcript, we sim-
ply find the subset of probes whose sum is closest to the weight normalized to
n ∗ μ, where μ is the mean of the log2 -normal distribution. In other words, we
select subsets of probes St for all transcripts t ∈ T that yield
min (Wt − |t| ∗ μ)2
t∈T
Fig. 8. Simulated accuracies of molecular classifiers using subsets of n probes per tran-
script. The shade of blue indicates the frequency of an outcome. 500 independent
simulations were done for each n. (Color figure online)
Fig. 10. Simulated accuracies for molecular classifiers built with weights encoded in
probe concentration. Decimals of precision indicates the control of the ratios. For exam-
ple, 1 decimal of precision means that only ratios with increments of ten percent can
be implemented.
8 Discussion
Based on these analyses, both selecting subsets of probes and encoding classifier
weights in probe concentration appear to be viable approaches to mitigating
amplification bias in molecular classifiers. When mitigating bias by selecting
subsets of probes, one can use almost exactly the experimental construction
presented in [4]. The only additional steps involve characterizing probe bias.
For this reason, it is nearly certain that such a strategy could be used to build
molecular classifiers. However, it is possible that many probes will need to be
screened in order to identify a subset of probes that implements the desired
classifier.
While encoding the classifier weights in probe concentration requires a
slightly different, currently experimentally unverified construction, it would
likely use a much smaller set of probes in order to implement the desired clas-
sifier, and thus be more cost effective. Even with very limited implementation
precision, one could imagine having to screen far fewer probes than in the subset
selection method. Furthermore, it allows one to implement weights with more
specificity than the subset selection method, so provided that there is sufficient
implementation precision, it should allow for more accurate implementation of
an in silico classifier.
Gene expression profiling is increasingly an important clinical metric for diag-
nosis a wide number of human diseases. The approach presented here would
enable amplification and classification of RNA samples containing multiple
biomarkers in a single reaction with a two-channel fluorescent readout. This could
drastically reduce the complexity of gene expression classification and poten-
tially enable a point-of-care solution to this type of diagnostics. Even though
this approach would result in a more complex development stage, once a final
construction is found, the implementation is drastically simpler than existing
alternatives.
References
1. Tsalik, E.L., et al.: Host gene expression classifiers diagnose acute respiratory ill-
ness etiology. Sci. Transl. Med. 8, 322ra11 (2016)
2. Best, M.G., et al.: RNA-Seq of tumor-educated platelets enables blood-based pan-
cancer, multiclass, and molecular pathway cancer diagnostics. Cancer cell 28, 666–
676 (2015)
3. Benenson, Y., Gil, B., Ben-Dor, U., Adar, R., Shapiro, E.: An autonomous molec-
ular computer for logical control of gene expression. Nature 429, 423–429 (2004)
4. Lopez, R., Wang, R., Seelig, G.: A molecular multi-gene classifier for disease diag-
nostics. Nat. Chem. 10, 746–754 (2018)
5. Zhang, D.Y.: Cooperative hybridization of oligonucleotides. J. Am. Chem. Soc.
133, 1077–1086 (2010)
6. Turberfield, A.J., Mitchell, J., Yurke, B., Mills Jr., A.P., Blakey, M., Simmel, F.C.:
DNA fuel for free-running nanomachines. Phys. Rev. Lett. 90, 118102 (2003)
7. Dirks, R.M., Pierce, N.A.: Triggered amplification by hybridization chain reaction.
Proc. Nat. Acad. Sci. USA 101, 15275–15278 (2004)
8. Seelig, G., Yurke, B., Winfree, E.: Catalyzed relaxation of a metastable DNA fuel.
J. Am. Chem. Soc. 128, 12211–12220 (2006)
9. Zhang, D.Y., Turberfield, A.J., Yurke, B., Winfree, E.: Engineering entropy-driven
reactions and networks catalyzed by DNA. Science 318, 1121–1125 (2007)
10. Zhang, D.Y., Seelig, G.: DNA-based fixed gain amplifiers and linear classifier cir-
cuits. In: Sakakibara, Y., Mi, Y. (eds.) DNA 2010. LNCS, vol. 6518, pp. 176–186.
Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-18305-8 16
11. Chen, S.X., Seelig, G.: A DNA neural network constructed from molecular variable
gain amplifiers. In: Brijder, R., Qian, L. (eds.) DNA 2017. LNCS, vol. 10467, pp.
110–121. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-66799-7 8
12. Li, H., Qiu, J., Fu, X.D.: RASL-seq for massively parallel and quantitative analysis
of gene expression. Curr. Protoc. Mol. Biol. 98, 4–13 (2012)
13. Cherry, K.M., Qian, L.: Scaling up molecular pattern recognition with DNA-based
winner-take-all neural networks. Nature 559, 370 (2018)
14. Burchill, S.A., Perebolte, L., Johnston, C., Top, B., Selby, P.: Comparison of the
RNA-amplification based methods RT-PCR and NASBA for the detection of cir-
culating tumour cells. Br. J. Cancer 86, 102 (2002)
15. Deng, R., Zhang, K., Sun, Y., Ren, X., Li, J.: Highly specific imaging of mRNA
in single cells by target RNA-initiated rolling circle amplification. Chem. Sci. 8,
3668–3675 (2017)
16. Song, T., Garg, S., Mokhtar, R., Bui, H., Reif, J.: Analog computation by DNA
strand displacement circuits. ACS Synth. Biol. 5, 898–912 (2016)
17. Stougaard, M., Juul, S., Andersen, F.F., Knudsen, B.R.: Strategies for highly sen-
sitive biomarker detection by Rolling Circle Amplification of signals from nucleic
acid composed sensors. Integr. Biol. 3, 982–992 (2011)
18. Takahashi, H., Matsumoto, A., Sugiyama, S., Kobori, T.: Direct detection of green
fluorescent protein messenger RNA expressed in Escherichia coli by rolling circle
amplification. Anal. Biochem. 401, 242–249 (2010)
19. Stahlberg, A., Krzyzanowski, P.M., Jackson, J.B., Egyud, M., Stein, L., Godfrey,
T.E.: Simple, multiplexed, PCR-based barcoding of DNA enables sensitive muta-
tion detection in liquid biopsies using sequencing. Nucleic Acids Res. 44, e105–e105
(2016)
Reversible Computation Using Swap
Reactions on a Surface
1 Introduction
In traditional digital logic, information is lost, making computation logically irre-
versible. For example, an AND gate transforms two inputs into a single output,
where the inputs cannot be deduced from the output. Landauer argued that irre-
versible logic, implemented by physically irreversible systems, dissipate at least
a minimum energy, kT log 2, with each binary computational step [1]. Charles
Bennett countered that computation could be done in a logically reversible fash-
ion, indicating that physically reversible systems could compute with arbitrarily
little energy expenditure [2]. A surprising flip side to this discovery was that
several simple models of constant-energy reversible systems, such as perfect bil-
liard balls [3,4] and even a microscopic model of heat diffusion within molecular
aggregation [5], were shown to be capable of carrying out arbitrary compu-
tations. The connections between computation and thermodynamics are now
richly developed [6,7]. However, despite considerable effort [8], practical com-
puting systems that perform reversible computing with asymptotically minimal
energy expenditure have not been demonstrated.
In his seminal work, Bennett references biological nucleic acid systems as
examples of logically and physically reversible computing [2,9]. Recently, build-
ing on techniques for compiling arbitrary formal chemical reaction networks
(CRNs) into DNA strand displacement systems (DSDs) [10–12], the poten-
tial of synthetic nucleic acid systems to implement reversible computing has
been explored theoretically and shown to be feasible for polynomial-space prob-
lems [13–15]. By further storing information in a DNA polymer based system,
T. Brailovskaya, G. Gowri and S. Yu—Equal contribution.
c Springer Nature Switzerland AG 2019
C. Thachuk and Y. Liu (Eds.): DNA 25, LNCS 11648, pp. 174–196, 2019.
https://doi.org/10.1007/978-3-030-26807-7_10
Reversible Computation Using Swap Reactions on a Surface 175
2 Computing Paradigm
We seek to construct a set of species, along with a set of permissible swap rules
and a starting arrangement of those species on the lattice, that is able to compute
logical functions.
To represent bits, we will use two species, denoted 1 and 0. Each lattice point
will be shown as a square. Within an arrangement of species on a surface, certain
lattice points will be designated as input locations and certain lattice points will
be designated as output locations. We will denote the input locations with arrows
pointing towards them and outputs with arrows pointing away (e.g. see the
arrows in the leftmost and rightmost locations in Fig. 1a). In our constructions,
if the input lattice locations are replaced with any permutation of bits, then
it is possible to reach an arrangement (through the permissible swaps) where
the output locations are filled with bits. We can think of this abstractly as the
arrangement computing some Boolean function f : {0, 1}n → {0, 1}m , where
n, m are the number of input and output lattice locations respectively, so long
as a unique set of output values are reachable.
Consider the task of constructing a wire. Let’s define a species w that is
permitted to swap both with 0 and 1 (i.e. we permit the reactions 0 ↔ W and
1 ↔ W ). Imagine a line of W , as shown in Fig. 1.
If we let the leftmost lattice point be the input location and rightmost be
the output location, then this arrangement computes the identity function. The
input bit will randomly walk along the line of W , eventually occupying the
output location. Any line of W is a wire, as it simply transmits a signal. In order
to develop more complex systems, we will introduce more species and rules,
and use larger layouts. With this paradigm in mind, we design composable logic
gates, which allow us to construct arbitrary digital logic circuits.
Fig. 1. Basic wire operation. (a) Wire starting configuration. (b) Initial loaded con-
figuration. (c) Computation in progress.
Reversible Computation Using Swap Reactions on a Surface 177
Table 1. List of swap rules required to implement NOT, AND, OR, fanout and wire-
cross. No species beyond those that appear in these swap rules are necessary. Recall
that the rule A ↔ B is equivalent to the implicitly reversible surface CRN reaction
A+B →B+A
For these gates, we had several important goals in mind, the most important
being that the gates had to be logically reversible. Fredkin and Toffoli demon-
strate in [3] a set of universal logic gates that are reversible called the Fredkin
and the Toffoli gates. Each of them is a three input - three output gate in which
it is uniquely possible to determine the input from the output.
In the case of AND, OR logic, this is impossible (since the gate is not injec-
tive). However for our systems, it is sufficient to be able to uniquely determine
the input to a gate from the output plus the final configuration of the gate. The
idea is that even though different inputs give the same output, the way in which
inputs rearrange in the gate will be unique.
NOT Logic. Initially, it may seem impossible to construct a NOT gate using
only swap reactions, as the output of a NOT gate is not present in the input, and
swap reactions cannot generate new species. However, we are able to implement
a NOT gate by instead storing both a 1 and a 0 inside the gate, and releasing
the appropriate bit depending on the input.
The starting configuration of a NOT gate is shown in Fig. 2a. In this config-
uration, no swaps are possible. Upon the arrival of a bit in the input location,
it goes either right or left depending on its value, as 1 swaps with W 1 and not
W 0, and 0 swaps with W 0 and not W 1. Upon this first transition, the bit may
now swap with the I species, which may now travel down the two consecutive J
species, and release the appropriate output bit. The output bit can then swap
into the output location. This motif is symmetric for both inputs, as shown in
Fig. 2b. An example trajectory for the 0 input case is shown in Fig. 2c.
178 T. Brailovskaya et al.
(a) (b)
(c)
(d)
Fig. 2. NOT gate implementation via swap reactions. The unidirectional black arrows
indicate the input and output locations. (a) Gate layout and swap rules. (b) Condensed
representation of computation. Blue lines represent the initial movement of the input
bit. The red represents the trajectory of the I species. The purple line is the movement
of the output bit, which occurs after interacting with the I species. Dotted lines refer
to when the input is 1, while solid lines are for input 0. (c) Computation trajectory
on input 0. The bidirectional black arrows represent transition via swap rule. (d)
Statespace of the NOT gate. (Color figure online)
Reversible Computation Using Swap Reactions on a Surface 179
All of our logic gates (AND, OR, NOT) have the property that there is
only one state in which a correct output is in the output square. This means
that in whatever circuit we embed our gates into, when the output leaves the
gate, the remainder of the gate can only be in one possible configuration. In
particular with the logic gates that we have constructed, after the output bit
leaves, the remainder of the gate is stable (where stable means that no swaps
can happen between the species in the remaining configuration). Furthermore,
the gates are stable before any inputs arrive. This stability property is achieved
without sacrificing reversibility by leveraging spatial separation.
AND Logic. Next, we will show how a small change in the NOT gate con-
struction yields an AND gate. Consider a gate with the same layout as NOT
except that the 1 and 0 species that are stored inside the gate are switched. If
this gate receives an input 1, the output will be 1. Similarly, if the gate receives
input 0, the output with be 0. Now, further modify this gate by removing the
stored 1 and turning it into another input location, as shown in Fig. 3a. Observe
that an AND gate will return 0 whenever there is a 0 in the input. Thus, in
this construction, if the top input receives a 0, the gate will correctly output 0,
regardless of what value arrives at the side input. It remains to verify that this
gate works correctly when the top input receives a 1. Whenever the top input
receives a 1, the side input will appear in the output location. Thus, if the side
input receives 0, the output will be 0, as it should. Similarly, if the side input
and top input both receive 1, the output will be 1, as desired.
OR Logic. Even though AND and NOT are sufficient for expressing any logical
formula, it is convenient to also have a simple way of computing OR directly.
Observe that in an OR gate, whenever there is a 1 in the input, the output should
be 1. Thus, we can create OR analogously to AND, by fixing 1 as a stored input
that always appears if the top input is 1. The layout is shown in Fig. 3b.
(a) (b)
Fig. 3. Gate layout of AND and OR. For these two gates we have two inputs, denoted
by the arrows pointing into the system. (a) AND gate. (b) OR gate.
180 T. Brailovskaya et al.
Selector Motif. If no bits are stored in the previously described gates such that
they have three input locations (top, left, and right), then the gate is equivalent
to a data selector (or multiplexer), a device frequently used by electrical engineers
that outputs one of two values determined by an additional input signal. We
have shown the implementation of AND, OR, and NOT by fixing certain inputs,
but we can also implement several other functions with this strategy, including
strictly less than and strictly greater than. However, in our constructions, we
use only the canonical AND, OR, and NOT gates.
The selector design was originally inspired by the Fredkin gate [3]. The Fred-
kin gate works by switching signals two and three in the output if signal one is
1, else the signals are output unchanged. A Fredkin gate can be programmed by
fixing one or two of the three input signals and observing the output value of
either signal two or three to compute AND, OR and NOT. Here, we effectively
construct a Fredkin gate that only outputs the relevant signal that stores the
value of AND, OR, or NOT.
(a) (b)
Fig. 4. Fanout mechanism. (a) Fanout layout. The input arrives on the left side indi-
cated by the arrow. The two outputs leave on the right at the specified locations. (b)
Fanout computation. The dotted lines represent the computation when a 0 bit serves
as the input and the solid lines represent computation when a 1 bit serves as the input.
The red lines represent the trajectory of the input. The yellow lines are the trajectory
of the I1 and I species for the cases in which the input is 1 and 0 respectively. The
green lines are the movement of the top output bit and the blue lines are the movement
of the bottom output bit. (Color figure online)
Reversible Computation Using Swap Reactions on a Surface 181
Fanout. In Fig. 4a we demonstrate our design for a fanout gate. The key idea is
to store an additional copy of the bit inside the gate to simulate bit duplication.
Overall, the gate consists of two interconnected columns, each of which is capable
of copying a bit. One column will duplicate the input bit if it is 1 and the other
will duplicate the input if it is 0. The bit is “duplicated” by freeing the extra
stored bit of the same value.
If the input bit is a 1, then the first column duplicates it, and the two outputs
travel on wires parallel to the W 0 wire. We introduce a new species K that can
both carry the 1 bit and the indicator I species. We also have to introduce a
new species I1 to allow the 1 bit to duplicate. Refer to Table 1 for the associated
swap rules.
Wirecross. Designing a wirecross that allows two bits to cross paths is chal-
lenging because if the signals are travelling along identical wire types, there is
nothing stopping them from trading places and going down the wrong wires. In
order to get around this issue, we translate the bits into intermediates that travel
on distinct wire types and then release the appropriate bit once the crossing has
taken place. We see this design in Fig. 5. At the top, we translate the input bit
a ∈ {0, 1} to W a ∈ {W 0, W 1}. This W a then travels along a path specified by
the P species. The other input b is translated to Ib ∈ {I0, I1}, which travels
along a path specified by the J species. The center species is initially occupied
with a J, which means the input coming in from the left can pass, while the
input from the top must wait. We introduce a final new species X which can
swap with both Ib and W a. First the Ib traverses the intersection and places
the X species in the center. Then the displaced W a can traverse the intersection
point.
stochastic, parallel, and reversible, correctness was evaluated not with respect
what the system does do, but rather with respect to what it could do, i.e. which
states are reachable from a given input state. There was no combination of inputs
for which the exhaustive enumeration found a state in which any incorrect output
was produced, and for all input combinations the enumeration found a state in
which all correct outputs were produced. Therefore, for all input combinations,
the circuit will (with probability 1) eventually reach a state where all outputs
are correct, and will never reach a state where any output is incorrect (though
perhaps most of the time the outputs will be empty).
bits being loaded into the input locations in the gate, the set of states of the
stochastic CRN will be in bisimulation with the configuration of the gate on the
surface when the same input bits are loaded. Observe that each gate’s operation
involves a set of independent random walks that come together at particular
points. For example if we consider the OR gate, the top input takes a random
walk and ends up in the top right corner. Meanwhile the indicator species I
takes a random walk from its original location in the top right to the bottom
right. If we give each of these random walks a label, then the entire state of the
gate can be described by how far each random walk trajectory has progressed
and which bit is being expressed on the trajectory. The species of our stochastic
CRN will have the form Abi where A is the label of the trajectory, i the index of
the trajectory (how far it has progressed) and b is the bit that is being expressed
on the trajectory. We also allow i to be S or F indicating respectively that the
trajectory has not started yet (it is in the starting configuration) or that the
trajectory is finished.
The most basic reaction of the stochastic CRN is Abi ↔ Abi+1 indicating
progress on trajectory A (provided Abi+1 is an allowed species). When we have
one trajectory lead unconditionally into another we see a reaction that looks like
Abn + BS ↔ AbF + B1b . When two trajectories come together in the surface CRN
layout, this corresponds to reactions consuming the final numbered species of
two trajectories and producing the first numbered species of a new trajectory.
In order for the stochastic CRN to be equivalent we must show that there
is a bisimulation between the state space of the surface CRN (given a specific
combination of inputs in the input locations) and the set of reachable states in the
stochastic CRN (from the corresponding set of starting species). To demonstrate
Fig. 7. 4-bit square root circuit. (a) Layout of the surface CRN 4-bit square root (done
by hand in order to use less space than the general circuit layout scheme). Locations
marked in purple represent the fanout mechanism. Red represents an OR gate, blue
represents an AND, green a NOT, and grey a wirecross. Lattice points in light blue are
input locations for the circuit and orange represents output locations. Black represents
wires. (b) Abstract circuit diagram. (Color figure online)
Reversible Computation Using Swap Reactions on a Surface 185
this we will have a paint function f that maps states of the stochastic CRN to
configurations (states) of the surface gate. This mapping will have the property
that the available swaps from a state f (s) on the surface correspond exactly to
the set of reactions available to the stochastic CRN state s. By this we mean
that applying the paint function f and then applying the swap will result in the
same thing as applying the CRN reaction corresponding to the swap, and then
applying the paint function. The paint function operates as follows, each species
will specify how to paint a part of the surface. The parts of the surface that
are not specified by any species will be the same as its initial configuration. We
demonstrate a paint function for the OR gate in Fig. 8.
Fig. 8. Paint functions for the OR gate. All species in the stochastic CRN that cor-
respond to the OR gate as well as their associated paint functions are shown. In each
table, the left hand column is the list of species. Each row is a paint function for a
particular species. Each column represents how a particular lattice point is painted.
(0)
For example, the AF species would paint the lattice point C1 as W 0, the lattice point
D1 as J, and so on. (a) Initial configuration of the gate with each lattice point labeled
with a row number and a column letter. (b) Paint function for A(0) including AS . (c)
Paint function for D. (d) Paint function for B. (e) Paint function for C. (f ) Paint
function for A(1) excluding AS .
186 T. Brailovskaya et al.
The reactions for the stochastic CRN that correspond to the OR gate are
(0) (0) (0) (0) (0)
A5 + B1 + CS ↔ AF + BF + C1
(0) (1) (0) (1) (1)
A5 + B1 + CS ↔ AF + BF + C1
(0) (0) (0)
C1 + DS ↔ CF + D1
(1) (1) (1)
(1)
C1 + DS ↔ CF + D1
(1) (1) (1)
A6 + DS ↔ AF + D1
(b) (b)
Xi ↔ Xi+1 ∀X ∈ {A, D}, ∀b ∈ {0, 1}, ∀i
If we load the inputs b1 , b2 on the top and on the right of the OR gate
respectively, the equivalent state in the stochastic CRN is to have one copy
(b ) (b )
each of A1 1 and B1 2 along with CS and DS . One can verify by hand that,
starting from these initial four species, reachable reactions in the stochastic CRN
correspond exactly to reachable swaps on the surface. In fact whenever at most
one input arrives at either input location, the stochastic CRN is in (strong)
bisimulation with the surface CRN. If for example b1 entered through the top
input, but nothing had entered through the right input, we can start the system
(b )
in the state {A1 1 , BS , CS , DS }. We represent this CRN pictorially in Fig. 9a.
Now notice that if we drop all subscripts in our species formulation, then the
stochastic CRN reduces to
the stochastic CRNs for them and for fanout and wirecross can be found in the
Appendix. What happens now when we have a composition of gates in which
the output lattice points of certain gates are linked with input lattice points
of other gates via a (possibly bent) linear wire? We can create a “stitched”
version of the stochastic CRN. We start with the stochastic CRN for each gate,
and we relabel the species so that the same trajectories from two different OR
gates, for example, are syntactically different. Next, we consider each wire in the
composition. Suppose a given wire W links the output trajectory O of some gate
to the input trajectory I of some other gate. Then we create a new trajectory
for the movement of bits on a wire—let us call it W —and add the following
reactions:
(b) (b)
On(b) + WS ↔ OF + W1
(b) (b) (b)
Wl + IS ↔ WF + I1 (3)
(b) (b)
Wi ↔ Wi+1 ∀b ∈ {0, 1}, ∀i s.t. 1 ≤ i < l
(b)
where l is the length of the wire and On is the last state of the output
trajectory. In the reduced CRN this is effectively O(b) ↔ I (b) , which makes
sense. Since we have already established every reaction in each gate’s individual
(a) (b)
Fig. 9. Pictorial representation of the stochastic CRN for the OR gate.(a) The full
stochastic CRN. Species and arrows shown in gray correspond to species that serve
as indicators of whether a certain trajectory is in an initial or a final configuration.
(b) A graph representation of the CRN without the grey indicator species. All species
that only differ in their subscript are associated with each other. Note that the node
above D(1) that appears to have two possible predecessors is actually deterministically
reversible when the indicator species are accounted for.
188 T. Brailovskaya et al.
stochastic CRN corresponds to some swap on the surface, its fairly clear that
within this stitched stochastic CRN, all reactions still correspond to reachable
swaps on the surface. What is left to show is that no reachable swaps cannot be
expressed as some reaction in the stitched stochastic reaction. First, we claim
that if the circuit is feedforward and each of its input locations is loaded with
exactly one bit, then the circuit as a whole receives exactly 1 input per input
wire. Consider what happens if this is not the case. Suppose a gate receives two
inputs at an input lattice. Consider the first such occurrence. Let g be the first
gate this happened to. g must have received two inputs from a previous gate,
some g that it was connected to. But g could not have produced two outputs
since we know g received at most one input per lattice (by our selection of g).
Therefore we have a contradiction, and so no such g can exist. If each gate will
receive at most one input per input wire, the behavior of each gate is entirely
captured by its individual stochastic CRN. Because the stochastic CRN for the
circuit is a stitching of individual stochastic CRNs it must capture all possible
swaps. Therefore the stitched stochastic CRN is in bisimulation with the surface
CRN.
As discussed above, for each gate there is only one state with correct output.
Therefore, in a circuit in which every wire leads toward an output lattice point
(such as the one in Fig. 7a), there is also only one state with all outputs simulta-
neously occupied. This is problematic for large circuits because the probability
of observing an output state becomes extremely small as the circuit increases in
size. The source of the issue is that forward and reverse reaction rates are iden-
tical for a single swap reaction. Thus, every possible configuration of the surface
has the same energy. As a result, at equilibrium each reachable surface configu-
ration is equally likely. In the case of the 4-bit square root, there is exactly one
state in which we have outputs, and > 106 states in which we do not. As such,
probability that the surface is in the output state is very low.
Conveniently, the reduced stochastic CRN provides a framework for quan-
titatively assessing entropic factors, which in turn suggests a solution to the
problem. Consider a “wire” of length n that is represented in the full stochas-
tic CRN by {XS , X1 , . . . , Xn , XF } and is represented in the reduced stochastic
CRN by {XS , X, XF }. We say that a signal is on the wire if some Xi with
1 ≤ i ≤ n is present in the full stochastic CRN, and if X is present in the
reduced stochastic CRN. A state α of the reduced stochastic CRN with signals
on m wires X 1 , X 2 , . . . , X m
(of respective lengths n1 , n2 , . . . , nm ) will therefore
correspond to exactly wα = 1≤k≤m nk states of the full stochastic CRN. Con-
sequently, we consider α to be a macrostate with Boltzmann weight wα and thus
equilibrium probability pα = wα /Z where Z = α wα . Equivalently, we could
say that macrostate α has energy Eα = −kT 1≤k≤m log nk .
As an initial application of this quantitative framework, we can determine
the effect of the “unnecessary” fanout gates in the construction of Fig. 6b. These
Reversible Computation Using Swap Reactions on a Surface 189
Fig. 10. The entropic driver gadget. The blue line indicates the trajectory of the pri-
mary bit traveling down the wire. The red and green lines represent the movement of
the I and J species after the primary bit has passed. (Color figure online)
190 T. Brailovskaya et al.
6 Future Directions
Appendix
Species C3 C4
BS W W
(1)
B1 1 W
(1)
B2 W 1
(0)
B1 0 W
(0)
B2 W 0
(a) (b)
Species C1 D1 E1 D2 D3 E3
AS W Species C1 B1 A1 B2 B3 A3
(0) (1)
A1 0 W0 I J J 1 A1 1 W1 I J J 0
(0) (1)
A2 W0 0 I J J 1 A2 W1 1 I J J 0
(0) (1)
A3 W0 I 0 J J 1 A3 W1 I 1 J J 0
(0) (1)
A4 W0 J 0 I J 1 A4 W1 J 1 I J 0
(0) (1)
A5 W0 J 0 J I 1 A5 W1 J 1 J I 0
(0) (1)
A6 W0 J 0 J 1 I A6 W1 J 1 J 0 I
(0) (1)
AF W0 J 0 J W I AF W1 J 1 J W I
(c) (d)
(b) (b)
Ai ↔ Ai+1 ∀b ∈ {0, 1}
(b) (b) (¬b)
A6 +BS ↔ AF +B1 ∀b ∈ {0, 1}
(e)
Fig. 11. Paint functions for the NOT gate. All species in the stochastic CRN that
corresponds to the NOT gate as well as their associated paint functions are shown. In
each table, the left hand column is the list of species. Each row is a paint function for
a particular species. Each column represents how a particular lattice is painted. (a)
Initial configuration of the NOT gate with each lattice point labeled with a row number
and a column letter. (b) Paint function for B. (c) Paint function for A(0) including
AS . (d) Paint function for A(1) excluding AS . (e) Stochastic CRN equivalent to the
NOT gate.
192 T. Brailovskaya et al.
Species C1 B1 A1 B2 B3 Species C3 C4
(1)
A1 1 W1 I J J DS W
(1) (0)
A2 W1 1 I J J D1 0 W
(1) (0)
A3 W1 I 1 J J D2 W 0
(1) (1)
A4 W1 J 1 I J D1 1 W
(1) (1)
A5 W1 J 1 J I D2 W 1
(1)
AF W1 J 1 J DF W W
(a) (b) (c)
Species C1 D1 E1 D2 D3 E3
AS W
(0)
A1 0 W0 I J J 0
(0)
A2 W0 0 I J J 0
(0)
Species A3 Species B3 A3 W I 0 J J 0
(0)
BS W CS A4 W0 J 0 J I 0
(0) (0) (0)
B1 0 C1 0 A5 W0 J 0 J I 0
(1) (1) (0)
B1 1 C1 1 A6 W0 J 0 J 0 I
(0)
BF I CF W AF W0 J 0 J W I
(d) (e) (f)
(0) (0) (0)
A6 + DS ↔ AF + D1
(1) (0) (0) (1)
A5 +B1 +CS ↔ C1 +AF +BF
(1) (1) (1) (1)
A5 +B1 +CS ↔ C1 +AF +BF
(b) (b)
C1 + DS ↔ D1 + CF ∀b ∈ {0, 1}
(b) (b)
Xi ↔ Xi+1 ∀X ∈ {A, D} ∀b ∈ {0, 1}
(g)
Fig. 12. Paint functions and the stochastic CRN for the AND gate. (a) Initial AND
gate surface layout with each lattice labeled with a row number and a column letter.
(b) Paint function for A(1) . (c) Paint function for D. (d) Paint function for B. (e)
Paint function for C. (f ) Paint function for A(0) . (g) Stochastic CRN equivalent to
AND gate.
Reversible Computation Using Swap Reactions on a Surface 193
Species B1 B2 B3 B4 Species A2 A3 A4 A5
AS W W BS I1 W1 I W
(1) (1)
A1 1 W B1 1 W1 I W
(1) (1)
A2 W 1 B2 W1 1 I W
(1) (1)
AF W B3 W1 I 1 W
(0) (1)
A1 0 W W0 W0 B4 W1 I W 1
(0) (1)
A2 W 0 W0 W0 BF W1 I W W
(0) (0)
A3 W W0 0 W0 B1 0 W
(0) (0)
A4 W W0 W0 0 B2 W 0
(0) (0)
AF W W0 W0 BF W W
(a) (b) (c)
Species B2 C2 D2 C3 C4 C5
CS J 1 W1 K W Species B4 C4 D4 E4 D5 C5
(1) (0)
C1 I1 J 1 W1 K W C1 I K J 0 W0 W
(1) (0)
C2 J I1 1 W1 K W C2 K I J 0 W0 W
(1) (0)
C3 J 1 I1 W1 K W C3 K J I 0 W0 W
(1) (0)
C4 J W1 I1 1 K W C4 K J 0 I W0 W
(1) (0)
C5 J W1 I1 K 1 W C5 K J W0 I 0 W
(1) (0)
C6 J W1 I1 K W 1 C6 K J W0 I W 0
(1) (0)
CF J W1 I1 K W W CF K J W0 I W W
(d) (e)
(f)
Fig. 13. Paint functions for the fanout gate. (a) Initial configuration of the fanout gate
with each lattice labeled with a row number and a column letter. (b) Paint function
for A. (c) Paint function for B. (d) Paint function for C (1) including CS . (e) Paint
function for C (0) excluding CS . (f ) Stochastic CRN equivalent to fanout.
194 T. Brailovskaya et al.
Species A3 B3 C3 Species D3 E3 E2 E4
AS J J J BS X J J0 J1
(1) (1)
A1 I1 J J B1 I1 J J0 J1
(1) (1)
A2 J I1 J B2 J I1 J0 J1
(1) (1)
A3 J J I1 B3 J J1 J0 I1
(1) (1)
AF J J BF J J0 I1
(0) (0)
A1 I0 J J B1 I0 J J0 J1
(0) (0)
A2 J I0 J B2 J I0 J0 J1
(0) (0)
A3 J J I0 B3 J J0 I0 J1
(0) (0)
AF J J BF J I0 J1
(a) (b) (c)
Species C3 C4 C5
DS X P P
(1)
Species C1 C2 D1 W1 P P
(1)
CS P P D2 P W1 P
(1) (1)
C1 W1 P D3 P P W1
(1) (1)
C2 P W1 DF P P
(1) (0)
CF P D1 W0 P P
(0) (0)
C1 W0 P D2 P W0 P
(0) (0)
C2 P W0 D3 P P W0
(0) (0)
CF P DF P P
(d) (e)
(b) (b)
Xi ↔ Xi+1 ∀X ∈ {A, B, C, D} ∀b ∈ {0, 1}
(b) (b) (b)
A3 +BS ↔ AF +B1 +DS ∀b ∈ {0, 1}
(b) (b) (b)
C2 +DS ↔ CF +D1 ∀b ∈ {0, 1}
(f)
Fig. 14. Paint function for partial wirecross. Truncated portions are equivalent to
trajectories found in AND/OR/NOT gates. (a) Initial configuration of the central
portion of wirecross with each lattice labeled with a row number and a column letter.
(b) Paint function for A. (c) Paint function for B. (d) Paint function for C. (e) Paint
function for D. (f ) Stochastic CRN equivalent to central portion of wirecross.
Reversible Computation Using Swap Reactions on a Surface 195
References
1. Landauer, R.: Irreversibility and heat generation in the computing process. IBM
J. Res. Dev. 5, 183–191 (1961)
2. Bennett, C.H.: Logical reversibility of computation. IBM J. Res. Dev. 17, 525–532
(1973)
3. Fredkin, E., Toffoli, T.: Conservative logic. Int. J. Theor. Phys. 21, 219–253 (1982)
4. Margolus, N.: Physics-like models of computation. Phys. D Nonlinear Phenom. 10,
81–95 (1984)
5. D’Souza, R.M., Homsy, G.E., Margolus, N.H.: Simulating digital logic with the
reversible aggregation model of crystal growth. In: Griffeath, D., Moore, C. (eds.)
New Constructions in Cellular Automata, pp. 211–230. Oxford University Press,
Oxford (2003)
6. Ouldridge, T.E.: The importance of thermodynamics for molecular systems, and
the importance of molecular systems for thermodynamics. Nat. Comput. 17, 3–29
(2018)
7. Wolpert, D.: The stochastic thermodynamics of computation. J. Phys. Math.
Theor. 52, 193001 (2019)
8. Perumalla, K.S.: Introduction to Reversible Computing. Chapman and Hall/CRC,
Boca Raton (2013)
9. Bennett, C.H.: The thermodynamics of computation-a review. Int. J. Theor. Phys.
21, 905–940 (1982)
10. Soloveichik, D., Seelig, G., Winfree, E.: DNA as a universal substrate for chemical
kinetics. Proc. Natl. Acad. Sci. 107, 5393–5398 (2010)
11. Chen, Y.-J., et al.: Programmable chemical controllers made from DNA. Nat. Nan-
otechnol. 8, 755–762 (2013)
12. Srinivas, N., Parkin, J., Seelig, G., Winfree, E., Soloveichik, D.: Enzyme-free nucleic
acid dynamical systems. Science 358, eaal2052 (2017)
13. Thachuk, C., Condon, A.: Space and energy efficient computation with DNA strand
displacement systems. In: Stefanovic, D., Turberfield, A. (eds.) DNA 2012. LNCS,
vol. 7433, pp. 135–149. Springer, Heidelberg (2012). https://doi.org/10.1007/978-
3-642-32208-2 11
14. Codon, A., Hu, A.J., Manuch, J., Thachuk, C.: Less haste, less waste: on recycling
and its limits in strand displacement systems. Interface Focus 2, 512–521 (2012)
15. Condon, A., Thachuk, C.: Towards space- and energy-efficient computations. In:
Kempes, C., Grochow, J., Stadler, P., Wolpert, D. (eds.) The Energetics of Com-
puting in Life and Machines, Chap. 9, pp. 209–232. The Sante Fe Institute Press,
Sante Fe (2019)
16. Qian, L., Soloveichik, D., Winfree, E.: Efficient turing-universal computation with
DNA polymers. In: Sakakibara, Y., Mi, Y. (eds.) DNA 2010. LNCS, vol. 6518, pp.
123–140. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-18305-
8 12
17. Qian, L., Winfree, E.: Parallel and scalable computation and spatial dynamics with
DNA-based chemical reaction networks on a surface. In: Murata, S., Kobayashi, S.
(eds.) DNA 2014. LNCS, vol. 8727, pp. 114–131. Springer, Cham (2014). https://
doi.org/10.1007/978-3-319-11295-4 8
18. Goldschlager, L.M.: The monotone and planar circuit value problems are log space
complete for P. ACM SIGACT News 9, 25–29 (1977)
19. Masson, G.M., Gingher, G.C., Nakamura, S.: A sampler of circuit switching net-
works. Computer 12, 32–48 (1979)
196 T. Brailovskaya et al.
1 Introduction
The logical, cause-and-effect nature of chemical reactions has long been recog-
nized for its potential to carry information and make decisions. Indeed, biolog-
ical systems exploit interacting digital molecules to perform many important
processes. Examples include inheritance with DNA replication, passing infor-
mation from the nucleus to the cytoplasm using messenger RNA, or activating
different cellular states through signal transduction cascades. Chemical reaction
networks (CRNs) exploit these capabilities to perform molecular computations,
using a finite set of molecular species (including designated input and output
species) and reactions. Reactions among molecules in a well-mixed solution cor-
respond to computation steps. CRN models may use mass-action kinetics, where
the dynamics of the reactions are governed by ordinary differential equations,
or stochastic kinetics, where the choice of reaction and length of time between
reactions depends on counts of molecular species. We focus on stochastic CRNs
in this work.
c Springer Nature Switzerland AG 2019
C. Thachuk and Y. Liu (Eds.): DNA 25, LNCS 11648, pp. 197–218, 2019.
https://doi.org/10.1007/978-3-030-26807-7_11
198 A. Tai and A. Condon
In the rest of this section we describe our four main contributions and review
related work. Section 2 introduces our polymer CRN models, Sects. 3, 4, and 5
describe our results, and Sect. 6 concludes with a summary and directions for
future work.
Time Complexity and a Simulator for CRNs with Anonymous Polymers. To test
the correctness of our psCRNs and evaluate their running times, we developed
a custom CRN simulator designed to support anonymous polymers and their
associated reactions. Underlying our simulator is a stochastic model of psCRN
kinetics that is a natural extension of traditional stochastic CRNs and population
protocols. We also use this model to analyze the expected time complexities of
our psCRNs examples in this paper, showing how speedups are possible with
anonymous polymers.
200 A. Tai and A. Condon
r + r −−→ p + p (1)
i ≥ 0 such that c(⊥σ σ i ) > 0, c(⊥σ σ i ) decreases by 1 and c(⊥σ σ i+1 ) increases
by 1. Similarly, the result of applying a σ-pop reaction is that c(σ) increases
by 1, c(Aσ ) decreases by 1, and for exactly one i ≥ 1 such that c(⊥σ σ i ) > 0,
c(⊥σ σ i ) decreases by 1 and c(⊥σ σ i−1 ) increases by 1. Intuitively, the length of
one σ-polymer in the system either grows or shrinks by 1 and correspondingly
the count of Aσ either increases or decreases by 1. The affected polymer is
chosen nondeterministically; exactly how the polymer is chosen is not important
in the context of stable computation. For example, the polymer could be chosen
uniformly at random, consistent with the model of Lakin and Phillips [12]. We
defer further discussion of this to Sect. 5.
If c results from the application of some reaction to c, we write c → c and
say that c is directly reachable from c. We say that c is reachable from c if for
some k ≥ 0 and configurations c1 , c2 , . . . , ck ,
c → c1 → c2 . . . → ck → c .
and only if at least one Iσ molecule is in the system. Either way, the instruc-
tion ensures that the program counter advances properly. When the σ-polymer
is empty, the dec(σ) cannot proceed and causes an algorithm to stall. The
jump-if-empty(σ, k) instruction provides a way to first check whether the
σ-polymer is empty, and if not, dec(σ) can safely be used. The create and
destroy instructions provide a way to create and destroy copies of a species. For
clarity, we also include create-polymer(σ) and destroy-polymer(σ) instruc-
tions, which create and destroy the stub ⊥σ , respectively. While more than one
reaction is needed to implement one instruction, all will have completed when
the instruction has completed and the program counter is set to the number of
the next instruction to be executed in the pseudocode.
i: copy(σ, σ ) i : goto(i.1)
i.1: create-polymer(τ )
i.2: jump-if-empty(σ, i.7)
i.3: dec(σ)
i.4: inc(σ )
i.5: inc(τ )
i.6: goto(i.2)
i.7: jump-if-empty(τ, i.11)
i.8: dec(τ )
i.9: inc(σ)
i.10: goto(i.7)
i.11: destroy-polymer(τ )
i.12: goto(i + 1)
i: flush(σ) i: goto(i.1)
i.1: jump-if-empty(σ, i + 1)
i.2: dec(σ)
i.3: goto(i.1)
i: release-output(σ) i: goto(i.1)
i.1 jump-if-empty(σ, i + 1)
i.2 dec(σ)
i.3 inc(Y )
i.4 create(Y )
i.5 goto(i.1)
No input detection is done in prelude lines p1, p2, and p3. Line p4 is a
function call to copy(R1 , R1 ), which executes instructions numbered p4.1
through p4.11 of copy. Input detection is only done at line p4.2, the first
jump-if-empty instruction:
It does not trigger a restart, but simply converts the active query molecule
AR1 to IR1 . Similarly, for lines p5 and p6, we add the reactions
– Restart: Restart happens a number of times that is at most the total input
length n1 + n2 + . . . nk , since each input molecule is loaded into a register
exactly once, generating one active query molecule. For k = 3, the registers
R1 , R2 and R3 , as well as the registers R4 , . . . , Rr are flushed, and any outputs
that have been released in solution are destroyed, assuming that the number
of outputs released into the solution was tracked by some Y register, as
before. Then the program counter is set to line p4 of the simulator (leader
molecule Lp4 ). Algorithm 3 shows the restart pseudocode.
Algorithm 3. Restart
s1: flush(R1 )
s2: flush(R2 )
s3: flush(R3 )
s4: flush(R4 )
...
sr: flush(Rr )
s(r + 1): destroy-output()
s(r + 2): goto(p4)
i: destroy-output() i: goto(i.1)
i.1: jump-if-empty(Y ,i.5)
i.2: dec(Y )
i.3: destroy(Y )
i.4: goto(i.1)
i.5: goto(i + 1)
present to ensure that reactions with B as a reactant can always proceed. (We
note that no “fairness” assumption regarding the order in which reactions happen
is necessary to show stability, since stability is a “reachability” requirement.)
The first three instructions, lines p1, p2, and p3), simply create polymers R1 ,
R2 , and R3 . The delicate part of the simulation lies in the next three instructions
on lines p4, p5, and p6, which copy input registers R1 , R2 , and R3 to R1 , R2 and
R3 , respectively. For concreteness, consider the instruction copy(R1 , R1 ) in line
p4. (The argument is the same for line p5, with R2 , R2 substituted for R1 , R1 ,
and is also the same for line p6, with R3 , R3 substituted for R1 , R1 .)
The R1 -push reaction used in input loading can cause a violation of our earlier
invariant that upon completion of each instruction, the count of IR1 equals the
length of the (leader) R1 -polymer. Instead, we have that IR1 is less than or equal
to the length of the R1 -polymer. This can cause the jump-if-empty instruction
numbered p4.2 in the copy function to stall, when there is no IR1 and also no
⊥R1 (since the R1 -polymer is not empty due to input loading). In this case, the
input detection reaction (introduced above)
will convert AR1 to IR1 . This averts stalling, since jump-if-empty can proceed
using IR1 . The subsequent lines of the copy(R1 , R1 ) code can then proceed.
Once lines p4, p5, and p6 have completed, the correctness of the psCRN
simulation of the register machine, using the copies R1 , R2 and R3 , is not affected
by input loading. Input loading and input detection can also proceed. These
are the only viable reactions from the “halting” state LH , and so eventually
(since the RM machine being simulated is a halting machine), on any sufficiently
long computation path, all inputs must be loaded and detected. Input detection
after the prelude phase produces a “missing” Iσ molecule and triggers a restart.
The restart flushes all registers used by the simulator, and also, using the Y -
polymer, destroys any outputs in solution. (Since restart is triggered only when
the program counter is at a line of the main program, restart does not interrupt
execution of the release-output function.) A new simulation is then started at
line p4, ensuring that any inputs that have been loaded since the last detect are
copied to the simulator’s input registers R1 , R2 and R3 .
Once all inputs have been detected, the invariant is restored and the simulator
proceeds correctly, producing the correct output. This correct output is never
subsequently changed, and so the computation is stable.
Bottleneck Reactions. In our sequential psCRNs, both inc(σ) and dec(σ) contain
bottleneck reactions, and so copy(σ, σ ) has Θ(|σ|) bottleneck reactions. Thus
the psCRN for Square has Θ(n2 ) bottleneck reactions. In the next section we
show how to compute a close variant of the Square function with fewer bottleneck
reactions, using anonymous polymers rather than leader polymers.
210 A. Tai and A. Condon
i: create-distributed-counter(σ) i: goto(i.1)
// Creates an empty counter i.1 create-polymer(Tσ )
// with zero polymers i.2 goto(i + 1)
i add-thread-polymers(σ, T ) i goto(i.1)
// Adds |T | empty i.1: create-polymer(Temp)
// thread-polymers to the i.2: copy(T ,Temp)
// distributed σ-counter, i.3: jump-if-empty(Temp, i.8)
// where T is a counter i.4: dec(Temp)
i.5: create-polymer(σ)
i.6: inc(Tσ )
i.7: goto(i.3)
i.8: destroy-polymer(Temp)
i.9: goto(i + 1)
i add-thread-polymer(σ, 1) i goto(i.1)
// Adds one empty i.1: create-polymer(σ)
// thread-polymer to the i.2: inc(Tσ )
// distributed σ-counter i.3: goto(i + 1)
212 A. Tai and A. Condon
i: transfer(σ, τ, τ ) i: goto(i.1)
// transfer σ to i.1: create-polymer(Thread-Count)
// both τ and τ i.2: create-threads(Tσ , Lt )
i.3: copy(Tσ , Thread-Count)
i.4: loop-until-empty(Thread-Count, i.5)
thread-transfer(σ, τ, τ ,Thread-Count)
i.5: destroy-threads(Lt )
i.6: destroy-polymer(Thread-Count)
i.7: goto(i + 1)
The function transfer(σ, τ ), not shown but used in double, is the same as
transfer(σ, τ , τ ), except the call to thread-transfer does not include τ and
the “inc(τ )” line is removed in the implementation of thread-transfer.
the thread-polymers; it is not the case that each thread “owns” a single thread-
polymer. Accordingly, one thread may do more work than another, but in the
end all thread-polymers are empty.
A thread exits the dec-until-destroy-polymer loop by destroying exactly
one σ-polymer. Since at the start of thread-transfer the number of σ-thread-
polymers equals the number of thread program counters, all thread program
counters eventually reach line t.5, and there are no σ-thread-polymers once all
threads have reached line t.5 of the code. At line t.5, each thread decrements
Thread-Count, and then stalls at line t.6. Moreover, once all threads have reached
line t.6, polymer ThreadCount is empty. At this point, the program counter for
transfer changes from line i.4 to line i.5, and all thread program counters are
destroyed.
i: thread-transfer
(σ,τ ,τ ,Thread-Count) i: threadon()
t.1: dec-until-destroy-polymer(σ, t.5)
t.2: inc(τ )
t.3: inc(τ )
t.4: goto(t.1)
t.5: dec(Thread-Count)
t.6:
Bottleneck Reactions. In each round, the halve(σ) function decreases the length
of the H-polymer by a factor of 2, starting from n initially. Each decrement or
increment of the H-polymer includes a bottleneck reaction, so there are Θ(n)
bottleneck reactions in total, over all rounds. The double function creates 2l
thread-polymers in round l, for a total of Θ(n) thread-polymers over all rounds.
The transfer function creates 2l threads in round l and similarly destroys 2l
threads, and copies a polymer of length 2l , so again has Θ(n) bottleneck reactions
over all rounds. The reactions in thread-transfer are not bottleneck reactions
(except in round 1); we analyze these in the next section.
We follow the stochastic model of Soloveichik et al. [6] for well-mixed, closed
systems with fixed volume V . We assume that all reactions have rate constant
1. When in configuration c, the propensity of reaction R : r + r → p + p is
c(r)c(r )/V if r = r , and is c(r)
2 /V if r = r . Let Δ(c) be the sum of all reaction
Stable Computation with Polymers 215
Fig. 1. (a) Simulation of f (n) = n2 starting with pre-loaded input, n = 100. (b)
Simulation of f (n) = n2 with input detection and restart, n = 100. Each coloured line
in the plots shows the count of the outputs as a function of the number of interactions,
with the blue line being the count of output species Y finally released into solution,
while the red line shows the size of the Yint polymer. By interaction, we mean a
collision of two molecular species in the system, which may or may not result in a
reaction. (Color figure online)
Fig. 2. (a) Simulations of f (n) = n2 starting with pre-loaded input, covering a range
of n. (b) Simulations of f (n) = n2 with input detection and restart, covering a range
of n. Each blue circle plots a single simulation, showing the final count of the output
species Y against the number of interactions it took to complete. (Color figure online)
is from the algorithm’s point of view, classifying all σ-polymers as one species,
and track polymer lengths separately.
Interestingly, simulation of our stable, error-corrected sequential psCRN for
Square usually takes little extra time compared to the committing, pre-loaded
sequential psCRN (see both Figs. 1 and 2). This is because each of the n error
detection steps, and subsequent restart, is expected to happen in O(n2 ) time,
which is negligible compared to the time for the Θ(n4 ) expected running time
of the psCRN with fully loaded input.
Stable Computation with Polymers 217
References
1. Soloveichik, D., Cook, M., Winfree, E., Bruck, J.: Computation with finite stochas-
tic chemical reaction networks. Nat. Comput. 7(4), 615–633 (2008)
2. Chen, H.-L., Doty, D., Soloveichik, D.: Deterministic function computation with
chemical reaction networks. Nat. Comput. 13, 517–534 (2014)
3. Angluin, D., Aspnes, J., Eisenstat, D.: Stably computable predicates are semilinear.
In: Proceedings of the Twenty-Fifth Annual ACM Symposium on Principles of
Distributed Computing, PODC 2006, New York, pp. 292–299. ACM Press (2006)
4. Cummings, R., Doty, D., Soloveichik, D.: Probability 1 computation with chemical
reaction networks. Nat. Comput. 15(2), 245–261 (2014)
5. Qian, L., Soloveichik, D., Winfree, E.: Efficient turing-universal computation with
DNA polymers. In: Sakakibara, Y., Mi, Y. (eds.) DNA 2010. LNCS, vol. 6518, pp.
123–140. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-18305-
8 12
6. Soloveichik, D., Cook, M., Winfree, E., Bruck, J.: Computation with finite stochas-
tic chemical reaction networks. Nat. Comput. 7, 615–633 (2008)
7. Bennett, C.: Logical reversibility of computation. IBM J. Res. Dev. 17(6), 525–532
(1973)
8. Bennett, C.: The thermodynamics of computation - a review. Int. J. Theor. Phys.
21(12), 905–940 (1981)
218 A. Tai and A. Condon
9. Johnson, R., Winfree, E.: Verifying polymer reaction networks using bisimulation
(2014)
10. Cardelli, L., Zavattaro, G.: Turing universality of the biochemical ground form.
Math. Struct. Comput. Sci. 20, 45–73 (2010)
11. Jiang, H., Riedel, M., Parhi, K.: Synchronous sequential computation with molec-
ular reactions. In: Proceedings of the 48th Design Automation Conference, DAC
2011, New York, pp. 836–841. ACM (2011)
12. Lakin, M.R., Phillips, A.: Modelling, simulating and verifying turing-powerful
strand displacement systems. In: Cardelli, L., Shih, W. (eds.) DNA 2011. LNCS,
vol. 6937, pp. 130–144. Springer, Heidelberg (2011). https://doi.org/10.1007/978-
3-642-23638-9 12
13. Angluin, D., Aspnes, J., Diamadi, Z., Fischer, M.J., Peralta, R.: Computation in
networks of passively mobile finite-state sensors. Distrib. Comput. 18, 235–253
(2006)
14. Chatzigiannakis, I., Michail, O., Nikolaou, S., Pavlogiannis, A., Spirakis, P.G.: Pas-
sively mobile communicating machines that use restricted space. In: Proceedings
of the 7th ACM ACM SIGACT/SIGMOBILE International Workshop on Foun-
dations of Mobile Computing, FOMC 2011, New York, pp. 6–15. ACM (2011)
15. Chen, H.-L., Cummings, R., Doty, D., Soloveichik, D.: Speed faults in computation
by chemical reaction networks. In: Kuhn, F. (ed.) DISC 2014. LNCS, vol. 8784,
pp. 16–30. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-45174-
82
16. Angluin, D., Aspnes, J., Eisenstat, D.: Fast computation by population protocols
with a leader. In: Dolev, S. (ed.) DISC 2006. LNCS, vol. 4167, pp. 61–75. Springer,
Heidelberg (2006). https://doi.org/10.1007/11864219 5
17. Gibson, M.A., Bruck, J.: Efficient exact stochastic simulation of chemical systems
with many species and many channels. J. Phys. Chem. A 104(9), 1876–1889 (2000)
18. Gillespie, D.T.: Exact stochastic simulation of coupled chemical reactions. J. Phys.
Chem. 81(25), 2340–2361 (1977)
SIMD||DNA: Single Instruction, Multiple
Data Computation with DNA Strand
Displacement Cascades
1 Introduction
Studies have espoused DNA as an incredibly dense (up to 455 exabytes per gram)
and stable (readable over millenia) digital storage medium [5]. Experiments stor-
ing text, images, and movies of hundreds of megabytes have demonstrated the
potential scalability of the approach [11]. Importantly, DNA’s essential biologi-
cal role ensures that the technology for manipulating DNA will never succumb
to obsolescence.
Typical DNA storage schemes have high information density but do not
permit “in-memory” computation: modifying data involves sequencing DNA,
classically computing the desired transformation, and synthesizing new DNA.
In contrast, strand displacement systems store information in the pattern of
reconfiguration of exposed single-stranded regions. This pattern can be directly
manipulated through toehold exchange and other molecular primitives as a form
of information processing [25]. However, strand displacement is incompatible
with traditional DNA storage schemes.
Here we combine DNA storage with massively parallel computation on the
data stored using strand displacement. In our proposed scheme, which we call
SIMD||DNA (Single Instruction Multiple Data DNA), a multi-stranded DNA
complex acts as a single register storing a (binary) string. Although all the
c Springer Nature Switzerland AG 2019
C. Thachuk and Y. Liu (Eds.): DNA 25, LNCS 11648, pp. 219–235, 2019.
https://doi.org/10.1007/978-3-030-26807-7_12
220 B. Wang et al.
2 SIMD||DNA
Here we propose the general scheme. First we will explain the notations we use
in this paper. We use the domain level abstraction for DNA strands. Consecutive
2
In [24] an enumeration of all possible rules for elementary CA is given. Rule 110
refers to that enumeration.
3
In a sense, we realize an extension of the sticker model envisioned by [4]: “Recent
research suggests that DNA ‘strand invasion’ might provide a means for the specific
removal of stickers from library strands. This could give rise to library strands that
act as very powerful read-write memories. Further investigation of this possibility
seems worthwhile.”.
SIMD||DNA 223
2.2 Instructions
An instruction is a set of strands. To apply an instruction to the data, these
strands are added to the solution at high concentration. Adding these strands can
lead to three different types of reactions on the registers. Figure 2a explains the
figure notation used to describe instructions throughout the paper, and Fig. 2b
gives examples of the three types of reactions. They are:
Attachment: This reaction preserves all the strands originally bound to the
register and attaches new strands. An instruction strand can attach to registers if
it binds strongly enough (by two or more domains). Note that the attachment of
an instruction strand can lead to a partial displacement of a pre-existing strand
on the register.
Displacement: This reaction introduces new strands to the register and
detaches some pre-existing strands. Upon binding to a toehold on the regis-
ter, the instruction strand displaces pre-existing strands through 3-way branch
migration.5 Toehold exchange reactions are favored towards displacement by the
instruction strand since they are added at high concentration. Two instruction
strands can also cooperatively displace strands on the register.
Detachment: This reaction detaches pre-existing strands without introduc-
ing new strands to the registers. An instruction strand that is complementary to
4
Given these properties, in practice one could choose the domain length to be from
5 to 7 nucleotides at room temperature.
5
Although other more complicated strand displacement mechanisms (e.g. 4-way,
remote toehold, associative toehold strand displacement) could provide extra power
in this architecture, they usually sacrifice the speed and increase the design com-
plexity, so we do not include them in this work.
224 B. Wang et al.
a pre-existing strand with an open overhang can use the overhang as a toehold
and pull the strand off the register. Throughout this paper, a dashed instruction
strand indicates the domains in the instruction strand are complementary to
other vertically aligned domains.
When an instruction strand displaces a top strand, we assume the waste top
strand does not interact further within the system (the instruction strands are
present in high concentration while the waste is in low concentration). After
the reactions complete, the waste is removed via elution. We assume washing
removes all species without a magnetic bead. Lastly, we assume there is no
leak —displacement of a strand without prior binding of a toehold. We discuss
the possibility and extent of errors caused by relaxing these assumptions in
Sect. 4.2.
In general, two reactions can be applicable but mutually exclusive. Then two
(or more) resulting register states may be possible after adding the instruction
strands. The instructions used in this paper do not have this issue. This point
is related to deterministic versus nondeterministic algorithms, and is discussed
further in Sect. 4.5.
2.3 Programs
We consider sequences of instructions, called programs. We design programs for
functions f : {0, 1}n → {0, 1}n so that, given a register encoding any s =
{0, 1}n , after applying all instructions in the program sequentially as in Fig. 1,
the resulting register encodes f (s).
Fig. 2. (a) The notation used to describe instructions. Domains are represented by
square boxes. We indicate complementarity of instruction strands to register domains
by vertical alignment. If a domain label is given explicitly, such as a and a∗ in this
figure, the domain is orthogonal to the other vertically aligned domains. A strand
can be described by listing the constituent domains in a bracket <> from 5’-end to
3’-end. Strands with solid lines are complementary to the corresponding domains in
the bottom strand. Strands with dashed lines are complementary to the corresponding
domains in the top strand. The blue dot represents the magnetic bead. (b) The three
instruction reactions. Attachment: instruction strands attach to the register without
releasing any other strands. Displacement: instruction strands attach to the register
and displace pre-existing strands on the register. Toehold-mediated strand displace-
ment (left), toehold-exchange strand displacement (right), and cooperative strand dis-
placement (bottom) mechanisms are allowed. Detachment: instruction strands fully
complementary to previously bound top strands pull strands off the register. (Color
figure online)
226 B. Wang et al.
Proof. During Instruction 1, the instruction strands cannot displace the strands
in state-1 cells. In Instruction 2, the strand on cell i is displaced cooperatively
only if the toeholds on both the left and the right side of the strand are open.
By assumption, cell i + 1 is a 1, so the toehold immediately to the right of
cell i, (i + 1)1 , is free. Since cell i − 1 is in state 1, domain i1 is not covered
after Instruction 1 (i1 would be covered if cell i − 1 were 0). Thus the strand
on cell i can be displaced by the instruction 2 strands. In Instruction 3, the
instruction 2 strands in cell i are detached, so every domain in cell i is free. Then
in Instruction 4 we attach the strands corresponding to a state 0, updating cell
i to 0. Instructions 5 and 6 do not introduce any instruction reaction on cell i,
so cell i remains in state 0.
Proof. During Instruction 1, the instruction strands cannot displace the strands
in state-1 cells. In Instruction 2, the strand on state-1 cells is displaced cooper-
atively only if the toeholds on both the left and the right side of the strand are
open. By assumption that the left or right cell is a 0, the toeholds required for
this, i1 or (i + 1)1 , will be covered: First consider that cell i − 1 is a 0. Then
in Instruction 1, the instruction strand displaces one strand at cell i − 1 and
covers the toehold i1 . On the other hand, if cell i + 1 is 0, then domain (i + 1)1
is covered since strands for the 0 state cover all the domains in that cell. So if
either neighbor state is 0, Instruction 2 does not displace the strand on cell i.
Then note that Instructions 3 and 4 do not introduce any instruction reaction
at cell i. The instruction 5 strands detach the instruction 1 strands if cell i − 1
SIMD||DNA 227
Fig. 3. The program implementing one timestep of Rule 110 shown on an example
register. The top register shows the initial state of each cell. After 6 instructions, the
register updates to the state shown at the bottom. Strand colors have three information
categories: state 1 (dark blue), state 0 (light blue), intermediates (other colors). Solid
boxes show the instruction strands and the state of the register before the strands are
applied. Dashed boxes explain the logical meaning of the instructions. The overhang
domains a and b are orthogonal to their vertically aligned domains. (Color figure online)
228 B. Wang et al.
is 0, freeing the toehold at i1 and recovering the state-1 cell. Instruction 6 does
not change the state-1 cell.
Proof. Simply note that for any instruction, no instruction reaction on cell i
occurs. So cell i stays in state 0.
These four claims combined verify that the two-rule characterization given
at the beginning of this section is satisfied, so the instructions implement one
timestep evolution of Rule 110.
Note that the Rule 110 simulation invokes two sources of parallelism. Instruc-
tion strands are applied to all registers in parallel, and every cell within a register
can update concurrently.
Also note that Rule 110 is defined only for an infinite set of cells or a circular
arrangement of finitely many cells. For a finite set of cells arranged linearly, one
must define boundary conditions for updating the leftmost and rightmost cells.
Boundary conditions can be constant or periodic. For space-bounded computa-
tion by Rule 110, it suffices to set periodic boundary conditions based on the
periodic initial condition of the CA given in [6]. These periodic boundary states
can be implemented by periodic instructions.
3.2 Counting
1. Assume the bit string has length n and the least significant bit is at cell n
and the rightmost 0 is at cell m (m n). As in the Rule 110 simulation proof,
we let jk denote the kth domain on cell j (from left to right). All cells can share
the same sequences, but we assume that each domain within a cell is orthogonal.
Additionally, the extra domain to the right of the rightmost cell is orthogonal
to all other domains.
Claim. All state 1 cells to the right of the rightmost 0 cell change to a 0.
Proof. Instruction 1 initiates a series of sequential reactions from the least sig-
nificant bit n to the rightmost 0. First the instruction strand with overhang
domain a displaces the strand covering domains n4 and n5 . If the least signifi-
cant bit is 1 (m < n), the domain n3 becomes unbound after this displacement
reaction. Then the domain n3 serves as an open toehold to initiate another dis-
placement reaction with the instruction strand with overhang domain b. Similar
displacement reactions proceed until cell m. By assumption, cell m is a state-0
cell, so the domain m3 will not be open after the displacement step, thus the
displacement cascade stops. Then the strands added in Instruction 2 detach the
strands from Instruction 1, leaving the cells from the (m + 1)th bit to the nth
bit free. In Instruction 3, every applied instruction strand from cell m + 1 to n
attaches to the register. Instruction 4 shifts those strands added in Instruction
3 one domain to the left, which opens toeholds for the cooperative displacement
in Instruction 5. After those cells change to state-0 in Instruction 5, the strands
added in Instruction 6 and 7 do not change them, so they remain in state 0.
Proof. Instruction 1 initiates a series of sequential reactions from the least sig-
nificant bit to the rightmost 0 at cell m. The domain m3 will not be open after
the instruction strand displaces the strand covering domains m4 and m5 and
no more strand displacement cascade can proceed to the left. Then the strands
added in Instruction 2 detach the strands from Instruction 1, leaving the domains
m4 and m5 free. The strands added in Instruction 3 serve as two purposes: (1)
They correspond to one of the strands representing state 1, thus they help cell
m to transition to state 1 and they partially displace the strand at domain m3 .
(2) They serve as a place holder by binding at domains m4 and m5 to prevent
cell m from being modified in Instructions 4 and 5. Instruction 6 detaches the
strand originally bound from domain m1 to m3 , leaving the domains m1 and m2
open. In Instruction 7, the instruction strand attaches to the register at domain
m1 and m2 , which completes the state changing from 0 to 1.
Claim. The cells to the left of the rightmost state 0 cell stay the same.
Proof. Note that no open toeholds are exposed at cells to the left of cell m, and
the displacement cascade does not pass to the left of cell m, thus no changes are
made to the states of those cells.
SIMD||DNA 231
6
For example, Cas9 nickase or restriction enzyme Pf Ago, uses an RNA or DNA strand
as a guide and can nick at a desired location.
232 B. Wang et al.
Unlike storing data in the DNA sequence itself, which has a data density of
2 bits per nucleotide, our schemes sacrifice data density. In our schemes, a bit
is encoded in a cell, which contains 5 domains. If a domain is composed of 6
consecutive nucleotides, it gives a data density of 0.033 (1/30) bit per nucleotide.
It is not obvious that the current construction with 5 domains per cell achieves
the highest possible data density for these programs. In practice, there is a
tradeoff between the strand binding stability and data density. Here we assume
that the minimal number of domains required for two strands to stably bind is
two, however in practice the binding strength is affected by experimental buffer
(salt concentration) and temperature. Given different experimental conditions,
it may be necessary to increase the number of domains in a cell, which could
reduce the data density further. However, one gram of DNA can still encode
exabytes of information. In principle, data density may also be increased by
using different encoding schemes, such as allowing overhangs on the top strands
to encode information.
Our programs are designed with deterministic instructions: given one state of
the register, after adding the instruction strands, the register changes to one
specific state. Deterministic instructions make it easy to design, predict, rea-
son about, and compose the programs. In contrast to deterministic instructions,
one could also construct nondeterministic instructions by introducing nondeter-
minism to the updates of the cells. For example, consider an empty cell with
domains 3∗ , 2∗ , 1∗ , and add instruction strands 1, 2 and 2, 3. Either the
first or second strand can bind, but since they displace each other, only one will
remain after elution. The probability of which strand remains depends on its rel-
ative concentration. In principle, applying nondeterministic instructions allows
for implementation of randomized algorithms and simulation of nondeterministic
computing machines.
The running time of a program depends on two factors: running time per instruc-
tion and the number of instructions. The running time per instruction depends
on whether the instruction updates the cells through parallel or sequential reac-
tions. In general, instructions are capable of acting on each cell within each
register in parallel. Yet, Instruction 1 of the binary counting program does not
have this source of parallelism. A first reaction (displacement) must occur on
the rightmost cell prior to a second reaction occurring on the second cell, which
must occur prior to a third reaction on the third cell, and so on. Thus, this
instruction with sequential reactions loses the speedup given by independent
instruction reactions occurring in parallel on each cell within a register. Besides
the running time per instruction, the larger the number of instructions per pro-
gram, the more complex is the experimental procedure. This motivates studying
the smallest number of instructions required to achieve a computational task.
Our two programs use different schemes for encoding binary information in a reg-
ister. Using some universal encoding would allow applying different consecutive
computations to the same registers. Alternatively, we could design programs to
inter-convert between different encodings. The reason for suggesting this alter-
native is that unlike classical machines acting on bits, in SIMD||DNA the way
a bit is encoded affects how it can be changed by instruction reactions. For
example, in the binary counting program, the encoding ensures that no toeholds
except for the rightmost domain are open on the register, which is used to argue
correctness. Alternatively, in the Rule 110 program, toeholds must be available
throughout the register to achieve the parallel cell updates required by CA.
Therefore having one encoding which implements these two different functions
seems difficult.
References
1. Adleman, L.M.: Molecular computation of solutions to combinatorial problems.
Science 266(5187), 1021–1024 (1994)
2. Beaver, D.: A universal molecular computer. DNA Based Comput. 27, 29–36 (1995)
3. Boneh, D., Dunworth, C., Lipton, R.J., Sgall, J.: On the computational power of
DNA. Discret. Appl. Math. 71(1–3), 79–94 (1996)
4. Braich, R.S., Chelyapov, N., Johnson, C., Rothemund, P.W.K., Adleman, L.: Solu-
tion of a 20-variable 3-SAT problem on a DNA computer. Science 296(5567), 499–
502 (2002)
5. Church, G.M., Gao, Y., Kosuri, S.: Next-generation digital information storage in
DNA. Science 337(6102), 1628 (2012)
SIMD||DNA 235
6. Cook, M.: Universality in elementary cellular automata. Complex Syst. 15(1), 1–40
(2004)
7. Flynn, M.J.: Some computer organizations and their effectiveness. IEEE Trans.
Comput. 21(9), 948–960 (1972)
8. Freund, R., Kari, L., Păun, G.: DNA computing based on splicing: the existence
of universal computers. Theory of Comput. Syst. 32(1), 69–112 (1999)
9. Liu, K., et al.: Detecting topological variations of DNA at single-molecule level.
Nat. Commun. 10(1), 3 (2019)
10. Neary, T., Woods, D.: P-completeness of cellular automaton rule 110. In: Bugliesi,
M., Preneel, B., Sassone, V., Wegener, I. (eds.) ICALP 2006. LNCS, vol. 4051, pp.
132–143. Springer, Heidelberg (2006). https://doi.org/10.1007/11786986 13
11. Organick, L., et al.: Random access in large-scale DNA data storage. Nat. Biotech-
nol. 36(3), 242–248 (2018)
12. Qian, L., Soloveichik, D., Winfree, E.: Efficient turing-universal computation with
DNA polymers. In: Sakakibara, Y., Mi, Y. (eds.) DNA 2010. LNCS, vol. 6518, pp.
123–140. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-18305-
8 12
13. Qian, L., Winfree, E.: Scaling up digital circuit computation with DNA strand
displacement cascades. Science 332(6034), 1196–1201 (2011)
14. Qian, L., Winfree, E.: Parallel and scalable computation and spatial dynamics with
DNA-based chemical reaction networks on a surface. In: Murata, S., Kobayashi, S.
(eds.) DNA 2014. LNCS, vol. 8727, pp. 114–131. Springer, Cham (2014). https://
doi.org/10.1007/978-3-319-11295-4 8
15. Rothemund, P.W.K.: A DNA and restriction enzyme implementation of turing
machines. DNA Based Comput. 27, 75–119 (1995)
16. Roweis, S., et al.: A sticker-based model for DNA computation. J. Comput. Biol.
5(4), 615–629 (1998)
17. Scalise, D., Schulman, R.: Emulating cellular automata in chemical reaction-
diffusion networks. Nat. Comput. 15(2), 197–214 (2016)
18. Seelig, G., Soloveichik, D., Zhang, Y., Winfree, E.: Enzyme-free nucleic acid logic
circuits. Science 314(5805), 1585–1588 (2006)
19. Smith III, A.R.: Simple computation-universal cellular spaces. J. ACM 18(3), 339–
353 (1971)
20. Tabatabaei, S.K., et al.: DNA punch cards: encoding data on native DNA sequences
via topological modifications. bioRxiv, 10.1101/672394
21. Thachuk, C., Winfree, E., Soloveichik, D.: Leakless DNA strand displacement sys-
tems. In: Phillips, A., Yin, P. (eds.) DNA 2015. LNCS, vol. 9211, pp. 133–153.
Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21999-8 9
22. Wang, B., Thachuk, C., Ellington, A.D., Soloveichik, D.: The design space of strand
displacement cascades with toehold-size clamps. In: Brijder, R., Qian, L. (eds.)
DNA 2017. LNCS, vol. 10467, pp. 64–81. Springer, Cham (2017). https://doi.org/
10.1007/978-3-319-66799-7 5
23. Wang, B., Thachuk, C., Ellington, A.D., Winfree, E., Soloveichik, D.: Effective
design principles for leakless strand displacement systems. Proc. Nat. Acad. Sci.
115(52), E12182–E12191 (2018)
24. Wolfram, S.: Statistical mechanics of cellular automata. Rev. Mod. Phys. 55, 601–
644 (1983)
25. Zhang, D.Y., Seelig, G.: Dynamic DNA nanotechnology using strand-displacement
reactions. Nat. Chem. 3(2), 103 (2011)
Author Index