Friday, February 15, 2008

Identify the poisoned wine

CAN YOU SOLVE THIS PUZZLE?

A king has 1000 bottles of wine. An assasin tried to poison the wine. The king's guards caught the assasin after he poisoned only one bottle, but they did not know which bottle was poisoned.

It is known however that the poison is so powerful that even a tiny bit of the poisoned wine will kill, and it is known also that the poison will only kill after 24 hours. The king order you, his advisor, to get some of the criminals in the dungeon to test the wines for him. The king expects to find out the result the next day, essentially 24 hours after the testers drink the wine.

Now the simplest way is if 1000 criminals were available, just get them to each drink a little bit from each of the 1000 bottles. Hence, the poisoned bottle will be identified when one particular tester, out of the thousand testers, dies the following day. However, only 10 criminals is imprisoned in the dungeon on that particular day!

Is there a way to identify the poisoned bottle by the following day using only 10 testers? What is the method?"

12 comments:

  1. yup, in fact it would be possible even with 1024 bottles of wine...

    ReplyDelete
  2. The bottle which was opened is obviously the bottle that was poisoned, right ? :)

    Okay. This is a binary question, gentlemen.

    ReplyDelete
  3. intersection of 3 x-y-z planes

    ReplyDelete
  4. damn. my xyz plane solution requires 30 prisoners.

    sorry sorry. :)

    suspect that it's probably something 2^10 stuff. but it's beyond me. boohoo. boohoo.

    ReplyDelete
  5. final attempt. should be correct already.

    label the wine in binary.

    arrange the prisoners to be the place holder for binary and drink if it's 1 in that place holder.

    e.g.

    wine number 109 is 1101101 in binary

    so if only prisoner A,B,D,E,G dies then 109 is poisonous.

    ..not very elegant way of explaining....but it works!

    ReplyDelete
  6. eng's reply at 12.41 is correct. the explanation is quite clear.

    ReplyDelete
  7. What about dividing the 1000 bottles to 10 lots of 100 bottles each, then ask each tester to taste 100 bottles each. This will shortlist the suspect poison to 100 bottles, with 9 testers left.

    Then divide the 100 bottles to 9 lots with 8 lots of 11 bottles each and the 9th lot of 12. Repeat the testing and this will shortlist the poison to at most 12 bottles, leaving 8 testers.

    Continue the process and as a bonus, there should be at least 5 testers still alive.

    Can or not, Mr Tan?

    ReplyDelete
  8. The correct answer is the one described by eng.

    ReplyDelete
  9. From a layman perspective, we can think of each person representing 2 atates, either dead or alive. Thus 10 people can represent 10^2 = 1,024 states. Using the binary system proposed by eng, each person can represent a placement from the least significant bit the most significant bit. So once we find out the poisoned wine, we lay all the bodies out and use it to decode each bottle is poisoned. e.g. 1010101010 means bottle 682.

    Next puzzle. Three colleagues came together and managed to find out their average salary without knowing each other's salary. How did they know how to do it?

    HK

    ReplyDelete
  10. Ask each other. Ha ha ha!

    ReplyDelete
  11. I was thinking something more along the line of the amazing numbers! But that would take some reverse engineering. The binary solution is cleaner.

    ReplyDelete
  12. I had this question today in an interview in Dublin for a job as software engineer. In my case there was only 8 bottles of wine. Now that I know the solution it seems so obvious but today it wasn't so easy...

    ReplyDelete