# Even weighted codewords and puncturing

My question is below:

Prove that if a binary $(n,M,d)$-code exists for which $d$ is even, then a binary $(n,M,d)$-code exists for which each codeword has even weight.

(Hint: Do some puncturing and extending.)

-
Actually, the hint is quite useful. Did you try it? Where did you get into trouble? – azimut May 14 '13 at 6:40

Breaking this down to individual steps. Assume that $d=2t$ is an even integer. Assume that an $(n,M,d)$ code $C$ exists.
1. Show that puncturing the last bit from the words of $C$, you get a code $C'$ with parameters $(n-1,M,d')$, where $d'\ge d-1$. Actually we could puncture any bit, but let's be specific. Also we fully expect to have $d'=d-1$, but can't tell for sure, and don't care.
2. Let us append each word of $C'$ by adding an extra bit chosen in such a way that the weight of the word is even. Call the resulting code $C^+$. Show that $C^*$ has parameters $(n,M,d^*)$, where $d^*\ge d'\ge 2t-1.$ Observe that all the words of $C^*$ have an even weight.
3. Show that the minimum distance of $C^*$ must be an even number. Conclude that $d^*\ge d$.