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

In a country far away, there is a tradition on the Independence day to give amne

ID: 3008979 • Letter: I

Question

In a country far away, there is a tradition on the Independence day to give amnesty to some prisoners. There is only one prison with 100 cells, numbered from 1 to 100. One year, to decide which prisoners will be set free, the president of the country does the following. First, he opens every cell. Then, he closes every second sell (numbered 2, 4, 6, 8... and so on). Then he changes the state of every third cell (numbered 3, 6, 9, 12...): if the cell was open, he closes it, and if the cell was closed, he opens it. Then he changes the state of every fourth cell, then every fifth cell, and so on. The last iteration is when he changes the state of every 100th cell (the cell numbered 100). After that, the prisoners with open cells are free to go.

The question is: how many prisoners were released and what are the numbers of open cells at the end?

Explanation / Answer

We divide the instances…, ex-2,4,6 in one go

3,6, 9 in another go.

obviously person #2 will do all the even numbers, and say person #10 will operate all the cell that end in a zero. So who would operate the prison cell 48: Persons numbered: 1 & 48, 2 & 24, 3 & 16, 4 & 12, 6 & 8 ........ That is all the factors (numbers by which 48 is divisible) will be in pairs. This means that for jailor who opens a cell on there will be he to close it off. This will result in the cell being back at it's original state.

So why aren't all cell closed ? Think of cell 36:- The factors are: 1 & 36, 2 & 13, 6 & 6 Well in this case whilst all the factors are in pairs the number 6 is paired with it's self. Clearly the sixth prison will be opened once and so the pairs don't cancel. This is true of all the square numbers.

There are 10 square numbers between 1 and 100 (1, 4, 9, 16, 25, 36, 49, 64, 81 & 100) hence 10 open cells at the end.