As you can see, factorial grows very fast, even faster than exponential functions. You will also notice that 5! = 120, and this is my 120th Wednesday Math post.
Let's say I have a five letter word, such as PARSE. How many different ways are there to rearrange the letters, like they do in the Jumble puzzles in the newspaper? The idea is that five different letters could be in the first position, and then four different letters could be in the second position, then three, then two then one, so the number of scrambles of PARSE is 5! or 120.
(Note: PARSE would never be used in the Jumble puzzle, because those five letters spell multiple English words, including SPARE, PEARS, PARES, RAPES, REAPS, etc.)
What if there is a repeated letter, like in the word ARENA? If I switched the first A and the second A, the word would look the same. What we do is count the number of times each letter shows up.
A shows up 2 times. R, E, N, show up 1 time each.
The total number of re-arrangements is 5!/(2!*1!*1!*1!) = 60.
What about the six letter word BANANA? Again, we need to count the appearances in the word of each letter.
B shows up 1 time. A shows up 3 times N shows up 2 times.
The total number of re-arrangements is 6!/(1!*3!*2!) = 720/12 = 60.
This may seem like a weird question, but how many times does Q show up in the word BANANA? Obviously, the answer is 0 times, but if we were to include this in the equation, that would mean dividing by 0!. If 0! = 0, our formula would fall apart, but if 0! = 1, the formula works even if we count how many times every letter in the alphabet appears in a word.
In books that introduce this idea, it is very common to ask the question how many different ways are there to rearrange the letters in MISSISSIPPI. You can try this one on your own, if you like. The answer is in the comments.