We are marooned on an island that has the following curious property: Everyone over a certain age lies all the time. More specifically, there is an age limit L — a positive integer — and all islanders who are younger than age L only tell the truth, while islanders who are at least L years old only tell lies.

We are greeted by five islanders who make the following statements:

A: “B is more than 20 years old.”

B: “C is more than 18 years old.”

C: “D is less than 22 years old.”

D: “E is not 17 years old.”

E: “A is more than 21 years old.”

A: “D is more than 16 years old.”

B: “E is less than 20 years old.”

C: “A is 19 years old.”

D: “B is 20 years old.”

E: “C is less than 18 years old.”

What is L? And what did we just learn about the ages of the islanders?

Up late and having trouble sleeping so I decided to give this problem a try. I used to love logic problems as a kid, and this one tickled that nerve.

The first step in this problem is to identify which statements are contradictory and what that says about each individual:

- B & E cannot both be truthful; if both liars, C = 18.
- C & E cannot both be truthful because they disagree on A’s age.
- A & D cannot both be truthful because they disagree on B’s age.
- A & C cannot both be liars because that would imply they disagree on D’s age.
- B & D cannot both be liars because that would imply they disagree on E’s age.

There are a finite combination of groupings of liars and truth-tellers. If you list these all out and eliminate all that that violate the above 5 statements, you’re left with:

Truthful | Liars |
---|---|

ABC | DE |

BCD | AE |

AB | CDE |

BC | ADE |

CD | ABE |

Let’s consider these cases one at a time. There are more than one way to organize your thoughts here; I found it especially helpful to go through the people in order listing the statements everyone made about them.

ABC | DE |

BC | ADE |

If either of the above are the configuration, D is a liar and then E is 17 years old. However, all of these imply C > 18, which is a contradiction because E is a liar and should be older than C.

AB | CDE |

If the above is the configuration, D is a liar and then E is 17 years old. However, A is truthful, implying B > 20, which is a contradiction because E is a liar and should be older than B.

BCD | AE |

If this is the configuration, then C is truthful implying A is 19, and D is truthful implying B is 20, which is a contradiction if B is truthful and A a liar.

That leaves

Truthful | Liars |
---|---|

CD | ABE |

Which, just to verify, tells us

- A <= 21 (because E lies), A = 19 (because C tells the truth). This is consistent.
- B <= 20 (because A lies), B = 20 (because D tells the truth). This is consistent.
- C <= 18, C >= 18 (because both B and E lies). This implies C = 18.
- D < 22 (because C is truthful), D <= 16 (because A lies). This is consistent.
- E != 17 (because D is truthful), E >= 20 (because B lies). This is consistent.
- Truth tellers D is 16 or less and C is 18. Liars A is 19, B is 20, and E is 20 or more. This tells us that L must be 19.

*QED*