-1

Can I solve the problems of Combination with indistinguishable objects plus repetition allowed using a formula?

For instance,

How many $3$-letter combinations could be formed from the word $BBA$ if repetition of letters is allowed?

We know the answer is $4$, as $S=\{{AAA, BBB, ABB, AAB}\}$.

Can these kinds of problems be solved using a formula, or, do I need to manually solve it every time?

Note. The problem in this question is different from the problem posted in this problem which I posted earlier. Here we have $2$ letters and need to produce $3$-element combinations (i.e. $n<r$). On the other hand, in the previous problem, we had $3$ letters to choose from $26$ letters (i.e. $n>r$).

YuiTo Cheng
  • 4,705
user366312
  • 1,641
  • A. this particular question is entirely trivial and B. the general question is equivalent to your prior question – lulu Jun 02 '18 at 13:40
  • @lulu, A.this is not about solving the problem, and B. there were no indistinguishable objects in the previous problem. – user366312 Jun 02 '18 at 13:42
  • I don't understand. Please edit your post to show an example illustrating the difference between the two questions. – lulu Jun 02 '18 at 13:44
  • At the moment I cannot figure out your "we know the answer ...". Why is $BBA$ not element of your set $S$? At the moment your $S$ does not seem to correspond to the description of the combinations you want to form. – trancelocation Jun 02 '18 at 13:47
  • @trancelocation, Coz, $BBA$ and $ABB$ are same. – user366312 Jun 02 '18 at 13:51
  • I see the edit ,but I still don't understand. It doesn't matter whether $n<r$ or not. – lulu Jun 02 '18 at 13:52
  • If you search for "weak compositions" and "stars and bars" you will find many similar examples. I have done at least $15$ myself – Ross Millikan Jun 02 '18 at 14:17

1 Answers1

1

This is a so called combination with repetition. The $BBA$ is a bit misleading.

Basically you want to create $3$-multisets - multisets with $3$ items - from the set $\{A,B\}$. ("multiset" means that repetitions are allowed).

In general the number of $k$-multisets from a set of $n$ elements is $$\binom{n+k-1}{k}$$

In your case you have $n=2$ and $k=3$: $$\binom{4}{3}=\frac{4!}{3!\cdot 1!} = 4$$