[Math] Number of ways of arranging 7 coloured blocks in patterns

combinatorics

The question goes:

Given you have 7 differently coloured blocks (red, orange, yellow, green, blue, indigo, violet), how many different arrangements are there such that the blue and green are not to be together, when the blocks are arranged in the pattern:

pattern of block arrangement: 2 rectangles on top, 3 in the middle, 2 on the bottom

I have gotten this far, yielding an incorrect answer:

Ext. cycle of 6, with 1 block inside. Ways for G&B to be adjacent on cycle: $2!4!$, for one to be in the middle $2\times 5!$. Total possible arrangements: pick the middle and arrange the outside ($_{}^{7}C_1\times 5!$). So the number of ways is $7\times 5! – (2!4! + 2\times 5!) = 552$.

The answer given in the book is 2160. Why is it correct, and how may it be justified?

Best Answer

You have solved the problem by first counting the arrangements you don't want. This is a perfectly valid idea and often a simple way to do these problems, however I think in this case the direct approach will be easier.

First note that neither B nor G can occupy the centre square. So

  • Choose a square for B. . . . . $6$ ways.
  • Choose a square for G. . . . . $3$ ways
  • Place the other $5$ blocks. . . . .$5!$ ways.

Answer, $3\times6\times5!=2160$.

Taking your approach, it seems to me that you are attempting to count things in the right way, but your actual numbers are wrong. It should be $7!-(6\times2\times5!+2\times6\times5!)$ which is also $2160$.

Related Question