the cost for DistanceMatrix(i, j)
the cost of an insertion or deletion
the lower cost and associated operation of a deletion, substitution or insertion in case of equality between a non-substitution and an insertion/suppression we select the insertion/suppression in order to group all the differences together diff("abcd", "acbd") ==> ("a[bc]d", "a[cb]d"). the distance is 2, otherwise diff("abcd", "acbd") ==> ("a[b]c[]d", "a[c]b[]d")
the cost of a substitution
Evaluate the distance between 2 strings by counting the number of insertions, suppressions or substitutions which are necessary to transform one into the other