ID:181691
 
On an island are 100 people with blue eyes, 100 people with brown eyes, and one Guru, who happens to have green eyes but that isn't relevant.

On the first day, the Guru says to everybody, "I see somebody with blue eyes." From then on, every night, anybody who knows the color of their eyes (besides the Guru, who really quite likes the island and doesn't factor into this riddle any further whatsoever) leaves.

Nobody can communicate with anybody else in any manner whatsoever. Everybody is perfectly logical. Everybody knows that everybody else is perfectly logical. Nobody initially knows exactly how many people have blue eyes or brown eyes. Nobody can directly discover the color of their own eyes (IE: by looking at some sort of reflective surface). There are, in short, no tricks. This is purely a logic problem.

How many days does it take for everybody (besides the Guru, who again quite likes the island) to leave the island?
1 day? The first day?
Nobody will leave the first night, but since nobody left the first night at least someone will realize that if the '[x] eye-colored' person didn't leave the night before then they must have the same eye color as that person because that person was expecting them to leave. After 100 of seeing this type of action everyone will have realized their own eye color, or at least THOUGHT they knew it, so they'd all leave by the 100th day.
In response to Nadrew
I'll expand on that because that short form doesn't really do the answer justice. It's an induction problem.

The islanders know at least one person has blue eyes. The only reason anyone will leave is if they can narrow down that they have blue eyes themselves. They can only tell other people's eye colors, so the only thing they can determine is whether they do or do not have blue eyes; if they have a color besides blue they can't narrow it down to brown.

If Alvin is the only blue-eyed islander, he'll leave the first night because he'll see no one else with blue eyes. He's the only choice left.

If Alvin and Betty are the only two blue-eyed islanders, the first night neither will leave because they'll each see someone else with blue eyes. On the second day Alvin realizes Betty didn't leave, but he knows she would have if she was the only blue-eyed person. By elimination he knows he's the only other person it could be. Betty will have reached the same conclusion, so they'll both leave the second night.

If Alvin, Betty, and Charlie are the only ones with blue eyes, none will leave the first night. None will leave the second night, because the logic for 2 people isn't satisfied. Betty and Charlie will both see on day 2 that Alvin has blue eyes, so neither will deduce that they're blue-eyed themselves. But by the third day, Alvin sees that Betty and Charlie haven't worked this out. If they were the only two blue-eyed islanders, they would be gone already. Therefore he must be the third. Each of them will apply this same logic, and all three will leave on the third day.

This logic can always be broken down into what people did the day before. If Alvin sees k people with blue eyes, they have k days to work it out. If they don't do it by then, he must be k+1. Therefore on the kth night, all k people with blue eyes will leave.

All 100 blue-eyed people will leave on the 100th night. Since the guru did not tell anyone about brown eyes, the remaining islanders have no idea their own eyes are brown, green, hazel, gray, or any other color. Therefore they'll stay indefinitely because they don't know their own eye color. If the guru had said from the outset that he saw someone with blue eyes, and someone with brown eyes, then all 200 islanders would leave the 100th night because the blue- and brown-eyed people would handle their logic separately.

Lummox JR
In response to Lummox JR
I have trouble accepting that solution given the riddle as stated. The riddle says "nobody initially knows how many people have blue eyes", so for all any person knows, there are no blue-eyed people. The process of discovery of blue-eyed people needs to be established. Your solution presumes that everybody gathers together for inspection, which is reasonable but isn't given in the riddle parameters.
In response to Ryan P
Ryan P wrote:
so for all any person knows, there are no blue-eyed people.

On the first day, the Guru says to everybody, "I see somebody with blue eyes."
In response to Airjoe
Okay, so assuming that everybody knows the guru is perfectly logical and not lying, they all know there is at least one person with blue eyes. However, how do we know that a given citizen will discover another person with blue eyes on the first day? Suppose a brown-eyed person doesn't see any blue-eyed people on the first day. That person would then leave the island on day 2, thinking he or she had blue eyes.

The only way I see the above solution working is if you introduce a discovery mechanism that's not there in the riddle description.
In response to Lummox JR
Why don't any of the people with brown eyes deduce that they must themselves have blue eyes?
In response to Kuraudo
Suppose there are n blue-eyed people and m brown-eyed people. For simplicity, let's let n:=2 and m:=1.

On day one, the two blue-eyed people recognize a single blue-eyed person and single brown-eyed person person, while the brown-eyed person recognizes two blue-eyed people. On that day, nobody leaves.

On day two, each blue-eyed person knows it's his time to leave, since there's only one other blue-eyed person. The brown-eyed person, on the other hand, doesn't think it's his time to leave, since there are two other blue-eyes. He wouldn't decide to leave until day 3...


... but when day 3 comes, the two blue-eyed people have left. From that information, the brown-eyed person can deduce that he must not have blue eyes. However, he doesn't know what color his eyes are, so he stays.

Edit: of course, this is again assuming a discovery mechanism where everybody lines up to check everyone else's eye color every day.
In response to Ryan P
Ryan P wrote:
I have trouble accepting that solution given the riddle as stated. The riddle says "nobody initially knows how many people have blue eyes", so for all any person knows, there are no blue-eyed people. The process of discovery of blue-eyed people needs to be established. Your solution presumes that everybody gathers together for inspection, which is reasonable but isn't given in the riddle parameters.

A different way of stating this riddle improves on the parameters, partly by expanding on the meaning of "perfectly logical" to say that everyone is excellent at logic and if a problem can be solved logically, it will be. But the discovery process can be implied. What probably needed improvement was spelling out that everyone planned to leave the island as soon as they knew their own eye color, and everyone knew that the others shared that plan. (Without everyone knowing this is the case, no one can make deductions based on who leaves or stays, so the problem is insoluble without that.) In the telling of the riddle there was also an erroneous assumption, which was that everyone would leave the island when in fact only the blue-eyed people would.

But there is at least one blue-eyed person because the guru said so, so that part is not in doubt.

Lummox JR
In response to Lummox JR
What is the function of the bit about nobody knowing how many blue-eyed and brown-eyed people there were originally?
In response to Ryan P
If they knew there were 100 blue eyed people, they would leave on the first day if they had brown eyes, because they could see 100 blue eyed people.
In response to Ryan P
Ryan P wrote:
What is the function of the bit about nobody knowing how many blue-eyed and brown-eyed people there were originally?

If they knew how many people had blue eyes they could simply count the number of people they saw with blue eyes, and tell if they were part of the group or not--the solution would be trivial.

But since they don't know the number but they can get an initial count of k other people who have blue eyes. Those people will all leave together on night k if the counter is not part of their group; otherwise, the couner will leave with them on night k+1.

Lummox JR
In response to Lummox JR
Okay, that makes sense. I confused that clause to preclude the obvious discovery mechanism. I would have worded it "each person can see each other person's eyes, but does not know how many total blue-eyed and brown-eyed people there are, respectively."
In response to Ryan P
You can blame Garthor for that, he posted the riddle very poorly. Take a look at http://xkcd.com/blue_eyes.html for a more proper telling of the riddle.