Problem:
Marina wants to color each cell of a table red or blue, in such a way that every cell shares at most one side with a cell of the same color. How many possible colorings of the table are there?
Problem:
Marina wants to color each cell of a table red or blue, in such a way that every cell shares at most one side with a cell of the same color. How many possible colorings of the table are there?
Pick one
Solution:
The answer is (A). First, we observe that once a row and a column of the table have been colored respecting the given conditions, then there exists at most one way to complete the coloring respecting the conditions of the problem: indeed, given a table with three cells colored using both colors, there is a unique way to color the fourth cell while keeping the conditions satisfied (this can be seen by listing the few possible cases). We also observe that a table with three cells colored the same color contradicts the conditions of the problem.
Therefore, given a coloring on a row and a column of our table, the only way to extend this coloring to the whole table is obtained by restricting our attention (each time) to the subtables of which 3 cells are already colored (necessarily using both colors) and coloring the remaining fourth cell.
We observe that once the first row has been colored in such a way that there are no three consecutive cells of the same color, but there are at least two adjacent cells with the same color (which can be done in 14 possible ways), there exists a unique way to extend the coloring to the entire table: indeed, if there are two adjacent blue cells, the two immediately below them must be red, those further below must be blue, and so on; hence the coloring of at least one column is determined and, by what was said above, there exists at most one coloring of the entire table that extends the initial one. Moreover, the coloring obtained by repeating the coloring of the first row on the third and fifth rows, and putting the opposite coloring on the second and fourth rows, is an admissible coloring. Note that in this case the coloring of the first column is obtained by alternating the colors. There are therefore 14 colorings of this type.
In a completely analogous way, a coloring of the first column with at least two adjacent cells of the same color (which can always be done in 14 distinct ways) determines a coloring of the entire table. In this case we will have that the first row will have alternating colors and therefore cannot coincide with any of the colorings counted above.
Also in the case in which both the first row and the first column are colored with alternating colors, there exists a unique possible coloring for the whole table, given by the checkerboard coloring. There are therefore 2 colorings that fall into this case.
Since we have exhausted all possible colorings of the first row and the first column, we have that there are no other colorings besides those listed, and therefore the total number of colorings is .