Solution

The Round Table of Neighbours

Show the problem again

At a round table sit 2026 islanders, each a knight (always truthful) or a knave (always lying). Every one of them says: "My two neighbours are of different types (one knight and one knave)." How many of the 2026 are knights? Give a single integer.

Worked solution

Encode knight as 1 and knave as 0, with seats $x_1, \dots, x_n$ around the circle. Seat $i$ is a knight exactly when its neighbours differ, so $x_i = x_{i-1} \oplus x_{i+1}$, which rearranges to $x_{i+1} = x_{i-1} \oplus x_i$. Once two adjacent seats are fixed, the whole circle is determined. Running this recurrence from any starting pair other than $(0,0)$ gives a sequence of period exactly 3 (for example $1,1,0,1,1,0,\dots$ or $1,0,1,1,0,1,\dots$). Going once round the table must return us to where we started, so the period must divide the number of seats. Since $2026 = 3 \cdot 675 + 1$ is not a multiple of 3, the only surviving start is $(0,0)$, which gives all knaves. This is consistent: every knave's neighbours are both knaves, so the claim "we differ" is false. Exact computation for $n = 2026$ confirms exactly one valid seating. (With 2025 seats there would be extra ones with 1350 knights, which is why the count matters.) Answer: 0.

Source: Round-table variant of a standard knights-and-knaves exercise; the period-3 recurrence is folklore. Statement written for AxiomIQ.