Switch on your Brain......

There are 2 separated rooms, one having 8 bulbs and the other having 8 switches.
You have to find out which switch is of which bulb, in minimum possible steps.
Switching & entering into the room once is defined as ONE STEP
๐Ÿ˜•

Replies

  • taruldixit
    taruldixit
    ๐Ÿ˜give me ans
  • GummiV
    GummiV
    Hmm, not sure if I should just post the answer right here or not... my first post ๐Ÿ˜€

    But given that each and every switch is wired to exactly one light bulb I think it would take 5 steps - correct? ๐Ÿ˜

    Then I started to wonder if we could devise a formula for calculating the minimum number of steps needed to sort out x number of light bulbs/switches? An added puzzle ๐Ÿ˜‰
  • silverscorpion
    silverscorpion
    @GummiV:
    Welcome to CE,
    and please explain your answer, how you arrived at it, et all.
  • GummiV
    GummiV
    Thanks silverscorpion ๐Ÿ˜€

    Since we have 8 bulbs and 8 switches, we only need to find out 7 bulb/switch pairs and then we should know the 8th pair.

    With the remaining 7 switches, I choose to switch on two at a time (switching everything else off before each step), like this:

    1&2
    2&3


    And then we should be able to pair switches 1, 2 and 3 to their respectful bulbs with bulb no. 2 being the one lit in both steps and bulbs no. 1 and 3 lit in their respectful steps, and then continue with the same method:

    4&5
    5&6


    Having figured out switches 4,5 and 6 also, we only need to flick switch number 7 to see which one that links to. And as stated previously we should also know by then that bulb no. 8 is the one that was never turned on.

    Anybody that can do it in fewer steps? ๐Ÿ˜€

    I'm at work right know, which I should really be getting back to ๐Ÿ˜€ but looking forward to working on a formula for this problem later ๐Ÿ˜€ I'm thinking something - 1, then modulus 3 and then the rest dived by three?


    WAIT! - Strike everything above

    Having written this post I wondered if turning on three bulbs at a time would work better.... and yeah.... I'm guessing we could do it in 4 steps... ๐Ÿ˜›

    Turning on:
    Step 1: 1 & 2 & 3
    Step 2: 3 & 4 & 5 Giving us the bulb linked to no. 3 (lit first two steps)
    Step 3: 5 & 6 & 7 Giving us bulb no. 5 (lit in step 2&3) AND bulb no. 4 (only lit in step 2)
    Step 4: 7 & 8 & 1 Same as above, giving no. 6 (only lit in step 3), no. 7 (lit in steps 3&4), no. 8 (the only one first lit in step 4) and bulb 1 (lit in steps 1 and 4)

    Wow, now I really need to get back to work ๐Ÿ˜› ๐Ÿ˜
  • GummiV
    GummiV
    Back home from work, and decided to work out a formula for this problem ๐Ÿ˜›

    As some might have spotted, in the last of the four steps in my post above, I could have just turned on switch 7&1 with switch 8 then being linked to the one bulb never lit. Better yet, the same algorithm could be used to link 9 switch/bulb pairs, then with the 9th bulb never being lit.

    I then decided to write out the steps in respect to number of odds and even numbers, as so:
    1 - odd number 1 = O1
    2 - even number 1 = E1
    3 - odd number 2 = O2
    4 - even number 2 = E2...

    With this notation, the steps for the above problem (with 8 or 9 bulbs that is) would be:
    O1 & E1 & O2
    O2 & E2 & O3
    O3 & E3 & O4
    O4 & E4 & O1

    As some might notice, the number of steps required to pair X switches/bulbs is the same as the number of even numbers counting up to (and including) X. And because an even number divided by two gives us the number of even numbers counting up to that number, all we need to do is to subtract one from the number if X is an odd number, and I would guess the best mathematical notation for that would by x - modulus(x/2), right?

    So the the number of steps required to pair X switches to X bulbs is (x - modulus(x/2)) / 2

    So, for example, to figure out 13 switch/bulb pairs, we would need:
    (13 - modulus(13/2)) / 2
    (13 - 1) / 2
    12 / 2 = 6 steps
  • shalini_goel14
    shalini_goel14
    @GummiV Superb analysis done by you. ๐Ÿ˜€

    Please introduce yourself here ๐Ÿ˜€
    #-Link-Snipped-#

    And if you are in Bangalore,India here also ๐Ÿ˜
    #-Link-Snipped-#


    Thanks
    Shalini
  • silverscorpion
    silverscorpion
    That's good work. nice explanation.. Keep it up.
  • Saandeep Sreerambatla
    Saandeep Sreerambatla
    Thats a very nice Explanation and BTW welcome to CE ๐Ÿ˜Ž
  • GummiV
    GummiV
    Thanks for the warm welcome you guys ๐Ÿ˜€
    Here is my intro thread: #-Link-Snipped-#
  • apurba
    apurba
    there is no need to apply any formula..
    its simple permutation & combination

    you can do thi in less than 4 steps try again
  • apurba
    apurba
    you r very close GummiV..
  • apurba
    apurba
    Suppose there are 8 bulbs A B C D E F G H, with switch no. 1 2 3 4 5 6 7 8
    STEP 1: Switch on 1 2 3 4. Suppose A B C D gets on.
    Now,
    1) We know 1 2 3 4 is for A B C D.
    2) We know 2 3 4 5 is for E F G H.
    3) We don't know the Respective switches for A B C D and E F G H.

    STEP 2: Switch on 3 4 5 6. Suppose C D E F gets on.
    Now,
    1) We know 1 2 is for A B pair [bcoz A B does not get lighted 2nd time]
    2) We know 3 4 is for C D pair [bcoz C D got lighted again]
    3) We know 5 6 is for E F pair [bcoz E F is a new pair of bubls got lighted]
    4) We know 7 8 is for G H pair [bcoz G H is not lighted at all and 7 8 is never turned on]

    STEP 3: Switch on 1 3 5 7. Suppose A C E G gets on.
    Now,
    1) We know 1 is for A. Therefore 2 is for B.
    2) We know 3 is for C. Therefore 4 is for D.
    3) We know 5 is for E. Therefore 6 is for F.
    4) We know 7 is for G. Therefore 8 is for H.
    [bcoz we have lighted the bulbs from each par that were already known to us]

    So youcan solve this problem using a minium of 3 steps.
    You can use any combination of bulbs and switches, but for simple explanation I have used this combination.
    Try this writing on the paper.
  • apurba
    apurba
    Best of luck
  • apurba
    apurba
    Suppose there are 8 bulbs A B C D E F G H, with switch no. 1 2 3 4 5 6 7 8
    STEP 1: Switch on 1 2 3 4. Suppose A B C D gets on.
    Now,
    1) We know 1 2 3 4 is for A B C D.
    2) We know 2 3 4 5 is for E F G H.
    3) We don't know the Respective switches for A B C D and E F G H.

    STEP 2: Switch on 3 4 5 6. Suppose C D E F gets on.
    Now,
    1) We know 1 2 is for A B pair [bcoz A B does not get lighted 2nd time]
    2) We know 3 4 is for C D pair [bcoz C D got lighted again]
    3) We know 5 6 is for E F pair [bcoz E F is a new pair of bubls got lighted]
    4) We know 7 8 is for G H pair [bcoz G H is not lighted at all and 7 8 is never turned on]

    STEP 3: Switch on 1 3 5 7. Suppose A C E G gets on.
    Now,
    1) We know 1 is for A. Therefore 2 is for B.
    2) We know 3 is for C. Therefore 4 is for D.
    3) We know 5 is for E. Therefore 6 is for F.
    4) We know 7 is for G. Therefore 8 is for H.
    [bcoz we have lighted the bulbs from each par that were already known to us]

    So youcan solve this problem using a minium of 3 steps.
    You can use any combination of bulbs and switches, but for simple explanation I have used this combination.
    Try this writing on the paper.

You are reading an archived discussion.

Related Posts

๐Ÿ˜‰ Hi friends, Need to build a reliable DC to AC Inverter for a solar parking light application. A common DC/AC inverter could be puchased quite cheaply, however as solar...
can anyone pls suggest me a topic for paper presentation on electronics and its applications in latest technologies???๐Ÿ˜’๐Ÿ˜•
Hi CEns, "Opensource and OpenSys.," I want to know about the differences between the open source and open systems...I am going to present a seminar in this topic...Please ask your...
i need to control a toy car using voice signals. i'm planning to use microcontroller 8951 for processing. if u hav got any idea to do it, plz help me......๐Ÿ˜
hi, i like someone out there to help find a perfect circuit for automatic forward and revers dc motor control circuit. the circuit will help me build up my final...