I will use a similar approach to the solution I posted for "Liars Logic" - if you've figured out (or read) a solution to that puzzle you'll note the obvious similarities. Let's look at the first two statements made by each person:
A: B is a Liar
B: C is a Liar
C: D is a Liar
D: E is a Liar
E: F is a Liar
F: A is a Liar
A: F is a Liar
B: A is a Liar
C: B is a Liar
D: C is a Liar
E: D is a Liar
F: E is a Liar
We can determine possible arrangements of their dispositions - e.g. if you assume A is a Knight, then B must be a Liar, or more generally, if there is a Knight present, the person immediately following the Knight must be a Liar (and then the person following the Liar is not a Liar, etc.) With a little observation we find that there are only two possible cycles that arise from the above combination of statements:
1. Knight - Liar - Knight - Liar - Knight - Liar (in some order, i.e. if A is a Knight then C and E are Knights and B, D, and F are Liars; if A is a Liar then C and E are Liars and B, D and F are Knights)
OR
2. Truth-first Knave - Liar - Lie-first Knave - Truth-first Knave - Liar - Lie-first Knave (in some order, e.g. if A is a Liar then D is a Liar, B and E are Lie-first Knaves, and C and F are Truth-first Knaves).
Let's assume that we have the first kind of cycle, and consider the fourth statement made by each person. If A is a Knight, then so are C and E. This causes a contradiction, since A would be older than C, who would be older than E, who would be older than A. Similarly, B, D and F can't all be Knights, either. Thus we do not have the Knight - Liar... cycle, but instead must have the second type of cycle.
Now let's assume that A is a Truth-first Knave, and evaluate the next two statements made by each person accordingly:
A: I'm one year older than B. TRUE
B: I'm one year older than C. FALSE
C: I'm one year older than D. FALSE
D: I'm one year older than E. TRUE
E: I'm one year older than F. FALSE
F: I'm one year older than A. FALSE
A: I'm three years older than C. FALSE
B: I'm three years older than D. FALSE
C: I'm three years older than E. TRUE
D: I'm three years older than F. FALSE
E: I'm three years older than A. FALSE
F: I'm three years older than B. TRUE
We see that A is 1 year older than B, and F is three years older than B. Similarly, D is one year older than E, and C is three years older than E. Thus the sum of the ages of all six natives can be expressed as:
B + (B+1) + (B+3) + E + (E+1) + (E+3)
= 3B + 3E + 8
= 3(B + E + 2) + 2
(Note that we assumed A was a Truth-first Knave, which is not necessarily the case. However, we know that two of the natives are Truth-first Knaves, and due to the cyclical nature of the statements they made, the above reasoning holds regardless of where the cycle starts. The names would change, but no matter what, the sum of their ages will be of the form 3k + 2 for some integer k.)
So the sum of their ages is 2 mod 3. Thus we know that A's fifth statement is a lie. While it may be less immediately obvious, this also means that F's fifth statement is a lie, as all square numbers are either 0 or 1 mod 3 (proof left to the reader).
The only way to align the cycle such that A and F's fifth statements are lies is as follows:
A: Lie-first Knave
B: Truth-first Knave
C: Liar
D: Lie-first Knave
E: Truth-first Knave
F: Liar
Now that we know the disposition of each native, we can deduce their ages. Here's what we know:
1. They're all between 20 and 50 (given in the introduction to the problem).
2. They're all different (given in the introduction to the problem).
3. The sum of their ages is 2 mod 3 (deduced above).
4. A is three years older than C (A's 4th statement)
5. B is one year older than C (B's 3rd statement)
6. B's age is divisble by 5 (B's 5th statement)
7. C's age is not divisible by 2 (C's 5th statement)
8. D is three years older than F (D's 4th statement)
9. D is not the oldest (D's 5th statement)
10. E is one year older than F (E's 3rd statement)
11. The sum of their ages is divisible by 11 (E's 5th statement)
From here it's relatively straightforward to calculate their ages.
A = C+3
B = C+1
D = F+3
E = F+1
B is 0 mod 5, thus C is 4 mod 5. Also, C is odd. So C = 29 or 39.
F < C (otherwise D would be the oldest) and in fact, F+3 = D < C (otherwise two people would end up with the same age), so we know F < E < D < C < B < A
3F + 3C + 8 is 2 mod 3, 0 mod 11, and between 140 and 278 (owing to the minimum and maximum possibilities for their ages). Thus the sum of their ages is either 143, 176, 209, 242, or 275, and therefore (F + C) = 45, 56, 67, 78, or 89.
Given the above info, the only valid solution for C and F are 39 and 28, respectively. Thus we have:
Andy is 42.
Brad is 40.
Chet is 39.
Doug is 31.
Eddy is 29.
Fred is 28.
|