prisoners

Thread Starter

recca02

Joined Apr 2, 2007
1,212
mr 9352527,
i'll be honest,
the answer for initial position that i came up with assumed the leader and everybody wud know if someone went first.
which might have been the case if the jailer announced it or he was taken immediately after the meeting.
thus the first person wud automatically become leader and keep the switch in reqd toggling position or let it remain if already so.
this wud have reduced the time a little bit but that might not have been the case (tyrannical jailer :()
but your answer seems much better.
you have the vision of a saint!
i wud like someone to find flaws with it. :)
though i believe it will work for sure.
 

Dave

Joined Nov 17, 2003
6,969
No we'll leave n9352527's answer up, the objective is to get the answer afterall!

I'm just devastated that I'm nowhere near getting this! :D Anyway its morning brew time so will have a look at this properly over my break.

Dave
 

n9352527

Joined Oct 14, 2005
1,198
There is a flaw in it, if the prisoners were picked up in random, then sooner or later they would all be counted and go free. However, it would only take one prisoner to be picked up always right after the leader had been picked up exactly twice or multiply of twice after initial setting to make the strategy fail. E.g. Leader, leader, prisoner 1 or leader, leader, leader, leader, prisoner 1.

That one prisoner would always saw switch A at the same position. But I guess this is true for any possible solution, there is always a repeatable combination or more where the counting process would actually go on forever. We should probably ask a mathematician to prove it :D
 

Thread Starter

recca02

Joined Apr 2, 2007
1,212
, there is always a repeatable combination or more where the counting process would actually go on forever. :D
so does it means that the process will go on for infinity,but the count will remain at the same number or will that also increase.
i believe the count will not increase so that means at least the leader will never be wrong in his declaration thats what we want.or am i getting it wrong?
kindly elaborate.
my answer is very much similar to yours and as far as i think there is no way the count wud be upset by any order of prisoner introduction.
please care to elaborate.
 

Thread Starter

recca02

Joined Apr 2, 2007
1,212
ok since i started this mental torture (brought to you from the book of ancient medieval tortures) i must at least provide the answer i came up with.

the answer is similar to mr n9352527's (looks like machine gen name ,how do u remember it:confused: )
also since i already explained the initial position answer which is full of controversy . i wud only give the process of counting and assume a the original position of the switches as known to the prisoners . based on the initial position the plan changes by very little.


it is decided that the leader must be the only one who wud toggle the switch A from on to off and do the counting. also the leader will never toggle the switch from off to on. if the switch is in off condition he will switch the dummy switch B.
for the rest of the prisoners:
nobody is to toggle switch A from on to off. they must toggle switch A from
off to on at least once and no more than once.rest of the time they can fiddle with switch B .
for every toggle leader makes for switch from on to off he will increment the count by one. this he will do 20 times after which he can make a declaration.

as we are only concerned abt switch A in initial position only 2 possibility of
initially off or initially on will arise.
if switch is initially on the leader will have to toggle switch A 21 times instead of 20 times.

its quite ironical that when we hear the puzzle first without knowing the answer ,we think that two switches are too less since only 2^2 conditions
are possible. in fact we need only one switch and a dummy for cheating the rules.

if any one can come up with a better answer he is always welcome and i will crown him king of the prisoners, though i think mr "numerical digits"'s genius answer is the most fitting one without any controversy.

now the most awaited answer of all.
the 21 prisoners were held captive by (u know who the jailer was:D ) for
spamming.:)


if someone's been thinking that i m kinda weird ,then read this:
__________________
no,
i don,t suffer from insanity,
i enjoy every second of it. :D
 

n9352527

Joined Oct 14, 2005
1,198
so does it means that the process will go on for infinity,but the count will remain at the same number or will that also increase.
i believe the count will not increase so that means at least the leader will never be wrong in his declaration thats what we want.or am i getting it wrong?
kindly elaborate.
my answer is very much similar to yours and as far as i think there is no way the count wud be upset by any order of prisoner introduction.
please care to elaborate.
You are right, it will go on indefinitely, while the count stays the same. The leader will never be wrong, but they will never go free either.

If we allowed for initial switches positions to be known, then I guess it would be foolproof. This infinity thing applies only when the initial positions are not known. I think :D I'm not even sure, it is just my logical analysis, which have been proven to be wrong in too many occasions :D
 

Thread Starter

recca02

Joined Apr 2, 2007
1,212
The leader will never be wrong, but they will never go free either.

If we allowed for initial switches positions to be known, then I guess it would be foolproof.
your logical analysis is praiseworthy,but here nothing is foolproof as far as the factor of infinity is concerned, it applies to all process.
we dont even need to think abt the repetition of certain order.
consider a case that the jailer may not even decide to take someone for more than a certain number of time. situation gets worse if that someone is the leader himself.


no prisoner can escape the claws of carnage at the hands of mr .thingmaker3:cool:
 

bloguetronica

Joined Apr 27, 2007
1,544
Well, they are 21 prisioners. If in the initial condition the switches were in the same position (no matter), afer 21 moves they would be in diffent positions (one up and one down, no matter wich). If, initially, they were in different positions, in the end, they position would be the same (both up or down). The only thing they had to combine was that a prisioner should not toggle a switch twice, no matter their position. So, if a prisioner had toggled a switch before, he would not move a switch. Is that part of the answer?
 

Thread Starter

recca02

Joined Apr 2, 2007
1,212
the process is actually a lot more complex,
a switch must be toggled every time a prisoner is in the cell.
also even if initial conditions are to be known same or different positions of switches do not necessarily prove that they have been toggled 21 times,
they might have been toggled only once and this wud not be known to anyone,
a wrong declaration will kill all 21 of them.
 

nomurphy

Joined Aug 8, 2005
567
The riddle as stated is not soluble, there are too many unknowns. Consider that the prisoners are not only taken randomly (non-sequentially), but also multiple and undetermined number of times. And, that each time a room is entered a switch MUST be flipped. The same prisoner could be taken to the room 100 times in a row and must flip a switch each time. There is no way to create a specific count of 21 given this environment and only two switches.

One way would be an act of subterfuge in regard to communication, where the first time in the room each prisoner secretly scratches the switch or maybe the wall plate. When any given prisoner entered the room and counted 21 scratches, a declaration could be made. But, this defies the post non-communication rule.
 

Thread Starter

recca02

Joined Apr 2, 2007
1,212
The riddle as stated is not soluble,.
actually the riddle does have a solid solution.(try readng the post by mr n952727 or mine)
but there is a possibility that the process can go on for eternity.
its safe to the process will take a long time.
but the two switches do suffice in giving the answer(this question is therefore my favorite and the hardest i was ever able to solve.)
there is no need for scratching the wall only scratching our head gives us the answer :D.
 

nomurphy

Joined Aug 8, 2005
567
actually the riddle does have a solid solution ...but there is a possibility that the process can go on for eternity.
It may be the best workable solution, but eternity is by no means a "solid" solution. This is like expecting a logical one or zero, and finding out you're tri-stated. In bad programming it's called an infinite loop.

And if the jailer is clever, he will observe the switch positions after each prisoner exits the room -- he will soon discover who the leader/counter is, and never select him for the room again (after at least once, to fulfill his part).

But even with a not-so-smart jailer, there is no guarantee that the leader/counter will be selected 21 times, even throughout infinity. The prisoners eventually die without seeing freedom (especially after a sufficient time, that the leader/counter begins contracting Alzheimer's).

It would help to clarify in the conundrum, that the jailer first assembles the prisoners in this particular room to both explain their "situation" and allow them to collude and inspect the room/switches. Otherwise, the prisoners are NOT going to know which is switch A or which is switch B -- which is the count and which is the dummy -- this goes to my assertion that there are too many unknowns.


++++++++++++++++++++++/

Try This version:

In a prison there are 21 people being held captive. The Jailer gives them a conundrum for which the following conditions are stated:

* at any given time a prisoner will be individually taken to a closed room with two switches, each with its own light. By the Jailer's definition if a light is on, the respective switch is on; if a light is off, the respective switch is off. Each time the prisoner is in the room, the prisoner must toggle one of the two switches (one visit, one switch, one toggle).

* each prisoner will visit the room, but can be taken any number of times and in random order. No prisoner knows when another is taken to the room.

* the prisoners will meet collectively only once in the room to plan in advance, but they are not allowed to touch or mess with the switches/lights in any way, only observe and talk. They will not meet or otherwise communicate in any way or fashion after that initial meeting, neither individually nor collectively.

* During the meeting, the Jailer concedes that they can select a Captain that will be taken to the room at least once a week. But the Jailer then stipulates that the Captain must toggle a switch upon each visit, and that the Captain's visits will also be at random intervals each week and uknown to every other prisoner.

* once any given prisoner thinks that all twenty-one prisoners have been to the room and toggled a switch at least once, that prisoner may declare that all have done so -- and all the prisoners will be set free.

* but, if his declaration is incorrect all prisoners will be summarily executed (cruel, cruel, Jailer :mad: ).
 

Thread Starter

recca02

Joined Apr 2, 2007
1,212
agreed,
but the aim of the puzzle was to device a procedure in which the declaration will
never be wrong, irrespective of whether it was ever made or not.
in the meeting it can be decided whether the leftmost or rightmost or topmost or
bottom one is to be called A or B. on wud be the position used normally for on,
if u read mr n9252727's post u might have realized that the initial position's
problem does get solved.
the gaoler is not so wicked (u know who he is :D) else he wud not take even a single prisoner let alone the leader being taken 21 times. lets say it is given that he wud take the prisoners in an unbiased manner.

neways even if i wanted i wont have been able to change the question since i have tried to present it along the same lines which
were present on the newspaper column i saw.
 

m4yh3m

Joined Apr 28, 2004
186
The prisoners would never have a chance to get to any room to play with any switches, because Warden Brian would be highly annoyed. Seeings how said prisoners constantly "resist arrest" while doing things like eating and going to the bathroom, they would conveniently slip and fall and break their necks, thus saving tax payers the burden of covering the cost of a prison wasting electricity by putting two freaking lights with two switches in a room for prisoners to think up logic games.
 

Thread Starter

recca02

Joined Apr 2, 2007
1,212
The prisoners would never have a chance to get to any room to play with any switches, because Warden Brian would be highly annoyed. Seeings how said prisoners constantly "resist arrest" while doing things like eating and going to the bathroom, they would conveniently slip and fall and break their necks, thus saving tax payers the burden of covering the cost of a prison wasting electricity by putting two freaking lights with two switches in a room for prisoners to think up logic games.
heh heh!
thats why they were slaughtered by one of the moderators:rolleyes:
the puzzle was given only to derive sadistic pleasure :D
the puzzle comes from the book of medieval tortures.
 
Top