An alien force has invaded the realms of the earth. All they plan is the destruction of the entire planet. However, they have given humans a chance. They picks up ten intelligent most humans (you are one of them) and take them in a pitch black room. There is nothing you can see in the total darkness. The aliens place a hat on every human. The hats are of two colors - pink and green. After they place all the hats, the lights are turned on.
You are not allowed to see your own hat. The circulation of the hat is totally random with any kind of possible combination. The aliens start from the back and ask, "What is the color of hat you are wearing?" Everyone is allowed to hear the answer. If he gives the correct answer, he will be allowed to live and save the people but if he gives the wrong answer, he will be killed mercilessly and the people you represent will be killed.
What will you do to save as many lives as you can?
Solution:
The human in front will count the number of green hats and if the count is an odd number, he will say green and if the number is even, he will say pink.
The next human behind him definitely saw either an odd or an even number of hats. If the number is still odd, then he has a pink hat. That human says Pink and survives. Thereafter, there will be an odd number of green hats forward and the third person can decide whether he is wearing a green hat or a pink hat.
If the second person sees an even number of green hats, then he must have a green hat as well and will be freed. In this fashion, the humans will just have to keep the track if the number of green hats in front of them are odd or even in number and then they can spontaneously conclude with the color of their hats.
Since the first human will be guessing, he will have a 50/50 chance of surviving but the other 9 people will definitely be saved.