# In how many ways can we arrange $n$ A's and $n-1$ B's into $2n-1$ slots?

There are $2n-1$ slots/boxes in all and two objects say A and B; total number of A's are $n$ and total number of B's are $n-1$. (All A's are identical and all B's are identical.) In how many ways can we arrange A's and B's in $2n-1$ slots.

My approach: there are $2n-1$ boxes in total and for A, $n$ have to be selected, so number of ways to select $n$ A's is $C(2n-1,n)$ and can be permuted in $n!/n!$ ways, i.e., $1$. And similarly for B, $C(n-1,n-1)$ and $(n-1!)/(n-1!)$ permutations in total.

So total $$C(2n-1,n) \times 1 \times C(n-1,n-1) \times 1=C(2n-1,n).$$

• Please tell us what you've tried and where you are stuck. Also, you should format your post using MathJax for readability. – rogerl Aug 6 '14 at 15:37
• Hint: We need to choose the $n$ places where the A's will go. – André Nicolas Aug 6 '14 at 15:41

Your answer appears correct to me (assuming all $2n-1$ slots need to be filled), but could be simplified:

We choose the positions of the A's, which can be done in $\binom{2n-1}{n}$ ways. The remaining positions all contain B's.

(While it's technically correct, it seems pointless to account for the $n!/n!$ and $(n-1)!/(n-1)!$ ways of permuting these objects given their respective slots.)

The problem can be reduced to this: How many ways can we arrange the n A's into 2n-1 positions? This is because we can say that once all A's have been placed, the rest must be B's. In a given arrangement of A's, this is the only arrangement of that type since all B's are identical.

Hence the answer is (2n-1)C(n) = (2n-1)C(n-1)

Since A's are identical, and B's are identical, it follows that you do not need to permute the A's among themselves, and B's among themselves, and just need to determine the places in which $n$ A's and hence, $n-1$ B's can be placed. First, select the $n$ places from $2n-1$ places for the A's in $C(2n-1,n)$ ways. Automatically you have chosen the $n-1$ places for the B's. So I would say the answer is simply $C(2n-1,n)$.

$$\frac{(n+(n-1))!}{n!(n-1)!}=\frac{(2n-1)!}{n!((2n-1)-n)!}=\binom{2n-1}{n}$$