Author Topic: Prisoners and hats puzzle  (Read 2085 times)


  • Party - TUP
  • Posts: 192
Prisoners and hats puzzle
« on: September 19, 2014, 12:37:16 am »
According to the story, four prisoners are arrested for a crime, but the jail is full and the jailer has nowhere to put them. He eventually comes up with the solution of giving them a puzzle so if they succeed they can go free but if they fail they are executed.

The jailer puts three of the men sitting in a line. The fourth man is put behind a screen (or in a separate room). He gives all four men party hats (as in diagram). The jailer explains that there are two red and two blue hats; that each prisoner is wearing one of the hats; and that each of the prisoners only see the hats in front of them but not on themselves or behind. The fourth man behind the screen can't see or be seen by any other prisoner. No communication between the prisoners is allowed.

If any prisoner can figure out and say to the jailer what color hat he has on his head all four prisoners go free. If any prisoner suggests an incorrect answer, all four prisoners are executed. The puzzle is to find how the prisoners can escape, regardless of how the jailer distributes the hats.

Iain Keers

  • Party - TUP
  • Posts: 12057
Re: Prisoners and hats puzzle
« Reply #1 on: September 19, 2014, 08:06:19 am »
Well the prisoner behind the screen can't guess anything cos he has zero info.

Guy at C can see 2 of the hats so if they're both red or blue he knows he's the opposite. If they're mixed then him and D are mixed too, but since he can't see D Idk how he'd possibly know which colour he was. So it would be 50/50 really, but that's the case for all four prisoners unless AB have the same colour hats.
"Come to me, all who labour and are heavy laden, and I will give you rest." ~ Mt 11:28


  • Political - Member of Parliament
  • Posts: 124
Re: Prisoners and hats puzzle
« Reply #2 on: September 19, 2014, 08:59:53 am »
only c can guess.
if he sees 2 blue in front of him he says red
if he sees 2 red in front of him he says blue
if he  sees 1 red and 1 blue in front of him then he cant know whats on his head
if c says nothing, then b can assume that that is because he and a have different hats.
if b assumes that then he can see what colour a has and and say the opposite colour
« Last Edit: September 19, 2014, 09:07:33 am by dougal4chaos »
I pledge allegiance to the flag of the UK BUT not the flag of the EU to which it belongs.
"We find out who did it and we kill them, we kill their supporters and we kill their friends, and then we kill any one that liked what they did"

Sir Digby Chicken-Caesar

  • Global Moderator
  • Posts: 13996
Re: Prisoners and hats puzzle
« Reply #3 on: September 19, 2014, 02:19:14 pm »
I like this one. There's a few quite similar.

HRH Pope Digby V, Prince of Hanover, KC, KG, KP, GBE, OGS, FRSL, BGD, PhD
Chancellor of BBH Open University


  • DamnKrantz
  • Posts: 2
Re: Prisoners and hats puzzle
« Reply #4 on: November 14, 2014, 07:55:55 am »

Great I was hoping this would come over from the old wikipedia