April 14, 2013
There are 100 prisoners in a line. They can only look forward and can see everyone in front of them (for example, prisoner 100 can see prisoners 1 to 99 while prisoner 1 can see nobody). A guard puts either a white hat or a black hat on each of the prisoners in such a way that they do not know their own hat color. They are then asked to guess which color hat they are wearing starting with prisoner 100. If correct, the prisoner is released. What should prisoner 100 say to ensure that at least 99 prisoners get released?