1. All gnomes are divided into liars and knights. Liars always lie, and knights always tell the truth. On each cell of a $4 \times 4$ board, there is a gnome. It is known that among them, there are both liars and knights. Each gnome stated: “Among my neighbors (by side) there are an equal number of liars and knights.” How many liars are there in total?
Answer: 12 liars.

Solution: Any dwarf standing on the side of the square but not in a corner cannot be telling the truth, because they have three neighbors, and among them, there cannot be an equal number of knights and liars. Therefore, these eight dwarfs are liars. Thus, the dwarfs standing in the corners are also liars because both of their neighbors are liars, not a knight and a liar. Therefore, all dwarfs except the four central ones are liars. Since there are knights among the dwarfs, at least one of the four central ones is a knight. Two of his neighbors are already definitely liars, so the two remaining ones are knights. For any of these two neighboring knights to have an equal number of knights and liars among their neighbors, the fourth central dwarf must also be a knight. Thus, there are 12 liars in total. In the diagram below, knights are denoted by the letter $\mathrm{P}$, and liars by the letter $\mathrm{L}$.

| $L$ | $L$ | $L$ | $L$ |
| :--- | :--- | :--- | :--- |
| $L$ | P | P | $L$ |
| $L$ | P | P | $L$ |
| $L$ | $L$ | $L$ | $L$ |