Coding Theory: A First Course

Recall that the Hamming distance d( x , y) between two words x , y ?
was defined in Chapter 2.
Let x be a word in
. The ( Hamming) weight of x, denoted by wt( x), is defined to be the number of nonzero coordinates in x; i.e.,
where 0 is the zero word.
For every element x of F q, we can define the Hamming weight as follows:
Then, writing x ?
as x = ( x 1 , x 2 , ,x n), the Hamming weight of x can also be equivalently defined as
| (4.1) | |
If x , y ?
, then d( x , y) = wt( x ? y) .
Proof. For x, y ? F q, d( x, y) = 0 if and only if x = y, which is true if and only if x ? y = 0 or, equivalently, wt( x ? y) = 0. Lemma 4.3.3 now follows from (2.1) and (4.1).
Since a = ? a for all a ? F q when q is even, the following corollary is an immediate consequence of Lemma 4.3.3.
Let q be even. If x , y ?
, then d( x , y) = wt( x + y)