There is a light bulb inside a room and three switches outside. All switches are currently in off state and only one switch controls the light bulb. You may turn any number of switches on or off any number of times you want. How many times do you need to go into the room to figure out which switch controls the light bulb?
A lighted bulb also emits heat and gets hot slowly (not instantaneously!)
The bulb gets hot slowly when turned on. Turn on the switch # for 10 minutes, turn it off and turn on the switch # and get into the room. There are possible cases.
- If the bulb is on, then switch # controls the bulb.
- If the bulb is off, but hot, then switch # controls the bulb.
- If the bulb is off and cool, then switch # controls the bulb.
Thus, we can infer the switch that controls the bulb in one entry.
Follow up question
What if there were switches?
Follow up answer
Assuming that modern bulbs heat up slowly, we can infer this in one entry. Turn on the switch # and # keeping others off. Wait for 10 minutes. Turn off #, turn on #, and quickly enter the room. Following are the possible states and the corresponding switch that controls the bulb.
|on and hot
|off but hot
|on but cool
|off and cool
The following table shows this information in a grid format: