[Math] Probability that a number is divisible by 11

elementary-number-theoryprobability theory

The digits $1, 2, \cdots, 9$ are written in random order to form a nine digit number. Then, the probability that the number is divisible by $11$ is $\ldots$

I know the condition for divisibility by $11$ but I couldn't guess how to apply it here.

Please help me in this regard. Thanks.

Best Answer

Consider using the alternating sum division rule. We need to have the sum of $5$ digits - the sum of $4$ digits to equal a number divisible by $11$. Denote the sum of $5$ digits by $O$ and the sum of the 4 digits as $E$.

Thus, we want $O - E = (45 - E) - E = 45 - 2E$ (sum of digits 1-9 is $45$) to be divisible by $11$. Further, since $45 - 2E$ is odd, we know it cannot be $22$. So we have $45 - 2E$ could possibly equal $33,11,-11$, or $-33$. Note $33$ is not possible since $E \geq 1 + 2 + 3 + 4 > 6$, and $-33$ isn't possible because $E \leq 6 + 7 + 8 + 9 < 39$.

For $E$ to satisfy $45 - 2E = - 11$, we must have that $E = 28$. Since $6 + 7 + 8 + 9 = 30$, we can quickly see that the only possibilities are $\{4,7,8,9\}$ and $\{5,6,8,9\}$.

For $E$ to satisfy $45 - 2E = 11$, we must have that $E = 17$. We wish to find distinct integers $a,b,c,d$ between $1$ and $9$ such that $a + b + c + d = 17$. This can be solved with combinatorics, though here it might be easier to enumerate. To make this easier, consider the possible combinations of $x,y,z,w$ solving $x + (x + y) + (x + y + z) + (x + y + z + w) = 17$, where $x = a$, $y = b - a$, $z = c - b$, $w = d - c$, and $x,y,z,w \geq 1$. We can normalize each variable (ex: $x' = x - 1$) to find the equation $x' + (x' + y') + (x' + y' + z') + (x' + y' + z' + w') = 7$, or $4x' + 3y' + 2z' + w' = 7$, where $x',y',w',z' \geq 0$. There aren't very many possible combinations, and enumerating gives us $11$ different combinations. However, we have to watch out for the few cases where we have a number bigger than $9$; there are exactly two of these cases, which is $\{1,2,4,10\}$ and $\{1,2,3,11\}$.

We now have $2$ ways to get $45 - 2E = 28$, and $9$ ways to get $45 - 2E = 17$. Thus we have a total of $11$ possible ways to select the set of $4$ digits. However, we need to consider permutations, so we multiply $11$ by $5!$ and $4!$ to get $31680$ permutations divisible by $11$. Dividing by the total number of permutations $9!$ gives us a probability of approximately $.0873015873$

Related Question