More information on the topics discussed below can be found on the Internet!

Custom Search

Wednesday, May 18, 2011

Outlaws, hats, and the new interview paradigm

My friend Bill has been trying to work out the solution to a logic problem. Neither he nor I can arrive at an unambiguous answer.

UPDATE: I think I've worked it out.  See the comments.

There was a sheriff in a town that caught three outlaws. He said he was going to give them all a chance to go free. All they had to do is figure out what color hat they were wearing. The sheriff had 5 hats, 3 black and 2 white. Each outlaw can see the color of the other outlaw’s hats, but cannot see his own. The first outlaw guessed and was wrong so he was put in jail. The second outlaw also guessed and was also put in jail. Finally the third blind outlaw guessed and he guessed correctly. How did he know?

Here's his original post, which contains the purported answer and our attempts at reasoning it out:

http://industrialblog.powerblogs.com/posts/1305306676.shtml

Now, why should this silly little problem be of concern?

Well, if you Google chunks of the text, you'll find this problem repeated dozens, maybe hundreds of times online, usually collected onto sites that list popular logic questions being asked during job interviews. If you haven't been sticking your toe into the job market lately, you might not be aware that logic problems have become part of the new paradigm of job interviews. Now, this is purportedly so that interviewers can assess the reasoning and critical thinking skills of interviewees. But I suspect that this is giving interviewers too much credit, and it seems more likely that they are pulling a question out of the Big Book of Logic Questions for Interviews and seeing if the interviewee is able to arrive at the "correct" answer. In this case the answer is easy enough to find: it is listed along with the question on numerous sites, each one using the slight variations in language familiar to anyone who has dealt with plagiarism. I suspect that the question is simply being copied from site to site, and the answer is being slightly rewritten so it can appear that each site owner has cleverly arrived at the answer independently.

But unless I am missing something very major, the answers that are being given are all wrong. Yet in an interview, the interviewer will be armed with the "right" answer - not that they will know how to arrive at in on their own; they simply know that this is the answer provided to them, and that the answer is correct. So if you should find yourself in an interview where this question is asked, and you know the purportedly "correct" answer from prior exposure, how should you respond?

2 comments:

D.B. Echo said...

OK, I've worked out the solution, and my error. Parts that have been revised from my comments on Bill's blog are in all-caps.

1 could have given two answers: white or black. If he saw two white, he would know that his hat was black. If he said "black" and was wrong, then his hat was white, and the other two were A (2w 3b), B (2b 3w), or C (2b 3b). If he said "white" and was wrong, then his hat was black, and the other two could be A (2w 3b), B (2b 3w), or C (2b 3b). (The same three possibilities for 2 and 3 either way.)

2 now knows that he and 3 are either both wearing black hats, or are wearing hats of different colors. If 1 and 3 have white hats, then he would know that his hat was black. IF ONLY 3 HAS A WHITE HAT, 2 KNOWS HIS HAT MUST BE BLACK, OR ELSE 1 WOULD HAVE GUESSED CORRECTLY. SO IN EITHER OF THESE CASES HE CAN GUESS "BLACK" AND BE CORRECT. But we know he gets this wrong, so NEITHER OF THESE CAN be the case. So the possibilities are D (1w 3b), or F(1b 3b). (POSSIBILITY E - 1B 3W - IS ELIMINATED BY THE "BOTH 2 AND 3 ARE BLACK OR DIFFERENT COLORS" RULE.) SO 2 EITHER GUESSED WHITE AND WAS WRONG, BECAUSE ALL THREE ARE WEARING BLACK, OR GUESSED BLACK AND WAS WRONG.

3 is blind. He can't see anything. At this point he knows what the color of 1's hat is (the opposite of what he guessed). HE ALSO KNOWS THAT IF HE HAD A WHITE HAT, 2 WOULD HAVE CORRECTLY GUESSED THAT 2 HAD A BLACK HAT. IF 2 GUESSED THAT 2 HAD A WHITE HAT AND WAS WRONG, THAT MEANS 3 HAS A BLACK HAT - OTHERWISE 1 WOULD HAVE SEEN THAT THEY BOTH HAD WHITE HATS. He knows that either he and 2 are both wearing black, or are wearing different colors. He also knows that both he and 1 are wearing black or are wearing different colors. So if 1 and 2 are white, he is black. If 1 is black and 2 is white, he is black. If 1 is white and 2 is black, he is black.

IF 2 AND 3 WERE WHITE, 1 COULD HAVE CORRECTLY GUESSED THAT HIS HAT WAS BLACK. SO 2 AND 3 ARE BOTH BLACK OR ARE DIFFERENT COLORS. IF 3 WAS WHITE, 2 COULD HAVE GUESSED THE COLOR OF HIS OWN HAT WAS BLACK - EITHER 1 AND 3 WOULD BOTH BE WHITE SO 2 WOULD HAVE TO BE BLACK, OR 1 WOULD BE BLACK AND 3 WOULD BE WHITE, AND BY THE "2 AND 3 DIFFERENT COLORS" RULE 2 WOULD BE BLACK. (OR 1, 2, AND 3 COULD ALL BE BLACK, AND 2 INCORRECTLY CHOSE WHITE.) SINCE NONE OF THESE HAPPENED, 3 KNOWS HIS HAT IS NOT WHITE.

D.B. Echo said...

A more elegant statement of the solution:

If 2 and 3 are both wearing white, 1 would know he was wearing black. He doesn't guess correctly. He either guessed white and was wrong, or black and was wrong.

Now 2 knows the same thing: if 1 and 3 are both white, then he is black. But he doesn't guess that, so that's not the case.

2 also knows that either all three of them are wearing black (= 2 and 3 are wearing black) or he and 3 are wearing different colors (= 2 and 3 not both wearing white at the same time.)

So if 3 is wearing white, 2 can guess black and go free. HE DOESN'T. So 3 is NOT wearing white ( = 3 is wearing black.)

The solution only requires that 3 know what color his hat is, and he knows that it isn't white.

NOTE: I don't think 3 needs to know what colors 1 and 2's hats were to arrive at this conclusion - he just has to know that they both guessed wrong.