Question

Problem 2: Modeling inseet population dynamies The use of arrays and matrix algebra are ideal for modeling population dynamics of organisms. If n) is computed from represents the number of organisms at time t, then the number at a later time, t+1, can be n(t+1) An(t). The array (vector, n) consists of the nurnber of females in each age class, and the array (matrix, A), called a Leslie matrix, is the survival- replacement matrix. Multiplying the number of females in each age class at time t, by the survival-replacement matrix, gives the number of females in each age class at the next time step. We need only model the female population because they carry the entire reproductive potential for the population. Assume a female insect population consists of only 2 age classes, juveniles and adults. Assume that 60% ofjuveniles survive to become adults, and that each adult female produces 3 female Juveniles within a time step. The survival- replacement matrix is then: 0 0.6 Suppose also that there are 100 adults and 10 juveniles at the start (first generation) 100 10 n(1) Using the rules of matrix multiplication, and applying eq. 1, we can easily compute the numbers of females in each age class in the next generation. In this case, the number of new adults would be 0 x 100 +0.6 x 10- 6, and the number of new juveniles would be 3 x 100 +0 x 10-300. For the numbers in the next time step, matrix Λ would operate on the new numbers, 6 and 300 to give 180 and 18. You can see already that the population fluctuations are pretty wild. A few more steps would convince you that the general population level will continue to increase without bound. Write a program to compute insect populations through 20 (or more) generations. Create a plot which shows the population of adults, juveniles, and the total population for at least 20 generations. Here are some suggestions: n should be an array of the number of females, where row 1 is adults and row 2 is juveniles. Each column should contain the number of females for one generation. Youll need to initialize the first column of n (n(:,1) with the initial population values. lambda (A) is a 2 x 2 array for the survival-replacement matrix . Check a few values with hand calculations to be sure the program is doing what you expect it to. Once this is all working, try changing the values in the survival-replacement matrix so that, say, 40% survive, or there are only 2 juvenile females produced per adult female. (Make any changes you want- just something different than what I just described). Describe what happens to the population when you make those change. Hand your deseription and plots. Is the change what you would expect? Thanks ahead of time!!!
0 0
Add a comment Improve this question Transcribed image text
Answer #1

The program will be as follows:

import matplotlib.pyplot as plt
import numpy as np
# n is the number of generations we are running the simulation
n = 20
lamb = np.matrix([[0, 0.6], [3, 0]])

# Initial number of adults and juveniles
nT = np.matrix([100, 10]).T

# Set up the vectors for calculation and plotting
x = np.linspace(1, n, n)
y1 = np.zeros(n)
y2 = np.zeros(n)
y3 = np.zeros(n)

for i in range(0, n):
    # Set the number of adults
    y1[i] = nT[0]
    # Set the number of juveniles
    y2[i] = nT[1]
    # Add the previous cumulative total to the current generation
    # (if we aren't currently calculating the first generation itself)
    y3[i] = nT[0]+nT[1] + (y3[i-1] if i != 0 else 0)
    # Perform the matrix multiplication and store it as the new value of nT
    nT = lamb * nT

# Print a few test values
print("Number of adults in generation 2: " + str(y1[1]))
print("Number of juveniles in generation 2: " + str(y2[1]))
print("Number of adults in generation 3: " + str(y1[2]))
print("Number of juveniles in generation 3: " + str(y2[2]))

# Plot the different values
plt.plot(x, y1, label='Adults')
plt.plot(x, y2, label='Juveniles')
plt.plot(x, y3, label='Total Population')

# Show the legend
plt.legend()

# Show the plot
plt.show()



import matplotlib.pyplot as plt import numpy as np f n is the number of generations we are running the simulation n20 lamb= n

Graph:

_Adults Juveniles 175000 Total Population 150000 125000 100000 75000 50000 25000 2.5 5.0 7.5 10.0 12.5 15.0 17.5 20.0

Output:

Number of adults in generation 2: 6.0 Number of adults in generation 3: 180.0 Number of juveniles in generation 3: 18.0

Checking for accuracy of the program:

\begin{bmatrix} 0 & 0.6\\3 & 0 \end{bmatrix} \times \begin{bmatrix} 100\\10 \end{bmatrix} = \begin{bmatrix} 6\\300 \end{bmatrix}, which is correctly output by the program

\begin{bmatrix} 0 & 0.6\\3 & 0 \end{bmatrix} \times \begin{bmatrix} 6\\300 \end{bmatrix} = \begin{bmatrix} 180\\18 \end{bmatrix}, which is correctly output by the program

On changing the values in the lamb matrix from 0.6 to 0.4 and 3 to 2, we get a graph as follows:

_ Adults 1400 Juveniles Total Population 1200 1000 800 600 400 200 2.5 5.0 7.5 10.0 12.5 15.0 17.5 20.0

Note that the expected value of a "new" child in every generation = probability of survival * number of new offspring. If this is greater than 1, the population is expected to grow exponentially (as in the first graph). If this is less than 1, the population is expected to stagnate after some time (as in the second graph).

Let me know if there are any questions or queries!

Add a comment
Know the answer?
Add Answer to:
Thanks ahead of time!!! Problem 2: Modeling inseet population dynamies The use of arrays and matrix...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Leslie Matrix-Calc 2 Question 1) What is the fraction of one-year-olds present at time t that...

    Leslie Matrix-Calc 2 Question 1) What is the fraction of one-year-olds present at time t that survive to time t+1? 2)What is the average number of female offspring of a two-year-old female? Assume the given Leslie matrix L for a population of female birds. Determine the number of age classes in the population, the fraction of one-year-olds present at time t that survive to time t + 1, and the average number of female offspring of a two-year-old-female. 2 4...

  • 2. (Adapted from problem 9.9 in the text) A population of insects is divided into two...

    2. (Adapted from problem 9.9 in the text) A population of insects is divided into two stages. Females in the first stage produce 3 female offspring each, and 25 percent survive to the second stage. The females in the second stage produce 7 female offspring and then die. When a new female is born (from a female in either stage), it becomes first stage female. a (a) Write down a matrix model for these populations that determines how the pop-...

  • ANSWER THE FULL QUESTION PLEASE. Assume the given Leslie matrix L for a population of female...

    ANSWER THE FULL QUESTION PLEASE. Assume the given Leslie matrix L for a population of female birds. Determine the number of age classes in the population, the fraction of one-year-olds present at time t that survive to time t + 1, and the average number of female offspring of a two-year-old-female. 2 4 4 3 0.2 0 0 0 L = 0 0.3 00 0 0 0.7 0 Determine the number of age classes in the population. There are age...

  • 14. What is the difference between generation time and the rate of population growth? 15. When...

    14. What is the difference between generation time and the rate of population growth? 15. When using the logistic population growth model, what are the different causes of slow population growth at low population sizes versus high population sizes? 8. What are the patterns of survival with age in the three types of survivorship curves? 9. How would you describe the generation time of a population? 10. Given that white tailed deer give birth to fawns each spring, which population...

  • Recruits = 0, Juveniles = 21, Non-flowering adults = 77, Flowering adults = 44 1. Multiply...

    Recruits = 0, Juveniles = 21, Non-flowering adults = 77, Flowering adults = 44 1. Multiply the Projection Matrix found in Figure 4 by the Population Vector above to estimate the number of each size class for one year into the future. 2. Calculate the rate of total population growth (R). 3. Identify which classes increased, decreased, or stayed the same in size from the previous year to the projected year. Projection Matrix P. nigrispinus Pop. Vector (time t) Population...

  • Linear Algebra Project : Urban Population Dynamics This project is about population modeling and how linear...

    Linear Algebra Project : Urban Population Dynamics This project is about population modeling and how linear algebra tools may be used to study it. Population modeling is useful from different perpectives: 1, planners at the city, state, and national level who look at human populations and need forecasts of populations in order to do planning for future needs. These future needs include housing, schools, care for elderly, jobs, and utilities such as electricity, water and transportation. 2. businesses do population...

  • how to solve this 2 problem inator of a there will be two c ng partial...

    how to solve this 2 problem inator of a there will be two c ng partial 3x2- 23x+ 44d (2x1x 2)2 nto the One Let P represent the number of female a their chosen mate is not sterile. Then the female population is related to time t by ale insects in a population and S the number of sterile males introduced each be the per capita rate of production of femaies by females, provided give an equation relating the female...

  • Stochastic Population Growth Model Next, we are going to monitor the population growth of an asexually reproducing single-celled organism, centinia lincolni (pennies). This Centina population has a m...

    Stochastic Population Growth Model Next, we are going to monitor the population growth of an asexually reproducing single-celled organism, centinia lincolni (pennies). This Centina population has a mortality rate of 50% per year, but all individuals that survive the year divide to produce an additional individual. The very most basic growth model of a closed population is: N+ N-deaths births Rewritten to use rates instead of individuals, this equation becomes: N+ -N,S+N.BS where S is the probability of survival (0.5)...

  • linear algebra Another use of the transition matrix is in stochastic modeling. An example is the...

    linear algebra Another use of the transition matrix is in stochastic modeling. An example is the following: Imagine a park with three locations: a lake; a picnic area; and a playground. Every hour, on the hour, the parkgoers move according to the following rulcs: Half of those at the lake move to the picnic area, and one-quarter of those at the lake move to the playground. Half of those at the picnic area go to the lake, and the other...

  • Simulate the following population system: There are 100 mitochondrial DNA (mDNA) groups, each with 100 members,...

    Simulate the following population system: There are 100 mitochondrial DNA (mDNA) groups, each with 100 members, 50 male and 50 Write a program to simulate population growth, tracking the sizes of mDNA groups. To simplify, assume the members of the population marry at random and that they have children in distinct generations. For each generation, marry males and females picked at random, and assign each family 0, 1, 2, or 3 children, each randomly male or female, P(male) Plfemale).5, and...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT