There are 5 different colours. In how many ways can you colour the nodes such that no two nodes connected by a link have the same colour?

135 Views Asked by At

enter image description here

It's the image I have given, but node 2 and 4 are connected. I have no idea on how to approach this problem.

1

There are 1 best solutions below

0
On BEST ANSWER

So, if $2$ and $4$ are also connected, then all three nodes $2,3,4$ must be of different colors. We can color them on $5\cdot 4\cdot 3$ ways. But then what ever color node $3$ has we have $4$ choises for $1$. So the answer is $$240$$