A security code consists of 4 different digits selected from 0 through 9. No digit may be repeated. How many different codes are possible?

Solution

Probability · Medium

Step 1: Determine whether order matters.

For a security code, order matters. For example, 1234 and 4321 are different codes.

Therefore, this is a permutation problem.

Step 2: Count the choices for the first digit.

A security code may begin with 0, so there are 10 choices for the first digit.

Step 3: Count the choices for each remaining digit.

Because digits cannot repeat:

There are 9 choices for the second digit.
There are 8 choices for the third digit.
There are 7 choices for the fourth digit.

Step 4: Apply the multiplication principle.

Number of codes = 10 × 9 × 8 × 7

Step 5: Calculate.

10 × 9 = 90
90 × 8 = 720
720 × 7 = 5040

Therefore, 5,040 different security codes are possible.

Result

5,040 codes