Color These Squares!

We can color each square red, blue, or green. How many ways are there to color the squares such that any 2 adjacent squares are different colors?

For example, these are valid:

but these are not:

27 12 6 8

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

6 solutions

Chung Kevin
Sep 29, 2015

Two cases:

1) We use 3 different colors, in which case the first square can be any color (3 options), the second square can be either of the other two colors (2 options), and then the final square must be the last color. By Rule of Product, that makes 3 × 2 = 6 3 \times 2 =6 options.

2) We use 2 different colors, making a sandwich with them. In this case, the outer squares could be any of the 3 colors and then the middle square can be either of the other two. So, again, by Rule of Product, that makes 3 × 2 = 6 3 \times 2 =6 options.

Combining the two cases together (by Rule of Sum), there are 12 ways to color altogether

Why split it into two cases? The first square has three options, the second has two, and because it's adjacent to the second, the third also has two options. 3x2x2 = 12.

I'm not attacking your answer, as a note. I am sincerely curious if there was a better reason to split into two cases like that.

Nate Thönnesen - 5 years, 8 months ago

Log in to reply

That's another way of approaching this problem. (Isn't it amazing that there are multiple ways of solving a problem?!)

You should add that as a solution to this problem!

Calvin Lin Staff - 5 years, 8 months ago

Very elegant problem with its solution!Upvoted.

Anibrata Bhattacharya - 5 years, 7 months ago

To color the 1 s t 1^{st} square, we have 3 colors to choose from(red, green or blue).

Now, having chosen one color, we have 2 choices for the next square as adjacent squares can't have the same color.

However, for the 3 r d 3^{rd} square, we can have 2 color choices, except the only one the 2 n d 2^{nd} square was colored with.Note:-As in the question, we can have two alternate squares having the same color.So, we don't need to color every single square with a distinct color.

So, the total number of ways to color the whole square is

3 × 2 × 2 = 12 3\times2\times2=\boxed{12} .

Tridip Das
Oct 1, 2015

First square can be coloured by 3different colours,

Second can be coloured by 2 colours other than the first square colour.

Third can be coloured by 2 different colours other than the second square colour.

So total possibility is 3×2×2=12

Mohammad Saleem
Oct 1, 2015

So you have 3 boxes, correct? In the first box, you get to choose the colors: red, green, or blue (3 choices). Let's say we use red. Then for the second box, we can ONLY use either green or blue since we can't have two of the same colors next to each other (2 choices). Let us use blue. For the last box, we have the choice of two colors! Why? Well because you are NOT restricted from using red again but you ARE restricted from using blue (2 choices). So 3x2x2 = 12

Pop Wong
May 2, 2020

Color the middle one first : 3 choices:

Then for the left and right, both have 2 choices

The number of ways = 2 3 2 = 12 = 2 * 3 *2 = 12

Gary Aknin
Oct 1, 2015

BGR, BGB, BRB, BRG | GBG, GBR, GRB, GRG | RBG, RBR, RGB, RGR

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...