Monday, April 21, 2008

The juice problem

For quite some time, I was trying to solve the following problem -
You have a party coming and you have ordered 1000 bottles of juice. The party is about to start in one hour and suddenly you come to know that one of the bottles is poisonous - the person who drinks it would die exactly in one hour (without showing any symptoms, just suddenly drop dead!).
Now, you don't want to ruin your party, but you certainly don't want your guests to die. Hence, you get 1o guinea pigs(Assume they behave exactly as humans once given juice). Your aim is to find the bottle which contains the poison.
I spent a lot of time to solve this one. Lets see how long does it take for you. :)

Will put solution in the comments section....

Labels:

2 Comments:

Blogger Abhigyan said...

Don't be too impatient!!! Think about this first and then seek the answer..

April 22, 2008 12:11 AM  
Blogger Abhigyan said...

Mark all bottles from 0 to 1000. Now, convert all these to binary i.e. 0 would be 0000000000 and 1000 would be 1111101000. Take guinea pigs and mark them 1 to 10.
Now we are ready to go, take small quantity from all the bottles which have their first digit as 1, mix it and make guinea pig 1 to drink it. Similarly, second guinea pig will take small quantity from all the bottles which have 1 in their 2nd digit and so on...
After one hour, monitor all guinea pigs and write a zero if they survived and a one if they died. You will now have written down the bottle no.!!!

April 25, 2008 10:42 PM  

Post a Comment

<< Home