[Math] How many combinations in this 4 digit pin

combinatorics

The pin code is

  • 4 digits between 0-9
  • Can be entered in any order e.g 1234 4231 1324 will all work
  • has no repeating numbers

writing them all out i have 194 codes to try.

however the math gives me 210 codes
5040 different non repeating codes
24 ways to write each code

5040/24 = 210

have i overlooked something?

Thanks

Best Answer

You’re 100% correct.

There are 10 possible numbers for the first digit, and then you can’t use that number again, so 9 for the second, and using the same logic, 8 for the third and 7 for the fourth. That means there’s $10\times 9\times 8 \times 7 = 5040$ combinations. Divide this by the number of ways to order each one, 24, and you get 210, as you said.