Not really heavy into the math, but a challenge in logic.

I found it puzzling, but the answer is surprisingly simple.

Thought I would share it here.

The Prisoner Hat Riddle by Alex Gendler on TED Ed.

http://ed.ted.com/lessons/can-you-solve-the-prisoner-hat-riddle-alex-gendler