Poison

From Math Puzzle Wiki
Revision as of 07:35, 22 October 2010 by Zerrakhi (talk | contribs)
Jump to navigation Jump to search

A nice number theory puzzle based on one I heard on Car Talk.

Puzzle

In the secret lab of a mad scientist, you find thirteen vials of liquid. One of the vials contains a deadly poison that will kill you instantly. If you drink all of the other twelve vials, you will gain a pleasant variety of super-powers. Luckily, there are some petri dishes which will, in one hour, determine if any poison has been placed in them. Unluckily, there are only four to use, and you only have one hour before the mad scientist returns. How can you determine which of the thirteen vials you should definitely not drink?

Help

Hint
You could actually find the poisoned vial even if you have up to sixteen vials total. For seventeen vials, you would need an extra petri dish.
Solution
Allocate a number to each liquid (zero, one, two, three, etc).

Now let each dish represent a particular position in a four-digit binary number (so one dish represents the "eights" position, one dish represents the "fours" position, etc).

Place a particular liquid in a particular dish only if the number of that liquid, written in binary, has a "1" in the position represented by that dish.

Then read the results from the four dishes as a binary number, which will be the number of the liquid that is the poison.

References

Car Talk Puzzler - sometimes automotive, sometimes more math/logic based.