Mad as a Hatter

100 mathematicians are standing in a line, wearing a black or white hat. Each mathematician can ONLY see the color of the hats of the people in front of them. So the first person sees no hats, the last sees 99.

The mathematicians are allowed to talk to each other and decide upon a strategy, for a government rep is coming to cut off funding. Each person can only say “black” or “white.” If you correctly say what color hat you’re wearing, your funding is continued and you live. If you’re wrong, you lose your funding, and you may as well be dead.

How many mathematicians can you guarantee will keep their funding?

You are not allowed you use “tricks,” say a person delays one second before answering means A, two seconds means B, … You have to answer IMMEDIATELY what color hat you’re wearing.

Communicated by Gergely Harcos.

34 Comments

  1. Steven Miller on October 24, 2017 at 3:08 pm

    Your email doesn’t work. email me at [email protected]



  2. Steven Miller on May 16, 2017 at 6:56 pm

    You can do better….



  3. Steph on May 16, 2017 at 3:05 pm

    50% would get it right… right??



  4. Steven Miller on September 22, 2012 at 3:52 pm

    david: correct — email me at sjm1 AT williams.edu



  5. Steven Miller on August 9, 2012 at 12:58 am

    John: close to optimal but one can do a bit better (feel free to email me at sjm1 AT williams.edu, as I don’t want to post solns as that can spoil other people’s fun)



  6. Steven Miller on August 9, 2012 at 12:54 am

    John: correct! Not posting as it’s the soln (email me at sjm1 AT williams.edu to chat more)



  7. Steven Miller on June 21, 2012 at 1:15 am

    ahh, but there is a better way wi’out cheating…. sjm1 AT williams.edu



  8. osga21 on June 20, 2012 at 3:42 pm

    I take of my hat and take a look at it, therefore every mathematician will keep its funding



  9. Steven Miller on June 5, 2012 at 6:06 pm

    Alex Irby: One can do better. If you want to chat about problems please email me at sjm1 AT williams.edu



  10. Steven Miller on May 27, 2012 at 1:17 am

    two problems: (1) you don’t know there are the same number of black and white hats, and (2) they cannot move. //s
    PS: email to you bounces, email me at sjm1 AT williams.edu



  11. Steven Miller on May 27, 2012 at 1:16 am

    two problems: (1) you don’t know there are the same number of black and white hats, and (2) they cannot move. //s



  12. Maria on May 26, 2012 at 11:59 pm

    If they had time could they rearrange themselves alternating between black and white, then they could see the person in front of them and say the opposite color of the person in front of themselves hat, then if there was not an even amount of people all the extra people could go to the back of the line after asking what their color was. Assuming everyone was honest and no one had a very short memory 100% of the people would be correct. I think…:)



  13. Steven Miller on April 22, 2012 at 12:46 am

    andreas: correct, not posting as it’s the right answer. email me at sjm1 AT williams.edu if you want an interesting answer that’s almost as good as what you have



  14. Steven Miller on April 4, 2012 at 12:34 pm

    let me try sending you a hint first. //s



  15. Mary on April 4, 2012 at 12:21 pm

    May I please have the solution to Mad as a Hatter? Thanks.



  16. Steven Miller on January 30, 2012 at 3:54 am

    ah, but their honor does….



  17. kevin K on January 30, 2012 at 12:46 am

    i’m sorry but nowhere does it say that the mathamations can’t just tell each other ” hey bill you have a black hat!” “thanks Rodger you too have a black hat” and thus everyone keeps their funding.



  18. Steven Miller on December 30, 2011 at 11:29 pm

    I can’t follow your logic — can you be more explicit? Send me an email at [email protected]. For example, what does ‘person behind him’ mean? There is no one behind the last person….



  19. Kher on December 30, 2011 at 10:59 pm

    99 can keep their funding as person behind him can see his hat color only 100th person is in delimma 🙁



  20. Steven Miller on December 22, 2011 at 9:52 pm

    Carl — well done! Not posting your response as it’s the answer. /s



  21. Steven Miller on December 14, 2011 at 6:33 pm

    do end to beginning — last person who sees all speaks first.



  22. Kareem on December 14, 2011 at 6:15 pm

    what is the order in which they are asked the color of their hat? is it from beginning to end, end to beginning, random? it makes a difference



  23. Steven Miller on November 29, 2011 at 1:45 am

    NOAH: great job. You can do better than what you wrote, but that is VERY close to optimal. Email me at [email protected] if you want to discuss the riddles more.



  24. Steven Miller on October 26, 2011 at 2:08 pm

    yes! can you do better! you had the yes/no right as well



  25. mukuro on October 26, 2011 at 7:17 am

    lets say person100 will say the hat color of person 99
    person99 will say the hat color person100 say
    person98 will say the hat color of person 97 AND SO ON
    that way more than 50% will be saved from death



  26. Steven Miller on October 25, 2011 at 1:54 am

    Not quite following what you’ve written; also, the soln has to work for ANY number of white and black hats. hint: can you find a way to always ensure at least 50%? At least 66%?



  27. Yorik on October 24, 2011 at 7:33 pm

    i know how to solve this riddle with 50 black and 50 white hats. using this method would give you a chance of 100-(difference between black and white hats) to get the answer right, depending on where in line you are.



  28. Steven Miller on October 20, 2011 at 1:00 am

    Aldo: correct, well done



  29. Steven Miller on August 19, 2011 at 4:36 am

    Nice generalization — thoughts all?



  30. Linh on August 19, 2011 at 1:57 am

    To make this problem a little more interesting, can I tweak it a little bit?
    Say, same rule and everything, but now there arent only black or white hats. Say there are 100 colors of hats to choose from. Colors of hat are determined randomly to assign to each person. No minimum hats of a certain color. So say purple is one of the 100 colors, but it might be by chance that no one was assigned purple.

    Have fun! 😀



  31. Steven Miller on June 8, 2011 at 6:50 pm

    You don’t get to decide on the amount of black or white hats — the sadistic (is it redundant to say sadistic?) professor does that!

    If you email me which mediums you’re most interested in I’ll send along the solutions. /s



  32. Joe G on June 8, 2011 at 3:06 pm

    Can we decide on the amount of white and black hats? if so, I can get 99 out of the 100 to keep their funding.

    Also, I have been looking for a site like this with real math (non-word trick) riddles. And you are correct on the front page that I would not spend as much time on the riddles if I had the answer right away. However, I have looked over all the mediums, would it be ok if you sent me most of the mediums’ answers if not all of them?

    Keep it up. I would love to see more.



  33. Steven Miller on April 7, 2011 at 1:48 pm

    Usually it’s to make it dramatic and have the stakes high so people take these riddles seriously. One can, of course, rephrase.



  34. gillain morgan on April 6, 2011 at 4:46 pm

    Why does almost every game have to do with killing? Ponies!!!!!!!!!!



Leave a Comment