Live data from Hacker News

Prison Switcharoo

cartalk.com

61–70 of 81 posts

Re: Prison Switcharoo

#61

The solution assumes no prisoners die before they flip A twice. No fault tolerance : p

You could solve this by creating an order of succession for the designated counter in your original meeting.

If no announcement is made when someone dies, however, you've got a problem.

Re: Prison Switcharoo

#62
post #2

The answer: http://www.cartalk.com/content/prison-switcharoo-0?answer

Doesn't this solution make the assumption that the guard will continue to pick prisoners to enter the switchroom indefinitely? If he picked P1, P2, P1, P2, Counter, Counter, would the solution still work?

This assumption is part of the original puzzle: "After today, from time to time whenever I feel so inclined, I will select one prisoner at random and escort him to the switch room."

Re: Prison Switcharoo

#63
post #19

Can the prisoners tell if the switch is in the on or off position?

Yes. The solution assumes that they can agree beforehand about what to call the states of at least 1 switch. I don't think there is a way to come to that agreement beginning the process.

Re: Prison Switcharoo

#64
This is mostly an instance of a class of problem discussed in more depth here: http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board...

I say mostly because the bit where one switch must be toggled and there are 2 switches makes it a bit different from 23C2. I don't think the difference is useful, though; the set of solutions is probably the same as the solution set for 23C2.

Re: Prison Switcharoo

#65
post #50

Earlier quoted context omitted.

Because there's no limit to the amount of time they can play. Not just if P2 is never at the switch, but imagine even if the "counter" player is never at the switch too. Statistically, when talking about an infinite run-time, there's no such thing as "never". Even if it takes a million years, they'll eventually all get turns in the switch room. Or, if you want to look at it more realistically, the run-time is limited…

I knew why I always hated these games, because there are some rules which apparently aren't a big deal, while others seem to matter a lot. In this case, the problem asked for a precise solution, which was given in the resolution example, with no thought at all to that nagging little probability problem. So in order to "solve" this, I would have to know that everybody is basically supposed to disregard certain aspects…

What aspect is being disregarded? Previously you asked " Prisoner 2 is never at the switch at all before the Counter gets to his magic number" Except that if Prisoner 2 is never at the switch, the counter can never reach the magic number. Assume there are 3 prisoners (1,2,C), the magic number is 4. But if the sequence is 1,C,1,C,1,C.... The count will never be greater than 3 (2 is the switch starts as off) The warden said everyone will eventually visit the room. The one thing that was assumed (but not spelled out explicitly) is the game goes on forever. Which means at some point 2 visits the room a bunch of times, and then C will visit again, and will meet the magic number. Nothing to do with probability. And there is no guessing, 44 is a precise number.

Re: Prison Switcharoo

#66

Since there's a password article on the front page too... This problem is very clever, and there is a very clever way to solve this, assuming everyone plays nice. However, that solution assumes perfect collusion. These are prisoners we're talking about, so at least in some cases, we have to assume there may be bad actors involved. I mean this is a cute problem assuming the following: 1. All the prisoners have perfect…

Pretty much you've failed this on an intelligence level.

Give current society and the normal constraints on these popular games the answer to all the above are incredibly obvious, the answers you ask can be deducted. (No prisoner can die, if they could it would have been hinted at)

It's like claiming you can't do cryptic crosswords because the questions are not clear or don't follow proper English.

Although I imagine you are just trying to be difficult :)

Re: Prison Switcharoo

#67
Although the supplied answer guarantees that no prisoner will die from alligators, it does not guarantee their freedom.

The answer includes a major (and I believe flawed) assumption, which is that the visits will be uniformly distributed. However, the puzzle states that "I may choose the same guy three times in a row".

The Counter could visit the switch room 44 times without flipping the switch if such visits were the first 44 chosen. After everyone visits (which would be 1,012 visits since "given enough time, everyone will eventually visit the switch room as many times as everyone else"), the Counter will be no closer to knowing the truth.

Of course, it is true that the greater the number of visits the greater the probability that the Counter's final visit will fall after everyone has visited, but there is no guarantee.

Regardless of how many visits you assume for each prisoner, there will always remain a probability that the Counter's visits will be clustered early in the visitations. In such a scenario, the Counter's role becomes useless and all prisoners will die in prison.

Re: Prison Switcharoo

#68

Can't they all meet in the switch room?

Every now and then you find someone who thinks differently from everyone else. In this case, you.

I might also be thinking wrong. But as far as I know, the puzzle doesn't explicitly prohibit this.
Post reply on HN