Given two squences (or strings) of symbols in an alphabet \mathcal{L}, the Hamming similarity is a function HammingSim:\mathcal{L}^*\times\mathcal{L}^*\longrightarrow [0,1] that measures the number of positions for which the corresponding symbols are equals, divided by the length of the bigest sequence:


where IdSim is the Identity similarity.

Examples Edit

  • HammingSim('house','horse') = 4/5 = 0.8.
  • HammingSim('abcd',' ') = 0/4 = 0.
  • HammingSim('abcd','a') = 1/4 = 0.25.
  • HammingSim('abcd','b') = 0/4 = 0.
  • HammingSim('id0345','id1352') = 3/6 = 0.5.

Normalization Edit

It is normalized.

Applications Edit

  • Comparing codes.

References Edit

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.