Problem

Source: 2018 Pan-African Mathematics Olympiad

Tags: combinatorics



A circle is divided into $n$ sectors ($n \geq 3$). Each sector can be filled in with either $1$ or $0$. Choose any sector $\mathcal{C}$ occupied by $0$, change it into a $1$ and simultaneously change the symbols $x, y$ in the two sectors adjacent to $\mathcal{C}$ to their complements $1-x$, $1-y$. We repeat this process as long as there exists a zero in some sector. In the initial configuration there is a $0$ in one sector and $1$s elsewhere. For which values of $n$ can we end this process?