## 10. Four colors

Each of the squares in a $4 \times 4$ grid, as shown in the figure, must be colored with one of four colors. How many ways can this be done such that any four squares sharing a common vertex are colored with different colors?

![](https://cdn.mathpix.com/cropped/2024_05_30_1fa462ef9f831ff2e2d1g-6.jpg?height=306&width=309&top_left_y=492&top_left_x=1512)

## Result: $\quad 168$
## Solution.

Let's denote the colors with $a, b, c$, and fix the color arrangement in the top-left $2 \mathrm{x} 2$ square.

Since 4 different colors can be arranged in these four fields in $4 \cdot 3 \cdot 2=24$ ways, we will multiply the number of possible colorings of the remaining parts of the table by 24 at the end.

![](https://cdn.mathpix.com/cropped/2024_05_30_1fa462ef9f831ff2e2d1g-6.jpg?height=254&width=244&top_left_y=911&top_left_x=1534)

Let's look at all the ways we can continue coloring to fill the 3x3 square.

The first two rows in the third column must contain the colors $a$ and $c$, and the third row must start with the colors $a$ and $b$.

This leads us to the following three possibilities: