Question: on python 2 A discrete-time predator-prey model can be described by the following system of difference equations: Xk+1 = axk bxkYk Yk+1 = cyk +

 on python 2 A discrete-time predator-prey model can be described by

on python 2

A discrete-time predator-prey model can be described by the following system of difference equations: Xk+1 = axk bxkYk Yk+1 = cyk + dxkYk In which x_{k+1}, y_{k+1} denote the prey and predator population at generation k+1 respectively, and a,b,c and d are positive constants. 1 - Write a recursive function that given initial values, x0 and yo, constants a,b,c,d and a specified number of generations n, returns the population size at the nth generation. 2- Use your function to calculate the populations sizes for the values specified below, up to 100th generation: a = 1.0 6, b = 0.007, C= 0.85, d= 0.003, x0=100 and yo=10 and store the values for each Xn and Yn in an array (i.e. X=(x0, x1, ... , xn],Y=[ye,y1, ... , xn]). 3 - Plot X vs Y. What is the predator population size when prey population is at 80? 4 - Plot values of X and Y vs number of generations 5 - Plot the combined population size (prey and predator) vs number of generations

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!