39.4k views
1 vote
A game designer must decide how to color four buildings that are in a row. Using only the colors yellow, green, red, and blue, each building must be painted with exactly one color. Any two neighboring buildings must be different colors, and the first and last buildings must be different colors. How many ways are there to paint the four buildings?

User Docchang
by
6.2k points

1 Answer

5 votes

Answer:

The number of ways are there to paint the four buildings is 48.

Explanation:

I) let the first building be any color. Therefore the first building can be painted with any of the 4 colors.

Therefore the first building can be colored in 4 ways.

ii) the second building can be colored in 3 ways since it cannot be colored the

same color as the first building.

iii) the third building can also be colored in 3 ways.

iv) the last building can be colored in 2 ways because it cannot be the same color as the first building or the color of the adjacent building.

Therefore the total number of ways the buildings can be colored = 4
* 3
* 3
* 2 = 48.

User Alejandro Haro
by
6.1k points