# How many combinations in this 4 digit pin

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

• The number of codes is the number of ways to choose $4$ digits from $10$. This is $\binom{10}{4}$, which is $210$. As to the $194$, it can be surprisingly difficult to make a list that is complete and has no repetitions. – André Nicolas Jun 1 '16 at 0:06
• A couple of years behind but I just found this. Do banks even have a requirement that PINs cannot have repeating numbers? Which way would provide more possible combinations? – Hayden Jun 13 '18 at 13:51

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.