20-CS-110-001 Introduction to Computer Science Fall 2010

Solution to Binary Numbers Puzzle

    Line the bottles up in a single row. Assign 10 binary digits to each - the first bottle gets assigned 0000000001, the second gets assigned 0000000010, the third 0000000011, the fourth 0000000100 and so on up to the 1000th which gets assigned 1111101000. Now acquire 10 vials and number them from 1 to 10. For each bottle of beer do the following: if the leftmost digit of its assigned number is 1, put a small amount of its contents into vial 1, otherwise do not; if the next digit is 1 put a small amount of its contents into vial 2, otherwise not; continue until reaching the rightmost digit - if it is 1 put a small amount of its contents into vial 10, otherwise not. Now dip a litmus strip into each vial. Some strips will indicate poison. The pattern of vials indicating such will match the pattern of one of the bottles. That will be the bottle that contains the poison.