In the figure, each of the 5 letters has a certain number of circles. We have 3 colors (blue, red, orange) to paint the circles (each one in a single color).

![](https://cdn.mathpix.com/cropped/2024_05_01_3fc4f3a6ef7302a792fcg-12.jpg?height=209&width=729&top_left_y=1101&top_left_x=545)

a) In how many different ways can we paint the circles of the letter "O", not necessarily using all 3 colors?

b) In how many different ways can we paint the circles of the letter "E" using all 3 colors?

c) In how many different ways can we paint the letter "B" such that circles connected by a segment must have different colors? (The three circles aligned vertically have TWO segments separating them).

#
Solution

a) There are 3 color possibilities for each of the circles. Therefore, we can paint it in $3 \cdot 3 \cdot 3 \cdot 3=81$ ways.

b) Without considering the restriction (using all 3 colors necessarily), the total number of possibilities, according to the reasoning from the previous item, is $3^{6}=729$. Now let's subtract from this result the possibilities where we use only 1 or 2 colors. For example, if we choose only 2 colors, such as blue and red, we have $2^{6}-2=62$ possibilities of painting with 2 colors (we subtract 2 to discount the two possibilities where we paint only blue and only red. Don't worry! We will put them back later). If we choose blue and orange, as well as orange and red, we also have 62 possibilities in each case. Remembering that in 3 possibilities all the circles are the same color, we have, therefore, a total of $729-3 \cdot 62-3=540$ ways to paint the circles of the letter $E$ using all the colors.

c) Let's paint the circle at the midpoint of the vertical segment right away, as it has a common segment with all the others: there are 3 possibilities. Now, there are 2 colors left to paint the 2 circles at the top and the same 2 colors for the ones at the bottom. Assuming the first circle was painted blue, we can paint the top circles red - orange or orange - red, that is, 2 possibilities, as well as the 2 at the bottom. Therefore, there are $3 \cdot 2 \cdot 2=12$ ways.