It will just be a more confusing schedule search (also find a way into the dungeon where some of the doors are broken and need to be opened and you want to get rid of your legs).
The details are highly dependent on what you mean by "mistake." Therefore, I believe that a βmistakeβ is a replacement for one character, this is the simplest case.
In the algorithm, you will search for a tree from the root, comparing and promoting your template, as if you were looking for an exact match. Simply, if there was a symbol on the edge that you cannot follow, you save the state of your algorithm for a later one (state [tree position, pattern position] ). This should apply even if you can follow one link for a node, but not another - you follow the match and save the rest.
Then you return to the saved positions and emulate the substitution, which means advancing one position in the tree (to all possibilities without possibility) and one position in the template. Then continue the search as usual (you took the opportunity of one error, so now you are looking for an exact match).
Whenever you reach the end of the pattern, report a successful match (i.e. all leaves below the current node in the tree).
source share