Two-digit codes:
The first digit can be any one of 5. For each of those . . .
the second digit can be any one of the remaining 4.
Total 2-digit possibilities = (5 x 4) = 20 .
Three-digit codes:
The first 2 digits are as above.
The 3rd digit can be any one of the remaining 3.
Total 3-digit possibilities = (5 x 4 x 3) = 60 .
The pattern is:
The number of n-digit possibilities = 5 ! / (5 - n) !
(The symbol " ! " means "factorial" ... the product of all
the whole numbers from 1 up to the number.)
Five-digit codes: Using the pattern ...
Number of 5-digit possibilities =
(5 !) / (5 - 5) ! = 120 / 0 !
That ' 0 ! ' is awkward, and hard to explain. For the time being,
I'll just have to ask you to accept that ' 0 ! ' is defined as ' 1 ' .
Then the number of 5-digit possibilities is 120 .