SAVE THE MANKIND
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?
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 |
Your Answer
More puzzles to try-
Four People on a Rickety Bridge
Four people need to cross a rickety bridge at night. Unfortunately, they have only one torch and the bridge is ...Read More »You will never see again
What is something you will never see again?Read More »What is the minimum number of the tickets they need to buy ?
4 fathers, 2 grand-fathers and 4 sons went to watch the movie. What is the minimum number of the tickets ...Read More »Count chocolate and sodas puzzle
A chocolate costs 6 rupees and a soda costs 5 rupees. If you have 32 rupees in total, how many ...Read More »How old are Daniel and Jessica now?
Alan’s son Daniel, is exactly one fifth of Alan’s age. In 21 years time, Alan will be exactly twice Daniel’s ...Read More »Incorrect Dictionary
I noticed one of the words in the oxford dictionary is spelled incorrectly. What about you?Read More »Bus Driver riddle
You drive a bus from Mexico city to Mexican Valley. At the first bus stop, 22 people get in. At ...Read More »Tricky puzzle
In the given sequence; I6, 06, 68, 88, X, 98. What does the X represent?Read More »How did Indian newspapers?
‘Ferari driver’ easily beats the ‘force indain driver’ in a two care race.How did Indian newspapers truthfully report so to ...Read More »Clock & time riddle
A stopped clock gives the exact time twice a day, while a normally running (but out of sync) clock will ...Read More »Grown from Darkness
It is grown from darkness but shine with a pale light. Very round it is, and always a lady’s delight. ...Read More »NDA Aptitude- Which number replace the question mark?
Which number replace the question mark?Read More »eight eights
Can you write down eight eights so that they add up to one thousand?Read More »Married many but has no wife riddle
He has married many but has never been married. Who is he?Read More »Santa Hot Chocolate store funny riddle
Where does Santa and his reindeer go to get hot chocolate while flying in the sky?Read More »Colour Combination Probability
You have three orange, two pink and five purple balls in the drawer beside your bed. There is no electricity ...Read More »The New Year Message
Answer the clues below to find each word. Then place the letters on the lines below. Each letter must be ...Read More »Number magic – Mathematical puzzle
If you multiply me by 2, subtract 1, and read the reverse the result you’ll find me. Which numbers can ...Read More »Insects Running Puzzle
There are two insects on a tile. Insect X is sitting on one side of the tile (point A) and ...Read More »Seconds in a year
How many seconds are there in one year?Read More »