3 ms·
The solution is on that page although the way the puzzle is worded on xkcd is better I think. The key piece that xkcd adds is that each islander keeps a count
by steverb 16y ago
The solution is on that page although the way the puzzle is worded on xkcd is better I think.
The key piece that xkcd adds is that each islander keeps a count of how many people of what eye color he/she sees.
It's easier if we assume there are only 2 islanders with blue eyes. That means that each blue-eyed person can see one blue-eyed person.
The day after the announcement each blue-eyed islander expects that if they themselves have brown eyes that the single blue-eyed person that they see would kill themselves, since if that person is the only blue eyed person they would only see other islanders with brown eyes. Since that doesn't happen, they know the day after the expected kill day that they themselves must also have blue eyes.
So on day two, they both kill themselves.
HTH