# What is the number of colorings?

## Robert colors each square in an empty 3 by 3 grid either red or green. Find the number of colorings such that no row or column contains more than one green square.

6 ways

#### Explanation:

Let's look at a 3x3 grid:

$\left(\begin{matrix}A 1 & A 2 & A 3 \\ B 1 & B 2 & B 3 \\ C 1 & C 2 & C 3\end{matrix}\right)$

Let's now make A1 green:

$\left(\begin{matrix}\textcolor{g r e e n}{A 1} & A 2 & A 3 \\ B 1 & B 2 & B 3 \\ C 1 & C 2 & C 3\end{matrix}\right)$

Now, we could have made any one of the 3 in the A row green - we've just chosen A1 for this example.

In the B row, we now have 2 choices - we can make either B2 or B3 green. Let's do B2:

$\left(\begin{matrix}\textcolor{g r e e n}{A 1} & A 2 & A 3 \\ B 1 & \textcolor{g r e e n}{B 2} & B 3 \\ C 1 & C 2 & C 3\end{matrix}\right)$

And that leaves us with the only choice in C3.

Let's also notice that we could have started with any of the rows and made our way through this process. We could also have worked with columns.

In any regard, we end up with:

$3 \times 2 \times 1 = 6$ ways to arrange the green grids.