There are 7 prisoners buried up to their necks in sand. 6 are on one side of a wall, all facing the wall. They are lined up such that the furthest from the wall can see the 5 prisoners closest to the wall, the next furthest can see the 4 prisoners closest to the wall, and so on. This means the closest prisoner to the wall cannot see anyone else. The 7th prisoner is on the other side of the wall, and is in isolation.
Here’s the information they have been given:
They are all logical logicians
There are 7 total prisoners
They are all wearing hats
There are only three hat colors: red, white, and blue
There are at most 3 hats of the same color, and at least 2 of the same color
A prisoner can be freed only if they say their own hat color
What is the best possible scenario for the prisoners? How many go free?
What is the worst possible scenario for the prisoners? How many go free?