Combinatorics – Counting the number of ways to color graphs

coloringcombinatoricsgraph theory

enter image description here

Each of the nine dots in this figure is to be colored red, white or blue. No two dots connected by a segment (with no other dots between) may be the same color. How many ways are there to color the dots of this figure?

What I have done so far: I know there are $3\cdot 2\cdot 1=6$ ways to color the leftmost triangle. How do I proceed?

Best Answer

Assume the middle triangle is coloured R, B, W, starting from the top vertex and moving clockwise. Then the top vertex of the rightmost triangle cannot be R, and the bottom-left vertex cannot be B.

You can list all possible valid arrangements of the rightmost triangle, of which there are $3$ in total. Draw them for yourself!

The top vertex must be of the other two colours, B or W in our case. There are $2$ arrangements when B is the top vertex, and $1$ arrangement when W is the top vertex, as in the other colouring, the bottom two vertices have the same colour. This is true for the leftmost triangle as well by symmetry.

Therefore, the number of possible arrangements is $6 \times 3 \times 3 = 54$.