For the vectors a=(a1,a2,…,an)∈{0,1}n and b=(b1,b2,…,bn)∈{0,1}n the Hamming Metric ρH is defined as
ρH(a,b)=i=1∑n∣ai−bi∣.
For example, for a=(1,0,1,1)∈{0,1}4 and b=(0,0,1,0)∈{0,1}4 the Hamming Metric ρH(a,b) is equal to
ρH(a,b)=∣1−0∣+∣0−0∣+∣1−1∣+∣1−0∣=1+0+0+1=2.
Comments
Leave a comment