English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

You have 100 light bulbs numbered (1-100), each one is connected to it own switch and initially they are all on. You count up to 100 in your head, and for each number, you flick the switches that are factors of the current number that you have in your head. For example, when considering number 12, you would flick switches 1,2,3,4,6 & 12. At the end, which light bulbs are on?

2006-08-20 10:35:39 · 13 answers · asked by Chris S 2 in Science & Mathematics Mathematics

13 answers

Well, think of it this way. For any light bulb N, you will flick the switch for that light bulb every time you encountered a multiple of N. Thus, since you will encounter the integer part of 100/N such multiples, if this integer part is even the light bulb will still be on at the end, otherwise it will be off. Thus ([a] means integer part of a):

[100/N] = 2 for N in the set {34,35, ... , 50}
[100/N] = 4 for N in the set {21,22, 23, 24, 25}
[100/N] = 6 for N in the set {15,16}
etc...

In general, if we ask how many N are there such that [100/N] = 2k for some given k, the answer should be [100/(2k)] - [100/(2k+1)] (i.e. those N for which N*(2k) <= 100 but N*(2k+1)>100).

Thus the formula for the number of light bulbs still on is : [100/2]-[100/3]+[100/4]-[100/5]+... (keep summing up terms until the terms become zero, e.g. [100/101]=0). Furthermore, bulb #N is on if [100/N] is even.

2006-08-20 12:34:30 · answer #1 · answered by Ando M 1 · 1 0

Hi there. Well the bulbs that will be on at the end are:

1 2 5 6 7 8 10 12 15 16 21 22 23 24 25 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 and 50 :)

I wrote a simple algorithm to run the process and got the answer by running it on MATLAB (It's a mathematical program. Very useful for engineers). Anyways, the code is as follows:

function [bulbs,on_bulbs] = flick()

x(1:100) = 1;

for (i=1:length(x))
for(j=1:i)
if(mod(i,j)==0)
if(x(j)==0)
x(j) = 1;
else
x(j) = 0;
end
end
end
end

bulbs = x;

on_bulbs = 0;

for (i=1:length(bulbs))
if(bulbs(i)==1)
on_bulbs = [on_bulbs,i];
end
end
on_bulbs = on_bulbs(2:length(on_bulbs));


It is easier to try this by hand using a pencil and a piece of paper for ten bulbs. The answer that you would get for 10 bulbs using your own solution and using the code is bulbs 1, 4, and 5.

Take care.

2006-08-20 11:24:03 · answer #2 · answered by YAN-1 1 · 0 0

33 of them?

1, 2, 5, 6, 7, 8, 10, 12, 15, 16, 21, 22, 23, 24, 25, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50

I don't think there is any kind of formula for working this out (other than brute force). There is, however, a standard GCSE maths question which is slightly different. Rather than flicking the light swtich for factors of the number in your head, you flick the lightswitch for numbers which are multiples of the number in your head (so for 12, you would flick 24, 36, 48, 60 etc but not 12)

In this case, only square numbers would be swtiched on at the end

2006-08-20 11:06:28 · answer #3 · answered by Anonymous · 0 0

If you start at 1 and count to 100, then all bulbs are off. In your example of the number 12, you would really only turn #12 off, since you have already passed 1, 2, 3, 4, and 6 and turned them off before you get to 12. Even if you start at 100 and count backwards to 1, all the bulbs still go off. When you get to the number 97 going backwards, 97 is a factor of 97 so it gets turned off. Is something from your question missing?

2006-08-20 10:58:25 · answer #4 · answered by kevvsworld 3 · 0 0

As you count from 1 to 100 each number is a factor of itself. Therefore all bulbs will be switched off.
None of the light bulbs is on.

2006-08-20 21:49:42 · answer #5 · answered by Clinkit 2 · 0 0

7

2006-08-20 10:42:23 · answer #6 · answered by Dee 4 · 0 0

All the bulbs represented by prime numbers.

2006-08-20 10:51:19 · answer #7 · answered by iandanielx 3 · 0 0

it's to late to think
I'll try and answer in the morning

2006-08-20 11:14:01 · answer #8 · answered by Red 3 · 0 0

None.

2006-08-20 10:44:38 · answer #9 · answered by Anonymous · 0 0

Who do you think i am? Einstien?

2006-08-20 10:45:55 · answer #10 · answered by Bilal Hares 3 · 0 0

fedest.com, questions and answers