Alphametic Puzzle Generator

This page will allow you to search for alphametic puzzles (for a description of what they are and for some examples, see my alphametics page) among a group of words. These puzzles are rare, but given a number of words to use, it's not unusual to find one or two. I've also written a web-based solver for these puzzles.

The generator will search for puzzles among all the permutations of the words given and find all puzzles conforming to the specified parameters. For an example of how to use it, see the bottom of this page.

You need to enter at least three words (two if you allow duplication), or there won't be enough options for summands and a sum. If you want to try to find puzzles with the possibility of duplicated summands, you can set the button to allow repeated words. Note that allowing words to appear as summands more than once means that the maximum possible number of summands isn't limited by the number of words you enter, so set the maximum summands limit appropriately.

Try searching among all of the names in your family, or terms related to a hobby, or something you're interested in. If you find any good ones, I'd be interested if you'd email me about them.

Note: The C program I wrote to search for these puzzles is very fast, however, a large enough list of words (15 to 20 or so) can bog it down. The program will terminate after about twenty seconds of time so as not to use up too much CPU time. The amount of searching will depend partly on the how busy my machine is when you run it, as well as characteristics of the words themselves. See the bottom of this page for more technical information about how the solver works and what to do if it runs out of time.


What base do you want to search for puzzles in (10, normally)?

Minimum number of summands:

Maximum number of summands:

Do you only want puzzles with one solution?
      Yes (only puzzles with exactly one solution will be generated)
      No (puzzles with one or more solutions will be generated)

Do you want to only look for puzzles with the first listed word as the sum?
      No (search for puzzles with any of the listed words as the sum word)
      Yes (use only the first word listed as the sum word)

Do you want to allow repeated words among summands?
      No (all summands will be unique)
      Yes (repeated summands are allowed. This will increase processing time)

Enter the words to search for puzzles, one word per line:

Example:
mercury
venus
earth
mars
jupiter
saturn
uranus
neptune
pluto


Example: Look for puzzles among the names of the planets where the word 'planets' is the sum.

Use base 10, set minimum summands to 2 and maximum to 9. Ask for puzzles with only one solution, and select 'Yes' to only look for puzzles with the first listed (planets) word as the sum.
Don't allow repetition.

Enter the following words and make sure 'planets' is first:

planets
mercury
venus
earth
mars
jupiter
saturn
uranus
neptune
pluto
After you press the submit button, it should find the following puzzles:
SATURN + URANUS = PLANETS
MARS + SATURN + URANUS + NEPTUNE = PLANETS
SATURN + URANUS + NEPTUNE + PLUTO = PLANETS


Technical Details

If the solver terminates because it ran out of time, there are several things you can do. Usually the best thing to try first is to reduce the range between the minimum and maximum summands. For example, if you want to look for puzzles with from 2 to 6 summands, you can get the same results asking for from 2 to 3 in one run and 4 to 6 in another run. Allowing repeated words for summands can increase processing time significantly, so disallowing them will help. Additionally, you may want to shorten the list of words, only ask for puzzles with one solution, or ask for puzzles with a specific word as the sum. For anyone using bases other than ten, larger bases take more time. There's not a specific number of words that's a limit because how long the analysis will take depends on the words in the list. Since the time limit is based on clock time instead of CPU time, using this generator when my ISP is less busy will get you farther. When exactly that is I don't know, but I'd guess that late night and early morning Pacific time would be a good bet.

The program searches for puzzles among all of the permutations of the words given, but it weeds out ones that can't have solutions due to word length or having more letters than the specified base. For example, "I + LOVE = ANN" can't have a solution because the sum is too short, and "HILLARY + RODHAM = CLINTON" has too many letters to have a solution in base 10. The permutations not easily weeded out in one of these ways are potential puzzles. For each of these the program tries to find one or more solutions. The program uses a smart depth-first search from the left to the right of the puzzle. With average length words and a machine that's not too heavily loaded, it will do about 300 of these searches a second.


12,147 visits (2 today, 23 this week, 108 this month, 498 this year) since November 10, 2013.

76,414 visits between January 3, 2000 and November 10, 2013 at a different URL.

Back to my alphametics index.
Back to my homepage.

Copyright 2000 by Truman Collins
For comments, email: Truman Collins (truman.collins+alpha@gmail.com)
Most recent update: January 24, 2015
http://www.trumancollins.net/truman/alphamet/alpha_gen.shtml