Explain the 5 hats puzzle?

Y’all did such a bang up job with the Monty Hall thread that maybe you can explain the 5 hats puzzle to me. I’ve never been able to truly work through it.

Tom, Dick, and Harry walk into a room with a box that contains five hats. Three hats are white and two are green. The guys turn out the lights and each grabs a hat and puts it on. Then they turn on the lights.

Tom looks at Dick’s and Harry’s hats, and says “I have no idea what color my own hat is.”

Dick looks at the others and says “In that case, I don’t know what color my hat is, either.”

Harry looks at them both, considers what they have said, and pronounces that he knows the color of his own hat.

What are the colors of all three men’s hats?

Tom and Dick are both wearing green hats and Harry is wearing a white hat. Harry knows he has to have a white hat because there are only two green hats, which he can see are being worn by Tom and Dick. Both Tom and Dick can see Harry wearing a white hat and their other friend wearing a green hat, which means they could be wearing a hat of either colour… Does that make sense?

OB

I should just add that it’s important in which order our three friends state whether they know what colour hats they’re each wearing. If Harry answers first or second, the friend(s) answering after him would know what colour hat they were wearing.

OB

First of all, it’s not possible that both Tom and Dick have green. If they had, Harry would know immediately that he had white because all the greens would already have gone; he wouldn’t have to contemplate. For the same reason, neither both Tom and Harry nor both Dick and Harry can have green, because then the third one would know he had white (remember, green only twice!). So there’s maximum one green hat circulating, and at least two, maybe three white ones.

Now let’s imagine Tom was the only one to have green. He sees white twice, so he can’t tell his own color. He says so. Dick sees one white (Harry) and one green hat (Tom); he can’t tell. But if he himself were wearing green, there would be two green hat circulating, which is impossible. because then Tom would have known his color. So Dick would know he had white. Impossible.

If Harry was the only one to wear green, both Tom and Dick would each see one white and one green hat. Harry would say he doesn’t know, but Dick would know he had white (because he sees Harry’s green hat, too, and if he had green, Tom would have known he, Tom, had white). Impossible.

If Dick was the only one to wear green, Tom would see one white, one green, and wouldn’t be able to tell his color. Dick would see two white hats, and couldn’t tell his own color either. Harry would know he had white, however, because if he had green Tom (who would see Dick’s green hat, too) would have known he had white. But he didn’t. So this scenario works out well.

If all three boys were wearing white hats, each of them would see two white hats. Tom wouldn’t be able to tell his color; Dick wouldn’t be able, either, and the fact that Tom said he didn’t know doesn’t help him because Tom wouldn’t know if Dick had green, either. Harry, too, can’t tell, and the information that the other guys didn’t know their own colors wouldn’t help him. So nobody could tell. Impossible.

So in the end, the scenario where Dick has green and Tom and Harry white is the only one that works out.

I disagree with the answers so far. Harry has white, the other two can have either green or white. Is there something missing from the statement of the puzzle?

'Tom looks at Dick’s and Harry’s hats, and says “I have no idea what color my own hat is.” ’ - therefore, at least one of Dick and Harry is wearing white (1).

'Dick looks at the others and says “In that case, I don’t know what color my hat is, either.” ’ - from (1), if Harry were wearing green, Dick would know that he must be wearing white. But he doesn’t, therefore Harry knows that he is wearing white instead.

I don’t see how you can deduce more than that.

Maybe Harry’s a bit slow… :wink:

OB

Not quite. If Harry saw that Tom had white and Dick had green, then he would have known his color as soon as Tom made his declaration. The fact that he had to rethink things based on Dick’s revelation belies this scenario.

If Tom had seen green hats on both Dick and Harry, he would have known his own hat must be white, because there are only 2 green hats. Since he does not know, at least one, and possibly both, of Dick and Harry is wearing a white hat. Furthermore, they now know this because of what Tom said.

As stated above, Dick knows that, of his and Harry’s hats, at least one is white. Given this, if he had seen a green hat on Harry’s head, he would have known that his own hat was white. Since he did not know this, Harry’s hat must have been white (leaving the possibility that Dick’s could be either green or white).

By the above reasoning, Harry knows that his own hat must be white.

As I see it, Harry’s is the only one we can be sure of. There’s nothing to absolutely rule out Tom and Dick both wearing green hats. Sure, if that were the case, Harry would have known immediately that his own hat was white—but we’re not told explicitly that he didn’t know this, or that he couldn’t have figured it out had he not been, as Oswald suggested, a little slow. It’s certainly implied that Harry was relying on Tom’s and Dick’s statements, but is it fair to assume that that must be the case?

Yes. Perhaps I worded the problem awkwardly, but in the original puzzle it’s clear that Harry draws his conclusion based on what both Tom and Dick said.

I’m happy with the conclusion that there can’t be two Green hats being worn. But the puzzle implies Harry was waiting for Dick’s statement. If that’s the case, then Tom had to be the one wearing the Green hat. If Dick was wearing the Green hat, then Tom’s statement alone would have told Harry what hat he was wearing, because both Tom and Harry can see the hat.

So Tom was wearing the Green hat.

Everyone got white hats, folks.

Harry figures out that “two hats [only] are green” translates into “at least one of the hats is white”.

Harry looks and sees that it is not true that both Tom and Dick have green hats. If it had been true, he would have immediately known he had a white hat because there would’ve been no more green hats to go around.

Harry figures Tom and Dick also are not staring out at a pair of guys with green hats. Of course Harry already knows this because he can see (for Tom) Dick’s white hat and he can see (for Dick) Tom’s white hat, but he also knows it by inference: unless Tom and Dick have the IQs of tree stumps they are not either of them staring out at a pair of guys with green hats because if they did they would have said, within a second or two of the lights coming on, “Aha, I got a white hat on my head”. They didn’t do that.

Back to Harry and what Harry sees. Harry does not see Tom with a green hat and Dick with a white hat, or vice versa. Why do I say so? Let us suppose that he had. Let us pretend (as Harry pretends to himself as a logical exercise) that Harry sees Tom with green and Dick with white. In this hypothetical situation, Dick would be seeing Tom with green and Harry with either green or white, depending on what Harry has. If (second-level hypothetical situation here) Dick were looking out at Tom with green and Harry with green, Dick would have long since said “Duh! I’ve got a white hat, all the green ones are right where I can see 'em!”. Dick ain’t doing that (in this second-level hypothetical situation). Now, since Harry can figure out this much, Harry also figures out that Tom and Dick can reason this far as well: that no one who sees one green hat is going to take long to figure out that the one without the green hat isn’t looking at two guys with green hats, and once they figured out that they would say, within a few minutes (rather than seconds) that “Aha, I got a white hat on my head”. But no one did that either. So no only is no one staring at two dudes both wearing green hats, no one is staring at one dude with a green hat and one dude with a white hat either.

So Harry says to himself “That don’t leave much in the way of choices. The mere fact that Tom and Dick can’t figure out what color hats they got on means the green hats aren’t in use”. And so Harry says “Aha! I’ve got a white hat on, just like these fellows!”

Make the case more rigid: the boys are blindfolded before the hats are put on, and each boy must leave the room if after removing his blindfold, he cannot determine his hat colour.

Tom, while blindfolded, reasons: “If I remove my blindfold and see Dick and Harry in green hats, I’ll know mine is white. If I see anything else, I won’t be certain.” Tom removes his blindfold, announces he doesn’t know, and leaves.

Dick, while blindfolded, reasons: “If Tom had seen green hats on me and Harry, he would have known his was white. Since he didn’t know, me or Harry (or both) is wearing a white hat. If I remove my blindfold and see Harry in a green hat, I’ll know I have the white hat. If not, then I won’t be certain.” Dick removes his blindfold, announces he doesn’t know, and leaves.

Harry, while blindfolded, reasons: “If Dick and me were in green hats, Tom would have known his was white. If I was in a green hat, Dick would have known his was white. Therefore I’m not in a green hat.” Without removing his blindfold (not that it matters, since the other boys have left), Harry announces his hat is white.
For a more exhaustive proof, consider every possibility:


TDH
---
WWW (1)
WWG (2)
WGW (3)
WGG (4)
GWW (5)
GWG (6)
GGW (7)

Since Tom didn’t know, case 4 is immediately eliminated. For all remaining cases, if H = G, D = W (cases 2 and 6). Since Dick didn’t know, eliminate these, leaving only cases 1, 3, 5 and 7. In all of these, H = W, and the hats of the first two boys could be any combination.

I confused about one of the starting premises: can each of the three see ONLY the hats the other two are wearing, or also the two unclaimed hats?

The former.

  1. Let’s say Tom sees two green hats. He would know that his is white. So either Dick or Harry (or both) have a white hat on.

  2. If Harry has a green hat on, then by the above logic, Dick would know his own is white, thus we know Harry’s hat must be white.

  3. Harry did not know his hat color until the end, so we know that Tom or Dick (or both) have a white hat on.

The real question is: Can the above scenerio be carried out if there is a green hat out?

  1. Notice that Dick cannot have a green hat since Harry would know after step 1 that his has was white (see step 2)

  2. If Tom had a green hat on, then Dick and Harry would simutaneously (in theory) realize that the other did not know his own hat color thus he could not be seeing two green hats therefore his own hat must be white (step 1). This could be done without Tom saying a word.

All three men are wearing white hats

-Saint Cad

Yep.

Central point of what I said earlier (buried under too much verbiage):

Ergo, white hats all around.

I agree that, as the problem is stated, Harry must be wearing white, but the other two could be wearing anything.

Those concluding that everyone must be wearing white are assuming an additional rule, such as:

(*) Each participant will volunteer that he knows his hat’s color as soon as he figures it out, and each participant is aware that the others will follow this rule.

However, we must be extremely cautious about adding this rule. Adding rule (*) is problematic because it forces us to start making assumptions about how fast each participant can reason.

They cannot all be assumed to reason arbitrarily fast. This is because if they could, then, given any interval of time during which they are all silent, the information that Tom and Dick don’t know their hats’ colors would be communicated to Harry, whereupon Harry would have all the information he needs to conclude that his hat is white. By rule (*), he would therefore immediately speak. It follows that Tom and Dick would not have time to both speak before Harry, as they in fact do. Therefore, they cannot all be able to reason arbitrarily fast.

Similar reasoning applies if we assume that they all take the same amount of time to reason: There would be no time for two distinct people to speak before Harry.

Thus, if we want to assume rule (**), we need to make particular assumptions about how fast each participant can reason, and different assumptions will lead to different answers.

One way to avoid this trouble would be with the following variation of rule (*):

(**) Each participant will volunteer that he knows his hat’s color as soon as he figures it out, but each participant is not aware that the others will follow this rule.

I haven’t worked out how thing would go with this rule, but on principle, I don’t think we should add it. If it were reasonable for us to assume that each participant will anounce his hat’s color, than the participants themselves would assume it (since participants are always assumed to be perfectly reasonable in these sorts of problems). Since rule (**) itself states that they don’t assume this, it argues against its own reasonableness.

I don’t see that - am I missing something?. Let’s use the previous notation for Tom, Dick and Harry (for example WGW means T=W, D=G, H=W). Total combinations are:

WWW
WWG
WGW
WGG
GWW
GWG
GGW

Since Tom doesn’t know his hat color right off the bat he must be looking at two W or one G and one W. This limits the possible combinations to:

WWW
WWG
WGW
GWW
GWG
GGW

And there is no way for Tom to figure out his hat color based on those choices.

Since Dick can’t figure out his hat color, he isn’t looking at two green hats either. This cuts the possibilities down to:

WWW
WWG
WGW
GWW
GGW

If Dick saw Tom wearing W and Harry wearing G he’d know that it was WWG (that’s the only pattern that would fit) and thus Dick would know that he was wearing white. But Dick does not know what color he has, so he can’t be seeing that which eliminates WWG. We’re down to:

WWW
WGW
GWW
GGW

Now we come to Harry. Harry goes through the same thought process as above and announces that based on what T and D said, he knows the color of his hat. Let’s use a strict reading and say that Harry can only make his decision based on what T and D said - that means that GGW isn’t an option because if Harry saw two green hats he’d know that he was wearing white regardless of what T and D said.

So we are down to:

WWW
WGW
GWW

Right away we can see that Harry knows he is wearing white - nothing else left for him to be wearing! However any of these three combinations would get us to this point so I don’t see how we can say what T and D are wearing.

Reread my post, steps 4 and 5 for the logic of what follows:
The basic idea is that is anyone sees two green hats, they know that theirs is white.
If there is one green hat out, it becomes obvious that there cannot be a second otherwise someone would know their own color immediately.
Therefore if I see a green hat, I know mine is white.

For this last step, it is important to note that each person’s statement is dependent on the previous information (i.e. everyone who has previously spoken does not know thier own color.
If I am wearing a green hat, the other two will see that and BOTH will know that they are wearing white hats.
Since no one knows their color until the end, there cannot be any green hats out ergo everyone has white hats on.

But unless you add assumptions about how long each participant takes to reason, you will end up with contradiction. For if silence can always be interpreted as ignorance, then each player would, after an arbitrarily small interval of time, know that the other two players were ignorant, and they would then all know everyones color, immediately and simulatneously. No one would ever have to say anything.