For the Gillespie algorithm, start from and an integer molecular copy number . At each step use the current state, without the mean approximation in parts (a)–(b). The reaction propensity functions are and , and their sum is . Draw two independent uniform random variables on and set
The waiting time has an exponential distribution with rate . Keep the sample path constant on , advance , and choose the reaction by
Record the post-jump state, recompute both reaction propensity functions, and repeat with fresh independent uniforms. At the death propensity is zero, so only a birth is selected and the trajectory remains nonnegative. For a prescribed terminal time , if the next event would occur after , keep the current state to and stop. This produces exact piecewise constant sample paths of the specified continuous-time Markov chain.
Write the molecular copy numbers as and use the power-law reaction propensity convention of the paper. The seven propensities and stoichiometric vectors are
A channel is assigned zero propensity whenever its update would leave the nonnegative integer lattice.
The Gillespie algorithm starts from and . At the current state compute . If , terminate the path. Otherwise draw independent random variables from the uniform distribution on , set the next waiting time to
and choose the least index satisfying
Then update and , and repeat. The minimum of the seven competing reaction clocks has an exponential distribution of rate , while reaction wins with probability .