arnaud-m / cryptator

A constraint-based cryptarithm solver
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Allow numbers in a cryptarithm #25

Closed arnaud-m closed 1 year ago

arnaud-m commented 2 years ago

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.

10 * A = BC
10 * A10 = 'ABCD'
10 * "10A" = "ABCD"
10 * '10A' = 'ABCD'
arnaud-m commented 2 years ago

In fact, the third example including a word with fixed digit makes no sense. Let us consider the classical SEND+MORE=MONEY.

In fact, the information must be given as a pair (cryptarithm, partial solution).

So, the grammar must be extended as follows.

arnaud-m commented 1 year ago