guest post by Jacob Biamonte
This post is part of a series on what John and I like to call Petri net field theory. Stochastic Petri nets can be used to model everything from vending machines to chemical reactions. Chemists have proven some powerful theorems about when these systems have equilibrium states. We’re trying to bind these old ideas into our fancy framework, in hopes that quantum field theory techniques could also be useful in this deep subject. We’ll describe the general theory later; today we’ll do an example from population biology.
Those of you following this series should know that I’m the calculation bunny for this project, with John playing the role of the wolf. If I don’t work quickly, drawing diagrams and trying to keep up with John’s space-bending quasar of information, I’ll be eaten alive! It’s no joke, so please try to respond and pretend to enjoy anything you read here. This will keep me alive for longer. If I did not take notes during our meetings, lots of this stuff would have never made it here, so hope you enjoy.
Amoeba reproduction and competition
Here’s a stochastic Petri net:
It shows a world with one state, amoeba, and two transitions:
• reproduction, where one amoeba turns into two. Let’s call the rate constant for this transition .
• competition, where two amoebas battle for resources and only one survives. Let’s call the rate constant for this transition .
We are going to analyse this example in several ways. First we’ll study the deterministic dynamics it describes: we’ll look at its rate equation, which turns out to be the logistic equation, familiar in population biology. Then we’ll study the stochastic dynamics, meaning its master equation. That’s where the ideas from quantum field theory come in.
The rate equation
If is the population of amoebas at time
, we can follow the rules explained in Part 3 and crank out this rate equation:
We can rewrite this as
where
What’s the meaning of and
?
• is the carrying capacity, that is, the maximum sustainable population the environment can support.
• is the growth rate describing the approximately exponential growth of population when
is small.
It’s a rare treat to find such an important differential equation that can be solved by analytical methods. Let’s enjoy solving it.
We start by separating variables and integrating both sides:
We need to use partial fractions on the left side above, resulting in
and so we pick up a constant , let
and rearrange things as
so the population as a function of time becomes
At we can determine
uniquely. We write
and
becomes
The model now becomes very intuitive. Let’s set and make a plot for various values of
:
We arrive at three distinct cases:
• equilibrium (). The horizontal blue line corresponds to the case where the initial population
exactly equals the carrying capacity. In this case the population is constant.
• dieoff (). The three decaying curves above the horizontal blue line correspond to cases where initial population is higher than the carrying capacity. The population dies off over time and approaches the carrying capacity.
• growth (). The four increasing curves below the horizontal blue line represent cases where the initial population is lower than the carrying capacity. Now the population grows over time and approaches the carrying capacity.
The master equation
Next, let us follow the rules explained in Part 6 to write down the master equation for our example. Remember, now we write:
where is the probability of having
amoebas at time
, and
is a formal variable. The master equation says
where is an operator on formal power series called the Hamiltonian. To get the Hamiltonian we take each transition in our Petri net and build an operator built from creation and annihilation operators, as follows. Reproduction works like this:
while competition works like this:
Here is the annihilation operator,
is the creation operator and
is the number operator. Last time John explained precisely how the
‘s arise. So the theory is already in place, and we arrive at this Hamiltonian:
Remember, is the rate constant for reproduction, while
is the rate constant for competition.
The master equation can be solved: it’s equivalent to
so that is constant, and so
and that’s it! We can calculate the time evolution starting from any initial probability distribution of populations. Maybe everyone is already used to this, but I find it rather remarkable.
Here’s how it works. We pick a population, say amoebas at
This would mean
. We then evolve this state using
. We expand this operator as
This operator contains the full information for the evolution of the system. It contains the histories of all possible amoeba populations—an amoeba mosaic if you will. From this, we can construct amoeba Feynman diagrams.
To do this, we work out each of the terms in the expansion above. The first-order terms correspond to the Hamiltonian acting once. These are proportional to either
or
. The second-order terms correspond to the Hamiltonian acting twice. These are proportional to either
,
or
. And so on.
This is where things start to get interesting! To illustrate how it works, we will consider two possibilities for the second-order terms:
1) We start with a lone amoeba, so . It reproduces and splits into two. In the battle of the century, the resulting amoebas compete and one dies. At the end we have:
We can draw this as a Feynman diagram:

You might find this tale grim, and you may not like the odds either. It’s true, the odds could be better, but people are worse off than amoebas! The great Japanese swordsman Miyamoto Musashi quoted the survival odds of fair sword duels as 1/3, seeing that 1/3 of the time both participants die. A remedy is to cheat, but these amoeba are competing honestly.
2) We start with two amoebas, so the initial state is . One of these amoebas splits into two. One of these then gets into an argument with the original amoeba over the Azimuth blog. The amoeba who solved all John’s puzzles survives. At the end we have
with corresponding Feynman diagram:
This should give an idea of how this all works. The exponential of the Hamiltonian gives all possible histories, and each of these can be translated into a Feynman diagram. In a future blog entry, we might explain this theory in detail.
An equilibrium state
We’ve seen the equilibrium solution for the rate equation; now let’s look for equilibrium solutions of the master equation. This paper:
• D. F. Anderson, G. Craciun and T.G. Kurtz, Product-form stationary distributions for deficiency zero chemical reaction networks, arXiv:0803.3042.
proves that for a large class of stochastic Petri nets, there exists an equilibrium solution of the master equation where the number of things in each state is distributed according to a Poisson distribution. Even more remarkably, these probability distributions are independent, so knowing how many things are in one state tells you nothing about how many are in another!
Here’s a nice quote from this paper:
The surprising aspect of the deficiency zero theorem is that the assumptions of the theorem are completely related to the network of the system whereas the conclusions of the theorem are related to the dynamical properties of the system.
The ‘deficiency zero theorem’ is a result of Feinberg, which says that for a large class of stochastic Petri nets, the rate equation has a unique equilibrium solution. Anderson showed how to use this fact to get equilibrium solutions of the master equation!
We will consider this in future posts. For now, we need to talk a bit about ‘coherent states’.
These are all over the place in quantum theory. Legend (or at least Wikipedia) has it that Erwin Schrödinger himself discovered coherent states when he was looking for states of a quantum system that look ‘as classical as possible’. Suppose you have a quantum harmonic oscillator. Then the uncertainty principle says that
where is the uncertainty in the momentum and
is the uncertainty in position. Suppose we want to make
as small as possible, and suppose we also want
. Then we need our particle to be in a ‘coherent state’. That’s the definition. For the quantum harmonic oscillator, there’s a way to write quantum states as formal power series
where is the amplitude for having
quanta of energy. A coherent state then looks like this:
where can be any complex number. Here we have omitted a constant factor necessary to normalize the state.
We can also use coherent states in classical stochastic systems like collections of amoebas! Now the coefficient of tells us the probability of having
amoebas, so
had better be real. And probabilities should sum to 1, so we really should normalize
as follows:
Now, the probability distribution
is called a Poisson distribution. So, for starters you can think of a ‘coherent state’ as an over-educated way of talking about a Poisson distribution.
Let’s work out the expected number of amoebas in this Poisson distribution. In the answers to the puzzles in Part 6, we started using this abbreviation:
We also saw that the expected number of amoebas in the probability distribution is
What does this equal? Remember that . The annihilation operator
is just
, so
and we get
But we saw in Part 5 that is stochastic, meaning
for any Furthermore, our
here has
since it’s a probability distribution. So:
The expected number of amoebas is just .
Puzzle 1. This calculation must be wrong if is negative: there can’t be a negative number of amoebas. What goes wrong then?
Puzzle 2. Use the same tricks to calculate the standard deviation of the number of amoebas in the Poisson distribution .
Now let’s return to our problem and consider the initial amoeba state
Here aren’t bothering to normalize it, because we’re going to look for equilibrium solutions to the master equation, meaning solutions where doesn’t change with time. So, we want to solve
Since this equation is linear, the normalization of doesn’t really matter.
Remember,
Let’s work this out. First consider the two terms:
and
Likewise for the terms we find
and
Here I’m using something John showed in Part 6: the product equals the ‘falling power’
.
The sum of all four terms must vanish. This happens whenever
which is satisfied for
Yipee! We’ve found an equilibrium solution, since we found a value for that makes
. Even better, we’ve seen that the expected number of amoebas in this equilibrium state is
This is just the same as the equilibrium population we saw for the rate equation—that is, the carrying capacity for the logistic equation! That’s pretty cool, but it’s no coincidence: in fact, Anderson proved it works like this for lots of stochastic Petri nets.
I’m not sure what’s up next or what’s in store, since I’m blogging at gun point from inside a rabbit cage:
I’d imagine we’re going to work out the theory behind this example and prove the existence of equilibrium solutions for master equations more generally. One idea John had was to have me start a night shift—that way you’ll get Azimuth posts 24 hours a day.
Posted by John Baez 






