[Math] Permutations and Combinations. Arranging things to be adjacent etc…

combinatoricspermutations

How many ways to do the following tasks

1)Arrange 12 blocks in a line, 4 of which are green, 3 of which are blue, and 5 red, so that all blocks are adjacent.

2)Form an 8 digit number using each digit 1 through 8 once, so that 3 appears before 8 and 8 appears before 5.

If you could explain your logic for each step I would appreciate it because I tried to figure these out and couldn't. So if you have explain why you use a combination and why a permutation, etc that would be wonderful.

Thanks for your help!

Best Answer

For (1), note that the objects are not all distinct: e.g. the green blocks. consider the green blocks in isolation. We can arrange them in $4!$ ways if they were distinct- however, as they are all the same colour, then we need to divide by a factor of $4!$, giving a total arrangements of 1. This is because we can swap the green blocks around with each other any way we like and still get the same arrangement.

Now, if all the blocks of the same colours are together- all the greens are together, all the blues are together and all the reds are together. The greens can be arranged amongst themselves in only 1 way, as I showed; similar logic goes for the red and blue blocks. So now we have 3 objects to arrange: the blob of green blocks, red blocks and blue blocks. They are all distinct objects, so $3!=6$ ways.

As for (2)- let's consider the digits 3, 8 and 5 in isolation. There are 3!=6 arrangements of these 3 digits. Only one arrangement has this particular order: 3,8,5. So it follows that only $\frac{1}{6}$ of the total arrangements will satisfy the given condition.

Hence, for (2) the answer is $\frac{8!}{6}$