Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Predator and Prey Model We have a population of foxes (f) and rabbits (r). Each

ID: 3528546 • Letter: P

Question

Predator and Prey Model We have a population of foxes (f) and rabbits (r). Each year the two populations change. There are two factors for each population: the birthrate, and the death rate. The birthrates for both species is a constant, so the number of births depends on how many animals there are. The death rate for rabbits is from old age and being eaten by foxes. Death by old age is a fixed proportion of the rabbit population. The rate of being eaten by foxes depends on the number of encounters with foxes times a fixed rate of being captured during an encounter. The death rate for foxes is from old age and the number of rabbits (the food supply). If there are too few rabbits, then the number of foxes declines because there is not enough food. Biologists have observed that the change in populations from year to year are linked in the following way: Because of the use of the floor function (first introduced last term), the model always has the number of rabbits and foxes as whole numbers. Unlike models from calculus, we don't have any fractional rabbits or foxes running around. With = 0.04, =5E-4, =0.2 and =5E-5, and with the initial rabbit and fox population r[0] = 4292 f[0] = 10 then after one year we find that the number of rabbits = 4442 and the number of foxes = 11 . (a) After 108 years from the start, how many rabbits are there, according to this model? Enter an exact integer (without a decimal point). (b) After 108 years, how many foxes are there, according to this model? Enter an exact integer (without a decimal point). (c) Consider the population of foxes after 54 years and the population after 108 What is the ratio ? Enter a decimal number.

Explanation / Answer

THIS IS WHAT I HAVE BEEN DOING IN C++

IF THE FORMULAE ARE RIGHT, I AM GETTING THE FOLLOWING ANSWERS:

1) 226472 rabbits

2) 5 foxes

3) Ratio : 1

I dont know where I am going wrong...Get it verified by your teacher...and please let me know my mistake as well...I have already spent over 2 hours on your question!!!

C++ code follows:


#include <iostream>

#include <cstdlib>

#include <ctime>

#include <iomanip>

#include <math.h>

using namespace std;


int main()

{

int R = 4292;//Rabbit Start

int F = 10;//Fox Start

double a = 0.04;

double b = 0.0005;

double c = 0.2;

double d = 0.00005;

for(int counting = 0; counting < 108; counting ++)

{

R = R + int(R * (a-(b*F)));

F = F - int(F * (c-(d*F)));

}

cout << R << endl;

cout << F << endl;

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote