How many decimal n-tuples contain at least one each of {1,2,3}?
Decimal n-tuples are n-tuples of $\displaystyle \{1,2,3,4,6,7,8,9,0\}$ which has cardinality of 10.
From PLATO's hint on computing the number of distinct n-tuples from a set of cardinality 10:
$\displaystyle \{1,2,3,4,5,6,7,8,9,0\}\setminus\{1,2,3\}=\{4,5,6, 7,8,9,0\}$
Use PLATO's hint to compute how many n-tuples can be made from the remainder set $\displaystyle \{4,5,6,7,8,9,0\}$ of cardinality 7. Then substract from the number of distinct n-tuples from a set of cardinality 10.
qtpipi,
Could you please clarify the question?
Do you want the number of tuples that contain at least one each of all the digits 1,2,3-- for example, 93321-- or do you want the number of tuples that contain at least one 1, at least one 2, or at least one 3-- for example, 99111?
Neat!
I am sure there is more than one way to solve the problem. I would have said (looking at the original problem rather than the complementary question) that the number of decimal n-tuples which contain at least one each of 1, 2, and 3 is
$\displaystyle 10^n - 3 \cdot 9^n + 3 \cdot 8^n - 7^n$.
Why? Because that is the coefficient of $\displaystyle \frac{1}{n!} x^n$ in
$\displaystyle e^{7x}\;(e^x - 1)^3$.
(Exponential generating functions... gotta love them.)