This article includes a list of general references, but it lacks sufficient corresponding inline citations. (May 2015) |
| |||
Class | String similarity | ||
---|---|---|---|
Data structure | string | ||
Worst-case performance | |||
Best-case performance | |||
Average performance | |||
Worst-case space complexity |
In information theory, the Hamming distance between two strings or vectors of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimum number of substitutions required to change one string into the other, or equivalently, the minimum number of errors that could have transformed one string into the other. In a more general context, the Hamming distance is one of several string metrics for measuring the edit distance between two sequences. It is named after the American mathematician Richard Hamming.
A major application is in coding theory, more specifically to block codes, in which the equal-length strings are vectors over a finite field.