Hacker News new | ask | show | jobs
by danbruc 2975 days ago
From the problem description on Wikipedia.

The director _randomly_ puts one prisoner's number in each closed drawer.

1 comments

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.

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.

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.

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.

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...)