I have created several riddles with my brother, and one of my favourite ones is this one. It is based on the classic prisoner hat riddle, but it has a twist.

TASK: You have to guess which ones are wearing green hats and which ones are wearing black:

enter image description here

DESCRIPTION: A, B and C can see the hats of their two mates, but not their own hat. Pay attention to the order, they give tips one by one:

1- A can see the hats B and C are wearing, but he doesn’t know what hat he’s wearing

2- After listening to A, C figures out which hat he must be wearing. So, C says, "I know my hat now". This statement tells A,B and D that C didn't know his hat color before A spoke but he knows it now, after A has spoken

3- Finally, D, who is hidden behind a wall and can’t see anyone, figures out what hat he is wearing, just by hearing what A and C have said.

You don’t know how many green and black hats there are of each color (4 in total, all of them must be wearing one), but they do know how many hats there are of each color. For example, if B were the only black hat, A would know his hat is green.

We already know B is wearing a black hat. You have to guess A's, C's, and D's hat! There is only one possible solution

  • 1
    $\begingroup$ This isn't exactly a 'modest' puzzle. $\endgroup$
    – PDT
    Sep 18, 2020 at 2:16
  • 1
    $\begingroup$ @GuessHat just wanted to mention that the picture is much appreciated. I don't see many on here with graphics. $\endgroup$
    – mjjf
    Sep 18, 2020 at 16:31

1 Answer 1


Let's start with the obvious:

There are not one or four black hats. In either case, A would know his hat color immediately.


If there are two black hats, for A to not know his hat color, C must be wearing a green hat. Likewise, if A is wearing the second black hat, C can deduce his own hat is green without A's input. Therefore, A and C's hats are both green. D knows from both A and C that their hats are the same color, in this way. I fail to see how D deduces his own hat color, in this line, though; if he cannot see B, he does not know whether it is black or green, so this does not work out.

In the case where there are three black hats: neither A nor C can see the single green hat. A's statement tells C that he is not wearing the green hat, leading him to claim that he knows his hat color. Now, let's look at D: he learns from A that neither B nor C is wearing the green hat, and from C that A isn't either. Therefore he must be wearing the green hat.


A, B, and C's hats are black. D's is green.

  • $\begingroup$ rot13(N, O, naq P znxr frafr, ohg jbhyqa'g vg fgvyy or nzovthbhf sbe Q? Va beqre sbe guvf gb or hanzovthbhf, Q zhfg xabj gung P qvqa'g nyernql xabj gurve ung pbybe orsber gurl fcbxr. Q pbhyqa'g xabj gung jvgubhg cevbe xabjyrqtr bs P, be gryrcngul. Q pbhyq nffhzr vg V fhccbfr.) $\endgroup$
    – mjjf
    Sep 18, 2020 at 4:22
  • $\begingroup$ I think you're right on that, but I also think the implication would be that ROT13(gurer vf ab fbyhgvba), given the other scenario? $\endgroup$
    – Braegh
    Sep 18, 2020 at 11:10
  • $\begingroup$ The reasoning is perfect, I wouldn't have been able to explain it better!!! I just posted a more difficult one, I bet you can't resolve it as quick this time... Good luck! puzzling.stackexchange.com/questions/102187/… $\endgroup$
    – Guess Hat
    Sep 18, 2020 at 14:55
  • $\begingroup$ @GuessHat if this is right, please mark it as the accepted answer. $\endgroup$
    – mjjf
    Sep 18, 2020 at 16:06
  • 1
    $\begingroup$ @GuessHat Yeah, I suppose if I was D I would interpret it that way. It wasn't clear that he knew that for a fact beforehand, but I can see it being the more likely conclusion after hearing the others' discussion. $\endgroup$
    – mjjf
    Sep 20, 2020 at 1:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.