Answer to Question #282799 in Discrete Mathematics for V.kathiravan

Question #282799

What and Define The Hamming Metric with example in mathematical foundations of computer science

1
Expert's answer
2021-12-27T16:30:18-0500

For the vectors a=(a1,a2,,an){0,1}na=(a_1,a_2,\ldots,a_n)\in\{0,1\}^n and b=(b1,b2,,bn){0,1}nb=(b_1,b_2,\ldots,b_n)\in\{0,1\}^n the Hamming Metric ρH\rho_H is defined as

ρH(a,b)=i=1naibi.\rho_H(a,b)=\sum\limits_{i=1}^n|a_i-b_i|.


For example, for a=(1,0,1,1){0,1}4a=(1,0,1,1)\in\{0,1\}^4 and b=(0,0,1,0){0,1}4b=(0,0,1,0)\in\{0,1\}^4 the Hamming Metric ρH(a,b)\rho_H(a,b) is equal to


ρH(a,b)=10+00+11+10=1+0+0+1=2.\rho_H(a,b)=|1-0|+|0-0|+|1-1|+|1-0|=1+0+0+1=2.


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment