Hats Off

Three mathematicians are applying for a job. There are five hats, three white, two black. They’re lined up, and a hat is placed on each. The first person in line cannot see any hat; the second in line sees only the hat of the person in front of him; the third person sees only the hats of the two people in front of her. The first person to correctly figure out what color hat he has gets the job; you guess wrong and you are killed. Assume these are INTELLIGENT mathematicians, and that they will do the logically correct thing at each stage — if something can be deduced, they will figure it out. After a long pause, the first person, who cannot see any hats, says he knows the color of his hat. What is the color, and how does he know?

46 Comments

  1. . on September 27, 2025 at 5:43 pm

    What happens if there are 4 mathematicians, 4 white hats, and 3 black hats—can they all still be correct? What if there are n mathematicians, n white hats, and n – 1 black hats—does a general strategy still work? And if hats are assigned randomly, what’s the probability that everyone guesses correctly under an optimal strategy?



  2. . on September 27, 2025 at 5:42 pm

    Thanks for sharing informative article.



  3. Matt on March 4, 2015 at 6:33 pm

    Some interesting followups:
    What happens if there are 4 mathematicians, 4 white hats, and 3 black hats?
    What about if there are n mathematicians, n white hats, and n-1 black hats?
    What is the probability, if there are n mathematicians, that each person in line gets the job (given that the hats are passed out randomly?)



  4. Steven Miller on April 18, 2014 at 6:32 pm

    Glad to hear!



  5. Sean on April 18, 2014 at 5:30 pm

    I really love this site. I like trying to solve the riddles in between calls while I’m at work. Like right now haha. Keep up the great work making my days fun and full of complex thinking!



  6. Steven Miller on February 18, 2014 at 9:28 am

    glad you’re enjoying; your email address didn’t work ./s



  7. Atdhe on February 18, 2014 at 9:25 am

    Very interesting, I got to admit it got me thinking for quite a time. 🙂



  8. Steven Miller on May 14, 2013 at 3:32 pm

    EXCELLENT question!



  9. Glenn McGinnis on May 14, 2013 at 3:09 pm

    An interesting question would be the fairness of this job application since the other 2 mathematicians cannot ever determine their hat in the situation. If candidate “C” knows that he cannot determine his hat and that eventually A or B will, he might simply guess, or say he does not want the job and walk away. And let the others guess on their own.



  10. Steven Miller on November 26, 2012 at 4:06 am

    Jason: correct (sjm1 AT williams.edu)



  11. Steven Miller on July 2, 2012 at 11:34 pm

    I’ll send a hint //s



  12. William on July 2, 2012 at 8:14 pm

    I would like to know the answer and how the problem was solved.



  13. Steven Miller on June 4, 2012 at 6:55 pm

    Alex Irby: correct. Please email solns to me (sjm1 AT williams.edu) as I don’t want to post correct solns and spoil people’s fun. Thanks ..s



  14. Steven Miller on May 31, 2012 at 1:42 am

    JerrySandusky: correct, not posting as it’s the soln ..s



  15. Steven Miller on May 6, 2012 at 11:54 am

    glad you’re enjoying..s



  16. Exercise & Weigh Loss - Vibration Plates on May 5, 2012 at 10:07 pm

    Having read this I thought it was rather informative. I appreciate you finding the time and energy to put this informative article together. I once again find myself spending a significant amount of time both reading and leaving comments. But so what, it was still worth it!



  17. Steven Miller on March 29, 2012 at 10:01 am

    xiaomilk: correct, well done — not posting as it’s the soln



  18. Steven Miller on February 3, 2012 at 12:48 pm

    to the person starting: Ok, let’s assume that person3 sees…. YOur logic from that point on is correct, but what if they don’t see what you claim? You’re essentially there, email me at [email protected] to chat more.



  19. Hi on February 3, 2012 at 11:14 am

    Ok, let’s assume that person3 sees 2 white hats infront. This means she doesnt know what hat she has, because it may be black or white. So she stays silent. Person2, who notices that person3 hasnt said anything, knows that he and person1 must have either a black&white hat between them, or 2 white hats. And since he can see that person1 has a white hat, then he doesnt know if he has a black or white hat (like, if he saw a black hat infront of him, then he knows that he’s got a white hat, but person1’s hat is white) so he stays silent. Person1, after seeing the other two staying silent, knows that there is only one possiblity that made both of them not sure of their colours: He has a white hat. So he answers, and gets the job.



  20. Steven Miller on January 27, 2012 at 2:44 am

    email me at [email protected] with more details, as I think this answer is wrong. ..s



  21. Anonymous on January 26, 2012 at 9:42 pm

    Black, the other two are white and can therefore not determine the color of their own hat.



  22. Steven Miller on December 6, 2011 at 3:17 pm

    email me at [email protected] for a hint



  23. Kiana and Lane on December 6, 2011 at 3:14 pm

    Is it that the he was wearing white? I’m not 100% sure how he had it….help?



  24. Steven Miller on November 20, 2011 at 2:51 am

    To Anonymous (Submitted on 2011/11/19 at 12:49 pm): Correct! Not posting as it’s the soln.



  25. Linh on October 14, 2011 at 2:51 am

    This site is so fun I bookmarked it 😀



  26. Steven Miller on September 18, 2011 at 1:23 am

    Glad you’re enjoying it.

    “If at first you do succeed, try something harder.”
    — Ann Landers



  27. gay adoption uk on September 17, 2011 at 6:20 am

    Simply a smiling visitor here to share the love (:, btw outstanding design and style . “People forget how fast you did a job – but they remember how well you did it.” by Howard Newton.



  28. feed your website with traffic on September 12, 2011 at 3:28 am

    Keep up the great work , I read few posts on this internet site and I believe that your web blog is real interesting and holds bands of great information.



  29. credit card with best rewards on August 31, 2011 at 3:33 am

    As I website possessor I think the content here is very good , appreciate it for your efforts.



  30. Get Your Music Heard Today on August 30, 2011 at 12:12 pm

    I like this blog very much, Its a rattling nice post to read and get information.



  31. Steven Miller on August 30, 2011 at 6:03 am

    You can always email me at sjm1 AT williams.edu.



  32. free games on August 30, 2011 at 5:38 am

    Thanks for the auspicious writeup. It actually was once a entertainment account it. Look complicated to more delivered agreeable from you! However, how could we be in contact?



  33. buy isagenix 9 day on August 28, 2011 at 11:22 am

    I like what you guys are up also. Such intelligent work and reporting! Carry on the excellent works guys I’ve incorporated you guys to my blogroll. I think it will improve the value of my website :). “A court is a place where what was confused before becomes more unsettled than ever.” by Henry Waldorf Francis.



  34. Your Ultimate Internet Traffic Guide on August 28, 2011 at 6:07 am

    I gotta bookmark this internet site it seems very helpful very beneficial



  35. Steven Miller on August 26, 2011 at 4:18 am

    Glad you’re enjoying the site. //s



  36. storyarea on August 26, 2011 at 4:08 am

    Great write-up, I’m normal visitor of one’s website, maintain up the nice operate, and It’s going to be a regular visitor for a long time. “He who seizes the right moment is the right man.” by Johann von Goethe.



  37. guru masterclass on August 19, 2011 at 5:39 am

    As I website owner I conceive the articles here is rattling excellent , regards for your efforts.



  38. Steven Miller on August 19, 2011 at 2:10 am

    if this is 100 in a line, last sees all but his and no one ever sees their hat



  39. Linh on August 19, 2011 at 1:35 am

    eh, wouldnt the last person in line always be the first person to know his color since he can see all other 4 people’s hats? Or only can the first person in line make his/her guess? Im confused as to the way this question is laid out.



  40. merseyside blinds on August 18, 2011 at 8:08 pm

    Its like you read my thoughts! You seem to know so much about this, such as you wrote the guide in it or something. I feel that you just could do with a few percent to power the message house a bit, however other than that, that is wonderful blog. An excellent read. I’ll definitely be back.



  41. remodeling livingston county on July 7, 2011 at 9:46 pm

    I am often to blogging and i actually respect your content. The article has really peaks my interest. I’m going to bookmark your site and maintain checking for brand spanking new information.



  42. Joe G on June 14, 2011 at 6:30 pm

    Haha, this is awesome. Once you start figuring these out, this site becomes so much more fun.

    The best thing to do for this one is draw all the possibilities, there are 7. Then work from the 3rd man forward and decide which ones required the “long pause” that let the first man to know.



  43. Steven Miller on May 23, 2011 at 3:18 am

    Greetings all. We’re working on a teacher’s corner — when we have it ready, let me know if you want me to pass it along.

    No one is able to see the extra hats, no one takes off hats, no one asks questions.

    Here’s a hint: put yourself in the third person’s place. You see two hats in front of you. Go through all the cases of what you could see, and think if there are any cases where you would be able to deduce your hat color. if there are, since the third person doesn’t speak then those cases cannot happen.



  44. The Queen's Class on May 20, 2011 at 4:45 pm

    Can the first person see the hat’s that are left over?

    If the answer is yes, we believe the first person sees that two black hats are left and is able to deduce that the three white hats are on their heads….

    OR

    Is there any rule that says they can’t take their hat off and look at it..maybe the other two were concentrating so hard on trying to solve it based on the hats they COULD see, and the 1st mathemetician recognized there was no rule saying they could not take their hat off.

    OR

    Can they ask questions of each other (which I don’t think makes sense, because why would you help someone else figure it out if you want the job….my students are nicer and think they would want to help eachother to stay alive…silly students, they don’t know how hard jobs are to find these days). Can they ask questions of people not in line? Are their people not in line…

    please help. we need to go to lunch now…

    oh…p.s. my students want to know if everyone else envisions top hats when solving this problem…because we all did!

    Thanks! Ms. Lippman and Brilliant Students



  45. Steven Miller on April 24, 2011 at 1:31 am

    Sure, but let me try a hint first. Imagine the third person saw two black hats. If this were the case, would they know what they have? Keep pushing this logic forward to eliminate what the hat possibilities are. If this doesn’t help, email me at sjm1 AT williams.edu for a solution.



  46. Anonymous on April 23, 2011 at 2:39 pm

    Hello. Could you send me answer for this riddle? I dont know how to do this… 🙂 If it is some kind of secret or you want me to think more I understand. Thank you in advance.



Leave a Comment