% SIMIODE-TeacherStudent-Template.tex and simiode.cls for LaTeX2e
% Version 22 November 2016.
%
% This template is to be used with the  class file "simiode.cls".
%
% The latest version of this class and template files
% can be found at
%
%       <http://www.SIMIODE.org> in the Author section.
%
% A "Quick Start Guide" appears below.
%
% This file must be processed with version LaTeX2e or higher.
% Appreciation to Mark Frantz, IUPUI; John Thoo, Yuba College; and Eric Sullivan, Carroll College.
%
\documentclass{simiode}
%
% With this version of the tex file and the associated SIMIODE.cls file you can produce BOTH a Student Version and a Teacher Version of your modeling scenario or technique narrative.
%
% Student Version contains the title STUDENT VERSION along with the NAME OF SCENARIO, with no abstract, no keywords, no tags, no author identifiers, and no COMMENTS section. The Student Version contains only the STATEMENT of the modeling scenario only with appropriate figures, data, instructions, and perhaps a bibliography appropriate for student resourcing, but nothing in the bibliography which would "give away" the nature of the modeling scenario, etc.
%
%The Teacher Version contains the material in the Student Version, namely the title NAME OF SCENARIO, now headed with   TEACHER VERSION, but also full author  identification, abstract, key words, tag words, and, following the STATEMENT, a section of COMMENTS which can be discussion of presentation  ideas, "solutions," techniques, etc.
%
% Authors can prepare a full Teacher Version using the notions immediately below  to create a pdf for review, but in review please eliminate all information about the author as we use a double-blind referee system. Such information will be restored when accepted and published in SIMIODE at www.simiode.org.
%
%***********   Toggle the following line to turn the teacher version on (1) or off (0). ***********
%
\def\TeacherEdition{0} % Toggle this line's value.
\newcommand{\teacher}[1]{\ifnum\TeacherEdition=1 #1 \fi}
%
% The \teacher{ } command wraps any text that will appear only in the teacher version of
% the document. See this file for examples. This has been done for you in the document below.
% Rename the pdf after you compile each final version.
%
\usepackage{amsmath,amssymb}
\usepackage{color}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{url}
%
\renewcommand{\baselinestretch}{1.3}
%
% NOTE regarding macros %%
%
% Any macros defined for your paper should be contained in
% the top matter. Likewise, any environment definitions such
% as \newtheorem or \newenvironment should also go in the
% top matter.
%
% Do not \input your macros as separate files within your
% final version because more files make it harder for the
% editors and users to keep track of and/or modify and
% append your paper.
%
% Top matter is above and the beginning of the document below.
%
\begin{document}

\newpage
%
% You only need to change the NAME OF SCENARIO in the next line and delete the footnote.
% See above for instructions on toggling from Teacher Version to Student Version.
%
\title{\ifnum\TeacherEdition=1 TEACHER VERSION \else STUDENT VERSION \fi\\The Next Time You Play HvZ, \\Think About Differential Equations}




\markboth{Zombie Game HvZ}{Zombie Game HvZ}

\author{Jue Wang\\
Union College\\
Schenectady NY  12308 USA\\
wangj@union.edu
}

\makeStitlePDFLaTex


\begin{abstract}
Invented in 2005, Humans vs. Zombies, or {\bf HvZ}, is a game of tag, predominantly played at US college campuses. In this activity, students use systems of non-linear differential equations to model the {\bf HvZ} game. Standard SIR and SIRS models are introduced to guide students as they set up the equations and analyze the resulting non-linear systems. Many alternate rule sets provide options to formulate different models. Students solve for the numerical solutions and examine the game outcomes by varying the interaction parameters. They conclude which group, Humans or Zombies, will win the game.
%Concepts include 2D and 3D non-linear systems, phase plane, nullclines, direction field, behavior of solutions, numerical solution, interaction parameters. 

\end{abstract}


\section*{SCENARIO DESCRIPTION}
Invented in 2005 at Goucher College (Towson, Maryland USA), Humans vs. Zombies, or {\bf HvZ}, is a game of tag predominantly played at US college campuses. All players begin as humans, and one is randomly chosen to be the ``Original Zombie''. The Original Zombie tags human players and turns them into  Zombies. Zombies must tag and eat a human every 48 hours or they starve to death and are out of the game. The Zombies win when all human players have been tagged and turned into Zombies; the Humans win by surviving long enough for all of the Zombies to starve. The game rules are outlined on the game official site \cite{HvZ}. Many alternate rule sets can be found on the internet. 

\smallskip
{\bf Can we use mathematical models and differential equations to study the game?}
\smallskip

Let us first examine differential equation models in epidemiology. Epidemiology is the study of the distribution and causes of disease in populations. The spread of infectious diseases, such as measles and malaria, can be modeled by a system of non-linear differential equations. The simplest model is the {\bf SIR} model (Susceptible-Infected-Recovered) \cite{Hirsch2012}. The model makes several basic assumptions:
\begin{enumerate}
\item[A1.] The total population is constant.
\item[A2.] Once an individual has been infected and subsequently recovered, that individual cannot be re-infected, such as in the case of measles, mumps, and smallpox.
\item[A3.] The rate of transmission of the disease is proportional to the number of encounters between susceptible and infected individuals.
\item[A4.] The rate at which infected individuals recover is proportional to the number of infected.
\end{enumerate}
Define the variables:
\begin{align*}
S(t) &= \textnormal{the number of susceptible individuals at time $t$,} \\
I(t) &= \textnormal{the number of infected individuals at time $t$,} \\
R(t) &= \textnormal{the number of recovered individuals at time $t$.}
\end{align*}
The SIR model is illustrated schematically in Figure~\ref{fig:SIR}, and described by the non-linear system below, where $\alpha$ is the recovery rate and $\beta$ is the transmission rate. 
\begin{align}
S'(t) &= -\beta S I \\
I'(t) &= \beta S I - \alpha I \\
R'(t) &= \alpha I
\end{align}

\begin{figure}[htb]
\includegraphics[width=3in]{SIR}
\centering
\caption{\label{fig:SIR} SIR model.}
\end{figure}

\begin{figure}[htb]
\includegraphics[width=4.3in]{SIR2_soln}
\centering
\caption{\label{fig:SIR_soln} SIR model solutions ($S+I+R=1000$).}
\end{figure}

In Mathematica, you may plot the solutions and visualize the interaction of the three groups. The solutions are shown in Figure~\ref{fig:SIR_soln} for a time period of 80 days and a total population of 1000. The codes are provided in \cite{Kaurov2014}.

\section*{The following activities will guide you in modeling {\bf HvZ}.}

\begin{enumerate}
\item In the SIR model, why is it sufficient to consider the two-variable system consisting of (1) and (2)? 

\item Find the $S$-nullclines (the set of points where $S'(t)=0$) and $I$-nullclines (the set of points where $I'(t)=0$) in the phase plane. Sketch them by hand in the $SI$-plane. Solve for the equilibria and label them in the $SI$-plane. Sketch the direction field, i.e., arrows indicating the direction of the solution curve. What behavior do you observe?

\item Recovered individuals may lose their immunity and become re-infected, such as in the case of malaria and tuberculosis. We add a new assumption.
\vspace*{.2 true cm}

A5. Re-infection occurs at a rate proportional to the population of recovered individuals.

\begin{enumerate}
\item Sketch a schematic diagram similar to Figure~\ref{fig:SIR}. Set up this modified model -- the {\bf SIRS} model.
\item Visualize the solutions in Mathematica or other softwares similar to Figure~\ref{fig:SIR_soln}. Explain the difference in the behaviors of the solutions.
\end{enumerate}

\item Now let's play {\bf HvZ}!
\begin{enumerate}
\item What reasonable assumptions would you make to help set up the model for the {\bf HvZ} game?
\item Define our variables:
\begin{align*}
S(t) &= \textnormal{the number of susceptible, or humans, at time $t$,} \\
Z(t) &= \textnormal{the number of Zombies at time $t$,} \\
R(t) &= \textnormal{the number of removed individuals at time $t$.}
\end{align*}
One SZR model is described below, adapted from \cite{Munz2009}. Note that the total population does not change. A schematic diagram for the interaction is shown in Figure~\ref{fig:SZR}.
\begin{align}
S'(t) &= - \beta SZ - \mu S \\
Z'(t) &= \beta SZ + \gamma R - \alpha SZ \\
R'(t) &= \mu S + \alpha SZ - \gamma R
\end{align}
Set up your SZR models based on your assumptions and sketch a corresponding diagram similar to Figure~\ref{fig:SZR}.
\begin{figure}[htb]
\includegraphics[width=3in]{SZR}
\centering
\caption{\label{fig:SZR}One SZR model.}
\end{figure}
\end{enumerate}

\item Suppose that at your school, 300 students signed up to play  {\bf HvZ}  for a period of 7 days. They started out with 299 humans and 1 zombie. The human or zombie group with a larger population wins the game.
\begin{enumerate}
\item Let's first use the system as described in (4)-(6). Write down the initial conditions for this model.
\item Set parameters $\alpha=0.0015, \beta=0.005, \gamma=0.001, \mu=0.002$. \\
Solve for the numerical solutions and plot them in Mathematica or other softwares. \\
Who won? Humans or Zombies?
\item What happens if you increase or decrease $\beta$? For example, $\beta=0.006$? 0.004? 
\item You may also change the other parameter values to investigate their effects on the outcome. \\
\item[] 
If using Mathematica consider these commands ``{\tt NDSolve}'' and ``{\tt Plot}'':

\url{http://reference.wolfram.com/language/ref/NDSolve.html}

\url{http://reference.wolfram.com/language/ref/Plot.html}

\end{enumerate}

\item Now use your own SZR models. Set your parameter values and determine the game outcomes. 
\end{enumerate}

\smallskip
You may further explore modeling other pandemics such as influenza and Ebola, and other models such as MSIR, SEIR, SEIS, SEAIR, MSEIRS, etc.

The next time you play {\bf HvZ}, think about differential equations!


%\section*{Submission Version}

%For submission to the manuscript management system, \url{https://simiode.expressacademic.org} authors should submit a Teacher Version with all author identifying information stripped out. This should be a pdf version of the material.

%Authors may also submit supporting documents such as pdf's of code files, e.g., MatLab, Mathematica, Maple, SAGE, etc. and spreadsheets and data files.


%Below is a set of References which appears in the Student Version. Note, there is a second set of References one can use for the Teacher Version.

\begin{thebibliography}{98}


\bibitem{Hirsch2012} Hirsch, M.~W., S.~Smale, and R.~L.~Devaney.  2012. {\it Differential equations, dynamical systems, and an introduction to chaos (3rd edition)}.  New York: Academic Press.

\bibitem{HvZ} Humans vs. Zombies game official site. \href{https://humansvszombies.org/}{https://humansvszombies.org/}.. Accessed 3 September 2018.
 
 
\bibitem{Kaurov2014} Kaurov, V. 2014. Modeling a pandemic like Ebola with the Wolfram Language. {\it Wolfram}.  
\href{http://blog.wolfram.com/2014/11/04/modeling-a-pandemic-like-ebola-with-the-wolfram-language}{http://blog.wolfram.com/2014/11/04/modeling-a-pandemic-like-ebola-with-the-wolfram-language}. Accessed 3 September 2018.

\bibitem{Munz2009} Munz, P., O.~Hudea, J.~Imad, and R.~J.~Smith. 2009.  When zombies attack!: mathematical modelling of an outbreak of zombie infection. {\it Infectious disease modelling research progress}. 133--150. Downloadable at \href{http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.159.6699}{http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.159.6699}. Accessed 3 September 2018.

\end{thebibliography}

\teacher{
\section*{NOTES FOR TEACHERS}

This activity is designed for an introductory differential equations course. It can used as an individual assignment or group project later in the course. A standard SIR model may be introduced in class prior to this module, or given to students to explore on their own. 

The {\bf HvZ} game is widely played on college campuses, and thus stimulates students' interests. Various models can be set up based on different assumptions (or rules). One student group in my class used data from previous {\bf HvZ} games -- this can be left for students to decide. Different interactions between populations can lead to different outcomes of the game.

\subsection*{Partial Solutions Offered:}
\begin{enumerate}
\item[] 5(a) $S(0) = 299, Z(0) = 1, R(0) = 0$.
\item[] 5(b) $\beta=0.005$: after 7 days, $S=36, Z=183, R=81$. Zombies won.
\item[] 5(c) $\beta=0.006$: after 7 days, $S=5, Z=220, R=75$. Zombies won.
\item[] \qquad $\beta=0.004$: after 7 days, $S=147, Z=94, R=59$. Humans won.
\end{enumerate}

\begin{figure}
\includegraphics[width=4in]{SZR2_soln1}
\centering
\caption{SZR model solutions for $\beta=0.005$.}
\end{figure}

\begin{figure}
\includegraphics[width=4in]{SZR2_soln2}
\centering
\caption{SZR model solutions for $\beta=0.006$.}
\end{figure}

\begin{figure}
\includegraphics[width=4in]{SZR2_soln3}
\centering
\caption{SZR model solutions for $\beta=0.004$.}
\end{figure}
%\begin{thebibliography}{99}
%\end{thebibliography}
}


\end{document}
