How do I prove that if $x, y ∈ F_n^{2}$ then w(x) + w(y) + w(x+ y) is even and at most $2n$?

74 Views Asked by At

Let $w(x)$ denote the Hamming weight of a binary word $x = (x_1,x_2, \ldots, x_n) \in \mathbb F_2^n$. Show that if $x, y ∈ \mathbb F_2^n$ then $w(x) + w(y) + w(x+ y)$ is even and at most $2n$. I understand what the Hamming weight is and I have tried a few examples to show that the theorem is true, however i'm not sure how to prove the theorem. Can someone explain please?

1

There are 1 best solutions below

0
On

Hint: Your understanding is complicated by the fact that in the expression $w(x) + w(y) + w(x+ y)$, that last $+$ has a different meaning (vector addition in $\mathbb F_2^n$) than the previous two $+$ signs which denote integer addition in the real numbers $\mathbb R$ or, if you prefer, in $\mathbb Z$. Write it as $w(x) + w(y) + w(x\oplus y)$ and note that in each coordinate, we have that $$w(x_i) + w(y_i) + w(x_i\oplus y_i)$$ can take on values $0$ and $2$ only. Then note that $w(x) = w(x_1)+w(x_2)+\cdots+w(x_n)$ and similarly for $w(y)$ and $w(x\oplus y)$, and re-order the resulting sums.