Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

It is Thanksgiving and the king decides to let out a few prisoners. He sends out

ID: 3122250 • Letter: I

Question

It is Thanksgiving and the king decides to let out a few prisoners. He sends out his top man and tells him to unlock every cell beginning with the first cell. Deciding this is too much, he immediately sends out his number two man and says, "lock every second cell, beginning with cell #2." He thinks on it again and sends his number three man and says "Change the position of the lock on every third cell. If it is locked, unlock it and if it is unlocked, lock it." He sends his number four man and tells him to change the position of the lock on every fourth cell...then the fifth, sixth and so on. He continues in this indecisive manner all night long. If his men act on these instructions in the order he gave them, who will eventually get out of jail?

Explanation / Answer

In the first operation, every cell is unlocked. Then, the cell numbers divisible by 2 are locked. In the third operation, the cell numbers divisible by 3 are unlocked and so on.

Thus if there is one factor of any cell number (i.e 1) it is unlocked. If there are two factors (1 and 2), it is locked. If there are 3 factors (1,2 and 3), it is unlocked and so on.

We can thus conclude that the prison whose number has odd distinct factors will be unlocked. However all numbers are products of two distinct factors unless the two factors are same. This means the number is a product of squares. Or in general the number itself is a perfect square.

The numbers are 1,4,9,16,25,36,49,64 and 81.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote