News for hackers. Stuff that matters.
Re:Ask HN: What's your favorite math/logic puzzle? by hollowpython on Monday August 01, 2022 @10:06AM (#32306107)
OP, if I understood your puzzle, then 99 prisoners can answer correctly. Is that right?
Re:Ask HN: What's your favorite math/logic puzzle? by tomachello on Tuesday August 02, 2022 @07:03AM (#32317174)
No, only one. Think about it this way - if the warden randomly generates their numbers, each prisoner has a 1/100 chance of guessing it right. So best case scenario is exactly one gets it right, which is actually possible.
Re:Ask HN: What's your favorite math/logic puzzle? by hollowpython on Tuesday August 02, 2022 @08:14AM (#32317570)
Ooooh. The prisoners can't hear other prisoners' guesses then. Ok! But in your example, isn't the probability of winning 1-(99/100)*100?

I don't think your "best case scenario" comment is actually true

Re:Ask HN: What's your favorite math/logic puzzle? by tomachello on Tuesday August 02, 2022 @11:00AM (#32319386)
They just need one prisoner to guess correctly - then they all win. Regarding the base case scenario - if each prisoner guesses randomly, each has a 1/100 chance of guessing correctly, and hence they have an expected number of exactly one correct guess. So no deterministic approach can give 2 correct guesses, since no prisoner actually has any real information about their number.