How many 6-digit numbers can I write?

767 Views Asked by At

I have a statement that says:

With the numbers $1, 2, 3$ How many of them contain all the digits $1$, $2$ and $3$ at least once?

I must have a number as _ _ _ _ _ _ , with $1, 2, 3$ at least once and with any position, so its possible positions are $6 * 5 * 4 = 120$, also the others 3 digits, can be {$1, 2, 3$} and can repeated so is $3^3 = 27$, and applying multiplicative principle, $120 * 27 = 3240$, but the result is totally wrong, what is wrong in my development ?

2

There are 2 best solutions below

4
On BEST ANSWER

Total ways to write this: $3^6=729$

Don't include the number '1': $2^6=64$

Thus, the number of ways can be calculated by take away ways that don't include 1,2 or 3, which is $$729-3*64+3=540$$ since 111111, 222222 and 333333 are counted twice.

4
On

An example of your error is when you overcount $\color{blue}{321}\color{red}{111}$ and $\color{blue}{32}\color{red}{111}\color{blue}1$ (The blue represents the three numbers you picked first).