The Hamming distance quantifies the difference between two strings of equal length by counting the positions at which their symbols differ. It is commonly used in information theory and computer science to assess dissimilarity, with smaller distances indicating higher similarity. For instance, the Hamming distance between the binary strings A=1011101 and B=1001001 is 2, as they differ at the 3rd and 5th positions.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
23 views4 pages
Hamming Distance
The Hamming distance quantifies the difference between two strings of equal length by counting the positions at which their symbols differ. It is commonly used in information theory and computer science to assess dissimilarity, with smaller distances indicating higher similarity. For instance, the Hamming distance between the binary strings A=1011101 and B=1001001 is 2, as they differ at the 3rd and 5th positions.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 4
Hamming Distance
• The Hamming distance is a measure of
difference between two strings of equal length. • It counts the number of positions at which the corresponding symbols (characters or bits) are different. • It is widely used in information theory, coding theory, and computer science to quantify the dissimilarity between two sequences. • For example, consider the binary strings A=1011101 and B=1001001 • The Hamming distance is: H(A,B)=2 because the two strings differ at the 3rd and 5th positions. A= 1 1 0 0 1 1 B= 1 1 0 0 1 1 Similarity and the Hamming Distance • While the Hamming distance measures dissimilarity, it can indirectly measure similarity. Smaller Hamming distances indicate higher similarity between two strings, while larger distances indicate more dissimilarity. • For example: • H(A,B)=0 implies A and B are identical. • As H(A,B) increases, the similarity between A and B decreases.