BrainTeaser Invariant Difficult

Problem - 3927

$\textbf{Flip the Grid}$

Given two grids shown below, is it possible to transform ($a$) to ($b$) after a series of operations? In each operation, one can change all the signs in either one entire row or one entire column.


$\textbf{Answer}$

It is impossible.

$\textbf{Reasoning}$

Let's consider the top left $2\times 2$ corner in these two diagrams. In that section of diagram $(a)$, there are four $+$ signs which is an even number. If we flip either a row or a column among these four cells, two, which is also even, will change signs. Because subtracting an even number from an even number always results in an even number, we conclude after every operation there will always be an even number of $+$ signs left. This can be evidenced by the fact that two $+$ signs will remain after the $1^{st}$ flip. After the second flip, there will be $0$, $2$, or $4$ $+$ signs depending on the chosen operation. However, in the top left $2\times 2$ corner of diagram $(b)$, there is an odd number of $+$ signs. Therefore, this status is not achievable.

$\textbf{Note}$

Because there are an infinite number of ways to flip, it is likely an invariant problem. The challenge in this particular problem is to find this invariant.

report an error