# Shortened linear codes

I've been working on my linear code assignment in my coding theory course and I have encountered a problem I would like to get help with. the question is described below. I will try to expalin what I have done so far. I know Ci has to be a linear code because the codewords in it are taken from C which is linear. I also know that I have to be equal or greater from d because the minimum distance in fewer codewords has to be bigger or equal (there could be a situation where the 2 codewords with the minimal distance are in Ci and then – DI=d)

• Linearity, viewed as a property that a code might or might not have, is a set property. That is, it is the set that is linear, not the individual codewords. Thus, "I know Ci has to be a linear code because the codewords in it are taken from C which is linear" is meaningless: a subset of a linear code is not necessarily a linear code. For example, take a linear $[n,k,d]$ code which has $q^k$ codewords and throw away one codeword. The resulting code is nonlinear. What you need to prove is that there are exactly $q^{k-1}$ codewords in $C$ that have the property that $ith$ coordinate is $0$ Commented Nov 11, 2021 at 17:56

I know Ci has to be a linear code because the codewords in it are taken from C which is linear

Not that fast! You removed elements from $$\mathcal C$$ – the result need not be a linear code anymore. For example, take the (very boring) $$\mathcal C =\{(0,0,0), (1,1,1)\}$$, and remove the $$(0,0,0)$$. The result is no longer a linear code, because $$(1,1,1)+(1,1,1)\notin \mathcal C\setminus\{(0,0,0)\}$$ .

Linearity is exactly what you need to show first. Good thing the neutral element of addition (the zero-codeword) is always in $$C_i$$!

For considerations about $$k-1$$: Maybe consider how many new codewords you get when you just take one element of $$\mathcal C\setminus C_i$$ and combine it with all elements from $$C_i$$.

• Cheers for the quick answer! What I meant is that you choose a column with not all zeros on that coordinate. Then you take only the codewords with zero in that same coordinate. This is the new code. You took (0,0,0) out of C. You needed to take (0,0,0) as Ci - the new code. Another comment is that we need to ignore the case when we are left only with the zero vector as in this case it is considered to have infinite dimention. Commented Nov 11, 2021 at 20:40
• yes, but just "taking" some subset does not necessarily give you a linear subset. It's not that easy, as my example illustrates. Commented Nov 11, 2021 at 20:42
• But in this specific examle it is supposed to be linear. I guess because you take away only codewords with zero in that coordinate. And my big question is why the new code's dimention is k-1. Thanks again! Commented Nov 11, 2021 at 21:00
• "it is supposed to be linear": no, it's your task to show it's a linear code. Commented Nov 11, 2021 at 21:28
• So why it is linear? I can't prove it. Commented Nov 11, 2021 at 21:40