In a regular (a) pentagon (b) hexagon all diagonals are drawn. Initially each vertex and each point of intersection of the diagonals is labeled by the number $1.$ In one step it is permitted to change the signs of all numbers of a side or diagonal. Is it possible to change the signs of all labels to $−1$ by a sequence of steps (IIM)?
This problem is from Problem Solving Strategies by Arthur Engel.
I am trying to understand what will happen if we consider a square with diagonals. Will we be able to label all the vertices with $-1$? It appears to be that this is not the case. So I am trying to look for an invariance, but am unable to find one. Any ideas will be much appreciated.
Edit:
After some backtracking, I realized that I was wrong. It is possible to label the vertices with $-1.$ First, change the signs on one side, then change the signs on a side that is adjacent to this side. And now finally flip the signs on the diagonal not containing any $-1$. You will be done. This raises a question, for which $n$ where $n$ are the number of sides of a regular polygon can this labeling be done?