218k views
5 votes
Tom needs to paint a fence that is made of 5 panels. He has red, yellow, green, blue, and white paint. In how many ways can Tom paint the fence if no two neighboring panels can be painted the same color?

User Leejaycoke
by
8.1k points

1 Answer

1 vote

Answer: In how many ways can Tom paint the fence if no two neighboring panels can be painted the same color?

Explanation:

There are a total of 120 ways to paint the fence with no two neighboring panels painted the same color.

To see why, consider the first panel. Tom can paint it any of the 5 colors. Without loss of generality, assume that he paints it red.

For the second panel, he can choose any of the 4 remaining colors (since he cannot use red again). Without loss of generality, assume that he paints it yellow.

For the third panel, he can choose any of the 3 remaining colors (since he cannot use red or yellow again). Without loss of generality, assume that he paints it green.

For the fourth panel, he can choose any of the 2 remaining colors (since he cannot use red, yellow, or green again). Without loss of generality, assume that he paints it blue.

For the fifth panel, he can choose the only remaining color (since he cannot use red, yellow, green, or blue again). Without loss of generality, assume that he paints it white.

Therefore, there are 5 × 4 × 3 × 2 × 1 = 120 ways to paint the fence with no two neighboring panels painted the same color.

{Hope This Helps! :)}

User Itanex
by
7.9k points

No related questions found