Basic Puzzles Harder Puzzles Sticks, Coins & More... Funny Riddles & Puzzle Jokes Mathematical Problems Harder Mathematical Problems Logical Puzzles Brainteasers Complex Problems Brain Tests & Experiments Quizzes
A short introduction Cookie policy Links

Solution to: Colorful Dwarfs

Let the dwarfs construct a sorted row, with all blue hats on the left and all red hats on the right. One dwarf starts by positioning himself somewhere, and then one by one the other dwarfs place themselves in the row at a position conforming to the following rules:

In this way, the row is filled from the boundary between blue and red hats, with blue hats to the left and red hats to the right. Once all dwarfs are in the row, all dwarfs that are at the right side of a red hat know they also wear a red hat, and all dwarfs that are left of a blue hat know they also wear a blue hat. Only the dwarf that was the last one entering the row does not know his own color yet. However, as the dwarfs know that at least 1 dwarf has a red hat, the most right sided dwarf in the row knows he has a red hat. This dwarf with a red hat steps from the end of the row and re-inserts himself again following the above rules. Therefore, also the previous dwarf now knows his color (red if the dwarf with the red hat re-entered the row left of him, blue otherwise).

Back to the puzzle
This website uses cookies. By further use of this website, or by clicking on 'Continue', you give permission for the use of cookies. If you want more information, look at our cookie policy.