The cells of a table m x n, $m \geq 5$, $n \geq 5$ are colored in 3 colors where:
(i) Each cell has an equal number of adjacent (by side) cells from the other two colors;
(ii) Each of the cells in the 4 corners of the table doesn’t have an adjacent cell in the same color.
Find all possible values for $m$ and $n$.
Could I ask if someone has a better solution to that problem? My solution involves many 'ifs' with which I construct a pattern to fill the board with.
$(m, n)=(2i, 3j), (3k, 2l)$ for $i,l\geq 3$ and $,k\geq 2$.
We will mark the colors with a, b, c.
It could be shown with cases that the table should look like:
\begin{tabular}{llllllllll}
a & b & b & a & a & b & b & a & . & . \\
c & c & c & c & c & c & c & c & . & . \\
b & a & a & b & b & a & a & b & . & . \\
b & a & a & b & b & a & a & b & . & . \\
c & c & c & c & c & c & c & c & . & . \\
a & b & b & a & a & b & b & a & . & . \\
a & b & b & a & a & b & b & a & . & . \\
c & c & c & c & c & c & c & c & . & . \\
. & . & . & . & . & . & . & . & . & . \\
. & . & . & . & . & . & . & . & . & . \\
. & . & . & . & . & . & . & . & . & .
\end{tabular}Or the same but turned $90^\circ$. From here we get the upper answers.
Also the pattern I use for the upper result is:
\begin{tabular}{llllllll}
a & b & b & a & a & b & . & . \\
c & c & c & c & c & . & . & . \\
b & a & a & b & . & . & . & . \\
b & a & . & . & . & . & . & . \\
c & . & . & . & . & . & . & . \\
. & . & . & . & . & . & . & . \\
. & . & . & . & . & . & . & .
\end{tabular}Using it we go through similar reasoning to complete the table.