## Black or white?

Posted by Chris on September 1, 2010 – 5:06 pm

Three men A, B and C are captured by cannibals. They are tied to stakes. A can see B and C. B can only see C. C can’t see either A or B. They are then shown five hats. Three are black and two are white. The men are then blindfolded. A hat is put on each one’s head, the remaining two hats are hidden away and then the blindfolds are removed. They are told that if one of them can call out the colour of his own hat, they can all go free, otherwise they’ll really be in hot water. \they are not allowed to confer.

After a short time A calls out, “I don’t know my hat colour”. Soon B calls out, “I don’t know my hat colour either”. C thens called out the colour of his hat.

What colour is C’s hat?

September 1st, 2010 at 5:37 pm

Ah, this one I know, but I’m not saying …

September 1st, 2010 at 5:55 pm

If A saw both B and C wearing white hats, A would know that his hat is black (because there are only 2 white hats). A saying “I don’t know” tells that he sees either one or two black hats in front of him, but we don’t know which.

B knows that because A does not know, then A must see either one or two black hats in front of him. If he saw C wearing a white hat, then B would know that his hat is black. B calling out “I don’t know” tells that he is unable to guess because the hat in front of him is black.

C then is able to correctly guess his hat colour, which is black.

September 1st, 2010 at 6:17 pm

A cannot see 2 white hats, which would grant him knowledge of his own hat colour. 2 white hats would tell A he was wearing black, and no other combination will allow him such insight.

B, knowing this, cannot see a white hat on C, preventing him from knowing his own hat colour. If he saw a white hat on C, he could deduce from A’s statement, that he were wearing black. But since C is wearing black, B could be wearing black or white.

C, performing all the necessary permutations in his head, easily deduces that he is wearing a fantastically stylish black hat.:)

September 1st, 2010 at 6:21 pm

C has a black hat.

A could only know if B and C had white hats, which would mean A has a black hat.

B could only know if C had a white hat, because A could only answer if both were white, but given that only C has a white hat, B must have a black hat. Since C does not have a white hat, B doesn’t know what color the hat is.

C knows that the hat is black because neither A nor B had enough information to answer. By previous reasoning, C must have a black hat.

September 1st, 2010 at 7:14 pm

You all did better than when this was first posted. Thanks to Eketahuna for trying to make it last a bit longer.

September 2nd, 2010 at 4:41 am

The only thing I don’t like in this particular problem is that it makes the cannibals look extremely stupid – it is easy to be seen by induction that no matter how many (n) people are captured, if you have n black and n-1 white hats, at least one person will always be able to guess the color of their hat (for example, the last one will always know it!) and, thus, the poor creatures have no chance to feed themselves with fresh meat

September 2nd, 2010 at 5:33 am

c has black hat…the reason same above.

September 2nd, 2010 at 6:50 pm

reply to slavy, first of all, its a riddle, its not real, 2nd of all, thats assuming that everyone whose put through this test figures it out.

September 2nd, 2010 at 10:58 pm

Black (: my reason seemed much less complicated in my head than said abiove.

September 3rd, 2010 at 12:49 am

OK, to continue my previous post, I would like to propose the following upgrade to the problem: Let us have N captured men tied to stakes, so that the first one can see all the others, the second one can see all the others, but the first one and so on. The last one doesn’t see anything. Each of them has either a white or a black hat on their head, where the hats are chosen at random out of N white and N-1 black ones. The cannibals start with the first one and consecutively move up, asking everyone if they know the color of their hat. If yes – the man stays alive, if no – they eat him. All the others can hear each of the answers, but they don’t have any strategy among themselves and each of them replies solely for himself, without any attempts to sacrifice for the group (i.e., the construction of saving everybody, but the first one is not applicable here). What is the expected/average number of killed men?

September 3rd, 2010 at 3:35 am

Teal4kiki, slavy is aware that the problem isn’t real. He really posted because of the extension from 3 to N. I should have added that the men are excellent logicians (I took that for granted).

Slavy, nice extensions to the problem, thank you.

September 4th, 2010 at 6:21 am

c has a black hat

a has a white hat and b has a black hat

September 4th, 2010 at 3:07 pm

Hi Ianny. You cannot possibly tell what colour hats A or B have.

September 5th, 2010 at 3:45 am

Chris, could you post my extension as a separate problem, please? I don’t know how well-known this problem is as I made it up alone two days ago, but the answer has a very nice short form and is not easy to get at all, so all the people who enjoy combinatorics should really love it. And I have already noticed that nobody pays attention to my subproblems written as comments under an original one… Thanks, in advance!

September 5th, 2010 at 4:36 pm

i think the color of C’s hat is white

September 6th, 2010 at 7:46 am

Nancy, are you serious?

September 26th, 2010 at 3:06 am

i guess MR.C has white hat

September 26th, 2010 at 7:19 am

tejaswi (and anyone else who doesn’t know), C’s hat is black as demonstrated in posts 3, 4 and 5.

September 26th, 2010 at 7:17 pm

he has a black hat

October 9th, 2010 at 12:21 pm

for a to know what hat he has, b and c would have to be white. beacause he doesnt know, b and c are either black black,black white,or white black. b and c both know that not both of them are white. for b to know what hat he has, c would have to have white. for b not to know, c would have to have black. c knows this, letting him know he has a black hat.

March 18th, 2011 at 10:07 pm

What if they all had black hats?

A would see 2 black hats and say i dont know, B would say I dont know, so how is C to know? He could have a white hat, and B and A would still say they didnt know, even if he has a black hat?

Im confused!

March 18th, 2011 at 11:06 pm

Hi Karley. I’m confused. You started by saying what if they all had black hats, then you suddenly changed to C having a white hat.

The only way that A can know his hat colour is if both B and C are wearing white. If that was the case, A would have called out that he as wearing a black hat – but that isn’t what happened in the posted problem. So (in the posted problem) either B and C are both wearing black, or B is wearing black and C is wearing white or B is wearing white and C is wearing black. Both B and C realise all of that. If C was wearing white, then B would know that he must be wearing black, and would say so – but that isn’t what happened in the posted problem. So B must have seen a black hat on C. C realises that B must be seeing a black hat on C, and so knows he’s wearing a black hat.

It’s very easy. But you mustn’t start an analysis with one set of colours and then suddenly change your mind half way through. Decide on some colours and analyse from scratch each time. NB although in the posted problem C worked out his own hat colour, we have no way of knowing the colour of A’s or B’s hat from the information given.

March 19th, 2011 at 5:30 am

The only possibilities are (in the order of ABC): BBB,BBW,BWB,BWW,WBB,WBW,WWB

A will call out for BWW only. B will call out for BBW,WBW only. C will call out for BBB,BWB,WBB,WWB. So A calls black if we have BWW, B calls black if we have ?BW and C calls black if we have ??B

The cannibals will need to devise a new scheme if they want to enjoy the taste of long pig.