Problem

Source: Spain Mathematical Olympiad 2021 P3

Tags: combinatorics, Spain, Parity



We have $2021$ colors and $2021$ chips of each color. We place the $2021^2$ chips in a row. We say that a chip $F$ is bad if there is an odd number of chips that have a different color to $F$ both to the left and to the right of $F$. (a) Determine the minimum possible number of bad chips. (b) If we impose the additional condition that each chip must have at least one adjacent chip of the same color, determine the minimum possible number of bad chips.