Hacker News new | ask | show | jobs
by Retric 2969 days ago
Random does not mean independently chosen random number.

Consider, if you pick a completely random location then two numbers could end up in the same box so one prisoner's number implies there is some order.

Further, random does not mean even distribution. The logic is really based on a very specific kind of random distribution.

2 comments

Colloquially, "random" does imply a uniform distribution.
Depends on context, I randomly tossed it does not imply all locations it might end up are equally likely. As it rolls after impact it's more likely to end up in a dip than on top of a hill etc. At best the direction is random but not necessarily the angle with respect to the ground.

Basically, even distributions are very rare in the real world.

Even if the warden's assignment of numbers to boxes is not random (perhaps he knows the suggested winning strategy and wants to foil it), the players can make it random by randomly permuting the numbers on the outside of the boxes. This guarantees their 31% success rate even against an adversarial warden.
Players can't communicate. So, this comes down to what that means, but your suggestion is reasonable and might depending on how the problem was carried out apply.

aka, they can't all individually come up with the same random numbers without communicating. But, they could all independently come up with the same strategy if the all saw the same numbers on the outside of the boxes.

They can communicate beforehand to come up with this scheme - it's clear they just can't communicate after looking at the boxes.

The generic version of the scheme is, after looking in box N, look in box f(N) where f is any bijective function from [1, 100], and all the prisoners agree on the same choice of f. The version described on the wikipedia page corresponds to f(N) := N, but any of the other 100! such functions would do so long as they agree on the same one.

You are treating this as a math problem not a puzzle. Is there anything written in the description that says they can all agree to an ordering that they can then apply their function to. Aka if they say box 1 maps to box 37 they need to agree what box 1 is and what box 2 is ...
They can communicate, before they start. That's how they share the strategy with each other.

> Before the first prisoner enters the room, the prisoners may discuss strategy—but may not communicate once the first prisoner enters to look in the drawers

So they just write down a random permutation and give a copy to each prisoner while discussing strategy.

They need to communicate before seeing the boxes. You assume the can decide on a strict ordering before looking at the boxes. If they say box one is the highest box closest to the door their might be two boxes that satisfy that criteria. As a math problem it's assumed that such problems don't occur, as a riddle things are not so clear.

On the other hand, if they could communicate after getting a reasonable definition of the room and know they would not be moved then sure strict ordering is easy. But, nothing says they are given that.

Further, they need to pick random numbers without the warden deducing the scheme, but let's assume the can use a public key crypto to get around the need for privacy.

From the problem description on Wikipedia again.

Before the first prisoner enters the room, the prisoners may discuss strategy—but may not communicate once the first prisoner enters to look in the drawers.

So they certainly could all use a pre-agreed random permutation to compensate for any insufficient or evil [non-]randomness introduced by the director.

I was not clear in my wording. They need to enter the room and know box one is this and thus I should treat that as box 22. But again without seeing the boxes they need a system to unambiguously order the boxes. That's not strictly a math problem as they are not say given exact x,y,z locations or precise measuring tools etc.
If you shuffle a deck of cards, do you ever get a 2/5 of heart/diamonds?
One operation to shuffle a deck of cards is to cut it creating a random offset.

So, I have seen someone just move the top few cards when asked to shuffle the deck. This makes a small offset more likely than you might assume. Remember the odds should be evenly spread across 52! which means in all of human history each deck should be unique, but in practice people have played with a default deck. (http://www.philly.com/philly/news/new_jersey/20120904_A_C__s...)