[Math] How many different numbers can you make with the following digits

combinatorics

How many different numbers can you make with the following eight digits?

$1, 2, 2, 3, 3, 3, 0, 0$

The problem I encounter is how to include numbers that aren't 8 digits long? For instance the number 12.

I know the answer for 8 digit numbers (assuming zero can be a starting digit):

$\frac{8!}{2!3!2!}$

But I can't seem to figure out how to include all the other numbers that aren't 8 digits long.

Best Answer

Here's how I'd do it.

Count all of the one-digit numbers. Count all of the two-digit numbers. Rinse and repeat until you've counted all of the eight-digit numbers.

You'll want to determine up-front whether $0012, 012,$ and $12$ are the same numbers, or different numbers.

There are obviously $4$ one-digit numbers.

If we don't have leading zeroes, then there are three choices for the first digit. If the first digit is $1$, then we have three choices for the second digit. Otherwise, four choices. So, $11$ two-digit numbers (no leading zeroes).

If we allow leading zeroes, we have $15$ two-digit numbers.

For three-digit numbers, the number may consist of one, two, or three different digits. There are $4$ ways to choose three different digits, $6$ ways to choose two of one and one of another, and $1$ way to choose the same digit for all three places. Count up the number of arrangements in each case.

You've done the eight-digit number case. For seven- and six-digit numbers, it's probably easier to count the cases here by removing one and two digits from the group, respectively. For seven-digit numbers, the number of arrangements depends on which digit you remove from the group.

For four- and five-digit numbers, choose your poison.

Related Question