Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Some discrete mathematicians are interested in this sort of problem, which they call "simultaneous hat guessing". There are quite a few papers, in case anyone is interested and unfamiliar with this sort of thing.

Another fun problem, probably better known, is sequential hat guessing: take 100 people in a line, arranged so that each person can see everyone in front of them, but no-one can see any of the people behind them. Everyone is given either a red or black hat to wear, but no one can see the color of their own hat, or the hat of anyone behind them. So the person at the back of the line can see everyone's hat but their own, the next person can see everyone's hat except the first person and their own, etc.

Now starting with the back of the line, each person is asked to publicly guess the color of their hat. The participants are allowed to agree upon a strategy, how many people can they guarantee guess correctly?

Things get crazy if you allow an infinite countable line of people, and put ear-muffs on anyone so that no one gets to hear anyone else's guess. Surprisingly, you can still save almost everyone (if you allow the axiom of choice).



The solution requires infinite memory (not just arbitrary finite memory, but an actual, non-compressible infinite value) which is of course impossible in reality.

Usually problems on "countable" structures need only finite memory (to process infinite streaming input), so this problem is rather misleading.


Yes, this is a great one. Unless I'm mistaken, the best strategy has potentially one error, but all the rest would get it right, yes?


that's exactly it


An actual fun problem:

100 prisoners are each assigned a black or white hat, at random. As always, they cannot communicate after the hats are assigned. Then they are shown each other. None sees own hat, everyone sees everyone elses hat. Then they are led into separate rooms and each guesses their own hat color.

They win only if everybody guesses correctly. What strategy maximizes the probability of that event?


Gurl pna trg svsgl creprag ol rirelbar thrffvat fhpu gung gur ahzore bs oynpx ungf vf rira (be bqq).

I wouldn't be surprised if this is optimal, but I also wouldn't be surprised if it's not.


Yikes. Rot13?? I haven't seen this since the days of UseNet, circa 1995! :-D




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: