${}_nP_r$ versus $n^r$

49 Views Asked by At

If I had $n=2$ different symbols, how many $2$-symbol ($r=2$) "words" could I create?

If I had $n=5$ different symbols, how many $2$-symbol ($r=2$) "words" could I create?

Would I use the permutations formula or $n^r$?

Why?

Edit: Yes, you are allowed to repeat symbols in the same word.

1

There are 1 best solutions below

2
On BEST ANSWER

If repetition is permitted, then there are $n$ ways of choosing each of the $k$ letters of the word. Hence, there are $n^k$ possible words when repetition is permitted.

Suppose our alphabet is $\{a, b, c\}$ and we wish to form words of length $2$. Since we have three choices for each letter, there are $3 \cdot 3 = 9$ words that can be formed. They are $aa, ab, ac, ba, bb, bc, ca, cb, cc$. Notice that $3^2 = 9$.

If repetition were not permitted, there are $n$ ways of choosing the first letter, $n - 1$ ways of choosing the second letter, $n - 2$ ways of choosing the third letter, and so forth. In general, there are $n - (k - 1) = n - k + 1$ choices for the $k$th letter. Thus, if repetition is not permitted, the number of words with length $k$ that could be formed is $$P(n, k) = n(n - 1)(n - 2) \cdots (n - k + 1) = \frac{n(n - 1)(n - 2) \cdots (n - k + 1)(n - k)!}{(n - k)!} = \frac{n!}{(n - k)!}$$ which is the number of permutations of $k$ objects selected from a set with $n$ objects, that is, the number of ordered selections of $k$ different elements of a set with $n$ elements.

Using the same alphabet as above, there are three ways to choose the first letter of a two-letter word, which leaves two ways to choose the second letter. Thus, $3 \cdot 2 = 6$ words can be formed. They are $ab, ac, ba, bc, ca, cb$. Notice that $$P(3, 2) = \frac{3!}{(3 - 2)!} = \frac{3!}{1!} = \frac{6}{1} = 6$$ as expected.

See if you can now answer the two questions you posed above when repetition is permitted and when it is not.