Levenshtein distance
The difference from the algorithm for Levenshtein distance is the addition of one recurrence: