Grid the plane forming an infinite board. In each cell of this board, there is a lamp, initially turned off. A permitted operation consists of selecting a square of $3\times 3, 4\times 4$ or $5\times 5$ cells and changing the state of all lamps in that square (those that are off become on, and those that are on become off).
(a) Prove that for any finite set of lamps, it is possible to achieve, through a finite sequence of permitted operations, that those are the only lamps turned on on the board.
(b) Prove that if in a sequence of permitted operations only two out of the three square sizes are used, then it is impossible to achieve that at the end the only lamps turned on on the board are those in a $2 \times 2$ square.
I couldn't solve part b).
In a) you can change the state of a $9\times 9$ board using the $3\times 3$, then you change the same $9\times 9$ board using 2 $4\times 4$ boards and 2 $5\times 5$ boards such that the $5 \times 5$ boards share a square. Therefore we changed the state of only one lamp, and this is enough to prove part a). (If this solution to part a) is not well understood, you can answer it in the comments and I will clarify it better).
Moons are the $5\times 5$ and elephants the $4\times 4$
I tried part b for a long time but I have no ideas how I can get it.
Best Answer
For part b, the idea is that we want to find an invariant doesn't affects 2 of those squares, but impacts the $2\times 2$ square.
Generalization: If the permitted operations were only to toggle a $a\times a$ and $ b\times b$ square where $a, b > c$, then we cannot end up with only a $d \times d$ square turned on for any $ 1\leq d \leq c$. (You can treat $c = 2$ as needed.)