SEARCH HOME
 Math Central Quandaries & Queries
 Question from Mike: I need to know all the possible 3 digit combinations using the numbers 0-9. The numbers can be repeated as long as they are not of the same set. Example for not repeating: 123 is ok but not 321 or 231,132,213, etc. Please help me. Thanks, Mike.

Hi Mike.

If order mattered, we would say select the first number (10 choices), then the second (9 choices) then the third (8 choices). So there would be 10 x 9 x 8 = 720 possible choices.

But because order does not matter, we have to take care of duplicates as you mentioned. How many duplicates are there for each set of three numbers? Well, again, we can choose one of the three as the "first", so there are 3 choices for that, then 2 choices for the "second" digit, then 1 choice for the last digit. There are, you see, 3 x 2 x 1 = 6 possible ways of arranging the three digits.

Therefore in that set of 720 possibilities, each unique combination of three digits is represented 6 times. So we just divide by 6.

720 / 6 = 120.

These are what are mathematically called "combinations". You can use a formula involving factorials to determine the number of combinations.

In this case, we say this is "10 Choose 3" and write it as 10C3. That means from a set of ten (digits in
this case), choose 3 regardless of order.

The formula for nCm is

nCm = n! / [ m! x (n-m)!]

So in your question, we have

10C3 = 10! / [3! x (10-3)!] = 10! / [3! 7!]
= (10 x 9 x 8 x 7!) / [ (3 x 2 x 1) 7!]
= (720) / 6 ... because the 7! on the top and bottom cancels.
= 120 as we expected.

For more information on Combinations and their close cousins Permutations (where order matters), look up these words in our Quick Search.

Cheers,
Steve La Rocque.

In December 2021 we received a note from Doug to say that he thought Steve's answer to Mike was incorrect. He felt so since Steve didn't allow combinations such as 000, 111, or 011. In Mike's question he said "The numbers can be repeated as long as they are not of the same set." and Steve interpreted that to mean that the combinations Doug mentioned were not valid. If Steve's interpretation is correct then there are 120 valid combinations.

If however such combinations are allowed then there are 10 combinations with the same digit repeated three times, 000, 111, ... , 999. For combinations with a digit repeated twice and a different digit in the remaining position there are 10 choices for the digit to be repeated twice and then 9 choices for the third digit giving 10x9=90 combinations. Hence, as Dough pointed out, in this case there are

120 + 10 + 90 = 220

valid combinations.

Math Central is supported by the University of Regina and The Pacific Institute for the Mathematical Sciences.