Gillespie algorithm
In probability theory and computational science, the Gillespie algorithm, also known as the stochastic simulation algorithm (SSA), is a method for generating statistically exact sample trajectories of certain continuous-time Markov jump processes. It is especially associated with the simulation of coupled chemical reaction systems. Daniel Gillespie presented the method in 1976 and developed it further in 1977. The method is widely used in computational systems biology, particularly when the numbers of reacting molecules are small enough that stochastic fluctuations are important. Gillespie-type algorithms are also used in network epidemiology to simulate stochastic epidemic spreading on complex networks, including continuous-time SI, SIS, and SIR processes. Mathematically, the algorithm is a form of dynamic Monte Carlo method and is closely related to kinetic Monte Carlo methods.
In probability theory and computational science, the Gillespie algorithm, also known as the stochastic simulation algorithm (SSA), is a method for generating statistically exact sample trajectories of certain continuous-time Markov jump processes. It is especially associated with the simulation of coupled chemical reaction systems. Daniel Gillespie presented the method in 1976 and developed it further in 1977. The method is widely used in computational systems biology, particularly when the numbers of reacting molecules are small enough that stochastic fluctuations are important. Gillespie-type algorithms are also used in network epidemiology to simulate stochastic epidemic spreading on complex networks, including continuous-time SI, SIS, and SIR processes. Mathematically, the algorithm is a form of dynamic Monte Carlo method and is closely related to kinetic Monte Carlo methods. a_0(\boldsymbol{x})=\sum_j a_j(\boldsymbol{x}). Provided that the process is Markovian, the waiting time \tau until the next event is exponentially distributed with rate a_0(\boldsymbol{x}) . The joint probability density that the next event occurs after a waiting time \tau and is reaction j is p(\tau,j\mid\boldsymbol{x},t)=a_j(\boldsymbol{x})\exp[-a_0(\boldsymbol{x})\tau]. Thus, the simulation requires two random choices: the time of the next event and which event occurs. Using two independent pseudorandom numbers r_1 and r_2 , uniformly distributed on (0,1) , the waiting time can be generated as \tau=\frac{1}{a_0(\boldsymbol{x})}\ln\left(\frac{1}{r_1}\right). The next reaction j is the smallest integer satisfying \sum_{j'=1}^{j} a_{j'}(\boldsymbol{x}) > r_2 a_0(\boldsymbol{x}). Initialize the time t=t_0 and state \boldsymbol{x}=\boldsymbol{x}_0 . Evaluate each propensity a_j(\boldsymbol{x}) and their total a_0(\boldsymbol{x}) . Generate the waiting time \tau and select the next reaction j . Advance the time according to t\leftarrow t+\tau . Update the state according to \boldsymbol{x}\leftarrow\boldsymbol{x}+\boldsymbol{\nu}_j , where \boldsymbol{\nu}_j is the state-change vector associated with reaction j . Record the state if required and repeat until the chosen stopping condition is reached. Each realization produced in this way is a sample trajectory of the corresponding stochastic process. A + B AB There are two possible reactions. An molecule and a molecule can combine to produce an dimer, or an existing dimer can dissociate. Let the rate constant for dimer formation be k_\mathrm{D} and the rate constant for dissociation be k_\mathrm{B} . If the system contains n_\mathrm{A} molecules of , n_\mathrm{B} molecules of , and n_\mathrm{AB} dimers, the two propensities are a_1=k_\mathrm{D}n_\mathrm{A}n_\mathrm{B} and a_2=k_\mathrm{B}n_\mathrm{AB}. The total reaction propensity is therefore a_0=k_\mathrm{D}n_\mathrm{A}n_\mathrm{B}+k_\mathrm{B}n_\mathrm{AB}. The waiting time until the next reaction is sampled from an exponential distribution with mean 1/a_0 . Once the waiting time has been generated, the probability that the next event is dimer formation is P(\mathrm{A+B\rightarrow AB})=\frac{k_\mathrm{D}n_\mathrm{A}n_\mathrm{B}}{a_0}, while the probability of dissociation is P(\mathrm{AB\rightarrow A+B})=\frac{k_\mathrm{B}n_\mathrm{AB}}{a_0}. If dimer formation occurs, n_\mathrm{A} and n_\mathrm{B} each decrease by one and n_\mathrm{AB} increases by one. If dissociation occurs, the opposite update is made. Repeatedly sampling the waiting time and reaction type generates one stochastic trajectory of the system.
References
- ^ Barrio, Manuel; Burrage, Kevin; Leier, André; Tian, Tianhai (2006). "Oscillatory Regulation of hes1 : Discrete Stochastic Delay Modelling and Simulation" . PLOS Computational Biology . 2 (9) e117. doi : 10.1371/journal.pcbi.0020117 . PMC 1560403 . PMID 16965175 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Bartlett, Maurice S. (1953). "Stochastic Processes or the Statistics of Change". Journal of the Royal Statistical Society, Series C . 2 (1): 44– 64. doi : 10.2307/2985327 . JSTOR 2985327 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Bratsun, Dmitri; Volfson, Dmitri; Hasty, Jeff; Tsimring, Lev S. (2005). "Delay-induced stochastic oscillations in gene regulation" . Proceedings of the National Academy of Sciences . 102 (41): 14593– 14598. doi : 10.1073/pnas.0503858102 . PMC 1253555 . PMID 16199522 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Cai, Xiaodong (2007). "Exact stochastic simulation of coupled chemical reactions with delays". Journal of Chemical Physics . 126 (12): 124108. Bibcode : 2007JChPh.126l4108C . doi : 10.1063/1.2710253 . PMID 17411109 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Doob, Joseph L. (1942). "Topics in the Theory of Markoff Chains". Transactions of the American Mathematical Society . 52 (1): 37– 64. doi : 10.1090/S0002-9947-1942-0006633-7 . JSTOR 1990152 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Doob, Joseph L. (1945). "Markoff Chains—Denumerable Case". Transactions of the American Mathematical Society . 58 (3): 455– 473. doi : 10.2307/1990339 . JSTOR 1990339 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Feller, William (1940). "On the Integro-Differential Equations of Purely Discontinuous Markoff Processes". Transactions of the American Mathematical Society . 48 (3): 488– 515. doi : 10.2307/1990095 . JSTOR 1990095 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Gibson, Michael A.; Bruck, Jehoshua (2000). "Efficient Exact Stochastic Simulation of Chemical Systems with Many Species and Many Channels". Journal of Physical Chemistry A . 104 (9): 1876– 1889. Bibcode : 2000JPCA..104.1876G . doi : 10.1021/jp993732q . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ a b Gillespie, Daniel T. (1976). "A General Method for Numerically Simulating the Stochastic Time Evolution of Coupled Chemical Reactions". Journal of Computational Physics . 22 (4): 403– 434. Bibcode : 1976JCoPh..22..403G . doi : 10.1016/0021-9991(76)90041-3 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ a b c d Gillespie, Daniel T. (1977). "Exact Stochastic Simulation of Coupled Chemical Reactions". The Journal of Physical Chemistry . 81 (25): 2340– 2361. doi : 10.1021/j100540a008 . S2CID 2606191 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ a b c d e f Gillespie, Daniel T. (2007-05-01). "Stochastic Simulation of Chemical Kinetics". Annual Review of Physical Chemistry . 58 (1): 35– 55. Bibcode : 2007ARPC...58...35G . doi : 10.1146/annurev.physchem.58.032806.104637 . PMID 17037977 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Indurkhya, Sagar; Beal, Jacob S. (2010). "Reaction Factoring and Bipartite Update Graphs Accelerate the Gillespie Algorithm for Large-Scale Biochemical Systems" . PLOS ONE . 5 (1) e8125. doi : 10.1371/journal.pone.0008125 . PMC 2798956 . PMID 20066048 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Kendall, David G. (1950). "An Artificial Realization of a Simple "Birth-and-Death" Process". Journal of the Royal Statistical Society, Series B . 12 (1): 116– 119. doi : 10.1111/j.2517-6161.1950.tb00048.x . JSTOR 2983837 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Kolmogorov, Andrey N. (1931). "Über die analytischen Methoden in der Wahrscheinlichkeitsrechnung" [On Analytical Methods in the Theory of Probability]. Mathematische Annalen . 104 : 415– 458. doi : 10.1007/BF01457949 . S2CID 119439925 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ a b Kuryliak, Yulian; Emmerich, Michael T. M.; Dosyn, Dmytro (2025). "Simulating epidemic peak dynamics on complex networks using efficient Gillespie algorithms". Infection, Genetics and Evolution . 132 105768. doi : 10.1016/j.meegid.2025.105768 . PMID 40441473 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Ramaswamy, Rajesh; González-Segredo, Nélido; Sbalzarini, Ivo F. (2009). "A new class of highly efficient exact stochastic simulation algorithms for chemical reaction networks". Journal of Chemical Physics . 130 (24): 244104. arXiv : 0906.1992 . doi : 10.1063/1.3154624 . PMID 19566139 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Ramaswamy, Rajesh; Sbalzarini, Ivo F. (2010). "A partial-propensity variant of the composition-rejection stochastic simulation algorithm for chemical reaction networks". Journal of Chemical Physics . 132 (4): 044102. doi : 10.1063/1.3297948 . PMID 20113014 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Ramaswamy, Rajesh; Sbalzarini, Ivo F. (2011). "A partial-propensity formulation of the stochastic simulation algorithm for chemical reaction networks with delays". Journal of Chemical Physics . 134 (1): 014106. doi : 10.1063/1.3521496 . PMID 21218996 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Rathinam, Muruhan; Petzold, Linda R.; Cao, Yang; Gillespie, Daniel T. (2003). "Stiffness in stochastic chemically reacting systems: The implicit tau-leaping method". Journal of Chemical Physics . 119 (24): 12784– 12794. Bibcode : 2003JChPh.11912784R . doi : 10.1063/1.1627296 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
- ^ Slepoy, Alexander; Thompson, Aidan P.; Plimpton, Steven J. (2008). "A constant-time kinetic Monte Carlo algorithm for simulation of large biochemical reaction networks". Journal of Chemical Physics . 128 (20): 205101. Bibcode : 2008JChPh.128t5101S . doi : 10.1063/1.2919546 . PMID 18513044 . Wikipedia revision 1373866241, retrieved 2026-11-18 · 1794956400.0
Cite this
"Gillespie algorithm". 1788860687. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1373866241