After Tim Harford Tweeted the link to it, I spent a fair bit of time yesterday wrestling with what XKCD reckon to be
The Hardest Logic Puzzle in the World
Here’s how it runs:
‘A group of people with assorted eye colors live on an island. They are all perfect logicians — if a conclusion can be logically deduced, they will do it instantly. No one knows the color of their eyes. Every night at midnight, a ferry stops at the island. Any islanders who have figured out the color of their own eyes then leave the island, and the rest stay. Everyone can see everyone else at all times and keeps a count of the number of people they see with each eye color (excluding themselves), but they cannot otherwise communicate. Everyone on the island knows all the rules in this paragraph.
On this island there are 100 blue-eyed people, 100 brown-eyed people, and the Guru (she happens to have green eyes). So any given blue-eyed person can see 100 people with brown eyes and 99 people with blue eyes (and one with green), but that does not tell him his own eye color; as far as he knows the totals could be 101 brown and 99 blue. Or 100 brown, 99 blue, and he could have red eyes.
The Guru is allowed to speak once (let’s say at noon), on one day in all their endless years on the island. Standing before the islanders, she says the following:
“I can see someone who has blue eyes.”
Who leaves the island, and on what night?’
Now, it’s possible to Google the answer but I thought it would be interesting the explain how I worked it out.
Because The Guru has said that she sees somebody with blue eyes the only thing any islander can know is that they either have or don’t have blue eyes. Straight away I knew that it is only possible for Blue-eyed islanders to catch the ferry. That’s because the best anybody else can hope to know about themselves is that they don’t have blue eyes, and that won’t get them on the ferry.
So that had made it easier for me already.
Next, I noted that there is nothing that distinguishes one Blue-eyed islander from another. Because of this it is likely that all of the Blue-eyed islanders are going to leave together. I wasn’t definite that this would be the case, but it was the answer I was keeping my eye out for.
Mathematics is, in part, the art of being lazy. I was finding all these 100s of people wandering about a bit confusing. So, I decided to make it easier and imagine what would happen if there were only three people – one with blue eyes, one with brown eyes and The Guru (green eyes).
- The Guru has no further information. She won’t leave.
- The Brown-Eyed islander will see the Blue-Eyed islander. They won’t leave on the first night.
- The Blue-eyed islander won’t see anybody else with blue eyes and will realise that The Guru must be talking about them. So, the Blue-eyed islander will leave on the first night’s ferry.
Now that’s fairly obvious, but I was hoping to build up my understanding of the problem by making it slowly more complex. Next, I imagined what would happen with five people: two with blue-eyes, two with brown eyes and The Guru (green eyes).
- The Guru has no further information. She won’t leave on any night.
- The Brown-Eyed islander will see the two Blue-Eyed islanders. They won’t leave on the first two nights.
- The Blue-eyed islanders will see one other person with blue eyes. They won’t leave on the first night.
When the?Blue-eyed islanders see that the other doesn’t leave on the first night?they know the only reason is that they themselves?have blue eyes and so:
- Both of the Blue-eyed islanders leave on the second night.
So, what happens with seven islanders – three Blue-eyed islanders, three Brown-eyed islanders and The Guru (green eyes)?
*deep breath*
- The Guru has no further information. She won’t leave on any night.
- The Brown-Eyed islander will see the three Blue-Eyed islanders. They won’t leave on the first three nights.
- The Blue-eyed islanders will see one other person with blue eyes. They won’t leave on the first two nights.
Imagine you are one of the Blue-eyed islanders. You see two Blue-eyed islanders. If they are the only two then they will leave on the second night by the logic above. When they don’t leave you realise that there must be a third Blue-eyed islander and that this is you. And so,
- The three Blue-eyed islanders leave on the third night
Now, this logic will continue all the way up to the situation where there are 100 Blue-Eyed Islanders and so you can say that all of the Blue-eyed islanders will leave on the 100th night.
Now, I’m not saying that the way I did the problem made it easy – it is still a difficult logic puzzle after all – but by breaking it down I was able to find the answer. There just remains one part of the puzzle unexplained: how on earth does that ferry company make any money?