Lab 2 : Stochastic simulations

Using the stochastic simulation algorithm discussed in class:

Q1. Implement the simulation of radioactive decay, starting with N0 = 10 atoms, with decay rate k = 3h − 1, and plot the distribution (for an appropriate number of replicate simulations) of the time at which the system is fully extinct.

Q2. Implement the simulation of reversible binding of two chemical species A and B, with parameters kA = 3 (association), kD = 2 (dissociation): plot the quantity of each species A, B, and AB along time with initial conditions A = B = 10 and AB = 0.

Q3. (optional, not graded) Implement the simulation of the emergence of a neutral mutant in an initially small isogenic population growing to saturation, as discussed by Luria and Delbruck. For parameters of your choice, plot the distribution of the number of mutants in the saturated population, and compare with the theoretical distribution proposed by Ma, Sandri and Sarkar.