Originally Posted by
Neverna
If the prisoner at the back saw 2 white hats, he'd know he has a black hat but as he said he doesn't know, the other 2 hats must either be both black or one is black and one is white.
The prisoner in the middle heard the prisoner at the back and has worked that out too. He looks at the hat of the prisoner in the front. If it was white, he'd know he himself has a black hat. If it saw a black hat, he wouldn't know what colour hat he has.
The prisoner at the front hears the other 2 prisoners, works it out and knows his hat isn't white, therefore it must be black.
Phew.