Use the Reverse Hamming Distance algorithm to calculate the percentage of character positions that differ between two strings, reading from right to left.
The Hamming Distance algorithm calculates a match score for two data strings by computing the number of positions in which characters differ between the data strings. For strings of different length, the algorithm counts each additional character in the longest string as a difference between the strings.
Reverse Hamming Distance Example
Consider the following strings, which use right-to-left alignment to mimic the Reverse Hamming algorithm:
1-999-9999
011-0
1-999-999
1
The highlighted characters indicate the positions that the Reverse Hamming Distance algorithm identifies as different.
To calculate the Reverse Hamming match score, the transformation divides the number of matching characters (9) by the length of the longest string (15). In this example, the match score is