Brain Wars | Episode 3 – Open lockers

Questions

A very rich celebrity decides to safeguard his wealth in a very
innovative way. He buys a cupboard having 10×10 indentical lockers
(numbered from 1-100) having single key. He passes through all the
lockers in numbered order and opens all of them. Then he goes to the
first locker and locks every alternate lockers till he reaches the
100th locker. Then he again goes to the first locker and opens every
third locker such that if the locker is already opened he closes it.
Simillary for the fourth pass he opens/locks every fourth locker and
continues the process for 100 passes. At the end of the 100th pass he
is left with few open lockers and uses them to keep his wealth. In
rest of the lockers he installs laser alarms so that even a wrong
selection of locker by the thief would lead him behind the bars. So
fellas do you have enough force to identify those wealthy lockers?

Answer:

Just 10 lockers are left open. All of which are perfect squares up to 100.

The trick is to check how many lockers in the row have an odd number of factors.
Lockers No.1 has an odd number of factors, but locker No.2 has an even number of factors. locker No.3 is even, but locker No. 4 has an odd number of factors. So locker No.1 and locker No.4 remain open. The 9th locker will also have odd number of factors, so it will remain open too. See a pattern emerging?

All the lockers that are going to remain open are perfect squares, because they have an odd number of factors. You have 100 passes, so you can go up to 10 times 10, i.e. 10 squared. So you have 10 perfect squares that correspond to the 1st, 4th, 9th, 16th, 25th, 36th, 49th, 64th, 81st and 100th locker, which will all remain open.

Leave a Reply

Your email address will not be published. Required fields are marked *