Finding Cryptarithms via Computer Search



  (Two words, 8153274096)

     The ideal cryptarithm (a puzzle in which every digit is present, and the solution is unique) above may be the first ever published with two 12-letter coherent addends and a 12-letter coherent sum (all three words may be found in Webster's Second New International Dictionary (1948) and the Compact Oxford English Dictionary (1991)).   This was found by a custom program, part of the Puzzle Virtuoso suite of puzzle tools.  It works from a candidate list of words, and checks every pair of words (including duplicates) as addends, against every other word in the list as a possible sum.   It checks each possible puzzle (using the cryptarithm addition solver in Puzzle Virtuoso) to find those with exactly one solution, and in which every digit occurs (the above example is in ordinary base 10, but the program can potentially find solutions in other bases such as 11 or 12 (popular ones in cryptarithmetic puzzles).  The puzzle was the only valid one turned up by a search of 651 highly-patterned 12-letter words (extracted from a raw word list from Webster's Second, herafter abbreviated as NI2).   The extraction was done with a different PV module which generates pattern word dictionaries, in this case with an option set to filter out any patterns shorter than 8 digits (the three words have patterns 12-22413743, 12-224325173, and 12-224351537).  Similar searches have been performed on shorter words (a similar list of 355 11-letter words generated 177,092 potential puzzles, but only 10 valid ideals).   One was published in The Cryptogram (C-13 in SO16, p.26); two others appear below:

  BARBARITIES              ECLECTICISM              

(2 words, 2961754038)                (2 words, 0683742159)

Smallest Addition

     A different kind of search looks for an ideal addition with the smallest possible sum.    The smallest I have found is the following:

 +  DOOM  

 (2 words, 1-0)

Smallest single-digit multiplications

      I wanted to find an ideal multiplication cryptarithm (with a single-digit multiplier), with the smallest possible multiplicand.   The equation ABCD x E = FGHIJ has 13 solutions, so I made a list of every possible multiplication with a five-digit mutliplicand and five-digit product, with one repeated digit.   There are 55 possible multiplications; I copied each one into a multiplication solver (using Puzzle Virtuoso and two others).   Six of the multiplications have no solution, 42 have multiple solutions, and there are seven ideals.  From smallest to largest multiplicand:

    LLANO       SMITE       THING       ATLAS  
  x     D     x     P     x     R     x     O  
    STICK       ALOOF       OOZES       GUIDE  
   (2 words, 1-0)      (2 words, 1-0)      (2 words,         (3 words, 0-1)


    CANTS       GRUEL       LASSO              
  x     P     x     O     x     G                         
    BIBLE       STAFF       PRICE             
  (2 words, 1-0)     (2 words, 0-1)     (2 words, 9-0)

Nine odd words

      When I first tried composing coherent additions, I used pattern word dictionaries to find pairs of words which looked suitable (and had letters in common), then tried to find values which produced a sum to which I could match a third word.  I was successful on occasion, and produced three cryptarithms which were published in The Cryptogram (C-14 JA97, C-8 JF98, and C-14 ND98).   When I wrote a search tool to look for ideal additions, I put the nine words (average, decoder, organdy, coolest, terrace, deports, octopus, scallop, results) into it to see if it would reproduce the three additions.  To my astonishment, it turned up all three, plus six additional cryptarithms using combinations of words from different puzzles (two of the six include a repeated addend).  In addition, there are 3 more ideals in base 11 and 2 in base 12.   I do not know if this is a result of selecting pattern words, or if many groups of 9 seven-letter words would produce similar results.   But it seems remarkable to get 14 valid puzzles from a list of only nine words.


    Another search tool in Puzzle Virtuoso looks for a square root by testing a range of values (for example, every five-digit number with a nine-digit square), and compares the pattern of the desired root to the pattern of the first (five) letters of its square.   This program, at present, needs to be customized for each run.   Here is a live example I composed while writing this.  I wanted to find a square root cryptarithm with a solitaire theme, where the square root of STOREHOUSE is equal to DEMON.  I customized the program to check every possible value of DEMON with a ten-digit square (from 31624 to 98765) and check whether its square starts with a five-letter pattern (STORE) in which the E's and O's match, but no other digits are repeated.  This takes a minute or two to set up and a second or two to run.  It gave me a list of 9 possible solutions; I scanned by hand to see whether H could be assigned a value equal to or larger than the sixth digit of the square (three of the cases were unusable by this check).  I usually like to have roots without zeroes, and that gave me the following cryptarithm:

      D E M O N

(Two words, 2061795483, give an appropriate key for this discussion)