|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re^3: Rabbitsby zejames (Hermit) |
| on Nov 29, 2004 at 09:14 UTC ( [id://410928]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
Let's assume that each couple of rabbits give birth to two baby rabbits. Let's count the number of couple of rabbits. At the beginning, we've 1 couple of young rabbit F_1 = 1Next year, they'll be adult rabbits, but won't have children yet : F_2 = 1On the third year, they'll a two baby rabbits, that is one couple F_3 = 2On the forth year, the first parent will have two baby rabbits again, but young rabbits won't be old enough to do so F_3 = 2 + 1 = 3On the fifth year, we've got two couples that can have little rabbits and one that cannot : F_3 = 3 + 2 = 5and so on... Each year, the number of couple is :
To conclude : F_n = F_{n-1} - F{n-2}Funny, isn't it ? Ok, that is not very realistic and very accurante, but who cares ? ;) -- zejames
In Section
Obfuscated Code
|
|
||||||||||||||||||||||||||||||