Math, asked by alkajindal1974pagluw, 1 year ago

4. Suppose you're in a hallway lined with 100 closed lockers.
You begin by opening every locker. Then you close every second locker.
Then you go to every third locker and open it (if it's
closed) or close it (if it's open). Let's call this action
toggling a locker. Continue toggling every nth locker
on pass number n. After 100 passes, where you
toggle only locker #100, how many lockers are open?

Answers

Answered by topanswers
37

Answer:

Ten lockers are left open after 100 passes.

Step-by-step explanation:

Initial position of all the 100 lockers is 'Close'.

For the first locker, it is toggled only once, so, it will be kept open.

For the second locker, it is toggled at the pass 1 and 2. So, it is left closed.

For the third locker, it is toggled at the pass 1 and 3. So, it is left closed.

For the fourth locker, it is toggled at the pass 1, 2 and 4. So, it is left open.

For the fifth locker, it is toggled at the pass 1 and 5. So, it is left closed.

…..

For the ninth locker, it is toggled at the pass 1, 3 and 9. So, it is left open.  

Similarly, for the 100th locker, it is toggled nine (odd) times (i.e,) at the pass 1, 2, 4, 5, 10, 20, 25, 50 and 100. So, it left open

It can be noticed that if the locker is toggled for even number of times, then it is left closed.

And, for the odd number of toggles, it is left open.

We know that only the perfect square (numbers) have odd number of factors. Eg. Factors of 4 are 1, 2 and 4.

So, only the ten locker numbers (perfect squares) such as 1, 4, 9,16,25,36,49,64,81 and 100 will be left open.

Answered by Harsheyaroda
8

Answer:

Answer: 10 lockers are left open:  

Step-by-step explanation:

Lockers #1, 4, 9, 16, 25, 36, 49, 64, 81, and 100.  

Each of these numbers are perfect squares. This problem is based on the factors of the locker number.  

Each locker is toggled by each factor; for example, locker #40 is toggled on pass number 1, 2, 4, 5, 8, 10, 20, and 40. That's eight toggles: open-closed-open-closed-open-closed-open-closed.

The only way a locker could be left open is if it is toggled an odd number of times. The only numbers with an odd number of factors are the perfect  

squares. Thus, the perfect squares are left open.  

For example, locker #25 is toggled on pass number 1, 5, and 25 (three toggles): open-closed-open.

Similar questions