A six digit number is formed randomly using digits $\{1,2,3\}$ with repetitions. Choose the correct option(s):

combinatoricsprobabilityproof-explanationsolution-verification

A six digit number is formed randomly using digits $\{1,2,3\}$ with repetitions. Choose the correct option(s):

  • A) Probability that all digits are used at least once is $\dfrac{20}{27}$
  • B) Probability that digit $1$ is used odd number of times and $2$ is used even number of times is $\dfrac{1-3^{-6}}4$
  • C) Probability that all digits are used as well as odd digits are used odd number of times and even digit is used even number of times is $\dfrac{3^6-2^7+1}{4\cdot3^6}$

Total cases = $3^6$

  • A) All digits used at least once = Total cases$-$Cases when one digit is not used

Or, would it be

All digits used at least once = Total cases$-$Cases when one digit is not used$-$Cases when two digits are not used

In any case, I am not getting $\frac{20}{27}$

  • B) $1$ can be used $1$ or $3$ or $5$ times. $2$ can be used $0$ or $2$ or $4$ times.

So, favorable cases=$^6C_1(^5C_0+^5C_2+^5C_4)+^6C_3(^3C_0+^3C_2)+^6C_5=182$, and it matches with the answer.

But the answer given in the option is of different format $\dfrac{3^6-1}{4\cdot3^6}$. Looks like they are subtacting $1$ from the total cases and diving by $4$ to get the favorable case. Why?

  • C) $1$ can be used $1$ or $3$ or $5$ times. $2$ can be used $2$ or $4$ times.

So, favorable cases=$^6C_1(^5C_2+^5C_4)+^6C_3(^3C_2)+^6C_5=156$

But as per the option, favorable cases= $150.5$. Also, looks like they are subtracting $2^7-1$ from total cases and then diving by $4$, what could be the motivation for this, even if this is wrong?

Best Answer

For the first, it is application of Principle of Inclusion Exclusion or we can simply work as follows -

Total count of $6$ digit numbers $ = 3^6$

Count of numbers where one of the digits is missing $ = 3 \cdot (2^6 - 2)$

Count of numbers where two digits are missing $ = 3$

So the answer for $(a)$ is $ = \dfrac{3^6 - 3 \cdot 2^6 + 3}{3^6} = \dfrac{20}{27}$

For the second, your working is correct but another way to solve it would be,

Count of $6$ digit numbers where $1$ appears odd number of times and $2$ appears even number of times,

$ \displaystyle {6 \choose 1}\frac{2^5}{2} + {6 \choose 3}\frac{2^3}{2} + {6 \choose 5} = 182$

Explanation: Take the first term where $1$ occurs once. We choose a place for it from $6$ digits. Rest $5$ digits are made up of $2$ and $3$. In half of the numbers, $2$ will occur even number of times $(0, 2, 4$ times) and in other half it will occur odd number of times $(1, 3, 5$ times). Similarly other terms.

Now given first and second are correct. It must be third that is incorrect. Now notice that the third is a subset of second. In second, as $1$ occurs odd number of times, $2$ occurs even number of times and so $3$ occurs odd number of times. But in third, we need to subtract cases from second where $2$ was missing (occurred zero times). Can you take it from here?