I can't solve the following exercise and I need a help.
Consider $\mathcal{C}$ binary cyclic code with length $n$ with generator polynomial $1 + x$. Let $\mathcal{C'}$ be the binary cyclic code of length $n$ with generator polynomial $g(x)$.
i) Prove that $\mathcal{C}$ is the set of all vectors in $\mathbb{F}_2^n$ with even weight.
ii) If $\mathcal{C'}$ has only even weight codewords, what is the relationship between $1 + x$ and $g(x)$?
iii) If $\mathcal{C'}$ has some odd weight codewords, what is the relationship between $1 + x$ and $g(x)$?
My attempt:
i) Every codeword $c \in \mathbb{C}$ is equal to $f(1+x)$ for some polynomial $f$ of degree $n-1$, and therefore $c$ has even weight. Moreover, since we are in $\mathbb{F}_2$, if something cancels, they cancel "pairwise", so I have still an even number of terms.
For the other two points, I just have that $1+x$ and $g(x)$ are divisors of $x^n-1$ for every $n$, so in particular $(1+x) g(x)|x^n-1$ but I don't know how to link these two facts together! What argument should I use?
Your attempt for $i)$ is fair, but it need some polish, and, more importantly, it only proves the the property one way : it proves $c \in \mathcal{C} \implies w(c) = 0\pmod 2$, but it doesn't prove that the code includes all tuples with even weigth: $w(c) = 0\pmod 2 \implies c \in \mathcal{C}$
For this, it's enough to see that $n-k = 1 \implies | \mathcal{C}| = 2^k = 2^n/2 $ : the code consists of half the total $n-$ tuples, hence it consists of all tuples with even weigth.
For $ii)$: You know that $c \in \mathcal{C}' \implies c \in \mathcal{C}$ (because $\mathcal{C}$ includes all all tuples with even weigth). Hence $g(x) = (1-x) u(x)$ , i.e., $1-x$ is a factor of $g(x)$ (I'll leave the details for you)
For $iii)$, analogously, $1-x$ is a not factor of $g(x)$.