1
$\begingroup$

How many passwords can you form using 4 A's, 5 B's and 6 C's , such that all A's are before C's.

I found that the answer is 3003 but I didnt understand it

$\endgroup$
4
  • $\begingroup$ Not too much information given , what is the length of the password? $\endgroup$ Feb 14, 2017 at 8:35
  • $\begingroup$ 15 @KasmirKhaan $\endgroup$ Feb 14, 2017 at 8:39
  • 1
    $\begingroup$ If you take such a password and remove all the Bs, what are the possible strings that can remain? How many ways are there to insert Bs into each possibility? $\endgroup$ Feb 14, 2017 at 8:49
  • $\begingroup$ Must all the passwords be of length 15 or are passwords with length less than 15 also included? Please clarify your question by editing the post and not just by leaving comments. $\endgroup$
    – JRN
    Feb 17, 2017 at 4:11

2 Answers 2

5
$\begingroup$

If you haven't learned "stars and bars", just insert the $Bs$ in $AAAACCCCCC$ one by one.

As you insert each $B$, you create an extra way of inserting the next one.

Don't forget to divide by $5!$ (as they are identical), i.e.

$\dfrac{11\cdot12\cdot13\cdot14\cdot15}{5!}$

$\endgroup$
1
$\begingroup$

Expanding Greg Martin's idea.

First, we remove all Bs in the password, leaving us $$\{\underbrace{A,\dots,A}_{4 A's},\underbrace{C,\dots,C}_{6 C's}\}.$$

We have to insert 5 B's in the 10 + 1 = 11 spaces ($s_i$) between the A's and C's

$$\{s_1,\underbrace{A,s_2,\dots,s_4,A}_{4 A's},s_5,\underbrace{C,\dots,s_{10},C}_{6 C's},s_{11}\}.$$

We can choose the $s_i$'s more than one time, so the answer is $$H^{11}_5 = C^{15}_5 = 3003.$$

$\endgroup$

Not the answer you're looking for? Browse other questions tagged .