Can you figure out the answer to this clever prisoner hat puzzle?

Here’s another classic math riddle for you to prune your brain on a little bit: if people were lined up from tallest to shortest (meaning a person can see everything in front of them) and all wearing black or white hats, can you figure out which color hat you were wearing even if you had no idea how many black or white hats there were total? The answer is yes, you can!


Alex Gendler explains for Ted-Ed how simple it is to do. But first, the problem: there are 10 people lined up from tallest to shortest each wearing a different hat color (black or white). The entire group doesn’t know how many black or white hats there are and you can only see the people in front of you but you have to guess what color your hat is. In fact, the entire group needs to guess 9 of the 10 hat colors correctly.

How does a group do it? Watch the video below.

It requires a bit of code and trickery but if you assign odd and even to the terms black and white for the tallest person that’s furthest back, it all makes sense.


SPLOID is delicious brain candy. Follow us on Facebook, Twitter, and YouTube.

Share This Story

Get our newsletter


Perhaps I’m missing something, but couldn’t they just say the color of the hat they see directly in front of them? First person still has a 50% chance, but everyone after would know exactly what color they are.