[Math] Peter purchased a pentagonal pen for his puppy Piper. Find the number of ways he can paint it such that no two sides are the same color.

combinatoricsprobability

Peter purchased a pentagonal pen for his puppy Piper. Now Peter wants to decorate the new pen for Piper, and he would like to paint each side of the pen either red, green, or blue so that each wall is a solid color.

enter image description here

Peter can only paint at night when Piper is sleeping, and unfortunately it is too dark for him to determine which color he is painting. So for each wall, Peter randomly chooses a can of paint and paints the wall in that color. In the morning, Peter observes the resulting color scheme. The vertices of the pentagon are labeled with the letters $A, B, C, D,$ and $E$, and these labels are clearly visible during the daytime. What is the probability that no two adjacent walls of the pen have the same color?


My approach was, that the total number of possible ways is $3^5$, and the number of ways to do it is, $3$ for the first side, $2$ for the next, $2$ for the next, $2$ for the next, and either $1$ or $2$ ways for the final side. These would be my two cases. However, I don't know how to do that. Can someone help, please? Thanks!


EDIT: I am open to other methods as well, but please do not make it too complicated.

Best Answer

There is no way to paint three sides the same color, with no two adjacent sides being the same color, so we must have one side of one color and two sides of each of the other two colors.

We have $3$ ways to choose the single color and $5$ ways to choose the wall to paint with it. The two adjacent walls must be painted different colors, or the two remaining walls, which are adjacent would be painted the same. There are $2$ ways to choose how to paint the two adjacent walls, and then the colors of the remaining walls are determined.

Altogether, we have $$3\cdot5\cdot2=30$$ admissible colorings.

Related Question