[Math] How many 5-letter words from ABRACADABRA

combinatorics

How many different 5-letter strings can be formed using the letters from the word ABRACADABRA if duplicated letters are allowed but no letter can be used more times than it occurs in the word?

Though this seems like a duplicate, there is a nuance in my question in which i am about to explain:

According to an answer key it is 1271 because

if we set the variables vwxyz, there are 5! ways, which i understand, but

if there is a repeated letter

vvxyz, then there are $3*4*(5!/2!)$ many ways and so on and so forth, But why is it $3*4*(5!/2!)$ ? why do you multiply the 4 and the 3?

I was wondering that there are 5 ! configurations with 2! repeated letters so wouldnt that just be $\frac{5!}{2!}?$

Best Answer

Let's only consider the case when there is only one pair of repeated letters, such as VVXYZ.

You're correct to think that VVXYZ has $5!$ configurations with $2!$ repeated letters, so the number of ways of arranging VVXYZ is $\frac{5!}{2!}$.

But we're not just arranging VVXYZ in this example. There are many ways to get one pair of repeated letters, such as AABRC or BBRCD or RRCDA...

So there are 3 possibilities for the double-letter pair (either AA or BB or RR) - that's why you need to multiply by 3.

Then, for each double-letter pair, there are four possibilities (technically, 4C3) for the remaining letters (such as AABRC, AABRD, AABCD, AARCD). That's why you also need to multiply by 4.