There are 2020 prisoners standing in Queue, each wearing a blue or red hat. The jailer in one The moment asks them to write the color of their hat on a piece of paper and give it to the jailer.anyone who guesses the color of his hat correctly will be released. Provide a way for at least 800 prisoners to be released (note that prisoners do not have the right to speak to each other or to point to each other and can only design an algorithm for this the day before)
Answers
Answered by
0
Step-by-step explanation:
100 prisoners in jail are standing in a queue facing in one direction. Each prisoner is wearing a hat of color either black or red. 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.
The jailer is going to ask color of each prisoner’s hat starting from the last prisoner in queue. If a prisoner tells the correct color, then is saved, otherwise executed. How many prisoners can be saved at most if they are allowed to discuss a strategy before the jailer starts asking colors of their hats.
Similar questions