Hacker News new | ask | show | jobs
by dmurray 2969 days ago
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.
1 comments

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 ...
From the page: '...Before the first prisoner enters the room, the prisoners may discuss strategy'
As I have pointed out in other comments discussing strategy without seeing the room makes finding a strict ordering difficult.

Picture them entering the room and the boxes are on a round filing cabinet. There is no obvious #1 to pick so some of the 100 would pick different #1's. Again, as a math problem it's reasonable to assume they can agree on an order, but it's not stated.

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.

There are many strict orderings that can be used, but we just need one.

Since each number is in a physical draw in a physical room, and no two draws can occupy the exact same space, there is a strict ordering of the drawers given by each drawers distance from a fixed point in the room (say a specific corner agreed on beforehand) in each of the three orthogonal dimensions sideways (x), backwards (y), and up (z).

We say a drawer A is before a drawer B if A.x < B.x; or, if A.x = B.x then if A.y < B.y; or, if A.x = B.x and A.y = B.y then if A.z < B.z

If A.x = B.x and A.y = B.y and A.z = B.z then A = B.

This is a strict ordering that will number the drawers from 1-100, and can be determined beforehand.

Now the prisoners take that order, and shuffle it randomly, without telling the warden what they are doing.

As math that works fine, in practice it's a world of problems. A.x = B.x is a question of finite precision close enough and all prisoners will not agree if A.x = B.X or A > B or A < B. Adding precision tools does not help as you get into things like thermal expansion and the weight of prisoners deforming the floor etc.

So, while that works as a math problem, it may fail as an actual solution.

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.
Or what if it is dark inside the room and they can not read the numbers in the drawers? Or what if there is no gravity in the room and they can not determine which drawers are at the top? Or what if the director used a script or number system none of the prisoners can read or understand? Or what if the numbers are only 100 nm tall inscribed with electron-beam lithography on small pieces of metal? Or what if there is no oxygen in the room? Or what if the room is 10,000 km long, wide, and high?
A Revolving Filing Cabinet or even just a two sided one is a not exactly a 10,000 km long room. But, I think your getting the argument.

If you assume something not explicitly as part of the puzzle it's not necessarily the correct solution.