I've got an exercise that asks
Is it true that (1,1,1,1,1,1,1) is codeword for any binary cyclic code of length 7?
My first answer was No. I can decompose $$ c(x)=1+x+x^2+x^3+x^4+x^5+x^6=(1+x+x^3)(1+x^2+x^3) $$ that are two irreducible factors over $\mathbb{F}_2$ and I know $$ x^7-1=(1+x)(1+x+x^3)(1+x^2+x^3) $$ Now since each code can be created using combinations of irreducible factors as generator polynomial $g(x)$ and each codeword $c(x)$ can be uniquely written as $c(x)=f(x)g(x)$, I end up with $c(x)$ belongs only to $$ C_1 = <1+x+x^3> \quad \text{or} \quad C_2=<1+x^2+x^3> $$ but this answer makes me confused.
I found the following Theorem: Let $\alpha$ be a primitive root of the unit in some extension field of $\mathbb{F}_q$. Let $C$ be a cyclic code of length $n$ over $\mathbb{F}_q$ with defining set $T$ and generator polynomial $g(x)$. Then
- A codeword $c(x)\in\mathcal{R}_n=\dfrac{\mathbb{F}_q[x]}{(x^n-1)}$ is in the code $C$ iff $c(\alpha^i)=0 \;\; \forall i\in T$.
Now in our case with $n=7$ and $q=2$ the extension field is $\mathbb{F}_8$ and in $\mathbb{F}_8^*$ all the roots are primitive, moreover consider the initial $c(x)$, it can be shown that $$ c(\alpha) = 1+\alpha^1+\alpha^2+\alpha^3+\alpha^4+\alpha^5+\alpha^6=0 $$ and this holds for every power of $\alpha$ $$ c(\alpha^i) = 0 \quad \forall i\in\{1\ldots 6\} $$ Having this result I should change my answer to Yes since we can use any $T$ and so any $g(x)$ and the thesis of the theorem still holds. Is it right? What am I missing in the first answer?
The freedom contained in the phrase for any binary cyclic code of length 7 is the freedom of choice of the generator polynomial $g(x)$. Should it happen that for all choices of $g(x)$ the all 1s word is a codeword, then the answer would be affirmative.
Remember, the generator polynomial $g(x)$ should be a factor of $x^7-1$. You have that factorization already, $$x^7-1=(x+1)(x^3+x^2+1)(x^3+x+1).$$ You also correctly converted the all 1s word into the polynomial $$c(x)=x^6+x^5+x^4+x^3+x^2+x+1.$$ Therefore the questions asks
Because $x^7-1$ has no repeated factors, this is equivalent to asking
Letting you answer that. Instead, I give a coding theoretical "spoiler".