Prisoner s hat puzzle think witty four prisoners are caught and are to be punished. This puzzle comee under game theory.
Generaly interview questions asked from math oriented.
Prisoner hat puzzle.
Each prisoner is given a hat to wear. If they do not they will be hanged. The prisoners know that there are only two hats of each color. However if b and c have hats of different colors then d can say nothing. Four prisoners have been captured but the prison is full. The judge allows them to be freed if they can solve a puzzle.
4 prisoners are are given a hat each from 2 blue and 2 yellow hats. The prisoners can see the numbers on all hats except their own. Puzzle 75 prisoner s hat. If a prisoner tells the correct color then is saved otherwise executed. Prisoners and hats is a logic puzzle based on inductive and deductive reasoning depending on which prisoner you are. 10 prisoners and hats puzzle solution i would suggest think once again before reading the solution.
The puzzle is to find how the prisoners can escape. The prisoners and hats puzzle is an induction puzzle a kind of logic puzzle that involves reasoning about the actions of other people drawing in aspects of game theory. He lines up three of the prisoners a b c in one room and the fourth prisoner d is placed in a separate room. Each prisoner is wearing a hat of color either black or red. Find out who will shout first and declare his own hat color. They do not know.
All know that there are 2 blue and 2 yellow hats. The key is that prisoner c after allowing an appropriate interval and knowing what d would. Companies expect that it students have the backround knowledge of problem solving. The puzzle is as follows. The jailer s a cruel person and gives these 4 prisoners a puzzle they have to solve. Okay if you tried enough the strategy is to count the number of white and black hats in front of them and say white if number of white hats are odd else say black.
A jailer lines up 10 prisoners facing one direction in the increasing height order and randomly places either red hat or blue hat on each prisoner s head. If any prisoner suggests an incorrect answer all four prisoners are executed. If they succeed they go free. If they don t they ll be executed. He plays a game with these four men. Prisoner hat problem three prisoners are placed in a line and each one is given a hat with either a 0 or a 1 on it.
A police officer caught four criminals. The prisoners are asked to guess the number on their hat. So if d observes that b and c have hats of the same color d would deduce that his own hat is the opposite color. The jailer is going to ask color of each prisoner s hat starting from the last prisoner in queue. A prisoner can see hats of all prisoners in front of him in the queue but cannot see his hat and hats of prisoners standing behind him.