Solution to Challenge 7, Spring '05



Suppose that we paint the rooms with a checkerboard pattern so that whenever two rooms are adjacent through a doorway or stairway, one is red and one is blue. Suppose that the starting room is red.

Every path through the rooms consists of alternating red and blue rooms. The number of red rooms is one greater than the number of blue rooms, so any solution must begin and end in red rooms. The middle room of the building is blue, so the task is impossible.

A variety of solutions were submitted, some of which were lengthy but correct. An interesting solution was given by Monica Chawathe, who wrote a program that performed an exhaustive search and concluded, after 96 million moves, that the task is impossible. (Monica also submitted a short solution that is equivalent to the above checkerboard argument.)