26.0k views
2 votes
A school has 1800 students and 1800 light bulbs, each with a pull cord and all in a row. All the lights start out off. The first student walks down the hall and pulls each cord turning them on. The second student pulls the cord on all the even numbered light bulbs turning those ones off. The third student approaches every third light bulb and changes it's state. If it was on, he turns it off, if it was off, he turns it on. The fourth student does the same to every fourth light bulb and so on through the 1,800 students. After all the 1,800 students pass down the hall, how many light bulbs end up in the on position and which ones are they?

User Miguel Prz
by
5.0k points

1 Answer

1 vote

Solution-

A school has 1800 students and 1800 light bulbs, each with a pull cord and all in a row.

As all the lights start out off, in the first pass all bulbs will be turned on.

In the second pass all the multiples of 2 will be off and rest will be turned on.

In the third pass all the multiples of 3 will be off, but the common multiple of 2 and 3 will be on along with the rest. i.e all the multiples of 6 will be turned on along with the rest.

In the fourth pass 4th light bulb will be turned on and so does all the multiples of 4.

But, in the sixth pass the 6th light bulb will be turned off as it was on after the third pass.

This pattern can observed that when a number has odd number of factors then only it can stay on till the last pass.

1 = 1

2 = 1, 2

3 = 1, 3

4 = 1, 2, 4

5 = 1, 5

6 = 1, 2, 3, 6

7 = 1, 7

8 = 1, 2, 4, 8

9 = 1, 3, 9

10 = 1, 2, 5, 10

11 = 1, 11

12 = 1, 2, 3, 4, 6, 12

13 = 1, 13

14 = 1, 2, 7, 14

15 = 1, 3, 5, 15

16 = 1, 2, 4, 8, 16

so on.....

The numbers who have odd number of factors are the perfect squares.

So calculating the number of perfect squares upto 1800 will give the number of light bulbs that will stay on.

As,
√(1800) =42.42 , so 42 perfect squared numbers are there which are less than 1800.

∴ 42 light bulbs will end up in the on position. And there position is given in the attached table.

A school has 1800 students and 1800 light bulbs, each with a pull cord and all in-example-1
A school has 1800 students and 1800 light bulbs, each with a pull cord and all in-example-2
User Life Is Complex
by
5.4k points
Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.