About Me

My photo
Northglenn, Colorado, United States
I'm primarily a BI Developer on the Microsoft stack. I do sometimes touch upon other Microsoft stacks ( web development, application development, and sql server development).

Monday, June 26, 2006

Riddle: CRIMINAL CUPBEARERS

Source: http://www.ocf.berkeley.edu/~wwu/riddles/hard.shtml

An evil king has 1000 bottles of wine. A neighboring queen plots to kill the bad king, and sends a servant to poison the wine. The king's guards catch the servant after he has only poisoned one bottle. The guards don't know which bottle was poisoned, but they do know that the poison is so potent that even if it was diluted 1,000,000 times, it would still be fatal. Furthermore, the effects of the poison take one month to surface. The king decides he will get some of his prisoners in his vast dungeons to drink the wine. Rather than using 1000 prisoners each assigned to a particular bottle, this king knows that he needs to murder no more than 10 prisoners to figure out what bottle is poisoned, and will still be able to drink the rest of the wine in 5 weeks time. How does he pull this off?


First thing I noticed was that 2^10 is approx 1000 and saw that this dealt with some sort of binary solution. I then broke the question down into a smaller one. Dealing with 8 bottles of wine and 3 prisioners, assuming that the 2^10 has something to do with the solution.

So, I came up with this basic solution:

Bottle 1: Prisoner 1 drinks
Bottle 2: Prisoner 2 drinks
Bottle 3: Prisoner 3 drinks

Bottle 4: Prisoner 1 & 2 drinks
Bottle 5: Prisoner 1 & 3 drinks
Bottle 6: Prisoner 2 & 3 drinks

Bottle 7: Prisoner 1 & 2 & 3 drinks

Bottle 8: No one drinks.

So for example if prisoner 1 & 3 dies, then you know it must be bottle 5 that was poisoned.

I guess this could be looked at as some type of Venn diagram, and/or combinatorics. I don't know if this solution would work for 1000 bottles and 10 prisoners.

No comments: