Coding theory MOC

Hamming distance

Let 𝑆 be an arbitrary set. The Hamming distance 𝑑(π‘₯,𝑦) of π‘₯,𝑦 βˆˆπ‘†π‘› is the number of positions in which they differ, code i.e.

𝑑(π‘₯,𝑦)=π‘›βˆ‘π‘–=1[π‘₯𝑖=𝑦𝑖]

where we have used an Iverson bracket. This defines a metric on 𝑆𝑛.

  • A Hamming ball Bπ‘Ÿβ‘(𝑐) ={π‘₯ βˆˆπ‘†π‘› :𝑑(π‘₯,𝑐) β‰€π‘Ÿ} is a closed ball under this metric.
  • The distance of a word from a distinguished βƒ—πŸŽ word is called the Hamming weight, or just weight, which sees a generalization in the linear case to Generalized Hamming weight.


tidy | en | SemBr