0

Let $C(n,k)$ and $C'(n,k)$ be two linear codes. Show that $C\cap C'$ and $C + C'= \{u +u'|u\in C , u'\in C'\}$ are linear codes. Determine conditions under which $C\cup C'$ is also linear.

My try: Let $c_1 , c_2 \in C\cap C'$. So we have $$c_1,c_2 \in C \\ c_1,c_2 \in C'$$Since $C$ and $C'$ are linear $$c_1 + c_2 \in C \\ c_1 + c_2 \in C'$$This implies $c_1 + c_2 \in C\cap C'$ and $C\cap C'$ is linear code. Now let $c_1 , c_2 \in C + C'$. By definition $$\exists u_1\in C, u_2\in C' : c_1 = u_1 + u_2 \\ \exists u_3\in C, u_4\in C' : c_2 = u_3 + u_4$$ Then we have $$c_1 + c_2 = (u_1 + u_3) + (u_2 + u_4)$$The first term belongs to $C$ and the second one belongs to $C'$. By definition $c_1 + c_2 \in C + C'$ and this shows $C + C'$ is linear code.

I think the sufficient and necessary condition for $C\cup C'$ to be linear is that $C\subseteq C'$ or $C'\subseteq C$ because of "The union of two subspaces is a subspace if and only if one of the subspaces is contained in the other" but I'm not sure about this. Gerry Myerson's argument relies on the existence of $-x$ but I don't know whether additive inverse makes sense for linear codes.

Also are two other proofs correct?

S.H.W
  • 4,379
  • A linear code is just a vector subspace. So this is just equivalent to proving the same statement for subspaces. Also, yes, if $c \in C$ then $-c \in C$ as well (subspaces closed under scalar multiplication). – xxxxxxxxx Apr 20 '21 at 14:46
  • @MorganRodgers Thanks, so are my proofs correct? – S.H.W Apr 20 '21 at 15:20
  • No, you need to show they contain the zero vector, and are closed under scalar multiplication (unless you are assuming they are binary codes) – xxxxxxxxx Apr 21 '21 at 05:13
  • @MorganRodgers Yes I'm assuming they are binary codes. – S.H.W Apr 21 '21 at 05:33
  • If they are binary codes then $-x = x$ for all words, so you definitely don't need to worry about the assumption in the linked answer. And you don't need to worry about scalar multiples in the binary case, but you do need to argue that the $0$ vector is in the code for it to be linear. – xxxxxxxxx Apr 21 '21 at 10:49

0 Answers0