\documentclass{article}

\newenvironment{problem}[1]{\begin{framed}\noindent{\bf\LARGE #1}\\*[1em]}{\end{framed}}
\newenvironment{subproblem}[1]{\begin{framed}\noindent{\bf(#1)} }{\end{framed}}
\newenvironment{solution}{}{}
\newcommand{\firstsub}[1][a]{${}$\\\noindent{\bf(#1)} }

\usepackage{fullpage}
\usepackage{framed}
\usepackage{amsmath}
\usepackage{color}

\begin{document}

\title{Math 142-2, Project 3}
\author{Both partners' names here}
\date{}
\maketitle

\begin{problem}{Problem 1}
  In Project 2, we constructed a model for the change in a single gene in a
  population over time.  If the gene has two variants, $r$ and $R$, then three
  distinct types of individuals may exist in the population: $RR$, $Rr$, and
  $rr$.  $A(t)$ is the number of individuals with genotype $RR$. $B(t)$ is the
  number of individuals with genotype $Rr$. $C(t)$ is the number of individuals
  with genotype $rr$.  The model is then
  \begin{align*}
    \frac{dA}{dt} &= \frac{(A+B/2)^2}{A + B + C} (m - n (A + B + C)) - a A \\
    \frac{dB}{dt} &= \frac{2 (C + B/2) (A + B/2)}{A + B + C} (m - n (A + B + C)) - b B \\
    \frac{dC}{dt} &= \frac{(C+B/2)^2}{A + B + C} (m - n (A + B + C)) - c C
  \end{align*}
  To analyze this model, we will use a computer to numerically approximate the
  solution to this system of ODE's.  Use fourth order Runge-Kutta to approximate
  the ODE.  You may use any programming language you like.  Use this
  implementation to explore the following by running simulations with a variety
  of initial conditions and parameters.  In each case below, determine what
  affect the parameters have on the long term behavior of the population.  Does
  the fraction of $R$ allele, $g(t) = \frac{A(t) + B(t)/2}{A(t) + B(t) + C(t)}$,
  change over time?  Does it approach some fixed value (such as $0$ ($R$ dies
  off), $\frac{1}{2}$ (equality), or $1$ ($r$ dies off))?  How does this depend
  on the initial populations?  For each problem, turn in plots for at least four
  sets of parameters and initial conditons which together tell a convincing
  story of what the population is doing.  In each plot, show $A(t)$, $B(t)$, and
  $C(t)$ over time.
  \firstsub[a] $a = b = c$.
  \firstsub[b] $a = c$ but $b < a$.  (heterozygote advantage).
  \firstsub[c] $a = c$ but $b > a$.  (heterozygote disadvantage).
  \firstsub[d] $a = b$ but $c < a$.  ($rr$ offers some advantage).
  \firstsub[e] $a = b$ but $c > a$.  ($rr$ offers some disadvantage).
  \firstsub[f] $c > a > b$.  This can occur with recessive traits, where the
  recessive trait $rr$ is harmful, but yet the trait offers heterozygote
  advantage.  How do the results differ qualitatively from those of case (e)?
\end{problem}

\begin{solution}
  \textbf{\textcolor{red}{Your solution goes here}}
\end{solution}

\begin{problem}{Problem 2}
  Sickle-cell and Cystic fibrosis are two fairly common genetic diseases.  Both
  are recessive and, without significant medical intervention, both are
  effectively fatal.  Sickle-cell is known to confer heterozygote advantage
  (such individuals fare better when infected with malaria).  Cystic fibrosis
  has no known heterozygote advantage.  Yet even though no such advantage has
  been found, it is nevertheless hypothesized that such an advantage must exist.
  Why?
\end{problem}

\begin{solution}
  \textbf{\textcolor{red}{Your solution goes here}}
\end{solution}

\begin{problem}{Problem 3}
  The model proposed in these solutions has a major problem when the population
  is over its carrying capacity and one of the populations is zero.  What is
  this problem?  Suggest a modification to the model that would correct this.
\end{problem}

\begin{solution}
  \textbf{\textcolor{red}{Your solution goes here}}
\end{solution}

\end{document}
