Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say that we have an alphabet with two letters $A, B$.

We want to words with length = 4. This means that possible words are $2^{4}$.

Now if we want to make words with length = 300 and an alphabet of 100 letters, can we say that possible words are $100^{300}$?

share|cite|improve this question
The other way around. – Rasmus Nov 8 '11 at 21:49
@Rasmus fixed now – ertzan topal Nov 8 '11 at 22:04
Now the answer is simply yes. – Rasmus Nov 8 '11 at 22:50
up vote 1 down vote accepted

Edited to correct the terminalogy (thanks to @MaX)

Yes. This a basic rule of combinatorics, known as "permutations with repetition".

Let us consider we have to fill these $n$ rooms (in your case $n$= 300 is the length of word). We are allowed to fill any of the rooms by an item from (say) $r$ items (in your case $r=100$ is the number of available letters).

$$\begin{array}{|c|c|c|c|}\hline\\&&\vdots&&&&&\vdots&&& \end{array}$$ We can do it in the following way: the first room can be filled in in exactly $r$ way. For each of these ways, the second room can also be filled in $r$ ways...and so on. So the total number of ways to fill the rooms is $r\times r\times\cdots\times r$ ($n$ times multiplication)=$r^n$.

share|cite|improve this answer
This is not combination with repetition. – Quixotic Nov 8 '11 at 22:43
@Max, Thanks for the correction. – Tapu Nov 8 '11 at 22:47
Well, it's combination with repetition and order. – Rasmus Nov 8 '11 at 22:49
Glad to help.Please edit accordingly so that I could remove the -1 :-) – Quixotic Nov 8 '11 at 22:50
@Rasmus:I still have doubts on the use of the term "combination" here. – Quixotic Nov 8 '11 at 22:51

I would say yes.

In case of the four letter word with two letter alphabet, we have a choice of $2$ letter for each letter of the 4 letter word, and then consistent to rule of product we get $2\times 2 \times 2\times 2= 2^4$.


Note we are allowing repetition of letters of the alphabet in each case.

EDIT $1$:

This problem is the reminiscent of the problem of finding the number of possible way of distributing $r$ distinct items into $n$ distinct groups where some groups could be empty.

EDIT $2$:

Other ways to model this same problem:

$(1)$ Number of ways of drawing a sample of $r$ objects from a set of $n$ distinct object when order of drawing is important and we allow repetition.

$(2)$ Distributing $r$ distinct balls into $n$ distinct cells with any number of balls per cell.

However,the answer in all these cases is $n^r$, which is again consistent to the rule of product.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.