Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@taruldixit-RWHi14 • Feb 23, 2009
😁give me ans
-
@gummiv-DiIYWi • Feb 24, 2009
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-iJKtdQ • Feb 24, 2009
@GummiV:
Welcome to CE,
and please explain your answer, how you arrived at it, et all. -
@gummiv-DiIYWi • Feb 24, 2009
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-DiIYWi • Feb 24, 2009
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-ASmC2J • Feb 24, 2009
@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-iJKtdQ • Feb 24, 2009
That's good work. nice explanation.. Keep it up.
-
@saandeep-sreerambatla-hWHU1M • Feb 25, 2009
Thats a very nice Explanation and BTW welcome to CE 😎
-
@gummiv-DiIYWi • Feb 25, 2009
Thanks for the warm welcome you guys 😀
Here is my intro thread: #-Link-Snipped-# -
@apurba-PzQ37I • Mar 3, 2009
there is no need to apply any formula..
its simple permutation & combination
you can do thi in less than 4 steps try again -
@apurba-PzQ37I • Mar 3, 2009
you r very close GummiV..
-
@apurba-PzQ37I • Mar 4, 2009
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-PzQ37I • Mar 4, 2009
Best of luck
-
@apurba-PzQ37I • Mar 4, 2009
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.