Substitute each of the letters by a different digit from 0 to 9 to satisfy this system of alphametic equations. None of the numbers as well as none of the exponents contains a leading zero.
- (DID)W = FXA, and:
- (FLY)A = YLI, and:
- (LOW)O = ILT
using the following code
digs = Table[i, {i, 0, 9}];
prms = Permutations[digs];
cnt = 0;
lng = Length[prms];
For[pi = 1, pi <= lng, ++pi,
lst = prms[[pi]];
d = lst[[1]];
i = lst[[2]];
w = lst[[3]];
f = lst[[4]];
x = lst[[5]];
a = lst[[6]];
l = lst[[7]];
y = lst[[8]];
o = lst[[9]];
t = lst[[10]];
If[a == 0 || o == 0 || t == 0,
did = FromDigits[{d, i, d}];
xa = FromDigits[{x, a}];
fly = FromDigits[{f, l, y}];
li = FromDigits[{l, i}];
low = FromDigits[{l, o, w}];
lt = FromDigits[{l, t}];
If[did^w == f^xa && fly^a == y^li && low^o == i^lt,
++cnt;
Print["Solution ", cnt, ":"];
Print[did, "^", w, "=", f, "^", xa, "=", f^xa];
Print[fly, "^", a, "=", y, "^", li, "=", y^li];
Print[low, "^", o, "=", i, "^", lt, "=", i^lt];
];
];
];
gives the following lone solution
343^6=7^18=1628413597910449
729^8=9^24=79766443076872509863361
256^5=4^20=1099511627776
|
Posted by Daniel
on 2010-08-05 11:52:53 |