recategorized by
782 views
1 votes
1 votes
A prison houses 100 inmates, one in each of 100 cells, guarded by a total of 100 warders. One evening, all the cells are locked and the keys left in the locks. As the first warder leaves, she turns every key, unlocking all the doors. The second warder turns every second key, re-locking every even numbered cell. The third warder turns every third key and so on. Finally the last warder turns the key in just the last cell. Which doors are left unlocked and why?
recategorized by

2 Answers

Best answer
2 votes
2 votes
Look if any cell is operated odd number of times then that cell remains open othewise it is closed.

We observe that the mth cell is operated n times where n = no. of divisors of m.

So those cell nos. have odd no. of divisors will be opened at last.

Only perfect square numbers have odd number of divisors (THINK)

So all the perfect square cells will be open

those are 1,4,9,16,25,36,49,64,81,100
selected by
1 votes
1 votes
The initial state of every lock = locked

On every NON-SQUARE numbered door, the number of wanders changing the state will be EVEN. And hence the door will return to locked position.
E.g. Door No.$8$: Warders $1, 2, 4$ and $8$ will act.
Door No.$30$: Warders $1,2,3,5,6,10,15,30$ i.e. a total of $8$ warders will act.

On every SQUARE numbered door, the number of wanders changing the state will be ODD. And hence the door will be in  unlocked position.
E.g. Door No.$16$: Warders $1, 2, 4, 8$ and $16$ will act.
Door No.$36$: Warders $1,2,3,4,6,9,12,18,36$ i.e. a total of $9$ warders will act.
So door No. $\color{gold}{1, 4, 9, 16, 25, 36, 49, 64, 84}$ and $\color{gold}{100}$ will be in Open position and rest in Locked position.

Concept used: Perfect squares have odd number of factors and others have even number of factors.
edited by

Related questions

0 votes
0 votes
2 answers
1
Sammohan Ganguly asked Apr 20, 2018
436 views
Why does a perfect square number have odd number of factors?
2 votes
2 votes
1 answer
2
Aghori asked Jul 12, 2017
2,043 views
Find the remainder of $\frac{9^{1}+9^{2}+...+9^{n}}{6}$ where $n$ is multiple of 11.I am getting $0$ or $3$. But given answer is 3. Can anyone check?
3 votes
3 votes
1 answer
3
Aghori asked Jul 12, 2017
546 views
If $N = 1!+2!+3!+...+10!$. What is the last digit of $N^{N}$?
0 votes
0 votes
1 answer
4
NarutoUzumaki asked Oct 6, 2023
164 views
Prove that :In triangular series1 = 11+2 = 31+2+3 = 61+2+3+4 = 10…………..Triangular number in 8n+1 always form perfect square .