[KongchangAI]
· 2 min read· 1,181 words

Logic Puzzle: Can You Solve Billy Bonka's Candy Factory Hair Color Puzzle?

Logic Puzzle: Can You Solve Billy Bonka's Candy Factory Hair Color Puzzle?

Through four yes/no answers and step-by-step elimination, deduce that your hair is red.

This article presents a TED-Ed logic puzzle: five people line up, each randomly given red, white, or blue hair (four red, two white, one blue), and can only see the colors of those in front. They must deduce their own color from the answers of the four behind them (no, yes, yes, yes). The first "no" eliminates the possibility that the person at the back saw "two white and one blue," the second "yes" reduces the possible arrangements to nine, the third "yes" to five, and the fourth "yes" locks in the only answer—your hair is red. The puzzle demonstrates the power of common knowledge and iterated reasoning.

This is a logic puzzle from TED-Ed about accidentally stumbling into Billy Bonka's candy laboratory and being forced into a life-or-death reasoning game. The core of the puzzle: five people stand in a line, each randomly given red, white, or blue hair (changed by candy), but each can only see the hair color of the people in front. By listening to the answers ("yes" or "no") of the four people behind you, you must deduce your own hair color.

Puzzle Rules and Key Information

According to the video description, there are seven candies: four red, two white, one blue. You and four Prufa Boompas (magical creatures in the factory) line up from front to back, each blindly taking one candy, and the remaining candies are hidden. Each person can see the hair color of everyone in front but not their own or those behind. The Prufa Boompas are asked in order from back to front: "Are you logically certain of your hair color?" The answers are, in order: no, yes, yes, yes. Finally, Bonka asks you: "What color is your hair?"

Queue diagram

The key is that each answer depends on two factors: first, the hair colors the responder can see in front, and second, the logical information gained from the answers behind. As the question progresses from back to front, each "yes" or "no" narrows the possible color arrangements.

Step-by-Step Reasoning: Starting from the First "No"

The first answer comes from Prufa Boompa 1 at the back (who can see the four people in front). He answers "no," meaning he cannot determine his color. The video analysis points out: if he saw two white and one blue among the four in front (in any order), he could determine he is red (because there is only one blue and two whites; if two whites and one blue appear in front, he must be red). But this did not happen, so the combination he saw cannot be "two white and one blue." This eliminates that combination, leaving all other possibilities.

Eliminated cases from the first "no"

Note that in each scenario, the colors can appear in any order in positions 2 to 5 (i.e., you and the three behind you). This step lays the foundation for subsequent reasoning.

Common Knowledge is a core concept in logic puzzles, meaning not only does each participant know a fact, but they know others know it, and they know others know that others know it... infinitely recursing. In this puzzle, everyone knows the total number of candies (four red, two white, one blue) and the rule that everyone can see the hair colors in front, and everyone knows that others know these rules. It is this infinitely recursive "knowing" that allows the first "no" to eliminate the "two white and one blue" combination: the person at the back knows that if he saw "two white and one blue," he could determine he is red; his "no" indicates he did not see "two white and one blue," and this information is jointly learned by everyone in front, becoming common knowledge for subsequent reasoning.

How the Second "Yes" Narrows the Range

Prufa Boompa 2 (who can see the three in front) answers "yes." He combines the information eliminated by Prufa Boompa 1's "no." The video explains: if Prufa Boompa 2 saw all three in front as red, then based on the remaining possibilities, his own color could be red, white, or blue, and he could not be certain. But after checking one by one, only two scenarios allow Prufa Boompa 2 to determine he is red: one is if he sees two white and one red, and the other is if he sees one white, one blue, and one red. In both cases, he can infer he must be red (otherwise Prufa Boompa 1 would have answered "yes"). These two scenarios reduce the possible color arrangements for positions 2 to 5 to nine.

Nine possibilities after the second "yes"

Iterated Reasoning refers to participants continuously updating their knowledge state based on others' behavior and anticipating that others will reason similarly. In the puzzle, after hearing the first "no," Prufa Boompa 2 thinks: "If I were a certain color, what would the person at the back see? Why did he answer 'no'?" By simulating the perspective of the person at the back, Prufa Boompa 2 eliminates possibilities for his own color that would have led the back person to answer "yes." This layered nested reasoning of "I know you know I know" makes each answer not just a personal judgment but a metacognition of others' reasoning processes, gradually compressing the possibility space.

The Chain Elimination of the Third "Yes" and Fourth "Yes"

Prufa Boompa 3 (who can see the two in front) answers "yes." Among the nine possibilities, some rows show positions 4 and 5 with the same color, but Prufa Boompa 3's color is different (e.g., he sees red and white, but he himself could be white or blue). These cases would make him uncertain, so they are eliminated, leaving five possibilities.

Remaining five possibilities

Prufa Boompa 4 (who can only see you, i.e., position 1) answers "yes." Applying the same logic again: among the remaining five possibilities, in some rows Prufa Boompa 4 sees your color (e.g., white), but he himself could be white or blue; or sees blue, and he himself could be white or red. These uncertain cases are eliminated, leaving only one arrangement: your hair is red.

Conclusion and Insights

You confidently announce: "My hair is red." Bonka is amazed, the Prufa Boompas are impressed, and inspired by you, they start organizing a union. This puzzle demonstrates the power of "common knowledge" in logical reasoning: each person's answer is based not only on what they see but also on anticipating others' reasoning processes. Through step-by-step elimination, seemingly complex uncertainty is peeled away layer by layer, ultimately locking in the only answer.

The video also recommends puzzle games like Rush Hour from TED Games for enthusiasts to continue challenging themselves. If you are interested in such logic puzzles, why not start with this "hair color" puzzle and exercise your deductive reasoning skills.

One-line Summary

Through four yes/no answers and step-by-step elimination, you ultimately deduce that your hair is red.

Paragraph Summary

This article introduces a TED-Ed logic puzzle: five people line up, each randomly given red, white, or blue hair (four red, two white, one blue), and can only see the colors of those in front. They must deduce their own color from the answers of the four behind them (no, yes, yes, yes). The first "no" eliminates the possibility that the person at the back saw "two white and one blue," the second "yes" reduces the possible arrangements to nine, the third "yes" to five, and the fourth "yes" locks in the only answer—your hair is red. The puzzle demonstrates the power of common knowledge and iterated reasoning, where each person bases their reasoning not only on what they see but also on anticipating others' reasoning processes.

#logic puzzle#TED-Ed#hair color puzzle#common knowledge#iterated reasoning#deductive reasoning
Share:

Related articles