6. In the Thrice-Tenth Kingdom, there are 17 islands, each inhabited by 119 people. The inhabitants of the kingdom are divided into two castes: knights, who always tell the truth, and liars, who always lie. During the census, each person was first asked: "Excluding you, are there an equal number of knights and liars on your island?". It turned out that on 7 islands, everyone answered "Yes", while on the others, everyone answered "No". Then each person was asked: "Is it true that, including you, there are fewer people of your caste than half the island's population?". This time, on some 7 islands, everyone answered "No", while on the others, everyone answered "Yes". How many liars are there in the kingdom?

(P. D. Mulyenko)
Answer: 1013.

## Solution.

1) Consider the first question. A "yes" answer would be given by either a knight on an island with exactly 60 knights, or a liar if the number of knights is different. A "no" answer would be given by either a liar on an island with 59 knights, or a knight if the number of knights is different. Therefore, on the 7 islands where everyone answered "yes" to the first question, the number of knights is either 60 or 0; on the other 10 islands, the number of knights is either 59 or 119.
2) For the second question, regardless of who answers, a "yes" answer indicates that the number of knights is less than half, and a "no" answer indicates that the number of liars is less than half. Therefore, on the 7 islands where everyone answered "no" to the second question, the number of knights is at least 60 (either 60 or 119); on the other 10 islands, the number of knights is no more than 59 (either 59 or 0).
3) Let $x$ be the number of islands with 60 knights, and $y$ be the number of islands with 59 knights; then (see point 1) on 7 - $x$ islands there are 0 knights, and on 10 - $y$ islands there are 119 knights. From point 2, we get: $x + (10 - y) = 7, y + (7 - x) = 10$. Both equations are equivalent to the equation $y - x = 3$.
4) Calculate the total number of knights:

$60 \cdot x + 59 \cdot y + (7 - x) \cdot 0 + (10 - y) \cdot 119 = 60x + 59(x + 3) + 119(7 - x) = 59 \cdot 3 + 119 \cdot 7 = 1010$.

Therefore, the number of liars is 1013.

Criteria. Correctly listed all possible numbers of knights and liars on each type of island - 2 points.

The problem is solved for the case where the 7 islands in the first and second questions are the same - 2 points. The problem is solved correctly, but the answer indicates the number of knights, not liars - 6 points.