### Author Topic: Hats  (Read 4537 times)

#### Hooman

• Hero Member
• Posts: 4949
##### Hats
« on: November 23, 2005, 05:16:39 PM »
Ohh, this puzzle comes with a motivating story.

So, these 4 people are about to be shot by a firing squad. However, if any of them can answer a simple question, they'll all be freed.

Two of the 4 people are wearing white hats, and the other two are wearing black hats. The people are not able to see what hat they are wearing, only the hats of people they are facing. The question is simply, "what color hat are you wearing?"

The people are arranged as follows. They are in a line from east to west, with everyone facing west. There is a wall between the first 3 people and the fourth person, so none of them can see the fourth person, and the fourth person can't see them. The first person can see the second and third person, and the second person can see the third person. (The third person can see only the wall).

The people are not allowed to say anything other than what hat they are wearing. If any of them calls out a wrong answer they will be shot. If they don't know, they may simply remain silent. The people do know there are 2 white hats and 2 black hats.

Which person knows with certainty which hat they are wearing? (and explain)

#### CK9

• Hero Member
• Posts: 6226
##### Hats
« Reply #1 on: November 23, 2005, 05:28:09 PM »
okay, let's see...

-n-
w-e
-s-

4 | 3 2 1

The first person "knows with certainty" which hat he/she wears.
let's give some probable combinations to explain
b = black
w = white

b | w w b
w | b b w
do I really need to explain these combinations?

w | b w b
b | w b w
w | w b b
b | b w w
Now, in the riddle, you say that none of them can see the fourth person.  HOWEVER, you never said they can't see his hat (with the exception of the third person, who only sees the wall).  Because of this, I say that the wall is the same hight as the third person, and the first person is just tall enough to see the hat of the 4th person, without being able to see the fourth person him/her self.
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

#### Hooman

• Hero Member
• Posts: 4949
##### Hats
« Reply #2 on: November 23, 2005, 05:30:00 PM »
Lol, nice try, but no. It's a tall wall. You can't see the person or the hat. You know only that someone is on the other side and is wearing a hat of one of the two colors.

#### CK9

• Hero Member
• Posts: 6226
##### Hats
« Reply #3 on: November 23, 2005, 05:33:38 PM »
in that case, guy one taps morse code on the shoulder of guy 2, who then translates it as being the color of hate he is wearing.  Or there is the obvious answer, which I've been skipping over 'cause it is that stupid.

****only Hooman should read the rest of this post****

the guy who put the hats on the peoples' heads
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

#### Hooman

• Hero Member
• Posts: 4949
##### Hats
« Reply #4 on: November 23, 2005, 05:43:12 PM »
Nope. Only the people being executed are going to answer, and they don't know what color hat they're wearing themselves. Only the color of hats people can see. And there is no physical contact allowed between people. They are only allowed to stand there doing nothing and remaining silent, or attempt to answer the question.

#### Sirbomber

• Hero Member
• Posts: 3221
##### Hats
« Reply #5 on: November 23, 2005, 09:14:35 PM »
Okay, it's not person 1. He can only know, for sure, if person 2 and 3 have the same color hat. But if person 2 has a white hat and person 3 has a black hat, then person 1 could have either a black or white hat.

Person 2 can only see person 3's hat. So, if whatever hat person 3 is wearing, person 2 knows there is only 1 other hat of that color. Of course, there are also 2 hats of the other color, so person 2 does not know which hat he is wearing. It isn't person 2.

Person 3 can see only the wall. He can't see any of the other people.

Person 4 can't see any other people. It isn't person 4.

It is person 3. He can't see any of the other people, but he can see shadows. He can use the wall to see how bright or dark his and the other's hats' shadows are on the wall and determine from that what color hat he is wearing. If his hat's shadow is brighter than the others', he has a white hat on. If his hat's shadow is darker, he has a black hat on.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

#### Hooman

• Hero Member
• Posts: 4949
##### Hats
« Reply #6 on: November 23, 2005, 10:21:21 PM »
Nope. That reasoning doesn't hold up. They can either see the person and their hat, or they can't. There is no guessing from space bending, light refraction, praying for the answer, feeling the increased gravity of some "heavier" color, etc. etc.

You may however assume perfectly well defined behavior of all the people being executed. That is, if you were cloned 4 times and had to be executed 4 times (a really really really horrible crime?) then you can state how you would act as each person.

#### CK9

• Hero Member
• Posts: 6226
##### Hats
« Reply #7 on: November 24, 2005, 02:54:01 AM »
I think they all just stand there silent.  person 1 has the best chance.  That whole shadow thing doesn't hold up, simply because shadow darkness is not determined by color, it is determined by the number of light sources from different angles.  I hold my answer at guy number 1.  I need more minuet details.  Like, were they blindfolded as the hats were placed on their heads?  Were other prisoners given this same chance before?  What type of hat is it?
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

#### Sirbomber

• Hero Member
• Posts: 3221
##### Hats
« Reply #8 on: November 24, 2005, 07:34:44 AM »
It holds up perfectly well. White objects reflect more light than black objects, which reflect no light. The reflected light from the hat would make the shaodw brighter.

[size=8]Maybe...[/size]
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

#### zhukant

• Full Member
• Posts: 187
##### Hats
« Reply #9 on: November 24, 2005, 08:24:11 PM »
If the two people in front of person 1 are wearing the same color hat, he knows what color his hat is - the color the other two are not wearing. If they are not, he does not know.
Detected rip in space-time continuum. Attempting repairs. Attempt #1 failed. Cause: unknown. Retry: comply: proceeding. Attempt #2 failed. Cause: probe annihilated. Retry: comply: proceeding. Attempt #3 failed. Cause: fleet annihilated. Retry: comply: proceeding. Attempt #4 failed. Cause: 404 Could

#### Hooman

• Hero Member
• Posts: 4949
##### Hats
« Reply #10 on: November 24, 2005, 10:31:22 PM »
Zhukant may be onto something here. CK9 also isn't too far off in some ways. Maybe you two should talk this over.  B)

I think maybe the way the question was phrased might be a little misleading. Although, I don't think I'll rephrase it for fear of complicating things more. (Plus, it's the way I originally heard it).

That whole shadow thing is way off in left field. There is nothing about shadows involved in this.

As for more background details, there is nothign further that can be given that would help. It would only serve to further detract from the problem.

Although, I guess I could possibly hint a little.

#### CK9

• Hero Member
• Posts: 6226
##### Hats
« Reply #11 on: November 25, 2005, 02:10:06 AM »
No, that info I asked for is neccessary.  Don't ask why, it would take too long to explain my brain process.
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

#### Sirbomber

• Hero Member
• Posts: 3221
##### Hats
« Reply #12 on: November 25, 2005, 07:56:24 AM »
Quote
If the two people in front of person 1 are wearing the same color hat, he knows what color his hat is - the color the other two are not wearing. If they are not, he does not know.

I already said that... or meant to.
Then again, I kinda made it up. But compared to person 1 suddenly gaining x-ray vision, it seemed pretty logical.

Edit: I forgot to add that I have no idea.
« Last Edit: November 25, 2005, 07:56:49 AM by Sirbomber »
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials

#### Hooman

• Hero Member
• Posts: 4949
##### Hats
« Reply #13 on: November 25, 2005, 11:48:08 AM »
Hmm yes, so you did. Well, that's certainly part of the problem. I mean, if the hats were setup in that fashion, than person one certainly knows right away. But what about hats setup in a different order?

CK9... I question your thought process. To please you, I will arbitrarily say it was a pirate hat, that many before have died due to idiocy, and they were not only blindfolded, but tickled with feathers.

Everyone else may ignore that since none of it necessarily has any truth to it. It doesn't matter what you say about the above questions CK9 has asked, it really shouldn't affect the question.
« Last Edit: November 25, 2005, 11:48:43 AM by Hooman »

#### CK9

• Hero Member
• Posts: 6226
##### Hats
« Reply #14 on: November 25, 2005, 03:30:28 PM »
#1 found a geni and wished that he would always know what colors he was wearing
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

#### zhukant

• Full Member
• Posts: 187
##### Hats
« Reply #15 on: November 25, 2005, 04:53:11 PM »
Question 1) Do you know the answer?
Question 2) Is the fourth person important, other than taking up a hat? In other words, Can the other people interact somehow with the fourth person?
Question 3) Will the people be shot if they move, or do anything except yell the right answer?

These are Yes/No questions, which will hopefully lead us closer to the solution. Otherwise, we may never know. Please answer them.
Detected rip in space-time continuum. Attempting repairs. Attempt #1 failed. Cause: unknown. Retry: comply: proceeding. Attempt #2 failed. Cause: probe annihilated. Retry: comply: proceeding. Attempt #3 failed. Cause: fleet annihilated. Retry: comply: proceeding. Attempt #4 failed. Cause: 404 Could

#### thablkpanda

• Full Member
• Posts: 249
##### Hats
« Reply #16 on: November 25, 2005, 05:17:52 PM »
1- Bill Gates might. He could pay someone to know it for him though.
2- Person 4 has a direct linkup to the aliens that crafted the Pyramids, with mind-broadcasting technologies- henceforth broadcasting the correct colors via high-frequency cameras from above. He's the secret to the whole thing.
3- See 2.

Heh, Pandizzle.

This is an interesting riddle, I'd like Z's questions answered, that could benefit my research.

#### zhukant

• Full Member
• Posts: 187
##### Hats
« Reply #17 on: November 25, 2005, 05:37:16 PM »
You know, that wasn't very helpful. Only annoying.
Detected rip in space-time continuum. Attempting repairs. Attempt #1 failed. Cause: unknown. Retry: comply: proceeding. Attempt #2 failed. Cause: probe annihilated. Retry: comply: proceeding. Attempt #3 failed. Cause: fleet annihilated. Retry: comply: proceeding. Attempt #4 failed. Cause: 404 Could

#### Hooman

• Hero Member
• Posts: 4949
##### Hats
« Reply #18 on: November 25, 2005, 06:18:20 PM »
Quote
Question 1) Do you know the answer?
Question 2) Is the fourth person important, other than taking up a hat? In other words, Can the other people interact somehow with the fourth person?
Question 3) Will the people be shot if they move, or do anything except yell the right answer?

1) Do you mean me personally? As in me being the person who posted the riddle? Then yes, I know the answer.
2) No. The fourth person can't interact with anyone. They are essentially just there to take up a hat. Good point for you to bring up.
3) Yes. They may only give the correct answer or remain silent. Any other behavior will result in them all being shot.

#### CK9

• Hero Member
• Posts: 6226
##### Hats
« Reply #19 on: November 26, 2005, 02:03:24 AM »
so we know that it can never be #4, and can sometimes be #1

#3 I have high doubts about, as he/she can only see the wall.
#2 has a very low chance

so, I can only say the #1 can answer with the most certanty.  Little statistics to show possibilities.  There is a 30% chance that the hats will be set up in a way that gives him 100% certanty.  A 50% chance for each hat color makes the decision very chancy for all of them, however the fact that he sees 50% of the hats brings the chances to his favor.  Now, even if it is one of the oth 70% of things, I say that he can answer with the upmost certanty.  Why?  There are certain behavioral patterns that appear on a subconcious level.  These patterns are easy to follow, and are often examined closely by prisoners for several reasons.  Malcom X, when he was in prison, would use the patern of the gaurd's patrols to buy reading time after light's out.  Now, the same principles can be used to explain this.  By seeing the everyday patterns of the gaurds, he can easily deduce what color hat he is wearing by seeing the two in front of his.
CK9 in outpost
Iamck in runescape (yes, I still play...sometimes...)
srentiln in minecraft (I like legos, and I like computer games...it was only a matter of time...) and youtube...
xdarkinsidex on deviantart

yup, I have too many screen names

#### dm-horus

• Banned
• Hero Member
• Posts: 1042
##### Hats
« Reply #20 on: November 26, 2005, 04:01:58 AM »
The thing about shadows and light reflection really irritated me. Like a splinter in my eye or something repetitive or something repetitive.

Colors do not "generate" light. They reflect it. Since the light source is blocked (by the thing generating the shadow, in this case a person and their hat), the color on the shadowed side of the hat isnt exposed to any light to reflect so the shadow does not become illuminated. Something else, colors do not "absorb" light. They may however reflect light of a different WAVELENGTH. A black hat will still reflect as much light as a white hat, but of a different wavelength. Once again, no affect to the shadow. Light does not bend unless you have mass on the order of a star, so thats a no-go either.

I think Lev has made it abundantly clear that nothing other than the observation of a person and their hat is the ONLY way of identifying their color with certainty. As far as the riddle is concerned, the universe is composed of nothing but this prison, 4 prisoners and their possible hats and a guy with a gun. Hiding a mirror between your buttcheeks during a conjugal visit with your "girlfriend" to get a look at the guys hat behind you isnt going to work. Developing a makeshift mass spectrometer out of pocket lint to identify the hat color isnt in the cards either. The point is for you to figure it out with your mind, not coming up with a way to 'cheat' the riddle. The thing about riddles is that the answer is usually woven into the question.

If person #1 can see the color of the hats on 2 people in front of him, the odds improve. If both of them are black or white, his and person #4 color is the opposite of theirs:

Person 1 - Must be White

Person 2 - Black \
> - Observed by Person 1
Person 3 - Black /

Person 4 - Must be White

If the 2 people in front of Person 1 have hats that are different colors, Person 1 still has the best chance of answering correctly with 50/50 odds.

Person 1 - 50% Chance of being White or Black

Person 2 - White \
> - Observed by Person 1
Person 3 - Black  /

Person 4 - 50% Chance of being White or Black

So no matter what happens, Person 1 either has the correct answer or a 50% chance of having the right answer. Person 1 has the best chance of knowing the correct answer no matter what. Hooray Person 1!!!

(My diagrams use multiple spaces so youll have to use your imagination to see what I was trying to do there. Hopefully it makes sense.)
« Last Edit: November 26, 2005, 04:18:36 AM by dm-horus »

#### Mez

• Hero Member
• Posts: 648
##### Hats
« Reply #21 on: November 26, 2005, 07:49:57 PM »
It is person 2, always for the following reasons:

If person 1 can see 2 black / 2 white then he will call out the opposite colour

e.g. P1 can see 2 black hats in front of him so P1 says he is white, P3 then knows he has to be black

If p1 can only see 1 black and 1 white then he stays silent.

P2 will then see 1 white or 1 black, ( p2 can see what p3 is wearing and then call the opposite)

e.g. P1 stays silent, P2 sees P3 has a black hat on so knows he is white, as p1 has stayed silent

OR

If P1 says Black then P2 knows he has to be white.

That was too easy Hooman,
« Last Edit: November 26, 2005, 07:52:29 PM by mezza »

#### Sirbomber

• Hero Member
• Posts: 3221
##### Hats
« Reply #22 on: November 26, 2005, 08:02:08 PM »
Quote
The thing about shadows and light reflection really irritated me. Like a splinter in my eye or something repetitive or something repetitive.
Yeah, I know that, we know that, somebody needs to calm down and realize I just spewed whatever gibberish I could because I had no idea what the answer was. As I have a tendancy to do.
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials