Friday, November 26, 2010

Mathematical model for zombie-human population behaviour.


As a result of extreme boredom,I made the following analysis in Matlab:

"Nicholson-Bailey model for studying zombie-human population interaction"

As expected,Zombies were the parasitoids and humans were the hosts.This is the excrept of the m-file:
%Made by Srikumar Krishnamoorthy,TTU
%This model is directly based on the Nicholson Bailey Parasitoid model and
%the assumptions that are made are : 1.A Zombified Human cannot be
%zombified again. 2.A Zombie needs a human's 'life force to 'survive'(or
%whatever it is that zombies do) 3.There are equal number of Male and
%female humans at all times and they all are monogamously 'coupled' 4.No
%weapons can hurt a zombie.
r=1%r=No of offspring by a human that survive till adulthood(I assumed 2 children per couple or 1 chld per human
c=1%c=Searching efficincy or the probability that a zombie will encounter a human in his lifetime(Okay,'undeadtime' :P)
e=1%e=No of infections that a zombie makes on a human that result in the complete zombification of the human
H0=input('input initial population N0 of Humans: ')
Z0=input('input initial population P0 of Zombies: ')
n=input('input time period of run: ')
H=zeros(n+1,1);
A=zeros(n+1,1);
t=zeros(n+1,1);
H(1)=H0;
Z(1)=Z0;
for i=1:n
t(i)=i-1;
H(i+1)=r*H(i)*exp(-c*Z(i));
Z(i+1)=e*H(i)*(1-exp(-c*Z(i)));
end
t(n+1)=n;
plot(t,H,t,H,'o')
title('No of Humans'),pause
plot(t,Z,t,Z,'o')
title('No of Zombies'),pause

These are graphs of a few sample runs:




Conclusion :
Whatever the initial populations of the humans and the zombies may be,humans are doomed.