Light Bulb and Four Switches
A room contains a light bulb controlled by exactly one of four switches outside the room, all currently off. You may flip switches as you like, but may only enter the room once to observe the bulb’s state. The bulb, if left on, also grows warm after enough time. What is the minimum number of times you need to enter the room to be guaranteed to identify the correct switch?
Work it out, then compare with the answer.
SolutionShow the worked solution
Key idea. One visit observes two binary features of the bulb, whether it is lit and whether it is warm. That gives distinguishable outcomes, which is exactly enough for four switches.
Zero visits cannot work, because without seeing the bulb you learn nothing and all four switches remain possible. So it suffices to show that a single visit always identifies the switch.
We assume, as usual, that a bulb needs several minutes to become noticeably warm and stays warm for a short while after being switched off. Label the switches .
- Turn on switches and and wait about twenty minutes.
- Turn off switch and turn on switch . Leave switch off throughout.
- Enter the room immediately.
At the moment you enter, each possible controlling switch produces a different state:
- switch : on for a long time, so the bulb is on and warm;
- switch : on only for a moment, so the bulb is on and cold;
- switch : on for a long time and just turned off, so the bulb is off and warm;
- switch : never on, so the bulb is off and cold.
These four outcomes are distinct, so the single visit identifies the switch with certainty.