Filling a grid square with 0,1,2

44 Views Asked by At

Each of the 25 cells in a five-by-five grid square is filled with a 0, 1, or 2 in such a way that the numbers written in neighboring cells differ from the number in that cell by 1. Two cells are considered neighbors if they share a side. How many different arrangements are possible?

Well how would I solve this, because just trying to write them out would take a good deal of time and I could easily get something wrong, so I think there'd be a better way.