Can You Solve This Hat Riddle?–Find a Strategy So Each Person Can Guess His Own Hat Color

July 5, 2019 Updated: July 5, 2019

Here is a challenging logic riddle to test your skills and have fun solving at the same time.

Imagine you are relaxing on the patio one day, minding your own business, when suddenly a bright light shines down on you from the sky. And instantly, you find yourself beamed aboard an alien spacecraft, along with nine other humans.

The aliens are a super-intelligent race from the planet Vulcan, in search of slaves to take back to their world to work for them. There’s just one catch: according to their laws, they cannot enslave highly logical, cooperative lifeforms.

Therefore, the aliens have devised a test of logic to see if the human race qualifies (no pressure).

As the Vulcan race possess an IQ measuring somewhere in the stratosphere, they instantly know how to speak English in order to relay the following instructions to you and the others:

You will be lined up in single file, from shortest to tallest, facing in one direction. Each of you will be randomly assigned either a white or black hat.

None of you will be told or allowed to see the color of your own hat, and the total number of each color of hats will also be unknown to each person.

Due to the difference in height, each person will be able to see all of the hats being worn by the persons in front of them.

If at least 9 of you are able to successfully guess the color of own your hat, you will all be set free. When I say to begin, starting from the back and moving forward, each of you must choose to utter either the word “black” or “white.”

You may not communicate or signal in any other way, such as by making sounds.

Nor are any of you allowed to step out of line or turn around or cheat in any way. The penalty for breaking the rules is automatic enslavement on the planet Vulcan for all of you.

Yet, there is hope. You have 10 minutes to speak with each other and come up with a plan, and by using logic, it is possible to pass the test. Good luck!

Can you come up with a plan that will ensure that all 10 of the Earthlings are set free? Take a few moments to think about it, and then scroll down to see the solution along with an explanation.

Were you able to figure it out?

The key lies in the fact that the person at the back knows the color of all of the hats in front of him. If he can somehow code that information using the words “black” or “white” to inform everyone in front of him, they can all guess their hat colors correctly. It seems impossible, but there is a way.

The person at the back doesn’t know the color of his own hat—that doesn’t matter, since only 9 of the 10 people need to guess their hat color correctly. Still, he has a 50 percent chance of getting it right.

Although the person at the back cannot communicate the number of each color of hat or the order in which he sees them, he is able to communicate the parity of the number of either black or white hats that he sees, that is, whether the number is odd or even.

Here’s an example of how he might code the parity of the number of black hats that he sees:

Suppose he sees an odd number of black hats; they can all agree to signify that condition by uttering the word “black.” If he sees an even number of black hats, he can utter the word “white,” thus signalling vital information to the others.

Thus, the person in front of him will be able to deduce the color of his own hat by what he sees. If the parity for the number of black hats he sees matches what the first person saw, he knows that his own hat must be white. If the opposite is true, he knows his hat must be black.

Each subsequent person (after the second person) has to count the number of times “black” was uttered previously (excluding the first person) and add that to the number of black hats that they see in front of them. If the parity is the same as what the first person signaled, he knows his own hat must be white, otherwise, it must be black.

In the above example, they chose to code the parity of the black hats. Alternately, they could have chosen to signal the parity of the white hats—as long as everyone understands the code, either way works.

Thanks to the powers of logic, the human race will be spared from enslavement on the planet Vulcan, and they will continue their voyage across the cosmos seeking less intelligent life elsewhere.

Are you ready for another one? Well, try this one on for size then:

Test Your Logic: Who Will Determine His Own Hat Color Before All the Others? And Why?

Logic riddles are timeless and never get old. As our daily routine doesn’t always present opportunities to test our logical prowess, we may forget how satisfying it is activating those mental skills to solve a good problem!

Here’s a doozie for you that should perk you up in your chair. This riddle might seem impossible at first glance, but try thinking logically, and you’ll begin to see the possibilities.

Instructions:

There are four Alcatraz prisoners who were selected to play a game of logic where the winner would be rewarded with his freedom. They were brought outside the prison and told to line up on a flight of stairs nearby the prison wall, as per the illustration below:

As you can see, Man 1, 2, and 3 are lined up on different levels and have different viewpoints. A wall separates Man 4 from the others. They are all facing the same direction. Note the following:

-Man 1 can see Man 2 and 3.

-Man 2 can only see Man 3.

-Man 3 can see none of the others.

-Man 4 also can see none of the others.

The prisoners are all given hats to wear. There are 2 white hats and 2 black hats, and the prisoners know this; but they do not know what color hat they are wearing. Whoever figures out what color hat they are wearing must shout out the color. The first person to correctly shout out their own hat color is the winner. Which man will be the first to yell out the answer, and why?

Note:

The prisoners must abide by some rules: No man is allowed to take off or look at their hat, turn around or move, nor are they allowed to speak or communicate to each other. They are all perfectly logical people, and will not shout out random answers or guess.

Take a moment to figure out a solution. Although it may seem counterintuitive, there is in fact a perfectly logical solution to the riddle. Once you have your answer, or should you give up and wish to see the answer, scroll down below for an explanatiom.

The answer is Man 2

Man 2 will be able to determine the color of his hat and shout it out first. Why? Consider that Man 1 can see what color hat Man 2 and 3 are wearing. Using simple logic, we know that were Man 2 and 3 wearing the same color hat, then Man 1 would deduce that his hat must be the opposite color (remember, there are only two hats of each color); then he would shout out his answer first, but as Man 2 and 3 are wearing different color hats, Man 1 cannot know for sure which hat he himself is wearing. Thus, he remains silent.

Man 2 can see the color of Man 3’s hat: black. Man 1’s silence indicates that the hats worn by Man 2 and 3 must be different. He will thus infer his own hat color. Certain of his answer, Man 2 will shout out, “White!” thus winning the game, and his freedom.

If you found this answer on your own, great job! You certainly would have had to consider the situation logically. If you didn’t get it, don’t worry—it was a doozie!

Thanks to logical deduction, Man 2 will leave the notorious island prison behind and roam the mainland once again, hopefully a reformed man… Never mind the fact that the game was stacked in his favor from the start.

We’re watching you!

Photo Credit: Illustration – The Epoch Times

RECOMMENDED