The answer to the first problem is:
- Turn light switches A on.
- Wait one hour
- Turn light switch A off, turn light switch B on
- Enter the lightbulb room
If the bulb is on then it's hooked up to switch B
If the bulb is off and hot, then it's hooked up to switch A
If the bulb is off and cold, then it's hooked up to switch C
One of my co-workers proposed an additional solution that leads to
even more possibilities. His solution is:
- Turn light switch A on and off quickly for a long time
- Turn light switch B on
- Enter the lightbulb room
If the bulb is on then it's hooked up to switch B
If the bulb is burned out, then it's hooked up to switch A
Otherwise it's hooked up to switch C
This gives us a much larger solution, we can imagine the same
problem with 6 switches and up to 6 bulbs where we need to figure out
which switch goes to which bulb. The process is:
- Turn A and B on
- Turn C on and off for a long time, leave it on
- Turn D on and off for a long time, leave it off
- Now that it's been a while, turn B off and turn E on
Then you can match the bulbs up accordingly:
- On and hot (on for a while)
- Off and hot (on for a while then turned off)
- Burned out and with power (use one of the other bulbs to see if it
has power, or just stick your finger in the socket ;)
- Burned out and without power
- On and cold (freshly turned on)
- Off and cold (never on)
In fact, you can take it even further then this by adding the additional
processes (though I think these are pushing it)
- You can leave a bulb on for a while and then flick it on and off
to burn it out. This gives you a burned out bulb that should be
hotter than a bulb which was just directly burned out. This is
assuming that:
- A hot bulb that is switched on and off doesn't get a chance
to cool down.
- A cold bulb that is switched on and off never heats up as much
as a hot bulb.
- You can determine more than just hot and cold. You can turn on
a switch for an hour and then turn on another switch for a few minutes,
one will be hot and one will be warm. This can add as many switches
as you can differentiate between the temperatures of the bulb.
The general problem that people have with this problem is that they
assume that a lightbulb only contains binary information (whether it
is on or off) when in reality it contains much more information that
that. Often people will look at the problem and it seems impossible,
so they 'prove' to themselves that it's not possible and then get stuck
on that and unable to look for new solutions. The 'proof' is obviously
flawed considering the answers above, but it seems like a simple
proof and therefore we can't work past it.