The article takes a very weird turn:<p><i>If we need extra information about the words, we can use an additional data structure along with the MA-FSA. We can store it in a hash table.</i><p>This is not necessary at all, since an acyclic finite state automaton can be used as a perfect hash function. If you sum the right language cardinalities of the transitions followed, you get a unique hash code (1..n, where n is the number of strings in the automaton). For efficiency, you can precompute the cardinalities in the transitions or states. You can then use a normal array for whatever data you want to associate with a word.<p>With respect to parts 1 & 2 of the series, one can construct a Levenshtein automaton for a given word in linear time[1]. Such an automaton matches any string within the given edit distance of the word. You can then compute the intersection (language) of the Levenshtein automaton and the dictionary automaton to get all words within the given edit distance.<p>(Another approach would be to make the dictionary a transducer that returns the words within the given edit distance. I tried this once, but the resulting automaton would be too large for realistic dictionaries.)<p>I wrote a Java library for dictionary automata, perfect hash automata, and Levenshtein automata. It also provides immutable Map containers for String keys, that store strings in an automaton and uses a flat array to store values:<p><a href="https://github.com/danieldk/dictomaton" rel="nofollow">https://github.com/danieldk/dictomaton</a><p>[1] <a href="http://csi.ufs.ac.za/resres/files/Schultz.pdf" rel="nofollow">http://csi.ufs.ac.za/resres/files/Schultz.pdf</a>