Let C be a binary linear code. Show that either every member of Chas even weight or exactly half the members of C have even weight.
Let C be a binary linear code. Show that either every member of C
has even weight or exactly half the members of C have even weight.
Let's see the solution.
Since I wrote the answer where the disputed statement appeared and the OP and @GitGud's discussion in the comments appears to be moving far too slowly toward a resolution, here are a few suggestions for an alternative strategy that will compel you to learn some crucial information about binary vectors along the way.
Assume that C stands for a linear binary code. Divide C into two subsets, C0 and C1, each containing all the words with an even Hamming weight and all the words with an odd Hamming weight.
Given that C' is a binary code, proving its linearity just needs demonstrating that the product of C"s two codewords occurs once more in C'. Let U and V be the parts of U and V that are in the linear code C (i.e., U and V without their parity check bits), where U and V are codewords of C'. The sum of the parity check bits for U' and V' is now U' + V' = U + V . U + V is in C since C is linear. The parity check for (U + V) must be equal to the total of the parity check bits of U' and V' in order for U' + V' to be in C'. U + V has an equal weight if U and V have the same parity (both even or both odd). The parity check bits of U' and V' in this instance are equal, therefore their sum is 0, making this the proper parity check for U + V. U + V, on the other hand, has an odd weight if U and V have distinct parities. Since one of them is 1 and the other is 0, the sum of the parity check bits for U' and V' is 1, making this the proper parity check for the odd weight U + V. Thus, U' + V' is in C' and C' is linear in all instances where the parity checks succeed.
Step by step
Solved in 3 steps