Author Notes
Dudeney's alphametic puzzle "SEND+MORE=MONEY" is widely known to have the solution 9567+1085=10652.
For our purpose, an alphametic problem is a string containing one and only one equal character separating two substrings. The substrings consist of words connected by arithmetic operations (+, -, *, /, ^). Parentheses are also allowed.
A character substitution rule is a one-to-one mapping of letters to digits in such a manner that no word starts with zero.
A particular character substitution rule is the solution of the puzzle if the two substituted substrings evaluate to the same numeric quantity. Often only the substituted form is given as the solution of the puzzle (see the first sentence of this paragraph).
A problem may have no solution, a unique solution or several solutions, but uniqueness is highly appreciated.
From a programming point of view, an alphametic—being a combinatorial problem—can be easily solved by total enumeration. The resource function Alphametic is more effective due to utilizing backtrack search and interval arithmetic.