## Hikaru's 3 Hat-Color Prisoner Problem

#### Posted Aug. 20, 2015. Updated Apr. 4, 2016.

The author of this puzzle is __Hikaru Saito__ a physicist currently working at Kyushu University in Japan. This puzzle is a variant of the well-known __red/blue hat prisoners in a row problem__. The solutions are quite different though, and knowing the solution to the traditional problem may actually hinder your ability to solve this one. The puzzle was recently __featured in Quanta Magazine's puzzle column__ alongside the 2 hat variant and a third which was unknown to me! Since the solutions are out there now, I have gone ahead and posted my solution to the puzzle __here__.
The puzzle goes like this:

10 prisoners are lined up single-file. The warden puts colored hats that are either blue, red, or yellow on each of the prisoners. They are lined up such that each prisoner can see the colors of the hats of everyone in front of her, but does not know her own color or those of anyone behind.
The warden then, starting from the back of the line, asks each prisoner to state the color of his/her hat. The prisoners are not permitted to say anything other than a color (red, blue, or yellow), and they can only speak it once. The warden will then go to the next prisoner and repeat the question and continue until all prisoners have been asked.
At the end, those prisoners who answered incorrectly the color of their hat will be executed. Assuming that the prisoners are permitted to confer with each other before the line-up of doom, what plan could they conceive of which would maximize the number of lives saved?
Let us assume that the warden can overhear this plan and adapt his hat-placement choices so as to counter any attempts at reducing deaths. e.g. if all the prisoners decide to announce blue as their color thinking that this could guarantee a 1/3 chance of survival, the warden could simply put red hats on everyone.
Feel free to email me if you think you have an answer! (disclaimer: there is no prize for solving it)