How many 8 digit numbers can be formed using the digits 1,2 and 3 so that the number contains at least one of each of these three digits?
2026-04-12 08:42:47.1775983367
On
Possible ways of 8 digit numbers using 1,2 and 3 such that the number has atleast one digit for each 1,2,and 3
3.4k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
2
On
- The total number of combinations is $3^8$
- The total number of combinations with only $1$s or $2$s is $2^8$
- The total number of combinations with only $1$s or $3$s is $2^8$
- The total number of combinations with only $2$s or $3$s is $2^8$
- The only combination with only $1$s is $11111111$
- The only combination with only $2$s is $22222222$
- The only combination with only $3$s is $33333333$
Hence the answer is $3^8-2^8-2^8-2^8+1+1+1=5796$
(the single-digit numbers are counted twice, so we need to "uncount" them)
First of all we can choose 3 places from 8 places in $C(8, 3) = \frac{8!}{3!5!}$. ways. Then in that places we fix 1,2, and 3. And that can be done in $3!$ ways. Rest of the places can be filled with $3^5$ ways (because each place can be filled in three ways either by 1 or 2 or 3)
The answer will be $C(8, 3) = \frac{8!}{3!5!}.3! \times 3^5$