This question is distinct from Exponential growth of cow populations in Minecraft in that an important constraint present in Minecraft is missing from that post. Here are the following constraints:
- We start with $2$ adult cows, and $0$ baby cows.
- Any given pair of adult cows can only be bred to form $1$ baby cow every $5$ minutes. (not included in the other post)
- A baby cow becomes an adult after $20$ minutes.
My first (failed) attempt at solving this was to intialise the following functions $A(0)=2, B(0)=0$, where $A$ and $B$ are funtions of $t$ (time, in minutes) representing the number of Adult and Baby cows respectively.
Naively, I represented this via a system of two linear differential equations given the above initial conditions:
$$\frac{dA}{dt}=\frac{B}{20}$$
$$\frac{dB}{dt}=\frac{A}{5}$$
Where my thought process was that every 20 minutes there would be an addition of $B$ adults, and every 5 minutes there would be an addition of $\frac{A}{2}$ baby cows. By use of linear algebra, it can be shown that the equations of $A$ and $B$ are as follows: $$A(t)=e^{-\frac{t}{10\sqrt{2}}}+e^{\frac{t}{10\sqrt{2}}}$$ $$B(t)=\frac{1}{\sqrt{2}}e^{\frac{-t}{10\sqrt{2}}}\left(e^{\frac{t}{5\sqrt{2}}}-1\right)$$ Where the total number of cows, call this $C(t)$ is some rounded form of $A(t)+B(t)$.
The problem with this: Given that at any given time, the 'age' of the babies within the pool will be different (non-uniform), the formation of adults will be staggered. This is the point I'm struggling to continue. I've tried to think of $B$ as forming subsequences every $5$ minutes, but I am really unsure how to implement this in any meaningful way.
So how can this formula be generated?
Edit: On second thoughts, this might be reducible to the post linked at the start. Not too sure though.
Edit 2: As pointed out in the comments by Daniel Mathias, this question is distinct from the linked post.
You are ignoring the granularity of five minute intervals. A way to incorporate that is to define $A(n),B(n),C(n),D(n),E(n)$ as the number of cows of age $0,5,10,15,\ge 20$ minutes at time $5n$ minutes. The starting condition is all $0$s except $E(0)=2$ unless the first cow is born at minute $0$. In that case $A(0)=1$. You have a set of recurrences $$A(n+1)=\frac 12E(n)\\ B(n+1)=A(n),C(n+1)=B(n),D(n+1)=C(n)\\ E(n+1)=E(n)+D(n)$$ You can write the current population as a vector and the recurrences as a matrix, find its eigenvalues, and find the growth rate from the greatest eigenvalue.