I just saw that people seem to be interested in zombie apocalypses, so here we go:

## The Zombie Apocalypse & what to do when it actually happens

Just like in my last post physicists/applied mathematicians came to the rescue of our purer colleagues by terming the previous, not so flashy-looking field of “diffusion models & interaction times” as zombie apocalypse! By now it should be obvious that mathematicians use every possible way of shameless advertising, so I’ll just stop pretending to be sorry about it.

So what is this all about? Why should we be interested in diffusion models and interaction times and what are they?

**Assumptions: **Assume zombies move like in the films, so pretty randomly with no real preference of direction (readers of my last post in this thread may identify this sort of movement as a Wiener process and indeed we will use the last post’s results!). Since we’ve got some randomness again one could try to get the expected/average number of zombies per square meter (or square mm, or even smaller, so this becomes a measure), but this is just the probability density function ρ of the last post, which happens to be the solution to the heat equation.

**What do we want to calculate? **Since this won’t really help us in the case of a zombie outbreak, let’s move on to something of interest like “*How much time do I have to build a castle?*“, or equivalently “What’s the expected time until a random particle reaches a certain destination?” which is also known as “mean first passage time”.

However, the “mean” time doesn’t help us much at all since the variance could be high; e.g. imagine they arrive either today or in one year (each with a probability of 50%), then the mean would be ~365/2 days, but this doesn’t really give us confidence.

So how about looking at the *probability that they arrive at some time t*? This can be defined as the L^2 norm of the difference of the probability density functions p_{x0}(. ,t) and p_{x1}(. ,t), where p_{x0}(x,t) gives the probability of a random particle starting at x0 to be at x after some time t (and analogously for x1).

**How do we calculate it? **This one’s a little bit tricky, but there are some pretty neat connections to the heat equation, Fokker-Planck operators and some other things I mentioned previously so if you’re interested feel free to take a look at my (first) Bachelor’s thesis (and references therein).

**But this doesn’t have anything to do with reality! **1) We’re talking about zombies. 2) A valid objection might be that *zombies do not move totally randomly*. They could move randomly until they see brainzzz and then start to move towards brainz with a higher probability, *but that’s pretty much the step from using the heat equation to using the Fokker-Planck equation*! So the above considerations still hold for that case as well. *Also it is possible to account for the geography* (most of the works out there restrict themselves to the 1D case) by not doing all those calculations in some Euclidean space, but on some (compact, Riemannian) manifolds. Getting explicit solutions is pretty hard in this general case though, so numerical approximations (e.g. using some generalized Fourier expansion as shown in my thesis) are pretty much the best thing we can get.

**Other things that might be of interest: **Of course this is not the only interesting result since zombies exhibit a richer algebraic structure than random particles, or in other words: When they make contact with a person, this person will either die or become a zombie. From a mathematical point of view this is not any different than trying to model the spreading of diseases (or information in social networks) and since this is a serious problem quite a lot of work has already been done here which comes in handily for everybody interested in zombies.

**Sources: **So if you want to check out why we can’t continue to live in peace and harmony take a look at Mathematical Modelling of Zombies. In this paper they kind of “translate” the epidemiology vocab to zombie invasions and in this one they investigate the effects of urban street network topology on rates of infection spreading in zombie epidemics.

**But what should I do if I encounter a zombie?** In case you didn’t watch enough zombie films:

__Run!__

__Run!__

(or build a fortress and defeat every zombie that gets close to you)