News for hackers. Stuff that matters.
Re:Puzzle HN: 100 prisoners, 100 boxes... by RiderOfGiraffes on Wednesday November 10, 2010 @05:53PM (#1892095)
I still, really don't understand what you're suggesting. Let's go carefully.

The first person opens 50 boxes. Let's suppose they find their own name (otherwise we're dead anyway). They leave the room, everything is put back exactly as it was, they're not allowed to communicate with the others.

It seems to me you're suggesting the next person opens the second batch of 50. OK. But then they leave the room, everything is put back exactly as it was, and they're not allowed to communicate with the others.

What does the third person do? They're confronted by 100 closed boxes with no idea of anything, except that the first person's name is in the first 50 boxes, and the second person's name is in the second 50 boxes.

So, what now?

Re:Puzzle HN: 100 prisoners, 100 boxes... by Someone on Thursday November 11, 2010 @07:00AM (#1893606)
The word 'close' does not appear in the problem formulation at all. Apparently, we must deduce that all boxes get closed between visits from "they will not know anything about the previous prisoners' experiences ahead of time". I am OK with that, but I still do not think it is a clear way to describe the problem.

So, ignoring that IMO fairly implicit message, the 'answer' I proposed is: prisoner #1 opens 50 boxes, prisoner 2 opens the other 50, and then each prisoner trivially searches for his name.

Nitpicking the text further: what is that ahead of time doing there? What time? What can they learn afterwards?

Re:Puzzle HN: 100 prisoners, 100 boxes... by RiderOfGiraffes on Thursday November 11, 2010 @11:24AM (#1894231)
I can't decide if you're trolling, or genuinely don't understand. This is becoming like explaining a joke, and turning into and endless sequence of refinements.

I'll answer you once more. If you don't get it after that, I don't really care.

  > The word 'close' does not appear in the problem 
  > formulation at all
No, but "open" does. The implication is that the boxes each contain a piece of paper on which exactly one name is written, and that each box is closed.

  > the 'answer' I proposed is: prisoner #1 opens 50 boxes,
  > prisoner 2 opens the other 50, and then each prisoner
  > trivially searches for his name.
You are assuming that the boxes can be left open. That is ruled out when the puzzle says:

  > and they will not know anything about the previous
  > prisoners' experiences ahead of time.
If the boxes remain open then, specifically, the second prisoner will know the names that have been seen by the first prisoner. That's not allowed.

  > Nitpicking the text further: what is that ahead of
  > time doing there? What time?
The time that they enter the room.

  > What can they learn afterwards?
If, for example, their strategy is that everyone opens the first box (which is pretty pointless, but this is just an example) then easch one will learn something about what the others knew. In this way they know things that the prisoners before them knew.

There are puzzles where this is significant. I'm not going to tell you if this is one of them.

I feel that your objections to the wording are very like the programmer who insists on more and more refinements to a specification, and eventually just transliterates the spec into code. Anything that can't be trivially transliterated is queried, until finally the specification is isomorphic to the code.

My apologies if I'm doing you a disservice, but I find it very difficult to find a position from which your questions become reasonable, and I offer answers and explanations in an attempt to learn more. Currently I'm failing, and perhaps it's time to give up.

Re:Puzzle HN: 100 prisoners, 100 boxes... by Someone on Thursday November 11, 2010 @03:40PM (#1895152)
No, I am not trolling. My initial remark (very early in this thread) was just that the formulation wasn't clear to me. I thought that might trigger a rewording that would help later readers. After that, I just answered questions about why I found (past tense!) it not clear. I also think I made clear that I do understand the problem:

  *Apparently, we must deduce that all boxes get closed between visits from "they will not know anything about the previous prisoners' experiences ahead of time". I am OK with that,*
but I guess I should have been even clearer. It may seem nitpicking, but to solve this, I need two things:

    - an understanding of what the problem is.
    - a solution to the problem.
I find it natural that, getting stuck at step 2, to revisit step 1, looking for something I missed on reading it first (Quoting Polya: 'What is the unknown? What are the data? What is the condition?'). When I did that, I started to wonder what the description tried to say. Since the trivial answer that I gave in my initial reply, I did get that, but it didn't exactly jump out to me.

Thanks for the polite replies, but let's close this discussion. It is helping neither of us.

[Dmn: initially, I thought "of course the probability is way better than (1/2)^100'. There are only 100! permutations to choose between", but rereading the problem once more I begin to wonder whether 'in which he randomly distributes 100 pieces of paper'* actually implies that each box receives one piece of paper. Please don't reply, or I may feel obliged to apologize again.]

Re:Puzzle HN: 100 prisoners, 100 boxes... by dedward on Wednesday November 10, 2010 @06:20PM (#1892175)
How do they even know that? Does the game continue until the end - or does it end as soon as one person fails to find their name?
Re:Puzzle HN: 100 prisoners, 100 boxes... by RiderOfGiraffes on Wednesday November 10, 2010 @06:36PM (#1892207)
They don't know that, but you may as well assume they do, because otherwise anything they do is pointless and has no effect.
Re:Puzzle HN: 100 prisoners, 100 boxes... by dedward on Thursday November 11, 2010 @10:29AM (#1894072)
True - but you only know that at the end of the puzzle. The point of the exercise is to maximize their strategy of winning. There is no "winning" strategy - but there is one that is significantly better than what immediately comes to mind.
Re:Puzzle HN: 100 prisoners, 100 boxes... by RiderOfGiraffes on Thursday November 11, 2010 @11:11AM (#1894189)
But that's not the point. The point is that without loss of generality each person can assume that the people before have all found their own names. If not then it makes no difference what they do, they're all doomed.

Unless I've misunderstood you.