So this is an old problem and it's one of my favourites so here it is.
So the aliens have abducted prominent people from all over the world. Each represents exactly million other people. And they decide they will turn the Earth into a mushroom farm. But then they decide to give humans a fair chance and give the group hours to think.
So the next day, they will place all of them lined up in a dark room and they place purple or green hats on their heads. The number of green hats or purple hats is not defined. They can even be all green or purple.
Now they turn on the lights and start from the guy in the end. He must shout the colour of his hat. He can only say purple or green. And then this goes on to the next guy and this cycle goes till the first guy. All people can hear what the person shouts and each person can see the hats of the people sitting in front of him.
What is the maximum number of people that can be saved as a guarantee, if they come up with the best plan? Note that each person represents six million people and that if he answers incorrectly, he and the other 6 million he represents will be turned into mushrooms.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
9x6000000 + 9 (themselves). They decided that the person at the back, if he see an odd number of a particular colour hat say "Green" in front of him then he will shout "Green' otherwise 'Purple". Since they all hear what the other person shouts. depending upon this information they can calculate the colour of their own hat. The person at the back who is the first one to shout will have a probability of 0.5.