Skip to content

Colorful Variant of The Prisoners with Hats Riddle

An orderly single file line of people, extending through a dark corridor. Each person faces forward and wears a hat of a unique color.

DifficultyCategoriesSourceI know the solution
🌶️🌶️🌶️🌶️ Extra SpicylogicDorit and Aharon HochbaumYes

After you narrowly survived yesterday’s trials, the evil logician unfortunately recaptured you. Once again he rounds you and your fellow inmates up, and proclaims:

Attention all prisoners. Sorry for capturing you again. I have one more trial to run, and I promise this will be the last one; to be honest, I can’t think of anything harder to put you through anyways…

I now have in my possession 101 uniquely-colored hats. Please take a look at them now - you can see that each hat is clearly distinct from each other. As per usual you will each receive a hat that you cannot see, but this time the hat will be randomly selected from this set of 101, meaning that there’s no longer the possibility of any of you ending up with the same colored hat.

Once your hats are distributed you will be arranged in a single-file line in an order of my choosing. The person in the back of the line must guess their hat color first, then second from the back, and so on, all the way until every single one of you has guessed correctly. Each of you will know:

  • the 101 available colors
  • the color of the hats on everyone in front of you in line
  • the colors guessed by everyone behind you in line

You will not know which one of the 101 hats was not selected to be placed on anyone’s head.

That’s the setup - otherwise, the same rules apply. Strategize today, since tomorrow you cannot communicate. A single wrong guess and you are all executed!

…What strategy will maximize your groups chance of survival?

Daniel’s Notes

This is one also took me a very long time to solve - I was working on it in class while studying abroad in Madrid. The eventual answer was quite satisfying!