2

Given, that we have the 5 letters a, a, b, b, c

Now we need to arrange them in such ways where 2 identical letters are not placed side by side. How many permutations of such condition can we have?

My question is that, how can I represent this problem by using stars and bars? And if I can't, what will be a quick method for solving this?

3 Answers3

2

you can use inclusion exclusion, the number of permutations where the two $a$'s are consecutive is $4!/2$, the number of permutations where the two $b$'s are consecutive is also $4!/2$ and the number of permutation where the two $a$'s and the two $b$'s are consecutive is $3!$.

So the desired result is : $\frac{5!}{2^2}-\frac{4!}{2}-\frac{4!}{2}+3!=30-12-12+6=12$

Asinomás
  • 105,651
1

You may have a look at the $3$ solutions generated by the tool careerbless.com/calculators/word/index.php (generated question no.18 for the input word AABBC)

enter image description here

Kiran
  • 4,198
1

We can successively use the gap method followed by the subtraction method.

Firstly, we shall keep the $A's$ separate by placing them in the gaps of $-B-B-C-$ and permute the other letters, thus $\binom42\cdot\frac{3!}{2!} = 18$ ways.

We shall now subtract arrangements with the $B's$ together treating them as a super $B$,
$ -\mathscr B - C - \;,$ thus $\binom32\cdot2! = 6$

thus the final ans is $18 -6 = 12$