Logic Puzzle
Aug. 31st, 2006 02:34 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
So this was sprung on our team meeting today and I thought I'd share... It's the typical kinda question that you'd expect to come across in a job interview, I'd think... Anyway, the puzzle.
Suppose we have 4 people A, B, C, D all standing facing a wall (marked as '|'). Two are wearing red hats and two are wearing black hats. Arranged as follows:
A | B C D
Rules:
- No one knows the color of their own hat
- No one can turn around to look at the hats of anyone behind them or look at their own hat
- No one can see through the wall
- Everyone is aware of everyone else's general position
- Everyone can see everyone else in front of them up to the wall (eg. D sees B & C but not A)
- No one can move or otherwise communicate in a non-verbal manner
- No one can communicate verbally except except to state what color hat they themselves are wearing
- The person who speaks must be 100% sure of their statement (if that person is wrong then they all lose)
- Only one person can speak; the first statement must be correct
- Everyone is working together and aware they're all trying to accomplish the same goal under the same rules
- They have a 5 minute deadline; after which someone must speak or they all lose
So, how can these 4 people resolve this? Who is to speak and how can that person be certain of what color hat they are wearing?
...And how long did it take you to figure it out? ^_-
Answer (highlight to read):
At the end of the given time limit C can be certain what its hat color is. And this is why...
C knows that D is behind it and can see B and C.
If B and C are wearing the same color, then obviously D can deduce that it and A are wearing the other two colors, and thus would say something immediately.
Since D did not say anything, therefore B and C must be wearing different colors.
Since D didn't say anything AND C can see what B is wearing, it can deduce that it must be wearing the opposite color as B.
Ergo, C will say black in this case.
My mentor came up with the answer in like 2 minutes after having the problem explained to us. Of course she is a professional problem solver, if you want to call our job that. XD
Suppose we have 4 people A, B, C, D all standing facing a wall (marked as '|'). Two are wearing red hats and two are wearing black hats. Arranged as follows:
A | B C D
Rules:
- No one knows the color of their own hat
- No one can turn around to look at the hats of anyone behind them or look at their own hat
- No one can see through the wall
- Everyone is aware of everyone else's general position
- Everyone can see everyone else in front of them up to the wall (eg. D sees B & C but not A)
- No one can move or otherwise communicate in a non-verbal manner
- No one can communicate verbally except except to state what color hat they themselves are wearing
- The person who speaks must be 100% sure of their statement (if that person is wrong then they all lose)
- Only one person can speak; the first statement must be correct
- Everyone is working together and aware they're all trying to accomplish the same goal under the same rules
- They have a 5 minute deadline; after which someone must speak or they all lose
So, how can these 4 people resolve this? Who is to speak and how can that person be certain of what color hat they are wearing?
...And how long did it take you to figure it out? ^_-
Answer (highlight to read):
At the end of the given time limit C can be certain what its hat color is. And this is why...
C knows that D is behind it and can see B and C.
If B and C are wearing the same color, then obviously D can deduce that it and A are wearing the other two colors, and thus would say something immediately.
Since D did not say anything, therefore B and C must be wearing different colors.
Since D didn't say anything AND C can see what B is wearing, it can deduce that it must be wearing the opposite color as B.
Ergo, C will say black in this case.
My mentor came up with the answer in like 2 minutes after having the problem explained to us. Of course she is a professional problem solver, if you want to call our job that. XD