Jump to content
BrainDen.com - Brain Teasers
  • 0

Light-bulb Problem


BMAD
 Share

Question

This is a modified version of the famous light-bulb problem.

There are three switches in the hallway. turning on the switches in different combinations cause different light-bulbs in the room to turn on. There are six light-bulbs and from turning on all of the possible combinations, each light-bulb is turned on at most twice (in other words there are only two ways to turn on a light-bulb). We need to map the switches to the light-bulbs.

The only things we know is that flicking 1 switch causes 1 light-bulb to turn-on, flicking 2 switches causes 2 to turn-on, and flicking all 3 cause three light-bulbs to turn-on and if a switch turns on a light-bulb, that switch must be on to turn it on again (even if flicking 2 switches).

What is the fewest number of 'tests' needed to effectively map the light-bulbs to the switches?

Link to comment
Share on other sites

16 answers to this question

Recommended Posts

  • 0

My answer is not very different from BobbyGo's, mainly to recognize two switches light one bulb from each of the two groups, thereby eliminating analysis of some non-occurring cases. It took me awhile to conclude the 1- and 3-switch bulbs were different, then the rest fell quickly in place.

I'll share my BA with BG. ;)

4

If I'm reading this right, the 3 light-bulbs that are turned on by flicking an individual switch cannot be any of the 3 light-bulbs that are turned on when all 3 switches are flicked. If they were, then at least one bulb would be powered on by two different 2 switch combinations; and since the op stipulated that "if a switch turns on a light-bulb, that switch must be on to turn it on again (even if flicking 2 switches)", two different pairs of switches cannot be used to power any individual bulb.

Test #1: Flick all 3 switches.

You now know which 3 light-bulbs are powered when all 3 switches are flicked. Label these bulbs D, E, and F.

You also know which 3 light-bulbs are powered individually, but don't know which switch corresponds to which bulb. Label these bulbs A, B, and C.

Test #2: Flick switches 1 and 2.

If any of the light-bulbs that turn on are bulbs D through F, then you know all of the combinations for turning those bulb(s) on.

If any of the light-bulbs that turn on are bulbs A through C, then you know those bulb(s) also get powered on individually by either switch 1 or switch 2.

If both of the light-bulbs that turn on are bulbs A through C, then you also know that the unpowered bulb from the A through C group is powered individually by switch 3.

Test #3: Flick switches 1 and 3.

If any of the light-bulbs that turn on are bulbs D through F, then you know all of the combinations for turning those bulb(s) on.

If any of the light-bulbs that turn on are bulbs A through C, then you know those bulb(s) also get powered on individually by either switch 1 or switch 3.

If both of the light-bulbs that turn on are bulbs A through C, then you also know that the unpowered bulb from the A through C group is powered individually by switch 2.

The two light-bulbs that were not powered on during either test 2 or 3 are powered when both switches 2 and 3 are flicked.

If any of these light-bulbs are bulbs D through F, then you know all of the combinations for turning those bulb(s) on.

If any of these light-bulbs are bulbs A through C, then you know those bulbs also get powered on individually by either switch 2 or switch 3.

If both of these light-bulbs are bulbs A through C, then you also know that the remaining bulb from the A through C group is powered individually by switch 1.

Test #4: Flick switch 1 only. (If you already know which bulb switch 1 powers individually, flick switch 2 instead.)

If you flicked switch 1, then you know which light-bulb it powers and have enough information to deduce which remaining bulbs from the A through C group are powered by either switch 2 or switch 3.

If you flicked switch 2, then you know which light-bulb it powers and the only remaining bulb from the A through C group is powered by the only remaining switch (3).

Link to comment
Share on other sites

  • 0

I may have misunderstood something, but here is a better explanation of what I meant

There are 7 total combinations for the switches, 3 with only a single switch on, 3 with 2 switches on and 1 where all 3 are on. Since the number of switchs in the on position dictates the number of light bulbs which are on, between all the tests a bulb will be lit a grand total of 12 times. As there are a total of 6 bulbs which can be lit at most twice, this means each bulb will be lit exactly twice.

As for each test, if we leave one combination on for an extended period to warm the bulbs, and immediately before checking the lights we switch to a second combination we can see all the bulbs lit by the first combo via heat and the second via light.

Since we can test 6/7 of the possible combinations this way in 3 tests, and we know each bulb is lit exactly 2 ways, we can determined which bulb(s) the remaining combo lights. It does not matter whether that is a 1, 2 or 3 switch combination.

Link to comment
Share on other sites

  • 0

4

If I'm reading this right, the 3 light-bulbs that are turned on by flicking an individual switch cannot be any of the 3 light-bulbs that are turned on when all 3 switches are flicked. If they were, then at least one bulb would be powered on by two different 2 switch combinations; and since the op stipulated that "if a switch turns on a light-bulb, that switch must be on to turn it on again (even if flicking 2 switches)", two different pairs of switches cannot be used to power any individual bulb.

Test #1: Flick all 3 switches.

You now know which 3 light-bulbs are powered when all 3 switches are flicked. Label these bulbs D, E, and F.

You also know which 3 light-bulbs are powered individually, but don't know which switch corresponds to which bulb. Label these bulbs A, B, and C.

Test #2: Flick switches 1 and 2.

If any of the light-bulbs that turn on are bulbs D through F, then you know all of the combinations for turning those bulb(s) on.

If any of the light-bulbs that turn on are bulbs A through C, then you know those bulb(s) also get powered on individually by either switch 1 or switch 2.

If both of the light-bulbs that turn on are bulbs A through C, then you also know that the unpowered bulb from the A through C group is powered individually by switch 3.

Test #3: Flick switches 1 and 3.

If any of the light-bulbs that turn on are bulbs D through F, then you know all of the combinations for turning those bulb(s) on.

If any of the light-bulbs that turn on are bulbs A through C, then you know those bulb(s) also get powered on individually by either switch 1 or switch 3.

If both of the light-bulbs that turn on are bulbs A through C, then you also know that the unpowered bulb from the A through C group is powered individually by switch 2.

The two light-bulbs that were not powered on during either test 2 or 3 are powered when both switches 2 and 3 are flicked.

If any of these light-bulbs are bulbs D through F, then you know all of the combinations for turning those bulb(s) on.

If any of these light-bulbs are bulbs A through C, then you know those bulbs also get powered on individually by either switch 2 or switch 3.

If both of these light-bulbs are bulbs A through C, then you also know that the remaining bulb from the A through C group is powered individually by switch 1.

Test #4: Flick switch 1 only. (If you already know which bulb switch 1 powers individually, flick switch 2 instead.)

If you flicked switch 1, then you know which light-bulb it powers and have enough information to deduce which remaining bulbs from the A through C group are powered by either switch 2 or switch 3.

If you flicked switch 2, then you know which light-bulb it powers and the only remaining bulb from the A through C group is powered by the only remaining switch (3).

Edited by BobbyGo
Link to comment
Share on other sites

  • 0

testing the 2 combos won't tell you which single switch turns on a single light-bulb and which three switch turns on which three switch combo.

Ahh yes, now I understand what the confusion here was

I had meant 2 different combinations per test via heat and light similar to the classic problem, not just the combos involving two switches.

As a side note I assumed bulbs did not heat up instantly so I can directly differentiate between the first and second combo being tested despite any potential overlap between the two. However even if you don't assume this all you have to do is test single switch combinations as the second combo for each test ie the one you leave on not heat up

Link to comment
Share on other sites

  • 0



I think it can be done with 3 tests.

My understanding of the rules is that there can be two possibilities for combinations.
- Possibility 1: Identified in that the three lights on the single switch combinations are different than the three lights on the three switch combination. The two light combinations comprise of one light from a single switch and one light from the three switch combination.
- Possibility 2: Identified in that the three lights on the single switch combinations are the same as the three lights on the three switch combination. The two light combinations comprise of different pairs of the three remaining lights.


Step 1 - Turn on switches 1, 2, and 3. Wait. Turn off switches 2 and 3. Check the lights.
Step 2 - Turn on switch 2. Wait. Turn off switch 1. Check the lights.
Step 3 - turn on switch 3. Wait. Turn off switch 2. Check the lights.

I'll leave it as a further exercise to work through what information each test provides.
Edited by jordge
Link to comment
Share on other sites

  • 0

4

If I'm reading this right, the 3 light-bulbs that are turned on by flicking an individual switch cannot be any of the 3 light-bulbs that are turned on when all 3 switches are flicked. If they were, then at least one bulb would be powered on by two different 2 switch combinations; and since the op stipulated that "if a switch turns on a light-bulb, that switch must be on to turn it on again (even if flicking 2 switches)", two different pairs of switches cannot be used to power any individual bulb.

Test #1: Flick all 3 switches.

You now know which 3 light-bulbs are powered when all 3 switches are flicked. Label these bulbs D, E, and F.

You also know which 3 light-bulbs are powered individually, but don't know which switch corresponds to which bulb. Label these bulbs A, B, and C.

Test #2: Flick switches 1 and 2.

If any of the light-bulbs that turn on are bulbs D through F, then you know all of the combinations for turning those bulb(s) on.

If any of the light-bulbs that turn on are bulbs A through C, then you know those bulb(s) also get powered on individually by either switch 1 or switch 2.

If both of the light-bulbs that turn on are bulbs A through C, then you also know that the unpowered bulb from the A through C group is powered individually by switch 3.

Test #3: Flick switches 1 and 3.

If any of the light-bulbs that turn on are bulbs D through F, then you know all of the combinations for turning those bulb(s) on.

If any of the light-bulbs that turn on are bulbs A through C, then you know those bulb(s) also get powered on individually by either switch 1 or switch 3.

If both of the light-bulbs that turn on are bulbs A through C, then you also know that the unpowered bulb from the A through C group is powered individually by switch 2.

The two light-bulbs that were not powered on during either test 2 or 3 are powered when both switches 2 and 3 are flicked.

If any of these light-bulbs are bulbs D through F, then you know all of the combinations for turning those bulb(s) on.

If any of these light-bulbs are bulbs A through C, then you know those bulbs also get powered on individually by either switch 2 or switch 3.

If both of these light-bulbs are bulbs A through C, then you also know that the remaining bulb from the A through C group is powered individually by switch 1.

Test #4: Flick switch 1 only. (If you already know which bulb switch 1 powers individually, flick switch 2 instead.)

If you flicked switch 1, then you know which light-bulb it powers and have enough information to deduce which remaining bulbs from the A through C group are powered by either switch 2 or switch 3.

If you flicked switch 2, then you know which light-bulb it powers and the only remaining bulb from the A through C group is powered by the only remaining switch (3).

I had considered testing for heat and testing for light to count as two different tests because you would need to use two different senses to acquire the information. If this is correct, I'll stick with my answer above.

If this is not the case, I'll change my answer to the one below.

2

This uses the same reasoning as my previous answer, but is condensed down to account for both heat and light. Also, because it cannot be known which bulb is powered individually by switch 1 after just the first test, I'm using the knowledge gained about switch 3 during the first test to determine which second test gets executed.

Test #1: Flick all 3 switches. Wait. Turn off switch 3. Check for heat and light.

If you know which bulb switch 3 powers individually:

Test #2: Flick switches 1 and 3. Wait. Turn off switch 3. Check for heat and light.

If you do not know which bulb switch 3 powers individually:

Test #2: Flick switches 1 and 3. Wait. Turn off switch 1. Check for heat and light.

Link to comment
Share on other sites

  • 0

BobbyGo - I think your assumption about the light configurations is wrong. When I read the OP, I took it literally in that if a light is on, a certain switch must be up, exclusive of any other switches that may be up. This would prevent the possibility of switch 1 operating light A individually but then the switch 2 and 3 combination also illuminating Light A.

OP - Clarification?

Link to comment
Share on other sites

  • 0

as stated in the OP:

if a switch turns on a light-bulb, that switch must be on to turn it on again

so for example....if switch 1 turns on light-bulb A, to turn on light-bulb A again in conjunction with other light bulbs, switch 1 must be in the 'on' position again in conjunction with other switch(es).

Edited by BMAD
Link to comment
Share on other sites

  • 0

Sorry, but does this or doesn't this cover light bulbs that are turned on by 2 switch combos but not 1 switch combos. In other words, for a bulb that is not lit by the 1,2 or 3 switches by themselves but is lit by any 2 switch combo, must both of the switches be on to light this bulb again ie is it necessarly true that the 3 switch combo lights it.

Edited by Nins_Leprechaun
Link to comment
Share on other sites

  • 0

Like I mentioned before, I think there are two possibilities to the switch/light combinations (determining which through the steps performed).



The three lights lit by the single switches are different from the three lights lit when all three switches are up. In which case the three 2-switch combinations illuminate a light from the single switch and a light from the triple switch combination.
1...........A
2...........B
3...........C
1,2........B,D
2,3........C,E
1,3........A,F
1,2,3.....D,E,F

The three lights lit by the single switches are the same as the three lights lit when all three switches are up. In which case the three 2-switch combinations illuminate a different pair of the unused lights.
1...........A
2...........B
3...........C
1,2........D,E
2,3........E,F
1,3........D,F
1,2,3.....A,B,C

In either case, when a light is on, a particular switch is up, regardless of what other switches may be up.

In my suggested solution, the first test indicates which possibility it is and shows one of the single lights.
Link to comment
Share on other sites

  • 0

a priori, label the switches 1 2 3.

Based on tests, label the bulbs (a la BG) ABCDEF.

Step 1. Lay out the solution.

Because of the cryptic constraint of 1 or 2 switches persisting for the lighting of each bulb:
Single switches individually light three of the bulbs (ABC)

All three switches light the others (DEF).
Two-switch combinations therefore light one from each group.

Step 2: Label the bulbs.

  1. 123 identifies the two groups ABC (off) and DEF (on).
  2. 12 lights one bulb from each group. Label bulbs A and D.
  3. 23 lights one bulb from each group. Label bulbs B and E. Label the other two C and F.
    Switches {1, 2, 3} will now light either {A B C} or {C A B} respectively.

Step 3: Resolve the last aspect of the switch patterns.

  1. Any single switch. Note which bulb lights. Say switch 1 lights bulb A.

Summary:

  • A: 1 12
  • B: 2 23
  • C: 3 1 3
  • D: 12 123
  • E: 23 123
  • F: 1 3 123
Link to comment
Share on other sites

  • 0

My answer is not very different from BobbyGo's, mainly to recognize two switches light one bulb from each of the two groups, thereby eliminating analysis of some non-occurring cases. It took me awhile to conclude the 1- and 3-switch bulbs were different, then the rest fell quickly in place.

I'll share my BA with BG. ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...