The abused 3 light question |
Suppose there are 3 light switches. There is elsewhere a room with three light bulbs each controlled by one of the aforementioned switches. You cannot see the room from where the switches are located. How do you determine which switch operates which light bulb if you are allowed to visit the room once?
Turn on switches 1 and 2. Wait several minutes. Turn off switch 2. Go into the room. The light which is on is controlled by switch 1. The light which is warm is switch 2 while the room temperature light is switch 3.
Candidate: Since each light is controlled by one switch I follow the wiring from the switch to the lights.
Interviewer: The wires are covered by walls and ceilings so you can’t see them. Can you think of another solution?
Candidate: I punch holes in the walls and ceilings so I can see the wires.
Interviewer: The walls and ceilings are made of a an indestructible material. Can you think of another solution?
Candidate: I set my cell phone to record video and toss it into the room. I operate each switch in order and then go into the room and review the video on the phone to determine switch order.
Interviewer: But you can only go into the room once.
Candidate: Well you said that I could only visit the room once but never mentioned my phone.
Interviewer: Ok. The room has a door which can only be opened once and shuts immediately once you leave the room never to open again.
Candidate: Hmmm. I disconnect the common wires from the switches and attach signal toners to 2 of them. I then go into the room with a probe and use it to identify which switch goes to which light.
Interviewer: A signal toner?
Candidate: Yeah its a device which transmits a modulating electrical signal over the line which can be detected by a contactless probe. I set the 2 toners to transmit different patterns from each other. The light which does not have a tone is controlled by the switch which doesn’t have a toner on it.
Interviewer: I see. Well lets say the lights and switches do not use wires which transmit electrical signals.
Candidate: Um. Isn’t that is a little bizarre.
Interviewer: Can you think of another solution?
Candidate: I would switch one light and then go outside and look through a window to see which light was on. Since I haven’t visited the room I can do this for each of the switches.
Interviewer: Why do you think this room would have a window?
Candidate: Well most rooms large enough to justify three different lights on three different switches would be too big to fit wholly within the interior volume of a building and most architecture would include windows in any room with an exterior wall. Doing this also helps with fire code.
Interviewer: Well lets say for this example this room has no windows.
Candidate: Alright. I would visit the room first and carefully arrange its furniture to cast specific patterns of shadows based on which light was on.
Interviewer: But the door will close after you leave.
Candidate: That’s fine. The pattern of shadows is oriented so as to be distinguishable from outside the door at ground level. I revisit the outside of the room after operating each of the switches in turn.
Interviewer: But the door is closed.
Candidate: Doors include a gap at the bottom to allow for return ventilation within a building. If the door perfectly sealed it would increase the static pressure experienced in the ducts and place undue stresses on the HVAC’s fan motors. You could have return vents within the room to alleviate this but its more expensive as you need a separate set of ducting to support it.
Interviewer: Why do you think this room wouldn’t have return ducts?
Candidate: Thus far this room is sounding like a terrible place so I am betting it is in a cheaply constructed building.
Interviewer: Well lets say the room has no ducting at all and the door does indeed perfectly seal when closed.
Candidate: Really?
Interviewer: Yes really.
Candidate: <long pause>
Interviewer: Any other ideas?
Candidate: YES! I have it! I am presently engaged in a dungeon crawl in a fantastic world of magic and adventure!
Interviewer: What?
Candidate: Of course, I should have seen it sooner. Where else would you find invincible walls, automatic sealing doors, and lights which don’t use electricity. This must be a challenge I have to solve before advancing. Excellent. I engage my divination powers to search for clues.
Interviewer: No! No! Magic is not the answer either. Its nothing like that.
Candidate: Combat then! You must be the boss fight. Very well I am prepared for battle.
Interviewer: No! You are supposed to use the fact the lights get hot when you run them for a few…
Candidate: SILENCE! Everyone knows magic lights produce no heat. Now, face me you fiend.