QUESTION:
The code for a lock consists of 5 digits (0-9). The last number cannot be 0 or 1. How many different codes are possible.
ANSWER:
Since in this particular scenario, the order of the numbers matter, we can use the Permutation Formula:–
- P(n,r) = n!/(n−r)! where n is the number of numbers in the set and r is the subset.
Since there are 10 digits to choose from, we can assume that n = 10.
Similarly, since there are 5 numbers that need to be chosen out of the ten, we can assume that r = 5.
Now, plug these values into the formula and solve:
= 10!(10−5)!
= 10!5!
= 10⋅9⋅8⋅7⋅6
= 30240.