Tuesday, July 9, 2019

mathematics - Alphametic with modulo


Solve this alphametic


$ABCDEFG$ $mod$ $(A×B×C×D×E×F×G) = 0$


example :



$ABCDE$ $mod$ $(A×B×C×D×E) = 0$
$13248$ $mod$ $(1×3×2×4×8) = 0$


Note :



  • Do not replace any letter with 0.

  • Each letter represent different digit.

  • There is only one solution.



Answer



A simple computer search quickly yields




1687392.



Is a computerless solution required?


[EDITED to add the following: first steps toward a computerless answer.]


Let's see what we can do. So we have seven digits chosen from 123456789. We must include at least one of {3,6,9} so the number is going to have to be a multiple of 3. We must include at least two of {2,4,6,8} so it has to be a multiple of 12.


If one of our digits is 5 then the number is a multiple of 10 and therefore ends in 0, which isn't allowed. So we are actually choosing seven digits from 12346789. Now we have only four odd digits so we must have three from {2,4,6,8}.


More specifically, either we take all of {1,3,7,9} and three of {2,4,6,8}, in which case we get a multiple of 9072 or of 12096, depending on whether we use the 6 or not; or else we take all of {2,4,6,8}, in which case we get a multiple of 8064 or 10368, depending on whether we use the 7 or not.


We can rule out some of these. If we take all of 1379 and three of 2468, the possible digit-sums mod 9 are 5 (from 246), 7 (from 248), 0 (from 268), 2 (from 468). Since one of the digits is 9, we must pick the third of these. So if we use all of 1379 then in fact our digit-set is 1236789.


On the other hand, if we take all of 2468 and three of 1379 then again we necessarily get a multiple of 9 (from 6 and either 3 or 9); the possible digit-sums mod 9 are 4 (from 137), 6 (from 139), 1 (from 179), 3 (from 379) -- none of these can be a multiple of 9.



So our digit-set must be 1236789 and our number must be a multiple of 18144. There are about 500 multiples in range, which is still rather a lot to do computerless.


No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...