Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

(OT) Meditate on this brain-teaser

by japhy (Canon)
on Dec 12, 2001 at 06:54 UTC ( [id://131154]=perlmeditation: print w/replies, xml ) Need Help??

I heard a brain-teaser today, and I think I have the answer, but it seems odd to me -- it relies on the other people in the puzzle not being as smart as the person who answers.
Three men are seated around a table. Each man is wearing a hat, either blue or white. Each can see the hat on the other two men, but not his own. They all know that there is at least one blue hat among them. The goal is for one of them to announce the color of the hat on his head. If he is right, he gets a million dollars. If he is wrong, he gets beheaded.

One of the three men sees that the other two men have blue hats. After half an hour, he stands up and announces his hat is...

Below is my thought process and conclusion.
Let's say A and B are wearing blue hats, and C is the man who stands up announces his color. If C's hat were white, then A would see a white and a blue hat and not be able to answer properly (since A's hat could be white or blue). Since A does not answer, B knows that there is only one white hat among the three -- and since A's hat is blue and C's hat is white, B knows his hat is blue.

But neither A nor B does such a thing. Since that has not happened, C knows that both A and B are looking at two blue hats. So C's hat is blue.

Question: why didn't one of the other two men do this?! I don't know.

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: (OT) Meditate on this brain-teaser
by VSarkiss (Monsignor) on Dec 12, 2001 at 09:17 UTC

    Actually, this is a well-known conundrum. The best exposition I know is by Martin Gardner, chapter 10 in Penrose Tiles to Trapdoor Ciphers. It originally appeared as a Mathematical Games column in the early 80's, I believe. (No, I'm not that old, it's just your imagination.) It brings up some very interesting problems in mathematical induction, upon which your solution is based.

    Try this on for size: your solution works even if C is totally blind! Read MG for the whole scoop.

There ain't no such thing as surprise tests then
by tilly (Archbishop) on Dec 13, 2001 at 14:00 UTC
    In a course, the teacher stands up and says that there will be a surprise test before the end of the year. But this is impossible! For look. If the test was given on the last day of class, would anybody be surprised? Why of course not, they know it has to come, and they know there is no other day possible. So it cannot come on the last day. But then on the second to last day, what then? Why they know it cannot be on the last day, and so does the teacher, so it must be today! Where is the surprise? And so it goes back to the first day. It is impossible for the teacher to give a surprise test to this logical group of people.

    Yet teachers announce surprise tests, and surprise their students.

    I leave you to reflect on the difference between knowledge and meta-knowledge. As I do so, I mention in passing that there is a world of difference between saying, I prove this! and saying, I prove that I can prove this! In fact this distinction is critical. Were it not so, then mathematics would run afoul of Gödel's theorem.

    Catch me another day and I may explain how this ties in with the existence of a finite number - trivially proven to be finite - but about which you cannot prove that any number explicitly written out in base 10 can ever be proven to be larger than this one in any consistent axiom system comprehensible by humans. But you wouldn't want that. It might tempt you into studying mathematics, which is a profession that will make you far less money than computers can...

    (BTW one such number is busy beaver of 50 million. It is a finite number which we can find no explicit upper bounds for.)

Re: (OT) Meditate on this brain-teaser
by hawson (Monk) on Dec 12, 2001 at 11:15 UTC
    This very puzzle (an many varients thereof) was the subject of a book called Anno's Hat Tricks, by Mr. Mitsumasa Anno. Somewhere I think I have my old copy.

    Mitsumasa Anno also wrote a number of simply wonderful books that I grew up with. Especially Anno's Journey. There are no words in this book, but that makes it all better. If you have kids, get these books for them; if you don't, get them for yourself.

Re: (OT) Meditate on this brain-teaser
by runrig (Abbot) on Dec 12, 2001 at 07:36 UTC
    Here is a spoiler link. And the site looks like a pretty cool puzzle site, with an unsolved puzzle link and discussion forum on the home page :-)
Re: (OT) Meditate on this brain-teaser
by Anonymous Monk on Dec 12, 2001 at 13:26 UTC
    This is a (fairly simple) example of a class of problems that motivated this CS paper, and a whole range of research that has followed it in the last 10 years or so. The "Muddy Children" problem in section 2 of the paper is really quite impressive, IMHO.
Re: (OT) Meditate on this brain-teaser
by tachyon (Chancellor) on Dec 12, 2001 at 17:20 UTC

    Actually there is no rational solution to the problem as stated. Given that all we can be sure of is that there must be one blue hat amongst the three the only way to know that one's own hat is blue is to see that both the other two participants are wearing white hats. None of the three participants are in this position. One sees two blue hats, the other two see one blue hat plus whatever color hat the participant who sees the two blue hats sees. All see at least one blue hat.

    It is immaterial as to whether the participant who announces his answer is wearing a blue or a white hat. It could be either, he can not know and is simply taking a 50:50 punt.

    Consider the two possible hat colors for our punter. If it is blue then all the participants are in the same position. They all see two blue hats. There is no logical differentiation between any of them. If on the other hand our punter wears a white hat the views are W-B B-W B-B This is still not of any help at all. Only seeing W-W is conclusive.

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

      The point isn't in what someone sees, the point is in what someone doesn't see. C knows that his hat is either white or blue. Now, let's say that C's hat is white. That means that A sees a white and a blue (because we know B's hat is blue). A can't make any decisions, for the very reason you stated.

      So, let's see what B thinks. (Remember, C's hat is white at this moment, and that A didn't do anything.) Since A didn't do anything, B knows his hat cannot be white. (If B's hat was white and C's hat was white, A would say his hat is blue.) So, B knows that his hat must be blue.

      But, B doesn't do anything, either. So, since A didn't stand up and B didn't stand up, then C must be able to stand up because his hat isn't white.

      Does that make sense?

      ------
      We are the carpenters and bricklayers of the Information Age.

      Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

        Tut, tut Dragonchild,

        There are a lot of assumptions being made here: That the players are rational thinkers and intelligent enough to realise this kind of strategy etc... I just find these problems incredibly annoying because I'm not very good at them and people who get the answer right tend to do so not because of induction but more because they've seen it before! It rather reminds me of a physics joke I once heard.

        A horseracing fan wins a million dollars/pound/shekels in the lottery and decides to invest it in an interesting proposition: He will find out how to predict the winner of a horserace with 95% accuracy based on the build, weight and past form of a horse. To do this he goes to a racehorse trainer, a molecular biologist and a theoretical physicist: He gives them each $10000 just for working for one year and promises the winner $250,000 more if they win.

        After the year is up he returns to each. The horse trainer is pleased to report than he can get it right 75% of the time and the fan is impressed, but his heart heavy he wanders on. The molecular biologist is delighted to report that he got to 80% but progressed no further. Eventually the fan comes to the physicist, who replies, "Yes, I can predict which horse will win any race with 99.5% probability of success with one minor catch."

        Needless to say, the racing fan is impressed and offers the physicist the prize money in return for the analysis, however the physicist being an honest man says he must tell him the catch first:"It must be a spherical horse running in a vacuum!"

        "A nerd is someone who knows the difference between a compiled and an interpreted language, whereas a geek is a person who can explain it cogently over a couple of beers"
               - Elgon

        Consider how different the puzzle would be if a correct guess spared only the guessers' head, an incorrect guess doomed them all and there was a time limit (which if not met, doomed them all as well). Now it's more like a game of chicken which will end with a 50-50 chance of three heads rolling.

        --Jim

        Ummh. No. As stated a player can only be sure of their hat color if they see two white hats as the only stated condition is at least one blue hat. All players see at least one blue hat. None of the players see two whites. They are all in the position of seeing at least one potentially lethal blue hat.

        In fact A and B are identical in all respects. They are better denoted A and A'. They both see B-X where X is C's hat color. C sees B-B. No one sees the required W-W combination. There is no logical solution. The lack of response on all player's behalfs is logical. C is a punter

        cheers

        tachyon

        s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://131154]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-16 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found