Adhere to the Code of Academic Integrity.
You may discuss background issues and general strategies
with others and seek help from course staﬀ, but the implementations that you submit must be your own.
In particular, you may discuss general ideas with others but you may not work out the detailed solutions
with others. It is never OK for you to see or hear another student’s code and it is never OK to copy code
from published/Internet sources. If you feel that you cannot complete the assignment on your own, seek
help from the course staﬀ.
When submitting your assignment, follow the instructions summarized in Section 4 of this document.
Do not use the
break
or
return
statement in any homework or test in CS1132.
1
Population Dynamics
(The following description is taken from Chapter 8.1 of ”Mathematical Models in Population Biology and
Epidemiology” by Brauer and CatilloChavez, 2001.)
Consider a population that is divided into a ﬁnite number of age classes labeled from 0 to
m
. One method
of describing the number of members in each age class as a function of time is by using a
linear discretetime
model
for population growth. In such a model, we let
α
j,n
denote the number of members in the
j
’th class
at the
n
’th time. We assume that the length of time spent in each age class is the same. Then
α
j,n
+1
,
the number of members in the
j
’th age class at the (
n
+ 1)st time, is equal to
α
j

1
,n
minus the number of
members of this age cohort who die before entering the next age class. We assume that the probability of
survival from one age class to the next depends only on age. Let
p
j
be the probability that a member of the
j
’th age class survives until the (
j
+ 1)st age class.
All new members recruited into the population are assumed to come from a birth process, with fecundity
depending only on age. Assume that there are constants
β
0
,β
1
,...,β
m
such that
α
0
,n
+1
=
β
0
α
0
,n
+
β
1
α
1
,n
+
···
+
β
m
α
m,n
.
If we deﬁne
~α
n
=
α
0
,n
α
1
,n
.
.
.
α
m,n
and deﬁne the
Leslie matrix
to be
A
=
β
0
β
1
β
2
... β
m

1
β
m
p
0
0
0
...
0
0
0
p
1
0
...
0
0
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
0
0
0
... p
m

1
0
then the change in the population through time can be described by the vector diﬀerence equation
~α
n
+1
=
A~α
n
. In the above equation,
A~α
n
is the multiplication of a matrix and a vector, which results in a vector. This
operation will be explained below. Let
P
n
be equal to the total population at time
n
. Then the vector
~α
n
P
n
gives the fraction of the population in each age class at time
n
.
1