# SAVE THE MANKIND

1,170.2K Views

A stark raving mad king tells his 100 wisest men he is about to line them up and that he will place either a red or blue hat on each of their heads. Once lined up, they must not communicate amongst themselves. Nor may they attempt to look behind them or remove their own hat.

The king tells the wise men that they will be able to see all the hats in front of them. They will not be able to see the color of their own hat or the hats behind them, although they will be able to hear the answers from all those behind them.

The king will then start with the wise man in the back and ask “what color is your hat?” The wise man will only be allowed to answer “red” or “blue,” nothing more. If the answer is incorrect then the wise man will be silently killed. If the answer is correct then the wise man may live but must remain absolutely silent.

The king will then move on to the next wise man and repeat the question.

The king makes it clear that if anyone breaks the rules then all the wise men will die, then allows the wise men to consult before lining them up. The king listens in while the wise men consult each other to make sure they don’t devise a plan to cheat. To communicate anything more than their guess of red or blue by coughing or shuffling would be breaking the rules.

What is the maximum number of men they can be guaranteed to save?

ravi Expert Asked on 20th July 2015 in

99.

You can save about 50% by having everyone guess randomly.

You can save 50% or more if every even person agrees to call out the color of the hat in front of them. That way the person in front knows what color their hat is, and if the person behind also has the same colored hat then both will survive.

So how can 99 people be saved? The first wise man counts all the red hats he can see (Q) and then answers “blue” if the number is odd or “red” if the number is even. Each subsequent wise man keeps track of the number of red hats known to have been saved from behind (X), and counts the number of red hats in front (Y).

If Q was even, and if X&Y are either both even or are both odd, then the wise man would answer blue. Otherwise the wise man would answer red.

If Q was odd, and if X&Y are either both even or are both odd, then the wise man would answer red. Otherwise the wise man would answer blue.

There can be any number of red hats, as the following examples show…

 Prisoner Hat he wears Number of red hats he sees (Y) Red hats saved for sure (X) He says 1 red 6 even (Q) N/A red 2 blue 6 even 0 even blue 3 red 5 odd 0 even red 4 blue 5 odd 1 odd blue 5 blue 5 odd 1 odd blue 6 red 4 even 1 odd red 7 red 3 odd 2 even red 8 red 2 even 3 odd red 9 red 1 odd 4 even red 10 red 0 even 5 odd red

Another example might also help, as this puzzle seems to trip up most people…

 Prisoner Hat he wears Number of red hats he sees (Y) Red hats saved for sure (X) He says 1 blue 5 odd (Q) N/A blue 2 blue 5 odd 0 even blue 3 red 4 even 0 even red 4 blue 4 even 1 odd blue 5 blue 4 even 1 odd blue 6 red 3 odd 1 odd red 7 blue 3 odd 2 even blue 8 red 2 even 2 even red 9 red 1 odd 3 odd red 10 red 0 even 3 odd red

John123 Expert Answered on 20th July 2015.

• ## More puzzles to try-

• ### What is the logic behind these ?

3 + 3 = 3 5 + 4 = 4 1 + 0 = 3 2 + 3 = 4 ...Read More »
• ### Defective stack of coins puzzle

There are 10 stacks of 10 coins each. Each coin weights 10 gms. However, one stack of coins is defective ...Read More »
• ### Which clock works best?

Which clock works best? The one that loses a minute a day or the one that doesn’t work at all?Read More »
• ### (Advanced) Cheryl’s Birthday Puzzle

Paul, Sam and Dean are assigned the task of figuring out two numbers. They get the following information: Both numbers ...Read More »
• ### Five greedy pirates and gold coin distribution Puzzle

Five  puzzleFry ship’s pirates have obtained 100 gold coins and have to divide up the loot. The pirates are all ...Read More »
• ### Tuesday, Thursday what are other two days staring with T?

Four days are there which start with the letter ‘T‘. I can remember only two of them as “Tuesday , Thursday”. ...Read More »
• ### How could only 3 apples left

Two fathers took their sons to a fruit stall. Each man and son bought an apple, But when they returned ...Read More »
• ### How Many Eggs ?

A farmer is taking her eggs to the market in a cart, but she hits a  pothole, which knocks over ...Read More »
• ### Most Analytical GOOGLE INTERVIEW Question Revealed

Let it be simple and as direct as possible. Interviewer : Tell me how much time (in days) and money would ...Read More »
• ### Lateral thinking sequence Puzzle

Solve this logic sequence puzzle by the correct digit- 8080 = 6 1357 = 0 2022 = 1 1999 = ...Read More »
• ### How did he know?

A man leaves his house in the morning to go to office and kisses his wife. In the evening on ...Read More »
• ### Pizza Cost Math Brain Teaser

Jasmine, Thibault, and Noah were having a night out and decided to order a pizza for \$10. It turned out ...Read More »
• ### Which letter replaces the question mark

Which letter replaces the question markRead More »
• ### Which room is safest puzzle

A murderer is condemned to death. He has to choose between three rooms. The first is full of raging fires, ...Read More »
• ### Richie’s Number System

Richie established a very strange number system. According to her claim for different combination of 0 and 2 you will ...Read More »
• ### Srabon wanted to pass

The result of math class test came out. Fariha’s mark was an even number. Srabon got a prime!! Nabila got ...Read More »
• ### Become Normal!!

Robi is a very serious student. On the first day of this year his seriousness for study was 1 hour. ...Read More »
• ### Sakib Knows The Number!

Ragib: I got digits of a 2 digit number Sakib: Is it an odd? Ragib: Yes. Moreover, the sum of ...Read More »
• ### Maths Genious Riddle

If u r genius solve it:- 40 * 14 = 11 30 * 13 = 12 20 * 12 = ...Read More »
• ### Calling 2 as 10 Riddle

When do we call “10” while looking at number “2”?Read More »