Hat Puzzle with 5 different colours and 3 people
A dad wants to play a game with his 3 children this Christmas. He has a bag with 5 hats; 1 white, 1 yellow, 1 red, 1 blue and 1 black in it. The hats are all equal except their colour. He will place one on each of their heads and if they can all guess correctly the colour on their head they all get presents this year, if they get a single one wrong they get nothing.
To make things harder the dad lines the children up so they all face the same direction. Child #1 can see #2 and #3. Child #2 can only see #3 and Child #3 cannot see anyone.
With total randomness and equal probability the dad places 1 hat on each of their heads. Child #1 has to guess first then #2 and finally #3.
Before playing the game the children come up with a strategy to optimise their chances of getting Christmas presents this year.
What is their strategy? What is the probability they get presents?
logical-deduction hat-guessing
add a comment |
A dad wants to play a game with his 3 children this Christmas. He has a bag with 5 hats; 1 white, 1 yellow, 1 red, 1 blue and 1 black in it. The hats are all equal except their colour. He will place one on each of their heads and if they can all guess correctly the colour on their head they all get presents this year, if they get a single one wrong they get nothing.
To make things harder the dad lines the children up so they all face the same direction. Child #1 can see #2 and #3. Child #2 can only see #3 and Child #3 cannot see anyone.
With total randomness and equal probability the dad places 1 hat on each of their heads. Child #1 has to guess first then #2 and finally #3.
Before playing the game the children come up with a strategy to optimise their chances of getting Christmas presents this year.
What is their strategy? What is the probability they get presents?
logical-deduction hat-guessing
Do they only get presents if all of them get it right, or do the ones who get it right get a present?
– S. M.
3 hours ago
add a comment |
A dad wants to play a game with his 3 children this Christmas. He has a bag with 5 hats; 1 white, 1 yellow, 1 red, 1 blue and 1 black in it. The hats are all equal except their colour. He will place one on each of their heads and if they can all guess correctly the colour on their head they all get presents this year, if they get a single one wrong they get nothing.
To make things harder the dad lines the children up so they all face the same direction. Child #1 can see #2 and #3. Child #2 can only see #3 and Child #3 cannot see anyone.
With total randomness and equal probability the dad places 1 hat on each of their heads. Child #1 has to guess first then #2 and finally #3.
Before playing the game the children come up with a strategy to optimise their chances of getting Christmas presents this year.
What is their strategy? What is the probability they get presents?
logical-deduction hat-guessing
A dad wants to play a game with his 3 children this Christmas. He has a bag with 5 hats; 1 white, 1 yellow, 1 red, 1 blue and 1 black in it. The hats are all equal except their colour. He will place one on each of their heads and if they can all guess correctly the colour on their head they all get presents this year, if they get a single one wrong they get nothing.
To make things harder the dad lines the children up so they all face the same direction. Child #1 can see #2 and #3. Child #2 can only see #3 and Child #3 cannot see anyone.
With total randomness and equal probability the dad places 1 hat on each of their heads. Child #1 has to guess first then #2 and finally #3.
Before playing the game the children come up with a strategy to optimise their chances of getting Christmas presents this year.
What is their strategy? What is the probability they get presents?
logical-deduction hat-guessing
logical-deduction hat-guessing
edited 20 mins ago
Bass
26.9k465167
26.9k465167
asked 3 hours ago
Ben Franks
48014
48014
Do they only get presents if all of them get it right, or do the ones who get it right get a present?
– S. M.
3 hours ago
add a comment |
Do they only get presents if all of them get it right, or do the ones who get it right get a present?
– S. M.
3 hours ago
Do they only get presents if all of them get it right, or do the ones who get it right get a present?
– S. M.
3 hours ago
Do they only get presents if all of them get it right, or do the ones who get it right get a present?
– S. M.
3 hours ago
add a comment |
2 Answers
2
active
oldest
votes
I'm pretty sure there's no way to get all 3 hats correct, but
I know a way to get 2 correct 100% of the time, and 3 correct exactly 20% of the time. (I don't know about you, but I wouldn't like this guy as my dad.)
Strategy:
The children assign a value from 0 to 4 to each hat color; say, white = 0, yellow = 1, red = 2, blue = 3, black = 4. Child #1's guess should be the sum of Child #2's hat and Child #3's hat mod 5, translated into a hat color. There is a 20% chance this will be correct, because there is a 9/25 chance that either child in front is wearing the 0 hat (which makes the guess 100% incorrect), and a 12/20 (4/5)(3/4) chance that neither is (which makes the guess 33% correct.) (12/20)(1/3) = 20%.
Now,
Child #2 knows the sum mod 5 of their hat and Child #3's hat, so they can subtract Child #3's color from the sum, and get their own color.
Then,
all Child #3 has to do is subtract Child #2's guess from Child #1's guess.
(This is assuming there isn't a lateral-thinking solution like the children being able to look at their own hats.)
Where does the 20% come from? It doesn't seem all that obvious.
– Bass
2 hours ago
@Bass i think your comment is incomplete, but I see what I did wrong lol
– Excited Raichu
2 hours ago
(sorry, on the phone, much misclicky, thanks for being clairvoyant :-)
– Bass
2 hours ago
1
@benj2240 if you use any different method that doesn't include some signal that you are using a different system (which I'm assuming isn't allowed by the problem, and a guess carries no information because you're already using that for information), it starts to impede the effectiveness of the first system.
– Excited Raichu
2 hours ago
1
@S.M. rot13(gur frpbaq xvq pnag gryy gur guveq uvf ung vs ur unf gb thrff uvf bja.)
– Excited Raichu
1 hour ago
|
show 4 more comments
I think they can get all the way to
one in three
probability.
There's probably a possible explanation that utilises Galois fields, modular exponents and discrete logarithms, (well, more likely just modular subtraction and averages are enough) but let's instead give each kid one of these:
.
Kid 1 then observes the other hat colours, and guesses a colour
that is as far (in the same direction) from kid 2's colour as kid 2's is from kid 3's.
For example, if kid 3 has black and kid 2 has yellow, then kid 1 guesses blue.
Then, kid 2 guesses the only colour that is
exactly halfway between 1's guess and 3's colour that can be seen.
In this example, kid 2 sees black, and hears the guess "blue", so 2 (correctly) guesses "yellow".
Kid 3, having heard two guesses, performs exactly the same operation as Kid 1.
In this example, 1 guessed "blue", and 2 guessed "yellow", so kid 3 (correctly) picks black, which is
two colours anticlockwise from yellow, just like yellow is two spots anticlockwise from blue.
This approach must be optimal, because
1. The first kid's guess can never be better than one in three, no matter what
2. The guess kid 1 makes with this system is always "possible" and never a duplicate of one of the other two colours, so its probability is one in three
3. After the first guess, the other kids always exactly know their colours.
So, yeah, that should just about do it.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "559"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fpuzzling.stackexchange.com%2fquestions%2f77693%2fhat-puzzle-with-5-different-colours-and-3-people%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I'm pretty sure there's no way to get all 3 hats correct, but
I know a way to get 2 correct 100% of the time, and 3 correct exactly 20% of the time. (I don't know about you, but I wouldn't like this guy as my dad.)
Strategy:
The children assign a value from 0 to 4 to each hat color; say, white = 0, yellow = 1, red = 2, blue = 3, black = 4. Child #1's guess should be the sum of Child #2's hat and Child #3's hat mod 5, translated into a hat color. There is a 20% chance this will be correct, because there is a 9/25 chance that either child in front is wearing the 0 hat (which makes the guess 100% incorrect), and a 12/20 (4/5)(3/4) chance that neither is (which makes the guess 33% correct.) (12/20)(1/3) = 20%.
Now,
Child #2 knows the sum mod 5 of their hat and Child #3's hat, so they can subtract Child #3's color from the sum, and get their own color.
Then,
all Child #3 has to do is subtract Child #2's guess from Child #1's guess.
(This is assuming there isn't a lateral-thinking solution like the children being able to look at their own hats.)
Where does the 20% come from? It doesn't seem all that obvious.
– Bass
2 hours ago
@Bass i think your comment is incomplete, but I see what I did wrong lol
– Excited Raichu
2 hours ago
(sorry, on the phone, much misclicky, thanks for being clairvoyant :-)
– Bass
2 hours ago
1
@benj2240 if you use any different method that doesn't include some signal that you are using a different system (which I'm assuming isn't allowed by the problem, and a guess carries no information because you're already using that for information), it starts to impede the effectiveness of the first system.
– Excited Raichu
2 hours ago
1
@S.M. rot13(gur frpbaq xvq pnag gryy gur guveq uvf ung vs ur unf gb thrff uvf bja.)
– Excited Raichu
1 hour ago
|
show 4 more comments
I'm pretty sure there's no way to get all 3 hats correct, but
I know a way to get 2 correct 100% of the time, and 3 correct exactly 20% of the time. (I don't know about you, but I wouldn't like this guy as my dad.)
Strategy:
The children assign a value from 0 to 4 to each hat color; say, white = 0, yellow = 1, red = 2, blue = 3, black = 4. Child #1's guess should be the sum of Child #2's hat and Child #3's hat mod 5, translated into a hat color. There is a 20% chance this will be correct, because there is a 9/25 chance that either child in front is wearing the 0 hat (which makes the guess 100% incorrect), and a 12/20 (4/5)(3/4) chance that neither is (which makes the guess 33% correct.) (12/20)(1/3) = 20%.
Now,
Child #2 knows the sum mod 5 of their hat and Child #3's hat, so they can subtract Child #3's color from the sum, and get their own color.
Then,
all Child #3 has to do is subtract Child #2's guess from Child #1's guess.
(This is assuming there isn't a lateral-thinking solution like the children being able to look at their own hats.)
Where does the 20% come from? It doesn't seem all that obvious.
– Bass
2 hours ago
@Bass i think your comment is incomplete, but I see what I did wrong lol
– Excited Raichu
2 hours ago
(sorry, on the phone, much misclicky, thanks for being clairvoyant :-)
– Bass
2 hours ago
1
@benj2240 if you use any different method that doesn't include some signal that you are using a different system (which I'm assuming isn't allowed by the problem, and a guess carries no information because you're already using that for information), it starts to impede the effectiveness of the first system.
– Excited Raichu
2 hours ago
1
@S.M. rot13(gur frpbaq xvq pnag gryy gur guveq uvf ung vs ur unf gb thrff uvf bja.)
– Excited Raichu
1 hour ago
|
show 4 more comments
I'm pretty sure there's no way to get all 3 hats correct, but
I know a way to get 2 correct 100% of the time, and 3 correct exactly 20% of the time. (I don't know about you, but I wouldn't like this guy as my dad.)
Strategy:
The children assign a value from 0 to 4 to each hat color; say, white = 0, yellow = 1, red = 2, blue = 3, black = 4. Child #1's guess should be the sum of Child #2's hat and Child #3's hat mod 5, translated into a hat color. There is a 20% chance this will be correct, because there is a 9/25 chance that either child in front is wearing the 0 hat (which makes the guess 100% incorrect), and a 12/20 (4/5)(3/4) chance that neither is (which makes the guess 33% correct.) (12/20)(1/3) = 20%.
Now,
Child #2 knows the sum mod 5 of their hat and Child #3's hat, so they can subtract Child #3's color from the sum, and get their own color.
Then,
all Child #3 has to do is subtract Child #2's guess from Child #1's guess.
(This is assuming there isn't a lateral-thinking solution like the children being able to look at their own hats.)
I'm pretty sure there's no way to get all 3 hats correct, but
I know a way to get 2 correct 100% of the time, and 3 correct exactly 20% of the time. (I don't know about you, but I wouldn't like this guy as my dad.)
Strategy:
The children assign a value from 0 to 4 to each hat color; say, white = 0, yellow = 1, red = 2, blue = 3, black = 4. Child #1's guess should be the sum of Child #2's hat and Child #3's hat mod 5, translated into a hat color. There is a 20% chance this will be correct, because there is a 9/25 chance that either child in front is wearing the 0 hat (which makes the guess 100% incorrect), and a 12/20 (4/5)(3/4) chance that neither is (which makes the guess 33% correct.) (12/20)(1/3) = 20%.
Now,
Child #2 knows the sum mod 5 of their hat and Child #3's hat, so they can subtract Child #3's color from the sum, and get their own color.
Then,
all Child #3 has to do is subtract Child #2's guess from Child #1's guess.
(This is assuming there isn't a lateral-thinking solution like the children being able to look at their own hats.)
edited 2 hours ago
answered 2 hours ago
Excited Raichu
5,465760
5,465760
Where does the 20% come from? It doesn't seem all that obvious.
– Bass
2 hours ago
@Bass i think your comment is incomplete, but I see what I did wrong lol
– Excited Raichu
2 hours ago
(sorry, on the phone, much misclicky, thanks for being clairvoyant :-)
– Bass
2 hours ago
1
@benj2240 if you use any different method that doesn't include some signal that you are using a different system (which I'm assuming isn't allowed by the problem, and a guess carries no information because you're already using that for information), it starts to impede the effectiveness of the first system.
– Excited Raichu
2 hours ago
1
@S.M. rot13(gur frpbaq xvq pnag gryy gur guveq uvf ung vs ur unf gb thrff uvf bja.)
– Excited Raichu
1 hour ago
|
show 4 more comments
Where does the 20% come from? It doesn't seem all that obvious.
– Bass
2 hours ago
@Bass i think your comment is incomplete, but I see what I did wrong lol
– Excited Raichu
2 hours ago
(sorry, on the phone, much misclicky, thanks for being clairvoyant :-)
– Bass
2 hours ago
1
@benj2240 if you use any different method that doesn't include some signal that you are using a different system (which I'm assuming isn't allowed by the problem, and a guess carries no information because you're already using that for information), it starts to impede the effectiveness of the first system.
– Excited Raichu
2 hours ago
1
@S.M. rot13(gur frpbaq xvq pnag gryy gur guveq uvf ung vs ur unf gb thrff uvf bja.)
– Excited Raichu
1 hour ago
Where does the 20% come from? It doesn't seem all that obvious.
– Bass
2 hours ago
Where does the 20% come from? It doesn't seem all that obvious.
– Bass
2 hours ago
@Bass i think your comment is incomplete, but I see what I did wrong lol
– Excited Raichu
2 hours ago
@Bass i think your comment is incomplete, but I see what I did wrong lol
– Excited Raichu
2 hours ago
(sorry, on the phone, much misclicky, thanks for being clairvoyant :-)
– Bass
2 hours ago
(sorry, on the phone, much misclicky, thanks for being clairvoyant :-)
– Bass
2 hours ago
1
1
@benj2240 if you use any different method that doesn't include some signal that you are using a different system (which I'm assuming isn't allowed by the problem, and a guess carries no information because you're already using that for information), it starts to impede the effectiveness of the first system.
– Excited Raichu
2 hours ago
@benj2240 if you use any different method that doesn't include some signal that you are using a different system (which I'm assuming isn't allowed by the problem, and a guess carries no information because you're already using that for information), it starts to impede the effectiveness of the first system.
– Excited Raichu
2 hours ago
1
1
@S.M. rot13(gur frpbaq xvq pnag gryy gur guveq uvf ung vs ur unf gb thrff uvf bja.)
– Excited Raichu
1 hour ago
@S.M. rot13(gur frpbaq xvq pnag gryy gur guveq uvf ung vs ur unf gb thrff uvf bja.)
– Excited Raichu
1 hour ago
|
show 4 more comments
I think they can get all the way to
one in three
probability.
There's probably a possible explanation that utilises Galois fields, modular exponents and discrete logarithms, (well, more likely just modular subtraction and averages are enough) but let's instead give each kid one of these:
.
Kid 1 then observes the other hat colours, and guesses a colour
that is as far (in the same direction) from kid 2's colour as kid 2's is from kid 3's.
For example, if kid 3 has black and kid 2 has yellow, then kid 1 guesses blue.
Then, kid 2 guesses the only colour that is
exactly halfway between 1's guess and 3's colour that can be seen.
In this example, kid 2 sees black, and hears the guess "blue", so 2 (correctly) guesses "yellow".
Kid 3, having heard two guesses, performs exactly the same operation as Kid 1.
In this example, 1 guessed "blue", and 2 guessed "yellow", so kid 3 (correctly) picks black, which is
two colours anticlockwise from yellow, just like yellow is two spots anticlockwise from blue.
This approach must be optimal, because
1. The first kid's guess can never be better than one in three, no matter what
2. The guess kid 1 makes with this system is always "possible" and never a duplicate of one of the other two colours, so its probability is one in three
3. After the first guess, the other kids always exactly know their colours.
So, yeah, that should just about do it.
add a comment |
I think they can get all the way to
one in three
probability.
There's probably a possible explanation that utilises Galois fields, modular exponents and discrete logarithms, (well, more likely just modular subtraction and averages are enough) but let's instead give each kid one of these:
.
Kid 1 then observes the other hat colours, and guesses a colour
that is as far (in the same direction) from kid 2's colour as kid 2's is from kid 3's.
For example, if kid 3 has black and kid 2 has yellow, then kid 1 guesses blue.
Then, kid 2 guesses the only colour that is
exactly halfway between 1's guess and 3's colour that can be seen.
In this example, kid 2 sees black, and hears the guess "blue", so 2 (correctly) guesses "yellow".
Kid 3, having heard two guesses, performs exactly the same operation as Kid 1.
In this example, 1 guessed "blue", and 2 guessed "yellow", so kid 3 (correctly) picks black, which is
two colours anticlockwise from yellow, just like yellow is two spots anticlockwise from blue.
This approach must be optimal, because
1. The first kid's guess can never be better than one in three, no matter what
2. The guess kid 1 makes with this system is always "possible" and never a duplicate of one of the other two colours, so its probability is one in three
3. After the first guess, the other kids always exactly know their colours.
So, yeah, that should just about do it.
add a comment |
I think they can get all the way to
one in three
probability.
There's probably a possible explanation that utilises Galois fields, modular exponents and discrete logarithms, (well, more likely just modular subtraction and averages are enough) but let's instead give each kid one of these:
.
Kid 1 then observes the other hat colours, and guesses a colour
that is as far (in the same direction) from kid 2's colour as kid 2's is from kid 3's.
For example, if kid 3 has black and kid 2 has yellow, then kid 1 guesses blue.
Then, kid 2 guesses the only colour that is
exactly halfway between 1's guess and 3's colour that can be seen.
In this example, kid 2 sees black, and hears the guess "blue", so 2 (correctly) guesses "yellow".
Kid 3, having heard two guesses, performs exactly the same operation as Kid 1.
In this example, 1 guessed "blue", and 2 guessed "yellow", so kid 3 (correctly) picks black, which is
two colours anticlockwise from yellow, just like yellow is two spots anticlockwise from blue.
This approach must be optimal, because
1. The first kid's guess can never be better than one in three, no matter what
2. The guess kid 1 makes with this system is always "possible" and never a duplicate of one of the other two colours, so its probability is one in three
3. After the first guess, the other kids always exactly know their colours.
So, yeah, that should just about do it.
I think they can get all the way to
one in three
probability.
There's probably a possible explanation that utilises Galois fields, modular exponents and discrete logarithms, (well, more likely just modular subtraction and averages are enough) but let's instead give each kid one of these:
.
Kid 1 then observes the other hat colours, and guesses a colour
that is as far (in the same direction) from kid 2's colour as kid 2's is from kid 3's.
For example, if kid 3 has black and kid 2 has yellow, then kid 1 guesses blue.
Then, kid 2 guesses the only colour that is
exactly halfway between 1's guess and 3's colour that can be seen.
In this example, kid 2 sees black, and hears the guess "blue", so 2 (correctly) guesses "yellow".
Kid 3, having heard two guesses, performs exactly the same operation as Kid 1.
In this example, 1 guessed "blue", and 2 guessed "yellow", so kid 3 (correctly) picks black, which is
two colours anticlockwise from yellow, just like yellow is two spots anticlockwise from blue.
This approach must be optimal, because
1. The first kid's guess can never be better than one in three, no matter what
2. The guess kid 1 makes with this system is always "possible" and never a duplicate of one of the other two colours, so its probability is one in three
3. After the first guess, the other kids always exactly know their colours.
So, yeah, that should just about do it.
edited 27 mins ago
answered 1 hour ago
Bass
26.9k465167
26.9k465167
add a comment |
add a comment |
Thanks for contributing an answer to Puzzling Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fpuzzling.stackexchange.com%2fquestions%2f77693%2fhat-puzzle-with-5-different-colours-and-3-people%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
.
Do they only get presents if all of them get it right, or do the ones who get it right get a present?
– S. M.
3 hours ago