SUBANAGRAM
Program to Find Subanagrams


SUBANAGRAM is a FORTRAN90 program which creates a list of subanagrams of a master word; the user can require that the subanagrams be at least a given number of letters in length.

For instance, given the minimum length requirement of 4 letters, and the master word sprite, there are as many as 85 subanagrams, including:

        ires
        pert
        pest
        pets
        pier
        piers
        pies
        ...(more)...
        tires
        tries
        trip
        tripe
        trips
      

The program simply opens a large "dictionary file" containing a list of words, and checks whether any word in the file matches the length requirement, and is a subanagram of the master word.

Every word list has peculiarities, that is, it includes words that a user may reject, and it omits words that a user might have accepted. Hence the output of this program is only a reasonable estimate of the subanagrams of a given word; a user must examine the list carefully and may find many words that need to be deleted, and may think of others that could be added.

Textropolis is an iPhone application which presents you with the name of a city and asks for as many words as you can form, using only the letters in the city name. It also wants the words to be at least 4 letters long. This program can be used to generate a list of candidate words for Textropolis's puzzles. However, Textropolis's dictionary file is quite different from the one used by this program, so many words found by this program are rejected, and Textropolis allows some words unknown to the dictionary file used by this program.

Dedication:

This program is dedicated to Vivian Benton.

Usage:

subanagram min_length master_word
where

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

SUBANAGRAM is available in a FORTRAN90 version.

Related Data and Programs:

ANAGRAM, a C++ program which computes anagrams of a word or phrase.

LADDERS, a C program which seeks to transform one five letter word into another, by changing one letter at a time, using only legitimate English words. This puzzle was invented by Lewis Carroll, who called it "Doublets", but it is also known as "Word Ladders" or "Word Gold". The program is by Donald Knuth.

PUZZLES, FORTRAN90 programs which were used to solve puzzles.

WORDS, a dataset directory which contains lists of words.

WORDSNAKE, a FORTRAN90 program which rearranges a list of words so that they have maximum overlap;

Source Code:

Examples and Tests:

List of Routines:

You can go up one level to the FORTRAN90 source codes.


Last revised on 28 August 2009.