Tokorev S.i.

In each cell of a $4 \times 4$ table, there is a sign "+" or "-". It is allowed to simultaneously change the signs to the opposite in any cell and in all cells that share a side with it. How many different tables can be obtained by repeatedly applying such operations?
Let's assume that each cell contains a button, pressing which we change the sign in this cell and in all adjacent cells.

Lower bound. Note that by pressing the buttons in the second row, we can bring the first row to any state (each button changes the sign in the cell above it and does not change the state of the other cells in the first row). After this, by pressing the buttons in the third row, we can get any set of signs in the second row, and finally, by pressing the buttons in the fourth row, we can get any third row. Thus, from any table, we can obtain at least \(2^{12}\) different tables (differing in the first three rows). Upper bound.

First method. Initially, we have 16 buttons. Let's call the 12 buttons in the white cells white, and the 4 in the gray cells gray (see the figure). The result of pressing a gray button can be achieved by pressing several white buttons (for the top gray button, these are the white buttons marked with dots; for the other three gray buttons, the necessary set of white buttons is obtained by rotating the figure by \(90^{\circ}\), \(180^{\circ}\), and \(270^{\circ}\)).

Thus, if a table can be obtained, it is sufficient to have a sequence of presses of white buttons. It is clear that the result does not depend on the order of presses, so a pair of presses on the same button can be discarded. In the end, the buttons remaining in the sequence will be pressed once. Thus, each desired table corresponds to a set of white buttons, pressing which it is obtained. But there are no more than \(2^{12}\) such sets (and, therefore, tables).

![](https://cdn.mathpix.com/cropped/2024_05_06_75db48f86176e8f64efag-32.jpg?height=345&width=380&top_left_y=-1&top_left_x=842)

Second method. It is easy to check that each operation changes the state of an even number of cells marked with dots. Therefore, the parity of the number of pluses in the marked cells remains the same as in the initial table A. Thus, the sign in the gray marked cell is determined by the parity of the number of pluses in the white marked cells.

By rotating the figure by \(90^{\circ}\), \(180^{\circ}\), and \(270^{\circ}\), we are convinced that the signs in the four gray cells of the table obtained after the operations are completely determined by the other 12 signs (located in the white cells) of this table (and the initial table A). This means that from A, we can obtain no more than \(2^{12}\) different tables.