Links between Minkowski metric, Hamming distance and Levenshtein distance

520 Views Asked by At

I know that Hamming distance is a particular case of Minkowski metric (with the specific definition of the subtraction).

Also it seems that Hamming distance is a particular case of a Levenshtein distance defined only on subset of strings with equal length.

Is it so?

And is Levenshtein distance a Minkowski metric?

1

There are 1 best solutions below

1
On BEST ANSWER

it seems that Hamming distance is a particular case of a Levenshtein distance

Not so. The Hamming distance between 01010101 and 10101010 is 8, but the Levenshtein distance is only 2: it takes two edits to turn the first sequence into the second. 010101010

is Levenshtein distance a Minkowski metric?

No. A Minkowski metric compares two strings by comparing characters at the same position: first to first, second to second, etc. Levenshtein distance is more subtle, involving comparisons between characters occupying different positions.