TITLE: What is the minimal number of steps needed to create a chessboard?
QUESTION [19 upvotes]: Imagine you have a $8 \times 8$ completely white field of squares on your screen. Now you can click on any square. When you do this, all the squares in that column and line (including the one you clicked on it) will change their color (if it's white it will be black and vice versa). How many steps at least would it take to create a standard chessboard?
I tried it manually but it got too complicated and I lost track of the situation. But if I could tell my problem to Mathematica it could be very easy. Is there a way to write code to calculate this? Or even a formula to do this manually without any program?

REPLY [14 votes]: A valid proof without advanced math:
No cell should be clicked more than once.
By clicking somewhere two times, you're just reversing your changes. Since the order of clicks does not make a difference, this holds even if you do other clicks between these. So we only need to consider one or zero clicks on each cell.
The number of clicks outside each row/column must be even.
If there was an odd number of clicks outside a given row, the number of cells changed in that row would be odd, leading to an odd number of black cells there. (Clicks in the row don't affect this, since they change all cells in that row).
The number of clicks in total must be even.
Each row changes 15 cells, so an odd number of clicks in total would lead to an odd number of color changes, resulting in an odd number of black cells on the whole board. (thanks user21820)
The number of clicks inside each row/column must be even.
Subtract the number of clicks outside a row (an even number) from the number of total clicks (another even number). The result will be even.
A cell will be changed in the end if and only if it was clicked.
Look at a row. The clicks in that row leave its cells unchanged, since there is an even number of them. Which cells are changed by the clicks in other rows? We can use the fact that there must be an even number of clicks in each column as well to tell. 
Look at the cells in the row:

If it was clicked, there is now one click in its column. There has to be an odd number more in other rows. These are the clicks outside the row that change this cell. Since there is an odd number of them, the cell will be changed in the end.
If it was not clicked, there has to be an even number of clicks elsewhere in the column. This means the clicks outside the row also leave the cell unchanged.

The optimal solution is 32 clicks.
We proved that we need to click all the cells we want to change to get a chessboard coloring. There are 32 of these, so that's the best we can do. In fact, that's the only number of moves which can lead to a chessboard coloring if we don't click any cell twice.