TITLE: Flipping coins in a chessboard
QUESTION [8 upvotes]: 64 coins are placed on a chessboard; coins on black squares are heads up, coins on white squares are tails up. In each step, you are allowed to choose three consecutive coins in the same row or column, and flip these three coins. Is it possible to get all heads up?
I managed to end up with one tail and 63 heads. I kind of believe that the answer is negative, but didn't manage to find an easy invariant.

REPLY [6 votes]: This is essentially just a more elementary version of Calvin Lim’s argument. Color the board by diagonals in three colors as shown below:
$$\begin{array}{|c|c|} \hline
2&\color{red}{0}&1&\color{red}{2}&0&\color{red}{1}&2&\color{red}{0}\\ \hline
\color{red}{0}&1&\color{red}{2}&0&\color{red}{1}&2&\color{red}{0}&1\\ \hline
1&\color{red}{2}&0&\color{red}{1}&2&\color{red}{0}&1&\color{red}{2}\\ \hline
\color{red}{2}&0&\color{red}{1}&2&\color{red}{0}&1&\color{red}{2}&0\\ \hline
0&\color{red}{1}&2&\color{red}{0}&1&\color{red}{2}&0&\color{red}{1}\\ \hline
\color{red}{1}&2&\color{red}{0}&1&\color{red}{2}&0&\color{red}{1}&2\\ \hline
2&\color{red}{0}&1&\color{red}{2}&0&\color{red}{1}&2&\color{red}{0}\\ \hline
\color{red}{0}&1&\color{red}{2}&0&\color{red}{1}&2&\color{red}{0}&1\\ \hline
\end{array}$$
The red numbers mark the squares initially occupied by coins showing heads; $12$ of the heads are on color $0$, $10$ are on color $1$, and $10$ are on color $2$. Of the $32$ coins showing tails, $10$ are on color $0$, $11$ are on color $1$, and $11$ are on color $2$. Thus, to get heads on all $64$ squares, we must change the parity of the number of heads on colors $1$ and $2$ without changing the parity of the number of heads on color $0$. However, this is impossible: each move changes the parity of the number of heads on each color, so the number of moves must be odd to take care of colors $1$ and $2$ and even to take care of color $0$.