So, what’s the answer?
It’s really important to understand straight away that the number of prisoners doesn’t matter here. Let’s simplify the task, and imagine that there are only two people on the island — let’s call them Adria and Bill. Each of them sees the other prisoner with green eyes, and knows that this person could be the only one.
During the first night after the statement, both of them just wait. In the morning, they see that the other is still here, and this gives them a clue. Adria realizes that if she doesn’t have green eyes, Bill would have been released the previous night, knowing he was the only green-eyed prisoner. And Bill realizes the same thing about Adria. And now they both understand: ’The fact that the other person is still waiting means that I must be the only one with green eyes’.
So both prisoners obtain their freedom the next morning. Now, let’s imagine there are three prisoners: Adria, Bill and Carl. Each of them sees two green-eyed prisoners, but is not sure how many green-eyed people these two see around them. They wait during the first night after the statement, and they still can’t be sure in the morning.
Carl thinks to himself: ’If my eyes aren’t green, then Adria and Bill are only watching each other. It means both of them will leave on the next night. However, when Carl sees them the third morning, he realizes that they have been watching him, too. Adria and Bill use the same reasoning, and all three prisoners leave on the third night.
This is called inductive logic. We can increase the number of prisoners under consideration, but our reasoning remains correct no matter how many people are involved. The prisoners didn’t receive any new information in the text of the statement itself, but they did learn something new due to the fact you told it to them all simultaneously. Thanks to this, they now know that not only at least one of them has green eyes, but also that everyone else is watching all the green-eyed people, and everybody knows this is happening, and so on.
What any one prisoner doesn’t know is whether he is the green-eyed person the others are keeping track of. He will learn this only when the number of nights passes that is equal to the number of prisoners on the island. Of course, you could have spared the prisoners an extra 98 days on the island by saying that at least 99 of them have green eyes. But when a mad dictator is involved it’s better not to risk it!