5. Around a round table, eight people are sitting, each of whom is either a knight or a liar. When asked who their neighbors are, each of them answered: “My neighbors are a liar and a knight.” How many of them were liars? How would the answer change if nine people were sitting at the table?
5. 6. At the table, there is at least one liar. Indeed, if only knights were sitting at the table, each knight's statement "next to me sits a knight and a liar" would be false, which is impossible. 2. The neighbors

![](https://cdn.mathpix.com/cropped/2024_05_21_b6bdef2bf90cccc464adg-026.jpg?height=594&width=594&top_left_y=1413&top_left_x=457)

Fig. 1

![](https://cdn.mathpix.com/cropped/2024_05_21_b6bdef2bf90cccc464adg-026.jpg?height=480&width=514&top_left_y=1413&top_left_x=1062)

Who can sit here? Both possible assumptions lead to a contradiction

Fig. 2

of a liar can be either two liars or two knights. 3. If both neighbors of a liar are liars, then further around the table sit only liars, otherwise, one of the liars' statements "next to me sits a knight and a liar" would be true, which is impossible. Thus, one of the possible answers is all liars. 4. If the neighbors of a liar are knights, then after each knight must sit another knight, then a liar, then again two knights, then a liar, and so on. If there are 9 people at the table, then there are 3 liars (Fig. 1), if 8 people, then we get a contradiction (Fig. 2$)^{1}$.

Answer: 1. If there are 8 people at the table, then all are liars. 2. If there are 9 people at the table, then the number of liars is either 9 or 3.