3-digit numbers not containing the same digits

combinatoricsprobability

Let S be the set of three-digit integers whose digits are from the set {1, 2, 3, 4, 5}. Three
distinct numbers are chosen from S. What is the probability that no two of these three
numbers have the same hundreds, tens, or units digit?

My try: since they must not have the same digits, each number will chose what digits they will use in {1,2,3,4,5}

Since there are 5 digits, we can split 5 into $1+2+2$ or $1+3+1$ pertaining to the number of distinct digits that they will use (e.g in the case 1+2+2, the 1st number uses only 1 digit, while the 2nd and 3rd number only uses 2 digits)

Case 1 : $2+2+1= 5$

$5C2 * 2^3 * 3C2 * 2^3 * 1C1 * 1 = 1920$

(the $2^3, 2^3, 1$ is pertains to the number of ways we can make a number using 2 digits, 2 digits and 1 digit respectively)

Case 2 : $3+1+1$

$5C1*1*4C1*1*3C3*3^3 = 540$

since there are $125C3$ ways if picking 3 numbers thus my answer is

$$\frac{1920 + 540}{125C3}$$

but the real answer is 144/1271. Did i miscount something or does my method not work? A solution with inclusion-exclusion would also be appreciated

Best Answer

First the number of 3 digit numbers that can be formed from the set $S$ is $5^3 = 125$. Three numbers are chosen from this set, this can be done in $125 \choose 3$ ways. Let us call these 125 numbers as set $S_1$. Now if there are no cases with the same number in same place value in any of the digits. The first number can be chosen in 125 ways. The second number can be chosen in $4^3$ ways (i.e, all numbers in $S$ except the digits of the first number for that place). The third number in $3^3$ ways by the same reasoning except every digit in a particular place cant be the same number from the previous 2 numbers.

$$ \frac{5^3 \times 4^3 \times 3^3}{125 \choose 3} $$

However, there will be $3!$ repetitions in this as there will cases where the same number from $S_1$ can be either the first number formed or the second number formed or the third.

Therefore the required probability is, $$ \frac{5^3\times 4^3 \times 3^3}{125\choose 3}\times \frac{1}{3!} = \frac{144}{1271} $$

Thanks to @N. F. Taussig for the input.

Related Question