this question, I know the solution, just wanted to challenge the great forum here.
100 prisoners stand in a column, last prisoner see 99 prisoners in front of him.
prisoner N+1 see N prisoners in from of him. each see only back. no communication is allowed.
each prisoner been given a hat colored White OR Gray OR Black.
the jail manager ask the 100th prisoner what is the color of his hat, prisoner must answer 1 of the 3 colors,
each prisoner hear the answer.
then jail manager ask same question the 99th prisoner and so on.
at the end, if at least 99 answers are correct - all prisoners are free, else all die.
no tricks - pure mathematics
delay answer, change tone, lowd / wisper : all are not allowed
the only information the prisoners have:
1) what been told until now (what, and not how ...)
2) what they can see in front of each.
3) they all agreed to use a specific algorithem
find out how