This problem appears on the mathematics stackexchange, which I summarize here as:
12 letters (a, b, c, d, e, f, g, h, k, l, m, n), are used to represent single digits, i.e., {0-9}. Given the following:
- d e f + f e f = g h h
- k l m + k l m = n k l
- a b c + a b c + a b c = b b b
There are a finite number of possibilities, so we can march through them and test, but is there smarter way to find the digits?
A naive application of Solve
shows a trivial solution:
Solve[{3 c == Last@IntegerDigits[x],
Last@IntegerDigits[x] == b,
3 b + First@IntegerDigits[x] == Last@IntegerDigits[y],
Last@IntegerDigits[y] == b,
3 a + First@IntegerDigits[y] == b},
{a, b, c, x, y}]
(* {{a -> 0, b -> 0, c -> 0, x -> 0, y -> 0}} *)
What's the best way to use Mathematica to crack the code (identify the digits a through n)?