Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 generationsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started