Zombies
Zombies
Zombies
Laboratory of Atomic and Solid State Physics, Cornell University, Ithaca, NY 14853
(Dated: March 6, 2015)
We use a popular fictional disease, zombies, in order to introduce techniques used in modern
epidemiology modelling, and ideas and techniques used in the numerical study of critical phenomena.
We consider variants of zombie models, from fully connected continuous time dynamics to a full scale
exact stochastic dynamic simulation of a zombie outbreak on the continental United States. Along
the way, we offer a closed form analytical expression for the fully connected differential equation,
and demonstrate that the single person per site two dimensional square lattice version of zombies
lies in the percolation universality class. We end with a quantitative study of the full scale US
outbreak, including the average susceptibility of different geographical regions.
I.
INTRODUCTION
preparedness. In this work, we will build up to a fullscale simulation of a zombie outbreak in the continental United States, with realistic values drawn from the
literature and popular culture (section V, simulation accessible online [14]). Before that, we shall use statistical
mechanics to scrutinize the threshold of zombie virulence
that determines whether humanity survives (section IV).
Preceding that, we shall show how methods from computational chemistry can be used to simulate every individual heroic encounter between a human and a zombie
(section III). But we begin by describing and analyzing
a simple model of zombies (the SZR model) the simplest and most natural generalization to the classic SIR
(Susceptible-Infected-Recovered) model used to describe
infectious disease spread in epidemiology.
II.
SZR MODEL
(2)
(3)
2
zombies and kill zombies is dependent on the total count
of zombies and humans in this site. This is in contrast
with most models of human diseases, which frequently
adopt frequency dependent interactions wherein S, Z, R
would be interpreted as the fraction of the population in
that state.
This distinction will become stark once we consider
large simulations with very inhomogeneous populations.
By claiming that zombies can be modeled by a single bite
parameter that itself is a rate per person per unit time,
we are claiming that a zombie in a block with 5,000 people would be one hundred times as effective at infecting
new zombies as a zombie in a block with fifty people,
similarly the zombie in question would be killed one hundred times faster. This would seem false for an ordinary
disease like the flu, but in the case of zombies, we argue
that it is appropriate, as zombies directly seek out hosts
to infect, at which point the human and zombie engage
in a dual to the (un)death.
To ease analysis we can nondimensionalize the equations by choosing a relevant population size N , and recasting in terms of the dimensionless time parameter
= tN and dimensionless virulence = /
dS
SZ
=
d
N
dZ
SZ
= (1 )
d
N
SZ
dR
=
d
N
(5)
(6)
(8)
(9)
(10)
lim Z( ) = P = Z0 + (1 )S0
(11)
lim S( ) = 0
(12)
(13)
(14)
0 =
(15)
(16)
(17)
(18)
P 0 ( ) = 0
(19)
P ( ) = P0 = Z( ) + (1 )S( ) = Z0 + (1 )S0
(20)
(
P > 0
0 ( ) =
(21)
+ P < 0
(
S( )
e P > 0
( ) =
= 0 +
(22)
Z( )
e
P <0
(7)
lim f ( ) = 0
dP
= P 0 = Z 0 + (1 )S 0
d
SZ
SZ
(1 )
=0
= (1 )
N
N
(4)
(1 ) =
1
Z0
Z0
P
f ( ) P/N
e
+
Z( ) = P f ( )
f ( )
S( ) =
1
and we will always flow to a final state composed of entirely zombies and no humans, where P denotes the number of zombies that survives.
S0
Z0
(23)
(24)
S = S0
Z0
1
(25)
3
1.
SIR model
(26)
(27)
(28)
(R( )R0 )
N
(29)
(30)
(R R0 )
N
(31)
III.
STOCHASTIC SIMULATION
While most previous studies modeling zombie population dynamics have been deterministic, things get more
interesting when we try to model discrete populations.
By treating the number of zombies and humans as continuous variables in the last section, we are ignoring the ran-
4
dom fluctuations that arise in small populations: even a
ferociously virulent zombie infestation might fortuitously
be killed early on by happy accident. Similar problems
arise in chemical reactions: reactions involving two types
of proteins in a cell can be described by chemical reaction kinetics evolving their concentrations (like our SZR
equations 4), but if the number of such proteins is small,
accurate predictions must simulate the individual binary
reactions (each zombie battling each human). Interpreting our SZR transitions as reaction rates, gives us a system akin to a chemical reaction with two possible transitions:
SZ
(S, Z) (Z, Z)
SZ
(S, Z) (S, R)
When a human and zombie are in contact, the probability of a bite in a small period of time is given by the bite
rate and the size of the populations of the two species
(SZ dt), and similarly for the probability of a kill. In
order to efficiently simulate this dynamics, we use Gillespie dynamics [7], which efficiently uses the computer to
sequentially calculate the result of each one-on-one battle.
The stochasticity gives more character to the simulation. The fully connected continuous dynamics modelled
by the differential equation is straight forward: either the
humans win and kill all of the zombies, or the zombies
win and bite all of the humans. While the continuous approximation may be appropriate at intermediate stages
of the infection where the total population is large and
there are a non-trivial number of infected individuals,
we will eventually be interested in simulating an actual
outbreak on an inhomogeneous population lattice, where
every new site will start with a single infected individual. But even though we may be interested in modeling
the outbreak case ( < 1), we would like to allow the
possibility that the humans manage to defeat the outbreak before it really takes off. The stochastic Gillespie
dynamics allows for this possibility.
In Figure 2 weve shown an example of a single stochastic simulation using the same parameter settings as those
used in Figure 1. The stochastic trajectory overall tracks
the analytic result, but at points in the simulation there
may be more or less zombies than anticipated if the dice
fall that way.
Another implication of stochastic dynamics is that it is
not always guaranteed that an < 0 outbreak will take
over the entire susceptible population. For the parameter
settings used in Figure 1 and 2, namely = 0.6 with a
population of 200 and one infected individual to start,
the zombies win only 40% of the time. Additionally, the
number of zombies we end with isnt fixed; as shown in
Figure 3.
In fact, we can solve for the probability that an < 1
simulation will go extinct in the limit of large populations. We are interested in Pext , the probability that the
FIG. 4.
The observed fraction of simulations that end in
an extinction for the zombie outbreak, for 1,000 runs of 104
individuals at various values of (eqn. 33). The observed
extinction probabilities agree with the expectation that they
should go as , here shown as the dashed blue line. This is
the same behavior as the SIR model.
outbreak goes extinct. At the very beginning of the simulation, there is only one zombie, who will be killed with
probability /( + ). If we kill the first zombie before
he bites anyone, we guarantee extinction. Otherwise, the
zombie will bite another human, at which point we will
have two independent zombie lines that we need to each
cause to go extinct, which will occur with probability
2
Pext
. This allows us to solve:
1+
P2
+
+ ext
= =.
Pext =
(32)
Pext
(33)
The probability of extinction is just given by our dimensionless inverse virulence . In Figure 4 weve shown the
5
observed extinction probabilities for 1,000 Gillespie runs
of a population of 104 individuals at various values of ,
and overlaid our expected dependence of .
This same extinction probability (Pext = = R01 ) is
observed for the SIR model [10]. This is not a coincidence. In fact, in precisely the limit that is important for
studying the probability of an extinction event, namely at
early times with very large populations, the SZR model
and SIR are effectively the same, since the population of
susceptibles (S) is nearly constant. Writing S as S0 S,
we have:
dZ
S0 Z
SZ
= (1 )
(1 )
d
N
N
dI
N S0 I
I
= 1
(N + S) .
d
S0
N
N
(34)
(35)
IV.
FIG. 5. Results from many Gillespie runs. One thousand different simulations are run for each cell. Each simulation starts
with a single zombie or infected individual. The runs are run
until they naturally terminate, either because the susceptible
population is deleted, the zombie population is gone, or there
are no more infected individuals. Each cell is colored according to the mean fraction of the population occurring in each
state. The top row is for SZR simulations and the bottom row
is for SIR simulations. In both cases N is chosen to be 100.
Here the stark contrast between density dependent SZR and
SIR is made apparent. Notice that density-dependent SIR
is very strongly population dependent.
Until now, weve considered fully connected populations, where any infected individual can infect any susceptible individual. But surely, a zombie in New York
cannot bite someone in Los Angeles. Studies of the spatial spread of infectious diseases is one of the applications of network science; social diseases spread among
intimate contacts, Ebola spreads by personal contact in
a network of caregivers, influenza can be spread by direct
contact, through the air or by hand-to-mouth, hand-toeye or hand-to-nose contact after exposure to a contaminated surface. For most diseases, long bonds dominate
the propagation to distant sites [13] airplane flights take
Ebola to new continents. Zombies do not fly airplanes, so
our model is closer in spirit to the spread of certain agricultural infestations, where the disease spreads across a
lattice of sites along the two-dimensional surface of the
Earth (although not those in which pathogens are transported long distances by atmospheric currents).
6
To begin, we will consider a two dimensional lattice,
where each site contains a single individual. Each individual is allowed to be in one of three states: S, Z,
or R. The infection spreads through nearest neighbor
bonds only. That is, a zombie can bite or be killed by
any susceptible individuals in each of the four touching
sites.
To make direct contact with our zombie model, the
rate at which an susceptible cell is bitten is given by Z
where Z is the number of zombie neighbors (since S is
one), and the rate at which a zombie site is killed is S
where S is the number of susceptible neighbors.
Because all state transitions in the SZR model depend only on ZS contacts, for computational efficiency,
we need only maintain a queue of all ZS bonds, that is
connections along which a human and zombie can interact. At each step of the simulation, one of these
ZS bonds is chosen at random, and with probability
/( + ) = 1/(1 + ), we bite the human, marking it
as a zombie and visiting each of its neighbors. If any of
its neighbors are human, we add that link to our queue.
With probability /( + ) = /(1 + ) we kill the zombie, removing any of its links to neighboring humans from
the queue. This process matches the stochastic dynamics
of our zombie model operating on the lattice.
Simulating zombie outbreaks on fixed lattices, there is
qualitatively different behavior for small and large .
When is large, the zombies do not spread very far, always being defeated by their neighboring humans. When
is very small, the zombies seem to grow until they infect the entire lattice. This suggests evidence of a phase
transition. Technically, the presence of a phase transition
would mean that if we could simulate our model on an infinite lattice, there should be some critical (c ), above
which any outbreak will necessarily terminate. Below the
critical value, we have the possibility (assuming we dont
go extinct) of having the infection grow without bound,
infecting a finite fraction of individuals, even on the infinite lattice. The SIR model has been demonstrated
to undergo such a phase transition, and we expect the
zombie model does as well.
The study of critical phenomena includes a series of
techniques and analyses that enable us to study the property of these hypothetical phase transitions even on finite
lattices. A major theme of critical phase transitions is
that with the order parameter (the parameter governing
the transition, in this case ) set to precisely the critical
value, models show scale free behavior, meaning there
is no natural length scale to the dynamics, and various
physical parameters all are governed by power laws.
With chosen to be precisely at the critical value, we
expect to see fractal like growth (Fig. 6). Note that there
are holes (surviving pockets of humans) of all sizes in the
figure. This reflects the proximity to the threshold: the
battle between zombies and humans is so evenly matched,
that one gets an emergent scale invariance in the survival
patterns. This is in keeping with studies of the SIR
model, which shows a similar critical behavior and phase
transition [8].
7
been three smaller outbreaks of size s which happened
to trigger one another, and these in turn are formed by
what would have been three outbreaks of size s/3. If the
probabilities and form of this mutual triggering is the
same at each scale, then it would not surprise us that
many properties of the outbreaks would be the same, after rescaling the sizes by a factor of three. In particular,
we expect at the critical point to find the probabilities of
avalanches of size s to be related to the probabiities at
size s/3 by some factor f :
P (s, c ) = f P (s/3, c ).
(36)
answer.
We conclude that the single person per site zombie
infestation, near the critical virulence, will on long length
scales develop spatial infestation patterns that are well
described by two-dimensional percolation theory.
V.
A.
We will attempt to simulate a zombie outbreak occurring in the United States. This will be similar to our lattice simulation, but with an inhomogeneous population
lattice. We based our lattice on code available for creating a dot map based off the 2010 US Census data [15].
The 2010 Census released census block level data, detailing the location and population of 11,155,486 different
blocks in the United States. To cast these blocks down
to a square grid, we assigned each of the 306,675,005 reported individuals a random location inside their corresponding census block, then gridded the population into
a 1500 900 grid based on latitude and longitude coordinates. The resulting population lattice can be seen
in the top half of Figure 9. You will see the presence
of many empty grids, especially throughout the western
United States. This disconnects the east and west coasts
in a clearly artificial pattern our zombies in practice
will gradually wander through the empty grid points. To
add in lattice connectivity, we did six iterations of binary
closing (an image processing technique) on the population lattice and added it to the original. The effect was
to add a single person to many vacant sites, taking our
total population up to 307,407,336. The resulting population map is shown in the bottom half of Figure 9. This
grid size corresponds to roughly 3 km square boxes. The
most populated grid site is downtown New York City,
with 299,616 individuals. The mean population of the
occupied grid sites is 420, the median population of an
occupied site is 13.
B.
Augmented Model
In order to more realistically simulate a zombie outbreak, we made two additions to our simplified SZR
model. The first was to add a latent state E (Exposed).
S i = Si Zi
E i = Ei
Z i = Ei Si Zi
(37)
R i = Si Zi
X
Z i =
Zj Zi
(40)
hji
(38)
(39)
(41)
9
or as a set of reactions:
Si Zi
(Si , Ei ) (Si 1, Ei + 1)
(42)
Ei
(Zi , Ei )
(Zi + 1, Ei 1)
(43)
Si Zi
(Zi , Ri )
(Zi 1, Ri + 1)
(44)
Zi
hi ji : (Zi , Zj ) (Zi 1, Zj + 1) .
(45)
2 /hr
0.0914 /hr
TABLE I. The parameters chosen for our US-scale simulations of a zombie outbreak. These parameters were chosen to
correspond with standard depictions of zombies and simple
physical estimations explained in the main text.
(46)
C.
Simulation Details
D.
Results
10
(a) 1 Day
(b) 2 Days
(c) 1 Week
(d) 2 Weeks
(e) 3 Weeks
(f) 4 Weeks
(g) 2 Months
(h) 4 Months
11
ena. We have described and analyzed various zombie
models, from one describing deterministic dynamics in a
well-mixed system to a full scale US epidemic. We have
given a closed form analytical solution to the well-mixed
dynamic differential equation model. We compared the
stochastic dynamics to a comparable density-dependent
SIR model. We investigated the critical behavior of the
single person per site two-dimensional square lattice zombie model and demonstrated it is in the percolation universality class. We ran full scale simulations of a zombie
epidemic, incorporating each human in the continental
United States, and discussed the geographical implications for survival.
FIG. 12. Status of the United States 28 days after an outbreak that started in New York City. Here blue represents
humans, red represents zombies and green represents dead
zombies. The three color channels have been laid on top of
one another.
VII.
VI.
ACKNOWLEDGEMENTS
CONCLUSION
We acknowledge NSF IIS1247696 and Cornell University for support of this research, and thank Paul Ginsparg
for useful references and conversations.
[1] Max Brooks. The Zombie Survival Guide: Complete protection from the living dead. Broadway books, 2003.
[2] Max Brooks. World War Z. Queridos Uitgeverij BV,
Em., 2013.
[3] John L Cardy and Peter Grassberger. Epidemic models
and percolation. Journal of Physics A: Mathematical and
General, 18(6):L267, 1985.
[4] Andrew Cartmel et al. Mathematical Modelling of Zombies. University of Ottawa Press, 2014.
[5] Jin Fu, Sheng Wu, Hong Li, and Linda R Petzold. The
time dependent propensity function for acceleration of
spatial stochastic simulation of reactiondiffusion systems. Journal of Computational Physics, 274:524549,
2014.
[6] Michael A Gibson and Jehoshua Bruck. Efficient exact stochastic simulation of chemical systems with many
species and many channels. The journal of physical chemistry A, 104(9):18761889, 2000.
[7] Daniel T Gillespie, Andreas Hellander, and Linda R Petzold. Perspective: Stochastic algorithms for chemical kinetics. The Journal of chemical physics, 138(17):170901,
2013.
[8] Peter Grassberger. On the critical behavior of the general
epidemic process and dynamical percolation. Mathematical Biosciences, 63(2):157172, 1983.
[9] Ronald Hochreiter and Christoph Waldhauser. Zombie politics: Evolutionary algorithms to counteract
the spread of negative opinions.
arXiv preprint
arXiv:1401.6420, 2014.
[10] Matt J Keeling and Pejman Rohani. Modeling infectious
diseases in humans and animals. Princeton University
Press, 2008.
12
FIG. 13. Average survivability from US scale runs. In both cases, the plot shows the probability of being infected in that
square after an epidemic that originates from a single infected individual chosen at random from the total population. The top
figure is the probability of being infected after 7 days, while the bottom plot is after 28 days. In total, this represents 7,000
simulated runs starting from a single individual. The top plot represents the 1,467 outbreaks that lasted at least 7 days, the
bottom plot represents 1,458 outbreaks that lasted at least 28 days.
[21] T
ania Tome and Robert M Ziff. Critical behavior of the
susceptible-infected-recovered model on a square lattice.
Physical Review E, 82(5):051921, 2010.