You are viewing a single comment's thread from:

RE: Brainsteem #9 Prize Maths Puzzle [Win 40% and 10% in SBD]

in #mathematics7 years ago

Ok, so this isn't a timely solution but hopefully a complete one.

The sum of the digits in the 9-digit number is always 45, so we know the number is divisible by 9 and only need to check for divisibility by 11. With a number of the form ABCDEFGHI, we want [(A+C+E+G+I) - (B+D+F+H)] to result in some multiple of 11.

When adding together any number of integers, if there are an odd number of odd integers in the group, the sum will be odd. If there are an even number of odd integers, the sum will be even. So no matter how the digits are split, if the 5-digit group has an odd sum then the 4-digit group has an even sum; if the 5-digit group's sum is even, the 4-digit group's sum is odd. Then whenever we subtract two integers, if one is odd and the other is even the result will always be odd.
Therefore we only care about [(A+C+E+G+I) - (B+D+F+H)] having a result of -11 or 11.

Let x = A+C+E+G+I, and let y = B+D+F+H. Then we have a system of linear equations:

x + y = 45
x - y = 11

2y = 34 -> y = 17, x = 28. If we use x - y = -11 instead, then x = 17 and y = 28.

So we want groups of 4 or 5 digits that sum up to 17 or 28. It's easier to just deal with the groups of 4 digits. Those groups are: 1259, 1268, 1349, 1358, 1367, 1457, 2348, 2357, 2456, 4789, and 5689. Each group can be permuted in 4! (24) ways as digits B, D, F, and H; thus the other 5 digits can be permuted in 5! (120) ways as digits A, C, E, G, and I.

The probability of one of these 9-digit numbers being divisible by 99 then is: (11 * 4! * 5!)/9! = 11/126.
The sum m + n then is 11 + 126 = 137

Coin Marketplace

STEEM 0.18
TRX 0.16
JST 0.030
BTC 67773.53
ETH 2617.28
USDT 1.00
SBD 2.71