wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> hard >> 3 light switches, 3 rooms
(Message started by: hopeless on Apr 22nd, 2004, 3:13pm)

Title: 3 light switches, 3 rooms
Post by hopeless on Apr 22nd, 2004, 3:13pm
A landlord has 3 rooms in his building, A, B and C, each with one light, and 3 light switches, 1, 2, and 3, one running to each room.  One of the lights is burnt out.  How can you determine which light switch goes to which room by switching on a different combination of lights but only entering each room once? (For example, switching on lights 1 and 3 and going into room B and C to see if the lights are on, etc)

Title: Re: 3 light switches, 3 rooms
Post by kellys on Apr 22nd, 2004, 5:44pm
Find some way to work base 3....

Title: Re: 3 light switches, 3 rooms
Post by rmsgrey on Apr 24th, 2004, 9:33pm
A friend has pointed out that this is approximately as solvable as the "1 room, 3 switches" version. Any strategy reduces to: fiddle with switches; enter room A; fiddle with switches; enter room B; fiddle with switches; enter room C (fiddle with switches). Under reasonably obvious assumptions, there are 7 possible sequences of observations to be made - representing observations by binary digits in the obvious way: 000, 001, 010, 011, 100, 101 and 110. 111 is impossible given one bulb is blown.

There are 6 possible matchings of switch to bulb, and 3 possibilities for which bulb is blown, giving 18 possible states, though we don't necessarily care which bulb is blown. In a solution, each observation must be associated with a different switch-bulb matching, but may cover more than one possible state overall when the blown bulb is taken into account. 000 can cover 3 states; 001, 010 and 100 2 each and 011, 101 and 110 only 1 each, for a total of 12 states out of the 18.

Title: Re: 3 light switches, 3 rooms
Post by Nigel_Parsons on Apr 25th, 2004, 9:06am
This seems very like the puzzle with 3 lights in room A & 3 switches in room B;
The solution will be similar:::[HIDE]

Number switches 1,2,3; label rooms A,B,C

1, Switch on switches 1 & 2. Pause,  Switch off 2; enter room A,
    If light is on; A=1, (Go to 2A)
    If light is off, but warm to touch; A=2 (Go to 2B)
    If light is off and cold to touch; A=3, or A is the blown lamp (Go to 2C)

2A, Switch on 2 & 3, pause, switch off 3, enter room B:
    If light is on; B=2, and as A=1 then C=3
    If light is off, but warm to touch; B=3 and as A=1 then C=2
    If light is off and cold to touch; B is the blown lamp (Go to 3A)
2B, Switch on 1 & 3, pause, switch off 3, enter room B:
    If light is on; B=1, and as A=2 then C=3
    If light is off, but warm to touch; B=3 and as A=2 then C=3
    If light is off and cold to touch; B is the blown lamp (Go to 3B)
2C Switch on 3, switch off 1 enter room B
    If light is on; B=3, and A is the blown lamp; (go to 3C)
    If light is off, but warm to touch; B=1 (go to 3D)
    If light is off and cold to touch; B is the blown lamp, or A is blown & B=2 (goto 3E)

3A Switch on 3 switch off 2; enter room C
    If light is on; C=3 thus as A=1 B=2
    If light is off, but warm to touch; C=2 thus as A=1 B=3
   
3B Switch on 3 & switch off 1; enter room C
    If light is on; C=3 thus as A=2 B=1
    If light is off, but warm to touch; C=3 thus as A=2 B=1

3C Switch on 1 & 2, pause, switch off 2, enter room C;
    If light is on; C=1 thus as B=3, A=2
    If light is off, but warm to touch; C=2 thus as B=3,A= 1

3D Switch on 2& 3, pause, switch off 2, enter room C
    If light is on; C=3 thus as B=1, A=2
    If light is off, but warm to touch; C=2 thus as B=1,A= 3

3E Switch on 3 & 2, pause, switch off 2, enter room C
    If light is on; C=3 thus A is the blown lamp, this gives B=2 so A=1
    If light is off, but warm to touch; C=2 thus as B is blown, this gives A=3 so B=1[/HIDE]::

Title: Re: 3 light switches, 3 rooms
Post by Nigel_Parsons on Apr 25th, 2004, 9:14am
::[HIDE]Alternately, take it one stage further, and assume you can move quickly into a room from the switches.

Switch on 1 & 2, pause, switch off 2, switch on 3 & enter room A, feel the bulb (carefully, it may be very hot!)
If the bulb is on & v.hot, it relates to switch 1.
If the bulb is on, but only warm, it relates to switch 3
If the bulb is off but warm, it relates to switch 2
If the bulb is off & cold, the bulb has blown and you cannot safely state which switch would operate it.(until you have repeated this with the other two rooms)

Repeat for the other two rooms.
Prior or later experience will allow you to judge between v.hot & warm[/HIDE]::

Title: Re: 3 light switches, 3 rooms
Post by jasmin valencia on May 25th, 2004, 2:30pm
there are 2 lights left right. you on one for a couple of hours and then turn it off. go into the rooms. one light will be on, one light will be off (the burned out one) and the other light will be warm.

Title: Re: 3 light switches, 3 rooms
Post by Kristine on Oct 2nd, 2004, 2:37pm
I will turn on the 1st switch and let it stands about 1 min, THe second switch about 3min, and the third switch about 5min or more, then I go to check each light bulb, the hotter the bulb, the easier I figure out which is its switch.

Title: Re: 3 light switches, 3 rooms
Post by rmsgrey on Oct 5th, 2004, 5:51am
You go to the architect and offer him the barometer...

Title: Re: 3 light switches, 3 rooms
Post by Grimbal on Oct 6th, 2004, 10:27am
It is not possible.

Whatever you do to the switches, if you don't see the light in the first room, there is the possibility that it burnt out, and you have 6 possible connection patterns remaining.  On each visit, you can only remove half of the possibilites, but you have only 2 visits left.  So there is no certain way.

I guess it is the old trick of checking for the bulb on/hot/cold.

Title: Re: 3 light switches, 3 rooms
Post by Nigel_Parsons on Oct 6th, 2004, 11:35am
As Grimbal said, only that was included in my first post on the subject (25 April)

Title: Re: 3 light switches, 3 rooms
Post by Grimbal on Oct 6th, 2004, 3:26pm
But until today... uh ... yesterday, I thought there might be a proper solution using only the on/off state.

Title: Re: 3 light switches, 3 rooms
Post by rmsgrey on Oct 7th, 2004, 6:10am

on 10/06/04 at 15:26:42, Grimbal wrote:
But until today... uh ... yesterday, I thought there might be a proper solution using only the on/off state.

despite my proving it impossible on April 24th...

Title: Re: 3 light switches, 3 rooms
Post by Grimbal on Oct 7th, 2004, 9:43am
And I proved it is still impossible on October 6  ;D

Well, I did not realize it was a proof.  It is not very explicit.  I had to re-read carefully your post to understand what you mean by "000 covers 3 states" and see that counting 12 states implies the impossibility of the task.

Title: Re: 3 light switches, 3 rooms
Post by rmsgrey on Oct 7th, 2004, 10:53am

on 04/24/04 at 21:33:32, rmsgrey wrote:
A friend has pointed out that this is approximately as solvable as the "1 room, 3 switches" version. Any strategy reduces to: fiddle with switches; enter room A; fiddle with switches; enter room B; fiddle with switches; enter room C (fiddle with switches). Under reasonably obvious assumptions, there are 7 possible sequences of observations to be made - representing observations by binary digits in the obvious way: 000, 001, 010, 011, 100, 101 and 110. 111 is impossible given one bulb is blown.

There are 6 possible matchings of switch to bulb, and 3 possibilities for which bulb is blown, giving 18 possible states, though we don't necessarily care which bulb is blown. In a solution, each observation must be associated with a different switch-bulb matching, but may cover more than one possible state overall when the blown bulb is taken into account. 000 can cover 3 states; 001, 010 and 100 2 each and 011, 101 and 110 only 1 each, for a total of 12 states out of the 18.

OK, it is moderately impenetrable...

There are 18 possible states for the building (6 ways of wiring the bulbs to switches, and 3 possible blown bulbs for each wiring). Since we don't care about identifying the blown bulb, we only need to be able to distinguish 6 cases with the seven possible observations (000,001,010,100,011,101,110), which doesn't seem so hard at first glance, but, while we don't care which bulb is blown for our conclusion, we do need each observation to only arise from building states which differ only by which bulb is blown (each state must lead to one of the seven observations, since each bulb has to be on or off when we observe it). So the seven possible observations have to account for 18 states between them, each one only accounting for multiple states by changing which bulb is blown. 110, for instance, can only account for one state because bulbs A and B are known not to be blown. Counting it up, 000 can account for 3 states; 001, 010 and 100 for 2 each, and 011, 101 and 110 only 1 each for a total of 12 of the 18 states correctly identified.

Title: Re: 3 light switches, 3 rooms
Post by thrillseeker on Sep 12th, 2005, 9:13pm
Turn the 1st switch on for 5 min. Turn it off and turn on the 2nd. Enter the rooms. When you enter the rooms, the room with the blown bulb will be the 2nd room. Either of the remaining rooms can be the 1st and 3rd room.

If the 1st room is on, the 2nd controls it. If the 3rd room is off and cold, the 3rd controls it. If the third room is off and warm the 1st controls it. The remaining switch controls the 2nd room for both scenarios.

If the 1st room is off and cold, the switch that controls the 1st room depends on the condition of the 3rd room bulb. If the 3rd room is on, the 2nd controls it and the 3rd controls the 1st. (1st controls the 2nd.) If the 3rd room is off and warm, the 1st switch controls it, the 2nd controls the 2nd and the 3rd controls the 1st. The 1st and 3rd rooms cannot BOTH be off and cold or off and warm. (Because if the 1st switch was turned on and it controled the 2nd room, the 2nd switch would have to control either room 1 or 3.)

If the 1st room is off and warm, the 1st controls it. If the 3rd room is off, the 3rd controls it. If the 3rd room is on, the 2nd controls it. The remaining switch controls the 2nd room for both scenarios.  8)

Title: Re: 3 light switches, 3 rooms
Post by Sjoerd Job Postmus on Sep 13th, 2005, 8:07am
I would buy a lot of power-cable. (3 * a lot)

I'd walk into room A, and deattach the lightbulb + holder, rewire the circuits... and take the lightbulb with me outside.

Next, I'd do the same for B and C (while making certain I know which one is A, B and C).

I'm now in front of the switches. And whatever I switch, I see the effect immidiately.

Title: Re: 3 light switches, 3 rooms
Post by Grimbal on Sep 18th, 2005, 4:08am
We could also replace the light bulbs with sirens having 3 different sounds.

Title: Re: 3 light switches, 3 rooms
Post by thrillseeker on Sep 18th, 2005, 8:18pm

on 04/25/04 at 09:06:45, Nigel_Parsons wrote:
This seems very like the puzzle with 3 lights in room A & 3 switches in room B;
The solution will be similar:::[HIDE]

Number switches 1,2,3; label rooms A,B,C

1, Switch on switches 1 & 2. Pause,  Switch off 2; enter room A,
    If light is on; A=1, (Go to 2A)
    If light is off, but warm to touch; A=2 (Go to 2B)
    If light is off and cold to touch; A=3, or A is the blown lamp (Go to 2C)

2A, Switch on 2 & 3, pause, switch off 3, enter room B:
    If light is on; B=2, and as A=1 then C=3
    If light is off, but warm to touch; B=3 and as A=1 then C=2
    If light is off and cold to touch; B is the blown lamp (Go to 3A)
2B, Switch on 1 & 3, pause, switch off 3, enter room B:
    If light is on; B=1, and as A=2 then C=3
    If light is off, but warm to touch; B=3 and as A=2 then C=3
    If light is off and cold to touch; B is the blown lamp (Go to 3B)
2C Switch on 3, switch off 1 enter room B
    If light is on; B=3, and A is the blown lamp; (go to 3C)
    If light is off, but warm to touch; B=1 (go to 3D)
    If light is off and cold to touch; B is the blown lamp, or A is blown & B=2 (goto 3E)

3A Switch on 3 switch off 2; enter room C
    If light is on; C=3 thus as A=1 B=2
    If light is off, but warm to touch; C=2 thus as A=1 B=3
   
3B Switch on 3 & switch off 1; enter room C
    If light is on; C=3 thus as A=2 B=1
    If light is off, but warm to touch; C=3 thus as A=2 B=1

3C Switch on 1 & 2, pause, switch off 2, enter room C;
    If light is on; C=1 thus as B=3, A=2
    If light is off, but warm to touch; C=2 thus as B=3,A= 1

3D Switch on 2& 3, pause, switch off 2, enter room C
    If light is on; C=3 thus as B=1, A=2
    If light is off, but warm to touch; C=2 thus as B=1,A= 3

3E Switch on 3 & 2, pause, switch off 2, enter room C
    If light is on; C=3 thus A is the blown lamp, this gives B=2 so A=1
    If light is off, but warm to touch; C=2 thus as B is blown, this gives A=3 so B=1[/HIDE]::


Nigels solutions require the subject to return to the switches after the first adjustments are made. The riddle states the you are allowed to make only one trip to the rooms. I assume that you are not allowed to return to the switches and filp them again.

Title: Re: 3 light switches, 3 rooms
Post by Nigel_Parsons on Sep 24th, 2005, 3:43am
The question stated:
A landlord has 3 rooms in his building, A, B and C, each with one light, and 3 light switches, 1, 2, and 3, one running to each room.  One of the lights is burnt out.  How can you determine which light switch goes to which room by switching on a different combination of lights but only entering each room once? (For example, switching on lights 1 and 3 and going into room B and C to see if the lights are on, etc)

It is reasonable to read that as meaning that the light switches are elsewhere than in one of the three rooms.
The solution I gave requires each of the three rooms (A B & C) to be entered once each. This would appear to be the approach required by the question

Nigel

Title: Re: 3 light switches, 3 rooms
Post by thrillseeker on Sep 26th, 2005, 9:43pm
I consider the riddle to be somewhat trivial if you are allowed to make multiple trips to the light panel. I was under the assumption that you are allowed to make only one trip to the light panel and only one trip to each room.

My solution solves the riddle with one trip to the light panel and one trip to each room.

Title: Re: 3 light switches, 3 rooms
Post by Nigel_Parsons on Sep 27th, 2005, 11:39am
Sorry Thrillseeker, your solution fails.

If you switch on #1, and switch it off after five minutes, it will result in a hot bulb, unless it operates the bulb which has blown.
Similarly, switching on #2 and leaving it on will result in a bulb which is still illuminated unless it controls the bulb which has blown.
Doing nothing with switch #3 will result in a dark, cold, bulb (which might have blown)
If you enter room A and the lamp is lit then it is controlled by switch#2. If you then find rooms B & C dark, and with cold bulbs all you know is that #2 operates roomA. You have no way of telling which switch relates to either of the other rooms.

Title: Re: 3 light switches, 3 rooms
Post by thrillseeker on Sep 27th, 2005, 9:58pm

on 09/27/05 at 11:39:38, Nigel_Parsons wrote:
Sorry Thrillseeker, your solution fails.

If you switch on #1, and switch it off after five minutes, it will result in a hot bulb, unless it operates the bulb which has blown.
Similarly, switching on #2 and leaving it on will result in a bulb which is still illuminated unless it controls the bulb which has blown.
Doing nothing with switch #3 will result in a dark, cold, bulb (which might have blown)
If you enter room A and the lamp is lit then it is controlled by switch#2. If you then find rooms B & C dark, and with cold bulbs all you know is that #2 operates roomA. You have no way of telling which switch relates to either of the other rooms.


Not quite....

Deductive reasoning discovers that an off and COLD bulb reveals the solution.

Ok...lets suppose you turn on the 1st switch and it controls the broken bulb. After 5 min you turn it off and flip on the second. When the second switch is turned on, one of the two remaining bulbs will be lit, and the other will be off and COLD. If it was off and warm, the first switch would control it, but that is not the case because we already decided that the first switch controls the broken bulb. Hense....the first switch controls the broken bulb, the second switch controls the lit bulb and the third switch controls the off and cold bulb.

You stated..."If you enter room A and the lamp is lit then it is controlled by switch#2. If you then find rooms B & C dark, and with cold bulbs all you know is that #2 operates roomA. You have no way of telling which switch relates to either of the other rooms."

Not so.... One of the remaining bulbs will be the broken one (which was not noted in your statement) and the other will be functioning, off and COLD. Obviously, the first switch does not control the functioning bulb (Because it would be warm if it did).

Lets suppose that the first switch controls one of the functioning bulbs and the second switch controls the broken bulb.
When you enter the rooms, the lights will be off. One room will be off and warm, the other will be off and cold. Hense....the first switch controls the off and warm bulb, the second controls the blown bulb and the third controls the off and cold bulb. If the third switch controled the broken bulb, the 1st controls the off and warm and the second controls the on bulb.  8)

Title: Re: 3 light switches, 3 rooms
Post by ChunkTug on Sep 28th, 2005, 12:12am
Thrillseeker, here's the flaw. If the bulb corresponding to switch #1 or #2 is blown, there is no way to differentiate it from the bulb for switch #3.

Method:
1 - ON for five minutes, then OFF
2 - ON
3 - OFF

For example, here are two different configurations:

1->B (blown)
2->A
3->C

1->C (blown)
2->A
3->B

Same observed result:
A is ON
B & C are off and cold.

Title: Re: 3 light switches, 3 rooms
Post by thrillseeker on Sep 28th, 2005, 11:52pm
That is totally wrong.

Room 1...Blown bulb
Room 2...Good bulb
Room 3...Good bulb

Switch 1 controls room 1
Switch 2 controls room 2
Switch 3 controls room 3

Turn on switch 1 for 5 min.
Turn off switch 1 and turn on switch 2.

Either room 2 or 3 will be lit. (Room 1 cannot be lit)

If room 2 is lit, room 3 will be off and cold.

THEREFORE ROOM 3 MUST BE CONTROLLED BY SWITCH 3 OR ELSE IT WOULD BE OFF AND WARM.

Is there any way that room 3 can be controlled by switch 1 or 2? No, there isnt. Switch 1 and 2 were both operated so there is no way that either of them could produce an off and cold bulb.

Its much easier to understand this if you imagine it on a table in front of you. The table has 3 switches and 3 bulbs on it. The bulbs are covered by boxes that allow no light to leave. You use my method, remove the boxes and check the state of the bulbs.

Its like you were describing a situation where switch 1 controls the blown bulb and the two remaining bulbs were found off and cold. That is not possible. If switch 1 controls the blown bulb, then one of the two remaining bulbs will be lit. Or were you thinking that there were 3 operational bulbs? You stated...A is lit, B and C are off and cold. If A is lit, then either B or C is blown. Even still, if you have three operational bulbs, the solution still works but it is simpler.

Title: Re: 3 light switches, 3 rooms
Post by Sjoerd Job Postmus on Sep 29th, 2005, 12:17am
Are you assuming that sending power to a blown bulb will make it hot?

Let me think...

S1,S2,S3 are in front of me.

I have three rooms, R1,R2, and R3.

method1:
S1 on. wait 5m. S1 off, S2 on.

room1:
 on: S2
 off&warm: S1, not blown
 off&cold:
   blown: S1, S2, or S3
   working: S3

room2:
 on: S2
 off&warm: S1, not blown
 off&cold:
   blown: S1, S2, or S3
   working: S3

room3:
 on: S2
 off&warm: S1, not blown
 off&cold:
   blown: S1, S2, or S3
   working: S3

Let's consider we saw light in r2, and the bulb is warm in r1, we know r3 is blown. S1>R1, S2>R2, S3>R3.
Any permutation of the happenings would give us the results we want.

Now, room 1 isn't warm... but neither is r3... How would we know?

Now, here's a different method I propose...
We start with all off... wait a few days for the bulbs to cool of, or assume they have.

S1,S2 on.
Wait a while for them to get really hot.
S1 off, S3 on.
Check.

We have one or two hot bulbs.
We have one or two lit bulbs.
If we have two hot bulbs, we have 1 lit bulb.
If we have two lit bulbs, we have 1 hot bulb.

We have four states: off&cold, on&cold, on&warm, off&warm.
00: Off&cold
01: Off&warm
10: On&cold
11: On&warm

We know one room has off&cold.

If two rooms are lit, off&cold = S1
If two rooms are warm, off&cold = S3
If one is lit, and one is warm, off&cold = S2

One lit, one warm: lit = S3, warm = S1
two lit: cold = S3, warm = S2
two warm: lit = S2, cold = S1

Still, only one visit to the switchboard, and one visit to the three rooms...

EDIT: I see that trillseekers "solution" does find which switch controls the blown bulb... but in the case where switch 1 controls the blown bulb, he still can not find wether room 1 or 3 is linked to switch 1...

Title: Re: 3 light switches, 3 rooms
Post by thrillseeker on Sep 29th, 2005, 12:24am
I see....
I was assuming that I would be able to identify which bulb was the blown bulb by looking at it when entering the room. I was imagining finding a brownish burnt out bulb or a shattered bulb. In all of my explanations I used the knowledge of which room had the blown bulb. I guess you must assume that there is no way of telling which bulb is burnt out by looking at it.  :-[

Title: Re: 3 light switches, 3 rooms
Post by Sjoerd Job Postmus on Sep 29th, 2005, 12:43am
Yes, but room 3 might have the blown bulb. Or room two for that matter.



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board