Edited: 08/09/2010 04:32 PM
Picture Placeholder: John Rowland
Picture: John Rowland
  • John Rowland

Cells

There are 100 prisoners in 100 separate locked cells. During the night each of 100 prisoner officers visits the cells. The first officer visits every cell. The second officer visits cells 2,4,6,... etc (every 2nd cell), the third officer visits every third cell, the fourth officer visits every fourth cell and so on until the 100th officer visits the 100th cell. On a visit each officer unlocks the door if it is locked or locks the door if it is unlocked.  In the morning, how many prisoners escape and why?
Picture: John Rowland
  • John Rowland
/People%20photos/CartoonMe.GIF" alt="Picture: John Rowland" />
John Rowland
There are 100 prisoners in 100 separate locked cells. During the night each of 100 prisoner officers visits the cells. The first officer visits every cell. The second officer visits cells 2,4,6,... etc (every 2nd cell), the third officer visits every third cell, the fourth officer visits every fourth cell and so on until the 100th officer visits the 100th cell. On a visit each officer unlocks the door if it is locked or locks the door if it is unlocked.  In the morning, how many prisoners escape and why?
108/09/2010 04:08 PM08/09/2010 04:32 PM
Posted: 20/05/2013 05:06 PM
Picture Placeholder: John Rowland
Picture: John Rowland
  • John Rowland

For a cell to be open in the morning, it must be visited an odd number of times. This only occurs for cells whose number is a square number.

That is for cells 1,4,9,16,25,36,49,64,81,100

So the answer is 10

For 1,000,000 cells the answer is 1000 since 1000 is the square root of 1,000,000

Picture: John Rowland
  • John Rowland
/People%20photos/CartoonMe.GIF" alt="Picture: John Rowland" />
John Rowland

For a cell to be open in the morning, it must be visited an odd number of times. This only occurs for cells whose number is a square number.

That is for cells 1,4,9,16,25,36,49,64,81,100

So the answer is 10

For 1,000,000 cells the answer is 1000 since 1000 is the square root of 1,000,000

020/05/2013 05:06 PM20/05/2013 05:06 PM