Permutations with restrictions on letters not allowed to the left of another

combinatorics

I'm working through Per Alexandersson's combinatorics handout (found here). My answer for #19 wrong and I'm trying to figure out why. The question is:

How many words can be made by rearranging aabbccdd, such that
no ā€™aā€™ appears somewhere to the right of some ā€™cā€™?

My approach is the following:

Lock the leftmost 'c' in every possible position it can take, count the permutations when c is in that position, and add up the different cases.

Case 1

leftmost 'c' is in position 3. This leaves 5 free letters, two of which are copies of another, to rearrange. This gives us $\frac{5!}{2!2!}$ permutations.

Case 2

leftmost 'c' is in position 4. Left of the leftmost 'c', we must have two 'a' letters, which leaves one space to put either a 'b' or a 'd'. Let's say we first put 'b' in that one spot, then to the right of the leftmost 'c', we'll have two 'd' letters, 'b' and 'c'. We can order the right side $\frac{4!}{2!}$. We can order the left side $\frac{3!}{2!}$. Then we can do the same thing with 'd' to the left of the leftmost 'c'. So, $2\times\frac{4!}{2!}\times\frac{3!}{2!}$

Case 3

leftmost 'c' is in position 5. Left of the leftmost 'c', there are two spaces available. I split this case into two subcases:

Subcase 1:
On the left side of the leftmost 'c', we have either 'bb' or 'dd'. In either case, the number of permutations will be $\frac{4!}{2!2!}\times\frac{3!}{2!}$, so the total cases for this subcase will just be $2\times\frac{4!}{2!2!}\times\frac{3!}{2!}$

Subcase 2:
On either side of the leftmost 'c', we have 'bd' in the free available spaces. This means we have $\frac{4!}{2!}\times3!$ permutations since the left will have 1 letter that is copied once and the right will have all distinct letters.

Case 4

leftmost 'c' is in position 6. Either 'd' or 'b' is on the right of leftmost 'c'. So we can order the left hand side in $\frac{5!}{2!2!}$ ways and we can order the right in 2 ways and there are 2 different letters that could go on the right. So our total permutations are: $2\times2\times\frac{5!}{2!2!}$

Case 6

last one. leftmost 'c' is in position 7. To the left of the leftmost c, there are 6 variables, each of which is a copy, that can be arranged. So we have, $\frac{6!}{2!2!2!}$ permutations.

Sum all of these and it comes to 384, but the answer is 420. What am I missing?

Best Answer

Your method is correct. However, you added wrong. If you add up the values of your expressions, you should obtain $420$. In particular, it looks like you omitted Subcase 1 of Case 3 from your total.

A simpler approach is to choose two of the eight positions for the bs and two of the remaining six positions for the ds. The remaining four positions must be filled from left to right with the two as followed by the two cs. Hence, the number of admissible arrangements is $$\binom{8}{2}\binom{6}{2} = 420$$

Related Question