Rabbit Puzzle
There is a closed room where we left a rabbit. That rabbit has a unique property. It starts giving birth after 2nd month of its own birth (start of third month), and after that it gives birth in every month. It delivers a single rabbit in each time. And these descendant rabbits inherit the same property.
Let's assume that the room is large enough to hold infinite number of rabbits, and there is enough food, water etc. in the room for infinite number of rabbits. How many rabbits will be there in the room after n months?
-Pradeep
Let's assume that the room is large enough to hold infinite number of rabbits, and there is enough food, water etc. in the room for infinite number of rabbits. How many rabbits will be there in the room after n months?
-Pradeep
Replies
-
shalini_goel14Sorry , it will be sum of following series
(n-1) + (n-1)(n-2) +(n-1)(n-2)(n-3)+... [(n-1)(n-2)..{n-(n-1)}] -
pradeep_agrawalI edited the post to make question more clear.
-Pradeep -
Anil Jain
I have not calculated till now... but certainly this is not the asnwer..shalini_goel14Sorry , it will be sum of following series
(n-1) + (n-1)(n-2) +(n-1)(n-2)(n-3)+... [(n-1)(n-2)..{n-(n-1)}]
Consider n= 1
As per your expression, value would be 0
However 1 rabit should be the value....
-CB -
shalini_goel14
No each rabbit can give birth only in second month so for 1 month[i.e n=1] there will be 0 rabbit.crazyboyI have not calculated till now... but certainly this is not the asnwer..
Consider n= 1
As per your expression, value would be 0
However 1 rabit should be the value....
-CB
PS: Correct me if wrong. -
pradeep_agrawal
Yep, you are wrong here. Even in the first month we have 1 rabbit (the unique rabbit who starts the chain) ๐shalini_goel14No each rabbit can give birth only in second month so for 1 month[i.e n=1] there will be 0 rabbit.
PS: Correct me if wrong.
And a rabbit can give birth after second month (i.e., start of third month). This is the clarification i have done by editing the puzzle.
-Pradeep -
shalini_goel14
Ok, I got it , it is wrong. Will post later the correct answer. ๐pradeep_agrawalYep, you are wrong here. Even in the first month we have 1 rabbit (the unique rabbit who starts the chain) ๐
And a rabbit can give birth after second month (i.e., start of third month). This is the clarification i have done by editing the puzzle.
-Pradeep
Bye ! Keep on trying ๐
PS: "Hurry makes curry" -how true ๐ก -
RajdeepCEAfter n days the number of rabits will be n[sup]th[/sup] fibonacci number. Here is explanation,
1st month = 1 rabit,
2nd month = 1 rabit,(1st rabit cant give birth now)
3rd month = 2 rabit,(1st rabit starts giving birth)
4th month = 3 rabit,(1st rabit gives birth to another)
5th month = 5 rabit,(both rabit start giving birth)
So the answer will be nth element of fibonacci series.
-
Anil JainAnd what would be n^th element ?? Thats what he is looking for.. ๐
-
RajdeepCEI mentioned that in my posts first and last line. And again after n months the number of rabits will be the n[sup]th[/sup] fibonacci number. And the equation of fibonacci series is,
f(n)=f(n-1)+f(n-2), n=2,3,4,... & f(n-1)=f(n-2)=1. -
pradeep_agrawal
Yes that the correct answer that the number of rabbits on nth day will be the nth element of the fibonacci series.RajdeepCESo the answer will be nth element of fibonacci series.
I feel you mean to say "f(1)=f(2)=1" instead of "f(n-1)=f(n-2)=1".RajdeepCEAnd the equation of fibonacci series is,
f(n)=f(n-1)+f(n-2), n=2,3,4,... & f(n-1)=f(n-2)=1.
My next query, is there any simple equation through which i can directly calculate the number of rabbits on nth day (i.e., nth element of fibonacci series) instead of going by formula
f(n)=f(n-1)+f(n-2), f(1)=f(2)=1.
-Pradeep -
silverscorpionOk. That's easy.
The formula for the N[sup]th[/sup] fibonacci number is,
{[(1+sqrt(5))/2][sup]n[/sup] - [(1-sqrt(5))/2][sup]n[/sup]} / sqrt(5)
ie.,
(1+sqrt(5))/2 is nothing but the golden ratio, 1.68. We can call it phi.
So, Nth fibonacci number is,
{phi[sup]n[/sup] - 1/phi[sup]n[/sup]} / sqrt(5);
Am I correct?? -
pradeep_agrawalsilverscorpion, not sure how you derived the formula. I tried with different value of n and i am not getting correct answers, e.g.,
For n = 1, answer = 0.485
For n = 2, answer = 1.103
For n = 3, answer = 2.026
For n = 4, answer = 3.506
For n = 5, answer = 5.951
For n = 6, answer = 10.034
I am even not sure if a equation for fibonacci series exist.
-Pradeep -
silverscorpionWell, this formula exists and is quite right too. The thing is, you have to round off the answers.
And sorry, I gave the value of phi to be 1.68. It's actually, 1.618.
And another thing I forgot to mention is that, the power should actually be n+1. ie, for getting nth fibonacci number, we have to use phi[sup]n+1[/sup].
So, let's calculate.
For 1, we have
(phi[sup]2[/sup] - 1/phi[sup]2[/sup]) / sqrt(5)
= (1.618[sup]2[/sup] - 0.618[sup]2[/sup]) / sqrt(5) = 1.0
For 2, we have
(phi[sup]3[/sup] - 1/phi[sup]3[/sup]) / sqrt(5)
= (1.618[sup]3[/sup] - 0.618[sup]3[/sup]) / sqrt(5) = 2.0
Try it for other numbers too. It will work. Let me know if you got it!! ๐๐ -
pradeep_agrawalThat's cool silverscorpion, this works ๐
-Pradeep -
silverscorpionI said it would!!
Happy?? ๐๐ -
mech_guyHi,
Fibonacci series sum was cool indeed. I got it other way round and my answer is:-
if n >= 3 Total no. of rabbits = 2 + [(n-2)*(n-3)/2]
if n = 1 Total no. of rabbits = 1
if n = 2 Total no. of rabbits = 2
I made following sequence :-
Months:- 1__2__3__4__5__6__7__8__9 ..............
Rabbits:- _1__1__1__1__1__1__1__1__1
__________________1__1__1__1__1__1
_____________________1__1__1__1__1
________________________1__1__1__1
___________________________1__1__1
______________________________1__1
_________________________________1
----------------------------------------
Total rabbits after n months:- 1 + 1 + (1 +2 + 3 + 4 + 5 + 6 + 7 + ....(n-2) terms)
= 2 + SIGMA(n on (n-2) terms)
= 2 + [(n-2)*(n-3)/2] => assuming n>=3 else total = 1 for n = 1 and total = 2 for n = 2
Thanks
PS: my first post, didnt knw how to properly type, so using lots of underscores, hope its comprehendible. -
pradeep_agrawalThat was also a good try mech_guy. But the formula that you have given works correctly till n = 6. When we have n = 7:
Total no. of rabbits = 2 + [(7-2)*(7-3)/2]
= 2 + [5*4/2]
= 2 + 10
= 12
But the actual answer is for n = 7 should be 13.
- Pradeep -
mech_guyHi Pradeep,
Formula for SIGMA (1 + 2 + 3....+ n) should be = n*(n+1)/2 while i did calculation for n*(n-1)/2 and that is why got wrong Total.
So total should be 2 + [(n-2)*(n-1)/2]
For n = 7, total number of rabbits after 7 months = 17 (how 13?)
Regards -
silverscorpionThis is not correct. Using this formula, you get the series,
1, 2, 3, 5, 8, 12, 17, 23, 30,...
This is not fibonacci series. -
mech_guyHi SilverScorpion,
Agreed its not a Fibonacci series.
And yes my solution is wrong, i messed it up after 6 month onwards. It was a bad try.
Regards -
silverscorpionmech_guyHi SilverScorpion,
Agreed its not a Fibonacci series.
And yes my solution is wrong, i messed it up after 6 month onwards. It was a bad try.
Regards
You tried!! That is great in itself!!
And now you know the answer! So, enjoy!๐
You are reading an archived discussion.
Related Posts
Hello everyone, i am a new one,i found this from the google search,wow this site looks beautiful.lol....i will be happy with you, BTW I run my own site which is...
hi friends...i am crazy mechanical and automation engineer from delhi,INDIA. Now i am going to join you all the worlds brilliant engineers and hope you all guide me, help me...
hello.. to all crazy brilliant engineers,,
can you simply diff b/t dtsi and mpfi engine tech.
I am student of MBA from Times Business school,and want to say all the friends Who wants to choose own career in MBA or BBA,participate the entrane exam conducted by...
Dear CEIANS
I am B. TECH. (CIVIL) want to do M.Arch. ,
i want to know is there any institution in INDIA, Where i can apply for the same.
thanks...