Fog Creek Software
Discussion Board

3 light switches

You might consider this one to have too big of an aha factor but it is definitely do-able. 

You stand in front of a door with three switches next to it.  One of the switches operate a ceiling fan inside the room that the door leads to but you don't know which one.  All three switches are initially in the off position ( assume they are standard light switches that are off in the down position and on in the up position ).  You need to decide which switch operates the fan.

You may toggle the three switches on and off all you want but once you open the door and examine the room you may no longer toggle any of the switches. 

How can this be done?

Assume that it is impossible to gather any information about the state of the room without opening the door (so no power tools or x-ray glasses or crap like that).

Greg Geller
Monday, July 29, 2002

(Hints and spoilers below).

Hint: I assume it's important that the "ceiling fan" is one of those big, rotating fans, not a grate in the ceiling that makes a sound? :-)

Adrian Gilby
Monday, July 29, 2002

Turn on switch 1 and 2.
Wait 10 seconds or so.
Turn off switch 2 and open the door immediately.

If the fan is rotating at full speed, it's switch is 1.
If the fan is rotating but going to stop, it's switch is 2.
If the fan is stopped, it's switch is 3.


Sergio Massara
Tuesday, July 30, 2002

I kind of like this (very similar) version better... although it would probably have a fairly high "aha" rating:

In the attic is a single incandescent light bulb.  You are at the base of the attic, behind a door, unable to see any light (or lack thereof) from the attic.  There are 3 light switches (currently in the "off" position) where you stand, only one of which controls the light in the attic.  Your job is to determine which of the switches controls the light, but you can only make one trip to the attic.  How can you manipulate the switches so that you can conclusively tell which one controls the light?

The answer is that you should flip switches 1 and 2 to "on."  After a few minutes, flip switch 2 to "off," then make your trip to the attic.  If the light is on, the answer is switch 1.  If the light is off but still hot, the answer is switch 2.  If the light is off and cool, the answer is switch 3.

In this problem, it's necessary to include the fact that the bulb is incandescent, because a fluorescent bulb doesn't heat up like an incandescent.

Drew Boyles
Wednesday, July 31, 2002

"In this problem, it's necessary to include the fact that the bulb is incandescent..."

And that the attic isn't drafty and you live in Alaska or maybe you live in Pheonix and all the bulbs feel hot whether they are on or not.

William Frantz
Thursday, August 1, 2002

There are three switches A, B and C.
Switch on any of the two switches. Say A and B.
Switch off A . Now the only switch on is switch B.
Enter to the room.
If the fan is rotating at full speed... Switch B belongs to fan.
If fan rotates and it slows and stops then fan's switch is A.
If the fan not rotating at all then fan's switch is C.

Vincent Chittilappilly
Thursday, August 29, 2002

*  Recent Topics

*  Fog Creek Home