### The Green-Eyed Puzzle Solution

Nobody is going to dare to go the guard unless he is absolutely sure that he is green eyed; otherwise it would be suicidal move.

-------------------------------------------------------------------------------------

For a moment, let's assume there are only 2 prisoners named A & B trapped on island.

On first day, A is watching green eyed B & B can see green-eyed A. But both are not sure what is color of their own eyes. Instead, A(or B) waited B(or A) to escape from island since he is green-eyed. Rather both are sure that other too doesn't know anything about color of own eyes.

On next morning both see each other still on island. Here is what A thinks.

If I was non green-eyed then B would have realized that the person pointed by visitor in his statement ('at least one of you have green eyes') is himself. Hence, B would have realized that he is green-eyed & could have escaped easily. Since B didn't try to escape that means I too must have green eyes.

So A can conclude that he too have green eyes. Exactly same way, B concludes that he too has green eyes. Hence, on next day both can escape from the island.

Note that, if the night of the day on which visitor made statement is counted then next day would have 1st morning & 2nd night since visitor's visit. Now since A & B left on 2nd night, we can't see anybody on 2nd morning next day.

--------------------------------------------------------------------------------

Now let's assume there are 3 prisoners named A,B and C trapped on island.

Let's think from A's point of view as an example.What he thinks.

Let me assume I don't have green eyes.Now each B and C could see 1 green-eyed & other non green-eyed person. But still they don't know color of own eyes.So on that night nobody tries to escape.

On first morning I see both B and C still present there.

Now B can think that if he has no green eyes then C could have concluded that the person pointed by visitor's statement ('at least one of you have green eyes') is C himself (as both A & B are non green-eyed. This way, C would have realized that he is green-eyed.

In a very similar way, B would have realized that he too is green-eyed.

Now both of them could have escaped on that night as they are sure that they are green-eyed.

But on the second morning, I see again both of them are still there. So now I can conclude that I too have green eyes.

If A can conclude then why can't B and C?  So after seeing each other on 3rd day, each of 3 can conclude color of eyes is green. Now on 3rd night they all can escape safely.

This is called as inductive logic.

-------------------------------------------------------------------------------

If observed carefully, 2 prisoners need 2 nights and 3 prisoners need 3 nights to logically deduce that the each of them is green-eyed.

Hence, 100 prisoners would require 100 nights to absolutely make sure that each of them is green eyed.

That's why on the 100th morning next day, there is no prisoner present on island.