How to calculate the Grundy number for states of a 4*4 matrix. A valid move consists of transforming the 1s into 0s of a submatrix having all 1s.
Example:
1010
0011
0000
0000
Grundy Number = 2
I checked for smaller cases and calculated the Grundy number for that, but couldn't extend it for any binary 4*4 matrix. So, please help me to calculate this.
Note: Can convert 1 to 0 only in submatrix.