#OK to post Homework #Jeton Hida, September 6, 2021, Assignment 1 #Number 1 #Only 1 year old, 2 year old, and 3 year old females can have children #The prob that 1 y.o. female has children is p1 #The prob that 2 y.o. female has children is p2 #The prob that 3 y.o. female has children is p3 #Assume only females of this species are born #R(n) is the number of females born at year n #R(0)=c0, R(1)=c1, R(2)=c2 #R(n,p1,p2,p3,c0,c1,c2) is the expected number of females born at year n #R(n)=p1*R(n-1)+p2*R(n-2)+p3*R(n-3) RECURRENCE RELATION #R(3)=p1*R(2)+p2*R(1)+p3*R(0) =p1*c2+p2*c1+p3*c0 #R(4)=p1*R(3)+p2*R(2)+p3*R(0) =p1*(p1*c2+p2*c1+p3*c0)+p2*c2+p3*c1 #Number 2 F := proc(n, p1, p2, p3, c0, c1, c2) option remember; if n = 0 then c0; elif n = 1 then c1; elif n = 2 then c2; else p1*F(n - 1, p1, p2, p3, c0, c1, c2) + p2*F(n - 2, p1, p2, p3, c0, c1, c2) + p3*F(n - 3, p1, p2, p3, c0, c1, c2); end if; end proc; seq(F(n, p1, p2, p3, c0, c1, c2), n = 4); p1 (c0 p3 + c1 p2 + c2 p1) + p2 c2 + p3 c1 #Number 3 #c0=c1=c2=1 n=1000 #i. Extinction F(1000, 0.12, 0.12, 0.01, 1, 1, 1); -354 2.266843675 10 F(1000, 0.25, 0.25, 0.25, 1, 1, 1); -61 1.095771968 10 #Extinction is reached when p1+p2+p3 < 1 #ii. Stable Population F(1000, 0.25, 0.25, 0.5, 1, 1, 1); 1.000000000 F(1000, 0.01, 0.55, 0.44, 1, 1, 1); 1.000000000 #A stable population is reached when p1+p2+p3=1 #iii. Population Explosion F(1000, 0.55, 0.45, 0.6, 1, 1, 1); 104 6.719690806 10 F(1000, 0.50, 0.50, 0.01, 1, 1, 1); 707.3273879 F(1000, 0.5, 0.5, 0.10, 1, 1, 1); 25 2.775908316 10 #A population explosion is achieved when p1+p2+p3 > 1