It's fun to think of the regular expression which matches all strings off by Levenshtein=1. For "hello" it's something like: hello|ello|hllo|helo|hell|.hello|h.ello|he.llo|hel.lo|hell.o|hello.|.ello|h.llo|he.lo|hel.o|hell.
This seems pretty easy to generate the NFA for this, then compile it to a DFA as usual.
This seems pretty easy to generate the NFA for this, then compile it to a DFA as usual.