0

I'm trying to figure out how to find the number of possible combinations of a set, but with allowing repeated letters. For example, if I want two letters, and they have to be $a$ or $b$, then I could have $aa, ab, ba, bb$. Is there some sort of formula I could use to figure out the number of possible combinations?

Thanks!

  • A somewhat related post, which enquirers the number of possible words length of at most $n$ letters, can be found here: https://math.stackexchange.com/questions/2339519. – jvdhooft Jun 29 '17 at 12:39

2 Answers2

1

Consider this: You have a set of two elements, A and B. You want to form a two letter word from them. Let's show that as _ _. In the first place you have choice of putting either A or B. After you have done that, you have now to put at the second place also A or B. So that is $2 \cdot 2 = 4$ combinations.

Similarly, if you were asked how many $k$ letter words can you form from $n$ different letters. The answer would be $n \cdot n \cdot \ldots \cdot n$ ($k$ times) and that is $n^k$.

N. F. Taussig
  • 76,571
0

If your words have length $n$ and you have $k$ letters, the formula you are looking for is $$n^k.$$ This should be in every book on basic combinatoric or stochastic, as it is one of four classical counting problems (with repetition, without repetition, with putting back, without putting back). If not, it is not that hard to prove, using induction for example.

Dirk
  • 6,359