Combinatorics exercises

124 Views Asked by At

So this is the question :

"Frogs and storks are grazing on the edge of a pond. The following happens every minute. In the first half of the minute every frog that was there at the beginning of this minute attracts three new frogs and one new stork. In the second half of the minute every stork eats one frog. At the beginning there were two frogs and one stork on the edge of a pond. How many frogs and storks are there after twenty minutes?"

I have the "formulas" for both parts of the minute:

First 30s : F = 4*F and S = F + S

Second 30s : F = F - S and S = S

I just can't seem to generelize this. Also when I did the calculation for every 30s The number of frogs that I start the previous minute is the same with the one of storks the current minute. Thanks in prior.

2

There are 2 best solutions below

3
On BEST ANSWER

You should define $F(n)$ as the number of frogs at the start of the $n^{th}$ minute and $S(n)$ as the number of storks at the start of the $n^{th}$ minute. We are given $F(0)=2,S(0)=1$. Now write a recurrence for $F(n+1)$ in terms of $F(n),S(n)$ and similarly for $S(n+1)$. You have $S(n+1)=S(n)+F(n)$. What is $F(n+1)?$

1
On

$$F_{k+\frac12}=4F_k, S_{k+\frac12}=F_k+S_k$$

$$F_{k+1}=F_{k+\frac12}-S_{k+\frac12}, S_{k+1}=S_{k+\frac12}$$

Hence,

\begin{align} F_{k+1} &=4F_k - (F_k+S_k) \\ &= 3F_k - S_k\\ S_{k+1}&=F_k + S_k \end{align}

Hence it is just a linear recurerrence problem. $$\begin{bmatrix} F_{k+1} \\ S_{k+1} \end{bmatrix} = \begin{bmatrix} 3 & -1\\ 1 & 1 \end{bmatrix}\begin{bmatrix} F_{k} \\ S_{k} \end{bmatrix}$$