What and Define The Hamming Metric with example in mathematical foundations of computer science
For the vectors "a=(a_1,a_2,\\ldots,a_n)\\in\\{0,1\\}^n" and "b=(b_1,b_2,\\ldots,b_n)\\in\\{0,1\\}^n" the Hamming Metric "\\rho_H" is defined as
"\\rho_H(a,b)=\\sum\\limits_{i=1}^n|a_i-b_i|."
For example, for "a=(1,0,1,1)\\in\\{0,1\\}^4" and "b=(0,0,1,0)\\in\\{0,1\\}^4" the Hamming Metric "\\rho_H(a,b)" is equal to
"\\rho_H(a,b)=|1-0|+|0-0|+|1-1|+|1-0|=1+0+0+1=2."
Comments
Leave a comment