Zombie mathematics

When the kids are out of the house for a few hours, and Netflix is in a cooperative mood, I am provided with a rare opportunity to catch up with popular culture by watching an R-rated film or television show. Today I finally got around to seeing World War Z, which Netflix kindly provided in its unrated form.

If you haven’t seen World War Z yet, then what you are about to read might spoil some of the aspects of the movie — but only if you don’t have any idea whatsoever what the movie is about and tend to watch movies without reading any of their reviews.  These are very high-level spoilers.

The Z in World War Z stands for “Zombie”, and it’s not really a war.  It’s more of a headlong flight.  The zombies strongly desire to bite people, and people who are bitten turn into zombies, who strongly desire to bite people as well.  Unlike most of the zombie movies you’ve already seen, or have avoided seeing, these zombies are not hungry (they don’t eat you — they just nip at you a bit) and they don’t stumble about in a slow shambling manner: these zombies are fast.  In fact, each zombie seems to be stronger and faster than the person he or she was pre-zombification, which makes it hard to outrun them, even if you’re not Danny O’Bigbelly.  I think even Milla Jojovich might have a hard time with these zombies.

The most important difference between these zombies and the canonical zombie from the scientific literature is how long it takes to become a zombie after being bitten.  In the movie, the transformation happens in about ten seconds.

This aspect is played up again and again: a small number of zombies can overwhelm a large number of people by converting those people into zombies very quickly.  There’s a particularly memorable sequence where the defenses of a large, well-defended city are breached by a handful zombies, and the city is overrun in essentially the same amount of time it takes for people to flee from one side of the city to the other.  By the time the fleeing populace reaches the opposite side of the city, they’re all zombies.

But is that realistic?

Fortunately, mathematicians have been thinking about problems of this sort for some time, and therefore we know how to answer this question.

Let’s say that you have a single zombie and a crowd of people at time T.  The people are constrained in their movements somehow (let’s say they’re on a moving bus, or an airplane, or something like that, just to spice things up).  The zombie attacks someone, and after some struggle, manages to nip him or her, say after ten seconds have gone past.  So at time T+10, there’s one zombie and one infected person.  In our model, the zombie is particularly diligent, and immediately attacks a second person.  After another ten seconds, the zombie manages to nip its second victim, and the first victim has become a fully functional zombie.  So at time T+20, we have two zombies, and one infected person.  The two zombies immediately attack two other people, and at time T+30, we have three zombies and two more infected people.  Oh, and people are probably running around screaming and whatnot, but we can ignore that for now and build a table of how things progress:

Time (s) Zombies Bitten
T+0 1 0
T+10 1 1
T+20 2 1
T+30 3 2
T+40 5 3
T+50 8 5
T+60 13 8

People who are familiar with Fibonacci sequences will recognize this immediately: the number of zombies at during the next time interval is the sum of the number of zombies from the previous two time intervals.  Even though Fibonacci’s original research was about vampires or rabbits or something like that, the theory still applies: if you have a number that increases according to a construction like this (i.e., creating more zombies by biting more humans, and more zombies can bite more humans), then it can be modeled as a simple recurrence.  In this case, the number of zombies at time X is equal to the number of zombies at time X-10 (the previous number of zombies) plus the number of zombies at time X-20 (the number of people bitten at that time, who will become zombies by time X).

Interestingly, as the numbers grow, the ratio between the number of zombies at each ten-second interval becomes closer and closer to the Golden Ratio (approximately 1.618034) which is ubiquitous in both art and nature — proof, if ever one was needed, that zombies are a fundamental property of our world.  Or maybe it’s vampires?  Probably both.

In any case, the fact that the ratio between the number of zombies at time X and X-10 is, for a suitably large X, approximately 1.618034, which means that the number of zombies is increasing by this factor every ten seconds.  So after a second minute has gone by, we will have increased by this ratio six more times, or a factor of a smidgeon less than 18, giving us 233 zombies.  So a full bus might last more than a minute, but at the end of two minutes, a zombie can work its way through a large airplane.  The passengers of a large cruise ship would be zombified in three minutes, with another ten seconds to take care of the crew as well.

Now, maybe I’m being too generous to the victims.  Most people wouldn’t be able to put up a fight for ten seconds, perhaps.  In that case, things would be much worse.  What if a zombie could run down and nip each of its victims in less time than it takes for the zombie transformation?  That makes the math a little more fun.

Let’s consider a simple case: it takes five seconds for the zombie to inflict its bite, and then another ten seconds for that person to turn into a zombie.  After five seconds, we have one zombie, and one bitten person.  After ten seconds, the bitten person is transforming, and the zombie has bitten another person. After 15 seconds, the transforming person is a zombie (so now we have two), the bitten person is transforming, and the original zombie has bitten yet another person.

It looks like this:

Time (s) Zombies Transforming Bitten
T+0 1 0 0
T+5 1 0 1
T+10 1 1 1
T+15 2 1 1
T+20 3 1 2
T+25 4 2 3
T+30 6 3 4
T+35 9 4 6
T+40 13 6 9
T+45 19 9 13
T+50 28 13 19
T+55 41 19 28
T+60 50 28 41

It isn’t the canonical Fibonacci sequence, but with a little observation, we can see that it’s a different Fibonacci sequence.  The number of people bitten at time X+5 is the number of zombies at time X, and the number of people transforming at time X+5 is the number of people who were bitten at time X, and the number of zombies at time X+5 is the number of zombies at time X plus the number of people transforming at time X-5, which is the same as the number of people who where bitten at time X-10, which is the same as the number of zombies at time X-10. This gives us a recurrence that we can use to solve for the number of zombies five seconds from now, if we know how many there are now and how many there were ten seconds ago:

Zombies at time X+5 = (Zombies at time X) + (Zombies at time X-10)

For a person trapped in a confined area with a zombie and a group of other people, this is a bit of a problem.  After one minute has gone by, a single zombie has become 50 zombies, with an additional 69 people well on their way to being zombies.  The number of zombies grows by a factor of 50 every minute.  At this time, there are approximately 6 billion people on the planet (give or take), and 6 billion is about 20 * 50 * 50 * 50 * 50 * 50 , which gives humanity  a smidgeon more than five minutes to sort things out, assuming that all of humanity is clumped within a five-minute run of the position of the first zombie.

Fortunately, these numbers are bit pessimistic for a number of reasons.  First, people are dispersed, and tend to flee, making it impossible for zombies to find unbitten people to bite as quickly as used in our model. This is good news for people in Montana, or who live on small islands, but if you find yourself sitting next to a zombie in coach on a long flight, it’s not very comforting.

Second, some people fight back, which both reduces the number of zombies and lengthens the time required for a zombie to overpower a victim and bite him or her.  The bitten do not always succumb; some, knowing full well what is about to happen to them, choose to destroy themselves instead.

And finally, there is a crowding issue; once the number of surviving humans drops below a certain percentage of the number of zombies, the zombies tend to get in each other’s way in their zeal to chase down the remaining humans.

There are a number of analyses we could do: if the victims fought back with a given probability of killing a zombie during each time period, how would that change things?  How should people disperse themselves in order to form the most effective zombie-fighting units?  Does it matter which weapons are available?  The ancient phalanx formation is an example of an arrangement that permits the most offensive advantage for a given defensive perimeter, exposing very few people to be bitten while protecting them with the maximum number of spears.  But spears and interlocking shields are not something everyone has, unfortunately, and we need to fight the zombie apocalypse with the weapons we have, not the weapons we want.

If the humans are able to alter their tactics by working in teams to quickly dispatch the singleton zombies that try to attack them, they might survive for a considerable period of time.  The zombies, of course, might also alter their tactics so that instead of attacking by ones and twos, they could attack in a coordinated manner to increase the likelihood of converting more people quickly, before their attack is rebuffed.  It’s clear that zombie attacks are not effective if they are nipped quickly in the bud, but if the exponential infection rate gets a handhold, the zombies are going to win.  This is the sort of thing that mathematicians think about as well, with applications to many fields.

This is all very interesting, and I plan to spend some time thinking about how the different scenarios might play out.

I’m certainly not going to be falling asleep any time soon.

Comments are closed.