Open In App

Puzzle – Evil Wizard

Last Updated : 18 Jan, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

An evil wizard had a hundred dwarfs as prisoners. One day he calls them and makes them stand consistent with their height, with the tallest dwarf on the again and the shortest dwarf withinside the front. He places a hat on every of the dwarf’s heads however does now no longer allow them to see the shadeation of the hat. However, the dwarfs can see the hat shadeation of those in front of them He tells the dwarfs that their hats are both black or white, and whoever among them can bet the color, is unfastened to move. And the only one who guesses incorrectly will die. The dwarfs are unfastened to speak about a method. Devise a method wherein most dwarfs can move unfastened.

From the given problem statement, we can deduce the following scenario:

  • The dwarfs are standing according to their height in descending order (tallest to shortest).
  • Each dwarf has a hat which can be either in a black or white shade.
  • Dwarfs cannot see the shade of their hat but can see the hat shade of every dwarf in front of them.

Arrangement of the dwarfs in descending order

Answer:

To save most of the dwarfs, they can devise a method with some pre-determined values. They can set the black shade as their reference. Whoever goes first (the tallest) should be able to see all the hat shades in front of them. Now he can either answer in black or white, but that answer will have some information that others can use on their turn:

  • If the first person says “Black”: It means there are even numbers of black-shaded hats in front of him
  • If the first person says “White”: It means there are odd numbers of black-shaded hats in front of him

Others can use this information to deduce the shade of their hat.

Suppose the first person says Black – it means there is an even number of black-shaded hats in front of him. When it is the next dwarf’s turn, he already knows that there is an even number of black hats in front of the dwarf behind him. Now, if he sees an odd number of black-shaded hats in front of him – it means his own hat is of “Black” shade. If he had seen an even number of black-shaded hats, that would have implied his hat was of “white” shade. 

This process continues and using this method, all the other dwarfs can correctly deduce the shade of their hat with absolute certainty. 

Thus, the first person who answered would have a 50% chance of answering correctly, but the rest of the dwarfs have a 100% chance of getting their answers correct.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads