# How many different arrangements? [closed]

Each of the 25 cells in a five-by-five grid of squares 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?

Even and odd numbers must alternate, so we can checker the grid odd and even and put $1$s on the odd squares and arbitrary even numbers on the even squares.
If we make $12$ squares odd and $13$ even, that yields $2^{13}$ possibilities, and if we make $13$ squares odd and $12$ even, that yields another $2^{12}$ possibilities, for a total of $2^{12}+2^{13}=3\cdot2^{12}=12288$.