How many rabbits can you fit into a magic hat?
 


From Fibbonacci's Liber Abaci ("Book of Calculating"), one well known problem that first appeared in 1202 is:

How many pairs of rabbits will there be after a year if it is assumed that every month each pair produces one new pair, which begins to bear young two months after its own birth?

[Assuming that none die and the female always produces a male and a female.]





Why do the Fibonacci numbers appear in the rabbit problem?

    Let f(n) be the number of pairs of rabbits at the beginning of each month.  We know at the beginning of the first month there is only one pair, so
                                f(1) = 1

At the beginning of the second month, they are still too young to reproduce, so

                               f(2) = 1

At the beginning of the third month, the original pair produces their first pair, so

                               f(3) = 2

There will always be the number of rabbits from the previous month [ f(n -1) ] plus the number of new pairs of rabbits born.  This number is determined by the number of rabbits able to produce.  The rabbits must be at least two months old in order to produce and only produce one pair.  The number of new pairs born is equal to f(n - 2).

Therefore the rabbit population is equal to

                               f(n) = f(n - 1) + f(n - 2) when n > 2

which is the definition of the Fibonacci numbers.


HOME