# Task 7.

Around a round table, 1001 people are sitting, each of whom is either a knight (always tells the truth) or a liar (always lies). It turned out that next to each knight sits exactly one liar, and next to each liar there is a knight. What is the minimum number of knights that can sit at the table?
Answer: 502

Solution. From the condition, it follows that a knight cannot sit between two knights or two liars, and a liar cannot sit between two liars. Thus, when moving around the table, knights will be encountered in pairs, while liars will be encountered singly or in pairs. From this, it follows that each liar can be paired with a knight (and there will still be knights who have not been paired). Therefore, the number of knights at the table is more than half of the total number of people and is also an even number, i.e., at least 502.

An example seating arrangement of 502 knights and 499 liars that satisfies the condition: first, seat 248 groups of "knight, knight, liar, liar," then three more groups of "knight, knight, liar."

## B-2

At a round table, 2001 people are sitting, each of whom is either a knight (always tells the truth) or a liar (always lies). It turns out that next to each knight sits exactly one liar, and next to each liar, there is a knight. What is the maximum number of liars that can sit at the table?

Answer: 999

## B-3

At a round table, 3001 people are sitting, each of whom is either a knight (always tells the truth) or a liar (always lies). It turns out that next to each knight sits exactly one liar, and next to each liar, there is a knight. What is the minimum number of knights that can sit at the table?

Answer: 1502

## B-4

At a round table, 4001 people are sitting, each of whom is either a knight (always tells the truth) or a liar (always lies). It turns out that next to each knight sits exactly one liar, and next to each liar, there is a knight. What is the maximum number of liars that can sit at the table?

Answer: 1999