Let me first explain building blocks to this problem. Before answering this, we shouldknow the relationship between Sent codeword, Received codeword, CRC generator and error polynomial.
let's take an example:
Sent codeword $=10010\ (=x^4+x)$
Received codeword $= 10\color{blue}{1}10$ (error at $2nd$ bit ) $(=x^4+x^2+x)$
Now, i can write Sent codeword = Received codeword + error
$(10010 =10\color{blue}{1}10 + 00100,$ here we do modulo $2$ arithmetic
i.e $1+1 =0$ without carry )
in polynomial also we can see $x^4+x = x^4+x^2+x+x^2 = x^4+\bf{2}x^2+x=\bf{x^4+x}$
(here multiplying with 2 means 0 because it corresponds to binary modulo 2 arithmetic which is 1+1 = 0 (not 2) )^{ }
^{OR }
We can also write,
Received codeword = Sent codeword + error (Check it using same method as above)
Sent codeword $C(x),$ Received codeword $R(x)$ and error $E(x)$.
Now we have R(x) = C(x) + E(x). and let CRC polynomial be G(x).
$G(x)$ always divides $C(x),$ and if there is an error then $G(x)$ should not divide $R(x)$.
Lets check -
$R(x) \bmod G(x) =\left(C(x) + E(x)\right) \bmod G(x)$ (for simplicity i am writing mod as division)
$\dfrac{R(x)}{G(x)}=\dfrac{C(x)}{G(x)}+\dfrac{E(x)}{G(x)}$
$G(x)$ always divides $C(x)$
$\Rightarrow \dfrac{R(x)}{G(x)}=0+\dfrac{E(x)}{G(x)}$
If $G(x)$ divides $E(x)$ also this would mean $G(x)$ divides $R(x)$. We know that, if $G(x)$ does not properly divide $R(x)$ then there is an error but we are never sure if there is error or not when $G(x)$ divides $R(X)$.
As we saw, $G(x)$ divides $R(x)$ or not totally depends on $G(x)$ divides $E(x)$ or not.
Whole strength of $G(x)$ lies if it does not divide any possible $E(x)$.
Lets see again $E(x)$, if there is an error in $3^{rd}$ and $4^{th}$ bit from left $\text{(LSB is 0th bit )}$ then $E(X) = x^4+x^3$.( it does not matter error is from toggling $1$ to $0$ or $0$ to $1$ ) Check with above example.
Now come to question. it says $G(x)$ should detect odd number of bits in error?.
If number of bits are odd then terms in $E(x)$ would be odd.
for instance if $1^{st}, 2nd$ and $5^{th}$ bit got corrupted then $E(x) = x^5+x^2+x.$
It is clear that if any function $f(x)$ has a factor of $x-k,$ then at x=k, $f(x)$ would be zero. I.e. $f(x) = 0$ at $x=k$.
- We want to detect odd number of bits that means received message $R(x)$ contains an odd number of inverted bits, then $E(x)$ must contain an odd number of terms with coefficients equal to $1$.
- As a result, $E(1)$ must equal to $1$ (remember 1+1 = 0, 1+1+1 = 1.
Any Odd number of times sum of one's is = 1). $E(1)$ is not zero, this means $x+1$ is not a factor of $E(x)$.
- Now I want $G(x)$ not to be a factor of $E(x),$ So that $G(x)$ wont divide $E(x)$ and i would happily detect odd number of bits.
- So, if we make sure that $G(1) = 0,$ we can conclude that $G(x)$ does not divide any $E(x)$ corresponding to an odd number of error bits. In this case, a CRC based on $G(x)$ will detect any odd number of errors.
- As long as $1+x$ is a factor of $G(x), G(x)$ can never divide $E(x).$ Because we know $E(x)$ dont have factor of $1+x$.
Option C.
(Option B might confuse you, If $G(x)$ has some factor of the form $x^k+1$ then also $G(x)$ would detect all odd number of errors, But in Option B, language is changed, and that too we should not have any upper bound on $k$)