# Number of words of length $l$ using $n$ characters

Given length of word $l$ and number of characters available $n$. Find the total number of words that can be formed using available characters of length $l$.

Example:
$l=2$
available char $(0,1)$
$n=2$
words $\rightarrow$ $00$, $01$, $10$, $11$
$l=3$
$n=2$
words $\rightarrow$ $000$, $001$, $010$, $011$, $100$, $101$, $110$, $111$

• i tried but not get any successful formula :( or pattern – user85857 Aug 9 '13 at 8:23
• Do you know about the product rule? – Tomas Aug 9 '13 at 8:25

1. You have $l$ places in a word and you can independently choose one of the $n$ letters for each place.
2. Suppose you know how many words of length $l-1$. Each word of length $l$ can be constructed as a word of length $l-1$ concatenated with some letter at the end. So, for each word you have $n$ options of choosing the last letter. You get a recurrent formula $W_l = n \cdot W_{l-1}$.