The vertices $A,B,C,D$ of a square $ABCD$ are to be coloured with one of three colours red, blue, or green such that adjacent vertices get different colours. What is the number of such colourings?
It seem that if $A$ is red coloured then none of $B$ or $D$ can be coloured by red one, so there are two options blue or green.Then if one of $B$ or $D$ is coloured with blue then $C$ can't be coloured with blue (same as for green one). Then we can colour $A$ by 3 ways (I mean we can colour $A$ by one of three colours) then $B$ by 2 ways again $C$ by two ways and lastly $D$ by also $2$ ways. So the nunber of such colourings must be $3×2×2×2=24$ ways. Is my way of approach is correct and also my answer? Please help me to solve this. Thanking you.