Suppose you and your friend are wearing a hat. I came and marked either 0 or 1 on both the hats. Both the numbers might be same or different. Now, you can see the number on your friend's hat but not your own. Similarly your friend can see number on your hat.
Now, I will ask both of you one question, "What is the number on your hat?". If at least one of you answer correctly then you are saved else I will kill both of you. What will you and your friend do?
Clarification: You and your friend can not communicate after the numbers are written. The only information available is the number on the other person's hat. You can decide the strategy beforehand.
Now, I will ask both of you one question, "What is the number on your hat?". If at least one of you answer correctly then you are saved else I will kill both of you. What will you and your friend do?
Clarification: You and your friend can not communicate after the numbers are written. The only information available is the number on the other person's hat. You can decide the strategy beforehand.