If Parker were the knight, he'd be 18, Remy would be 15, Quinn 12 and Skyler 17, and both of Skyler's statements would be false, contradicting the fact that no complete liar was making any statements.
If Quinn were the knight, he'd be 13 and Skyler 17. Parker would be 16 and Remy 15, again making both of Skyler's statements false.
If Remy were the knight, Parker would be 16 and Quinn 12. Skyler would be 17 and Remy 15, still making both of Skyler's statements false.
So Skyler must be the knight.
With Parker at 18, Remy is 14 by Skyler's first statement and Skyler himself is 17. Quinn is 12 per Remy's true statement.
Other ages for Parker don't work out.
Alternatively,
clearvars, clc
for p=5:25
for q=5:25
for r=5:25
for s=5:25
ps=[p==18 r==15];
if ps(1) || ps(2)
qs=[q==13 s==17];
if qs(1) || qs(2)
rs=[p==16 q==12];
if rs(1) || rs(2)
ss=[p-r==4 s-r==3];
if ss(1) || ss(2)
disp([p q r s])
disp(ps)
disp(qs)
disp(rs)
disp(ss)
disp(' ')
end
end
end
end
end
end
end
end
assigns all possible sets of ages with each person being between 5 and 25, listing the truth values of all 8 statements, when each person's pair includes at least one true statement. The only three possibilities are:
16 13 15 18
0 1
1 0
1 0
0 1
18 12 14 17
1 0
0 1
0 1
1 1
19 12 15 17
0 1
0 1
0 1
1 0
where 1 symbolizes true, and 0 false.
Indeed only ages 18, 12, 14 and 17 for Parker, Quinn, Remy and Skyler result in one of the people having two true statements. |