# Really simple combinatorics question - Composition of n number strings

I'm doing a bit of revision and want to make sure I'm doing these two questions correctly. They are as follows:

Two n-digit (leading zeros allowed) numbers are considered to be equivalent if one is a rearrangement of the other.

a) What is the largest number of 5-digit numbers that can be produced so that no two are equivalent?

I think this just an unordered selection of 5 numbers from 10 options with repetition allowed. So ${{10+5-1} \choose {5}} = { 14 \choose 5} = 2002$

b) What is the largest number of 5-digit number that can be produced so that no two are equivalent and none on the digits 1, 3, 7 appear more than once.

Assuming part a) is correct we can use inclusion-exclusion with the conditions:

$c_1: 1$ appears more than once

$c_2: 3$ appears more than once

$c_3: 7$ appears more than once

$\bar{N} = {14 \choose 5} - 3{12 \choose 3} + {3 \choose 2}{10 \choose 1} = 1372$

Is this correct? If not could you point out where I went wrong?

Thanks

-
Yes, it looks fine. –  Brian M. Scott Jun 6 '12 at 2:34