The figure shows the map of a country (imaginary) consisting of five states. It is desired to color this map with the colors green, blue, and yellow, so that two adjacent states do not have the same color. In how many different ways can the map be painted?

![](https://cdn.mathpix.com/cropped/2024_05_01_666a1aec7e447b0a6cbeg-009.jpg?height=274&width=374&top_left_y=2053&top_left_x=1503)
(a) 12
(b) 6
(c) 10
(d) 24
(e) 120
The correct option is (b).

State A can be painted in three ways: green, blue, or yellow. For any neighboring state, for example, state $\mathrm{B}$, we have two possibilities, and the colors of the other states are determined. Therefore, we can color the map in $3 \times 2=6$ ways.

Below we illustrate two of these ways to paint the map; in both, state A has the same color.
![](https://cdn.mathpix.com/cropped/2024_05_01_666a1aec7e447b0a6cbeg-048.jpg?height=266&width=856&top_left_y=412&top_left_x=679)