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

In a high school, there is a row of 100 lockers numbered form 1 to 100. They are all closed. 100 students line up at the beginning of the row. The first student goes down the row and opens every locker. The second student goes down the row and closes every locker that is a multiple of 2. The third student goes down the row and opens or closes every multiple of three locker(if it is open he close it, and if it is closed he opens it). The fourth student opens or closes every multiple of four, and so on, util the 100th studen opens or closes the 100th locker.
Which lockers are open after the 100th student is done? What is the set of these numbers called? What lockers would be open if there were 200 lockers? 300? n lockers?

2007-03-31 10:44:29 · 8 answers · asked by Eva 1 in Science & Mathematics Mathematics

8 answers

look here for a demonstration

http://www.math.msu.edu/~nathsinc/java/Lockers/

eventually you willnotice that perfect squared numbered lockers are all open

2007-03-31 11:00:48 · answer #1 · answered by gjmb1960 7 · 0 0

I would approach this as a series starting a 1.
If you had only 1 locker, it would be open.
If you have 2 lockers, the first would be open, and the second one closed.

1 - 0
2 - 01
3 - 011
4 - 0110
5 - 01101
6 - 011011
7 - 0110111
8 - 01101111
9 - 011011110
10 - 0110111101

Here we notice that every perfect square is open, and every other number is closed.

Why does this occur?
Each locker will be changed (opened or closed) once for each number in its prime factorization.
1 had 1 number
2 has 2 number (1,2)
3 has 2 numbers (1,3)
4 has 3 numbers (1,2,4)
5 has 2 numbers (1,5)
6 has 4 numbers (1, 2, 4, 6)
7 has 2 numbers (1, 7)
8 has 4 numbers (1, 2, 4, 8)
9 has 3 numbers (1, 3, 9)
10 has 4 numbers (1, 2, 5, 10)
The only time that we will have an count the set of prime factors is when we have a perfect square. Thus the only time that we have a set of changes that leaves a locker open is when we have a perfect square.

The question then is how many perfect squares are in the set of lockers that you have and this is simply the floor of the square root of n.
n = 100 open = sqrt(100) = 10
n = 200 open = sqrt(200) = 14.14314 floor(sqrt(200)) = 14
n = 300 open = sqrt(300) = 17.32051 floor(sqrt(300)) = 17

Thus if there are 200 lockers, 14 are open (186 closed)
if there are 300 lockers, 17 are open (283 closed)

2007-03-31 11:29:39 · answer #2 · answered by Math Guy 4 · 0 0

80 open 20 close.. This problem is easiest to do if you divide 100/10 intially and multiple you answer by 10 at the end. Hope it helps

2007-03-31 11:00:35 · answer #3 · answered by ReducedMags.com 1 · 0 0

Mathguy gave up the answer.
Its hidden in number of perfect squares which give up the final number of Lockers open.

2007-03-31 13:01:38 · answer #4 · answered by JOHN 1 · 0 0

2x + 2y = 20 utilising the simultaneous approach 2x - 2y = 4 ____________ 4x = 24 ( divide via 4) x = 6 substitute x in certainly one of the two equations 2x + 2y = 20 2 (6) + 2y = 20 12 +2y = 20 2y = 20 - 12 2y = 8 (divide via 2) y = 4 answer : X = 6 , Y = 4

2016-11-25 02:43:25 · answer #5 · answered by ? 4 · 0 0

1000-1row open 2nd row closed
200-1rowopen 2nd row closed
300- 1 row CLOSED 2ndrow open

2007-03-31 10:48:45 · answer #6 · answered by big bear 2 · 0 0

I was with you until near the end... I have no idea, but would very much like to know that answer...

2007-03-31 10:47:45 · answer #7 · answered by Anonymous · 0 0

yes....I know how to solve it...

2007-03-31 10:46:58 · answer #8 · answered by Anonymous · 1 0

fedest.com, questions and answers