In a row of five squares, each square is to be colored either red, yellow, or blue, so that no two consecutive squares have the same color. How many ways are there to color the five squares?


 Sep 1, 2023

Since there must be at least three red squares, the red squares must be in squares 1, 3, and 5. That leaves two squares to contend with, squares 2 and 4. We can color those two squares in 4 ways:

Red Yellow Red Blue Red

Red Blue Red Yellow Red

Red Yellow Red Yellow Red

Red Blue Red Blue Red

So the answer is 4​.

 Sep 1, 2023

I see nowhere where the problem specifies that at least three of the squares must be of the color red.


The leftmost square is essentially a free choice; there is no restriction on this choice. Therefore, the leftmost square can take any of the 3 colors.

The square directly to the right of the leftmost square is somewhat restricted. Because no consecutive squares can have the same color, there will be 2 other choices for the square directly to the right of the leftmost square in all cases.

All squares after the leftmost square are under the same restriction of having only 2 choices in all cases.


This means there are \(3 * 2 * 2 * 2 * 2 = 3 * 2^4 = 3 * 16 = 48\) ways of coloring these squares.

 Sep 3, 2023

2 Online Users