Four friends are sitting on a tree. Each one of them are wearing a hat. They dont know which colored hat are they wearing but they do know that two of them have green hats and two of them have orange hats.
Adam is sitting on the top branch and he can clearly see the hats of Billy and Cyrus. Billy is sitting on a branch above Cyrus and he can see Cyrus hat clearly. Duke is sitting at the base of the tree. There are branches covering him fully and no one can see his hat.
Now they are nota allowed to look upwards. Who do you think will shout the color of his hat first?
There can be two cases in this situation. Either Billy and Cyrus have same colored hats or they have different colored hats.
Suppose if Billy and Cyrus have same colored hats. Adam will see that and he will know that his color is different from them both. So he will speak up first.
If Billy and Cyrus have different colored hats, he will not be able to deduce the color of his hat. Now when Billy notices that Adam is silent, he will know that this is because he and Cyrus have different colored hats. Thus he will speak up first and his color will be different than Cyrus