Growth Algorythm

I want to know the population of my herd of cattle after time T years.

I'm starting with one cow.

And I'm going to be using the following information:
Cows can't makes babies until their third year at which time they produce one baby a year.
After their 3rd baby they are sold (at the end of their fifth year).
Now cows have a 50/50 chance of producing a baby bull or cow.
But I'll make it simple by saying we have a reoccurring pattern of boy, girl, boy, girl (starting with boy).

I'm just going to stop there because that gives a good idea of what the algorithm consists of.

As i said in the beginning I want to know the population of the herd at time T.
But I actually want more of a demography, meaning "how many boys do we have and how old are they?", "how many females do we have and how old are they?" etc... So like a report.

So my question is how easy would it be to make a program to solve this?
If it is doable would you be willing to help me? Then I can post all the needed information.
(Its for my cow investment I've been thinking about)
Thanks :D

Topic archived. No new replies allowed.