Author |
Topic: Circular Jail Cell with 100 cells (Read 9987 times) |
|
Jesse
Guest
|
Does anyone know the solution to the ciruclar jail riddle? There's 100 cells, the jailer unlocks all of them, then locks every other one, then turns the key on every third, then every fourth, and so on. Which cells are unlocked when he turns the key on the 100th repitition? Jesse
|
|
IP Logged |
|
|
|
Noke Lieu
Uberpuzzler
pen... paper... let's go! (and bit of plastic)
Gender:
Posts: 1884
|
|
Re: Circular Jail Cell with 100 cells
« Reply #1 on: Feb 3rd, 2005, 9:35pm » |
Quote Modify
|
Yes.
|
|
IP Logged |
a shade of wit and the art of farce.
|
|
|
Nigel_Parsons
Junior Member
Gender:
Posts: 63
|
|
Re: Circular Jail Cell with 100 cells
« Reply #2 on: Feb 6th, 2005, 12:51pm » |
Quote Modify
|
Jesse You can work this one out quite easily and quickly. Each door will be unlocked on circuit one. The even doors will be re-locked on circuit two After circuit three all doors divisible by either two or three (but not by six) will be locked. :: For each number door 1 - 100, count the number of exact divisors it has (including itself and 1). e.g. 100 can be divided by 100, 50, 25,20,10, 5, 4, 2 & 1 i.e it has 9 divisors, and so will have had the key turned nine times from its original position, and so will be unlocked. All doors with an even number of divisors will be locked. Those with an odd number will be open. Clearly all prime number doors will also be locked, having been opened on the first circuit, and locked on their own circuit. :: The rest I leave to you.
|
« Last Edit: Feb 6th, 2005, 12:53pm by Nigel_Parsons » |
IP Logged |
|
|
|
Grimbal
wu::riddles Moderator Uberpuzzler
Gender:
Posts: 7527
|
|
Re: Circular Jail Cell with 100 cells
« Reply #3 on: Feb 9th, 2005, 1:36am » |
Quote Modify
|
Hehe now I understand. :: And the number of exact divisor is odd iff the door number is a perfect square. Therefore, 10 prisonners will see their door open (no. 1, 4, 9, 16, ..., 100). The others will see their door closed, whether or not they are still inside. ::
|
|
IP Logged |
|
|
|
Laura101
Guest
|
|
Re: Circular Jail Cell with 100 cells
« Reply #4 on: Aug 22nd, 2005, 11:24am » |
Quote Modify
Remove
|
This problem is relatively easy once you do the 1st 13 rounds. You simply open all of them the first time around, close every other the second, switch every 3rd the 3rd time, and so on (it's pretty much only possible if it's drawn out). When you look at the pattern after the first few rounds, it looks like this.......occoccccoccccccocccccccco If u see it, you can tell that an o (open) is placed at every perfect square (until 100 if you keep going on). So when they're added up, the answer is 10 open cells placed at #s 1,4,9,16,25,36,49,64,81,100 sometimes u have to see it to believe it
|
|
IP Logged |
|
|
|
mikedagr8
Uberpuzzler
A rich man is one who is content; not wealthy.
Gender:
Posts: 1105
|
|
Re: Circular Jail Cell with 100 cells
« Reply #5 on: Jul 19th, 2007, 2:33am » |
Quote Modify
|
i did this puzzle when i was 8. it's nice when learning counting formualae e.g. squares, triangles, fibonnacci etc. bit easy though.
|
|
IP Logged |
"It's not that I'm correct, it's that you're just not correct, and so; I am right." - M.P.E.
|
|
|
zeroooooooooooo
Newbie
Posts: 1
|
|
Re: Circular Jail Cell with 100 cells
« Reply #6 on: Aug 14th, 2007, 10:53pm » |
Quote Modify
|
I did it in Matlab. Code:status=zeros(100,1); % 0 is locked, 1 is open. for lap=1:100 for cell=lap:lap:100 if status(cell)==0; status(cell)=1; else status(cell)=0; end end end sum=0; for n=1:100 sum=sum+status(n); end sum |
|
|
|
IP Logged |
|
|
|
Topcat
Newbie
Gender:
Posts: 1
|
|
Re: Circular Jail Cell with 100 cells
« Reply #7 on: Oct 30th, 2007, 1:01pm » |
Quote Modify
|
This one is actually easy to do without any iterations. You just need to look at some basic facts. 1) A door is open if it is operated upon an even number of times. 2) A door is closed if it is operated upon an odd number of times. 3) Doors with an even number of factors are open and doors with an odd number of factors are closed. 4) All positive integers have an even number of factors unless they are squares. Given those premises, the only doors which will be open are the squares. Since 10^2 = 100, then the squares of the numbers 1 - 10 are the open doors. That is ten numbers, therefore, there are ten open doors at the end.
|
|
IP Logged |
|
|
|
temporary
Full Member
Posts: 255
|
|
Re: Circular Jail Cell with 100 cells
« Reply #8 on: Jan 22nd, 2008, 9:44pm » |
Quote Modify
|
All the perfect squares.
|
|
IP Logged |
My goal is to find what my goal is, once I find what my goal is, my goal will be complete.
|
|
|
|