The sum forms a necessary but not sufficient condition for being within a certain Levenshtein distance. In your example, the inequality I gave above does not apply since |c1-c2| = 0. You would have to calculate the Levenshtein distance. In cases where the inequality is satisfied, you do not have to calculate the Levenshtein distance at all.
The idea is that any edit operation on a string will at most change the letter sum by |A|.
The idea is that any edit operation on a string will at most change the letter sum by |A|.