Bloomberg LP Interview Question
Financial Software DevelopersA sees (B&W || B&B). Hence, A cannot decide.
B has to obviously see a black hat on C to not decide an answer. Coz, if B sees a white hat on C, then, B can conclude that he is wearing a black hat (by using A's answer) since only B&W and B&B are two possibilities.
So, C is wearing a black hat.
Person C is wearing White hat.
Since A is not sure of his color, he is indicating that atleast one of
B or C is white ( since there are only two blacks )
Now, B is also not sure of his color, which points to that C has to be White,
because had it been that C is Black, then B could have easily guessed his own color
as White drawing information from A's answer.
So C is wearing White hat.
but there are 3 black hats, not 2. So if A is not sure, he is indicating that he either saw a B&W or a B&B.
The only way I see that C knows what he has is if one of the others know. If A or B knew, one would have seen 2 whites automatically making C's hat white. Other than that, what you're saying seems incorrect.
There are 7 potential solutions:
# A B C
- - - -
1 B B B
2 B B W
3 B W B
4 B W W
5 W B B
6 W B W
7 W W B
A can only trivially eliminate #4 since A must know the answer in #4.
# A B C
- - - -
1 B B B
2 B B W
3 B W B
5 W B B
6 W B W
7 W W B
B and C now know that B and C are not both white, but this provides no additional information.
B can trivially eliminate #6 since he would then know the answer.
1 B B B
2 B B W
3 B W B
5 W B B
7 W W B
C must know that #4 and #6 have been eliminated.
C must have guessed black since he's got a 80% chance of being right.
C is wearing black
Condition one:
A says "I don't know"
So either B or C must have White hat on his hat.
Condition two:
A says "I don't know"
So either A or C must have White hat on his hat.
So possible number os solution are:
A B C
1 W W B
2 B W B
3 B B W
4 W W B
5 W B B
6 B W W
7 B B W
3 and 6 are invalid option otherwise A and B know the color of thier hat.
Since C answers the hat color correctly so color of condition 1, 2 ,4 ,5 and 7 satisfies all the conditions.
Hence color of C is Black.
Consider the following.
-> A cannot determine by himself by himself what he is waering by looking at B & C. this means B & C are both not wearing White hats. They are either wearing Black hats each or Black and White.
-> B cannot determine by himself by himself what he is wearing by looking at A & C. this means A & C are both not wearing White hats. They are either wearing Black hats each or Black and White.
Somehow we have to elminate the Black and Black options from each case. If we are able to do this then.
When C looks at A & B he will find they are both wearing White hats in which case he will deduce he is waring Black. If he finds they are both waring Black then he will deduce he is waering White.
Consider the following.
-> A cannot determine by himself by himself what he is waering by looking at B & C. this means B & C are both not wearing White hats. They are either wearing Black hats each or Black and White.
-> B cannot determine by himself by himself what he is wearing by looking at A & C. this means A & C are both not wearing White hats. They are either wearing Black hats each or Black and White.
Somehow we have to elminate the Black and Black options from each case. If we are able to do this then.
When C looks at A & B he will find they are both wearing White hats in which case he will deduce he is waring Black. If he finds they are both waring Black then he will deduce he is waering White.
A did not know so he saw either B-Black C-Black; B-White C-Black; B-Black C-White.
Had he seen B-White C-White, he would have know that he had a black hat on because there are only two white.
Let's just list what be could have seen. 1.A-White C-White; 2.A-White C-Black; 3.A-Black C-White; 4.A-Black C-Black.
We know that 1. cannot be true as B would have known he was wearing black for the same reason A would have known. Also 3. Cannot be true because B, knowing A could have seen a Black and White hat on B and C, could have reasoned that he had a black hat on because C had the white hat. Since he responded "I don't know", that leaves us with 2. and 4., both with C wearing a black hat.
A did not know so he saw either B-Black C-Black; B-White C-Black; B-Black C-White.
Had he seen B-White C-White, he would have known that he had a black hat on because there are only two white.
Let's just list what B could have seen. 1.A-White C-White; 2.A-White C-Black; 3.A-Black C-White; 4.A-Black C-Black.
We know that 1. cannot be true as B would have known he was wearing black for the same reason A would have known. Also 3. Cannot be true because B, knowing A could have seen a Black and White hat on B and C, could have reasoned that he had a black hat on because C had the white hat. Since he responded "I don't know", that leaves us with 2. and 4., both with C wearing a black hat.
Guys,
Not really complicated when you write out the seven combinations:
BBB
BBW
BWB
BWW
WBB
WBW
WWB
The only one that would tell A what he is wearing is if he sees two whites, so eliminate the BWW condition so now person B has six conditions left:
BBB
BBW
BWB
WBB
WBW
WWB
If he sees A wearing black and C wearing white, he knows he has black, so eliminate that condition. If he sees A and C both wearing white, he knows he has black, so elimiate that. Now when it is person C's turn, he has 4 possibilities left:
BBB
BWB
WBB
WWB
All of them have him wearing black.
jeez man write the question correctly. He (the OP) wrote that (for person C) 'without having their blindfold removed... their hat, they are correct', leading me to believe that C can tell his hat's color and A's and B's too. Which was not possible...
What a waste of time (and thinking I was stupid :D)
Person C is wearing Black hat.
- UT December 15, 2009A is not sure of his hat color either because he sees B&W or B&B.
B on hearing A say "Dont know" , Would arrive at this conclusion. Now had it been B&W with C wearing White, B would have said it is wearing black instead of saying "I dont know".
So B&W is eliminated. And B is not sure since it sees C's hat is black.