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

Solution to Morning Pills Puzzle

    Take one more A pill and put it in your hand. You now have two of each. Then cut each of the pills in half, and put one half in one pile and the other half in a second pile. Then each pile will contain a total of one A and one B pill - take one pile, and then save the next pile for tomorrow.

   Start:  AA     BB     BB
           | \    | \    | \
           |  \___|__\___|__\___ A B B____
           \______\______\______ A B B__  \
                                        \ |
   New Pill:                             AA