# Combinatorics -coloring a board

In how many different ways can you color $10$ squares on a $2\times5$ board so that every square is colored in red,blue, green or yellow and in each row at least two squares must be colored in red? The board cannot rotate. My answer is $\frac{5*4*5*4*(4^6)}{2*2}$, is that correct? First I chose $2$ squares for the red color in each row then divided it by $2$ two times, and then I can choose any of the $4$ colors on the $6$ remaining squares(fields) so that is $4^6$.

• I think you have a double counting problem. How many times do you count the configuration in which all $10$ squares are colored red? – saulspatz May 9 '18 at 19:03

## 2 Answers

Hint: It is easier to count the ways to fill a $1\times 5$ board and square it as the rows do not interact. For that, count the total ways to color the squares without the restriction on red squares and subtract the colorings with $0$ or $1$ red squares.

Your approach overcounts the arrangements with more than two red squares in a row because you count it once for each pair of red squares.

Hint: To avoid problems with double counting, it's easier to do this by counting the complement. How many ways are there to color the first row if non square is colored red? How many ways if exactly one is colored red? Subtract these from the total number of ways to color the row, and you have the number you need, for the first row. From there, it's easy.