Closed arnaud-m closed 1 year ago
In fact, the third example including a word with fixed digit makes no sense.
Let us consider the classical SEND+MORE=MONEY
.
9END+108E=10NEY
: how do we store that M=1
, O=0
... ?9END+M08E=10NEY
is wrong because M
is already assigned 1. In fact, the information must be given as a pair (cryptarithm, partial solution).
So, the grammar must be extended as follows.
At this time, a sequence of digits is always parsed as a word.
The grammar must be extended so that a sequence of numbers can also be parsed as a number.
Here are a few examples of new cryptarithms.