How many ways are there to organize the letters in the word BUBBLES into a 4-letter permutation

combinationscombinatorics

So I've recently been reviewing problems and formulas for the upcoming AMC8 which I will be taking. Most of the stuff is pretty simple, but I've forgotten what formula I am able to use for this type of problem. Now I know how to deal with a few similar problems on it, but I'm not sure how to relate them back to this. The problem goes a little like this:

Suppose you have the world "BUBBLES" where you are allowed to mix the letters as you want. Each different permutation of letters counts as a distinct word if it cannot be recognized as a previous word already counted. Words do not necessarily have to match up with standard English words either, so "words" like "SULBEBB" or "BSLBEBU" are acceptable. How many four-letter permutations can be formed from the word "BUBBLES"?

Now I already know how to deal with the problem if all letters in the world BUBBLES were unique. If we had something like ABCDEFG, all that needs to be done is $\frac{7!}{3!} = 7*6*5*4 = 840$. But the issue comes in with the $3$ letters that are the same, which in this case is the 3 Bs. Now if we had to include the $3$ Bs no matter what, I know that we can simply divide again by $6!$ as that's the amount of ways that we would have overcounted the Bs for each scenario. But the issue comes in with the fact that not all the Bs need to be included. I'm not sure how to get pass this condition, does anyone have any ideas on it? And does anyone know a formula (and the way to derive it would be nice to hear as well, if you have one) or method I could use for this type of problem (excluding brute forcing it, of course)? Or do I have to casework through it manually?

Best Answer

Let $T(n)$ denote the # of words possible, if $n$ B's are used : $n \in \{0,1,2,3\}.$

Then the total # words is $\sum_{n=1}^3 T(n)$.

$T(0) = 4!$.

$T(1) = \binom{4}{3} \times 4!$.

$T(2) = \binom{4}{2} \times 4 \times 3.$

$T(3) = \binom{4}{3} \times 4.$