Light bulbs and Switches

There are 200 light bulbs in a room but the switches to them are outside. The switches and bulbs are not marked and there is no way to tell which switch will turn which bulb on without entering the room. A switch can only be on or off. The bulb will become hot when it's turned on for some time and will cool down in 1 minute. What is the minimum number of time a person needs to enter the room to mark all the switches and bulbs with similar marks? Note: I can't differentiate between more hot and less hot just hot and cool.


The answer is 5.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Saad Khondoker
Jan 7, 2021

There are 3 states of switches and bulbs actually.

For lights: 'on', 'off', 'off but hot' /(off-hot)

For switches: 'on', 'off', 'was turned on for some time but turned off before entering room' /(on-off)

Each condition of bulb responds to the condition of switches respectively.

For 3 bulbs and switches its easy to calculate the number of times necessary to enter the room, its 1. 1st turn 2 lights 'on' then wait a little. Before entering the room turn 1 of the switches 'off'. After entering the room the bulb which is on has the switch which was on. The bulb which is off and hot has the switch which was turned on for a small time. The bulb which is off and cold has the switch which was never turned on.

This can also be done this way. Mark all the switches with 0 (off), 1 (on-off), 2 (on). Then do as the instruction of the switch numbers. Then enter the room and mark the bulbs with 0 (off), 1 (off-hot), 2(on). The bulbs will have the same mark as the switches.

For 4, 5,...,9 [3^1 < n < 3^2+1] lights we have to visit the room at least 2 times. It can also be seen as a number greater than 3 can not be expressed using 1 digit base 3 number (base 3 because 3 states/ 3 marks). But using 2 digit, we can distinguish up to 9=3^2 numbers/ switches. Using 3 digit, its possible to distinguish 3^3=27 numbers.

1st we give the switches a unique number using 0, 1, 2. Then follow the instruction of 1st digit of the number and visit the room. Then mark the bulbs according to their state. So after the first visit all the switches and bulbs will have the same 1st digit. Repeat this till the last digit. Now every bulb has the unique number given to it's switch at the beginning. Each digit of a number represents the number of time we have to visit the room. So for 10 to 27 bulbs we have to represent the switches with at least 3 digit numbers so we have visit the room at least 3 times.

Using this process we get, 3^4 < 200 < 3^5+1. So we have to visit the room at least 5 times.

Shortcut:

Log(200) base 3 = 4.8 (base 3 because 3 conditions)

So the answer is 5.

Very nice. What if there had only been 82 82 bulbs? This approach suggests five visits would still be necessary, but is that true?

Chris Lewis - 5 months ago

Log in to reply

Yes. Sadly it is true. While designing the question I thought of giving 100 bulbs. But later I changed my mind though the answer is same.

Saad Khondoker - 5 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...