This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

HammingDistance

HammingDistance
gives the Hamming distance between strings or vectors u and v.
  • HammingDistance gives the number of elements whose values disagree in u and v.
Hamming distance between two strings:
Hamming distance between two vectors:
Hamming distance between two strings:
In[1]:=
Click for copyable input
Out[1]=
 
Hamming distance between two vectors:
In[1]:=
Click for copyable input
Out[1]=
Compute distance between any strings of equal length:
Compute distance between any vectors of equal length:
Obtain Hamming distance, ignoring case of letters:
Cluster string data using Hamming distance:
Cluster numeric data using Hamming distance:
HammingDistance is equivalent to ManhattanDistance for 0, 1 data:
HammingDistance is greater than or equal to EditDistance:
New in 6