One hundred prisoners are lined up, one behind the other, all facing forward. On each prisoner's head is a hat, either red or black. Each prisoner can see the hats of all the people in front of him, but he cannot see his own hat and he cannot see the hats of the people behind him. Starting with the prisoner in the back of the line (the one that can see all 99 other prisoners), the prison warden asks the prisoner what color hat he is wearing. Each prisoner can hear the guesses of all of the prisoners behind him. If a prisoner correctly guesses his hat color, he is set free. If he guesses wrong, he is executed.
The prisoners are allowed to agree in advance on an algorithm to use, and you can assume that they all agree to follow the agreed-upon algorithm. The prisoners are NOT allowed to provide each other with any additional clues once the hats are placed on their heads. (For example, tapping shoulders or modulating their voices are not allowed.) The only information each prisoner has is the guesses for the prisoners behind them, and the hats on the prisoners in front of them. Design an algorithm for the prisoners to follow that saves the most prisoners from execution. What is the maximum number of prisoners you can guarantee to save?
The person who can solve mathematical problems,can lead life easily ,Maths tellu that every problem as solution...we can find number of solutions for one problem ...Aplly it in the life also we can lead our life happily...
swetha
"The gaming of numbers is called maths.So participate in this wonderful game and explore in it,learn in it and enjoy in it.Then only you can pass in this wonderful game."