Wednesday, 19 September 2012

Minimum no. of rats needed for finding poison in bottle....google puzzle


Question:
There are 8 bottles, one has poison. What's the minimum number of rats you need to find the poison bottle in time T, and how? (You get the rats you need all at once, feed them all at the same time, and poison kills them after time T.)


Solution:

representation in binary numbers
1-0001
2-0010
3-0011
4-0100
5-0101
6-0110
7-0111
8-1000
so , now if we take 4 rats , and suppose 0 represents that the rat does not drink from that bottle and 1 means the rat drinks from that bottle.
so solution 1 is fed to the 4th rat only , solutin 2 is fed only to the 3rd rat , soln 3 is fed to the 3rd and 4th rat .. so on , at the end , we can make out which one has poison , seeing which rat dies/rats die .....



POST YOUR OPINION IF YOU HAVE BETTER SOLUTION


2 comments:

  1. Dude srsly??
    Represent the poisons in 3 digit binary.
    You need 3 rats only. Bottles b1, b2, ....b8. Rats, rat1, rat2, rat3
    feed the Mixture of b1,b3,b5,b7 to rat1
    Feed the mixture of b1,b2,b5,b6 to rat2
    Feed the mixture of b1,b2,b3,b4 to rat3
    If rat1 dies r1 =0 else r1=1, rat2 dies, r2 =0 else r2=1, rat3 dies r3 =0 else r3 =1
    Now we have
    r3 r2 r3 Poison bottle
    0 0 0 b1
    0 0 1 b2
    0 1 0 b3
    0 1 1 b4
    1 0 0 b5
    1 0 1 b6
    1 1 0 b7
    1 1 1 b8


    ReplyDelete
  2. hey that`s not the case u told...for eight bottles you have to consider 4 bits only not 3 bits...because to find poison in bottle...u have to give poison to atleast one rat,so your 0 0 0 b1 case is eliminated.I hope ur doubt is cleared.:)

    ReplyDelete

Your feedback is always appreciated.
I will try to reply to your queries as soon as time allows.
Please do not spam Spam comments will be deleted immediately upon our review.