News for hackers. Stuff that matters.
Re:The Logic Puzzle You Can Only Solve with Your Brightest F... by palotasb on Tuesday July 17, 2018 @07:36AM (#17548922)
Can it still be solved if I generalize the question like this?

  * Same setup: two prisoners A and B overlooking two distinct gardens with a constant nonnegative integer number of statues each.
  * The guard asks A and B each day if there are more than N statues total.
  * They can either guess or pass.
  * Wrong guess is a life sentence for both, game over.
  * Good guess and they are both out instantly.
  * N is a nonnegative integer.
  * N is the same each day.
  * N is the same for both A and B.
  * The question is posed each day to A first.
  * They both know all rules of this game.
  * A and B can't exchange information except indirectly by the fact that the other has passed in his turn and they get the question posed to them again.
So the same except generalizing [18 or 20?] to [more than N, in this case more than 18?].

The solution in the article doesn't seem to require the more specific question and the information derived from it ("the other guy must see either either 20 - X or 18 - X statues"), while this seems to confuse some solutions given here.

The guard asks whether there are at least N statues total. [For any integer N which in the linked case would be 19.]

There are no comments on this comment yet.