Factor the polynomial $X^3-X+1$ in $F_{23}$ and $X^3+X+1$ in $F_{31}$.
How can I know in which way to factor a polynomial mod $p$? Is there some specified method to do that?
Thanks.
Factor the polynomial $X^3-X+1$ in $F_{23}$ and $X^3+X+1$ in $F_{31}$.
How can I know in which way to factor a polynomial mod $p$? Is there some specified method to do that?
Thanks.
Cubics fall into three categories:
irreducible
product of a linear polynomial and an irreducible quadratic polynomial
product of three linear polynomials (not necessarily distinct)
So just try all possible roots. If you don't find a root, it's irreducible.
If you find a root $a$, divide the polynomial by $X-a$ and search for the roots of the resulting quadratic, starting at $a$, because the roots may be repeated.
There is some "specified method" to factor polynomials $f(x)$ over finite fields, namely the Berlekamp algorithm. It gives $$ x^3-x+1=(x + 10)^2(x + 3) $$ over $\mathbb{F}_{23}$, and $$ x^3+x+1=(x + 28)(x + 17)^2 $$ over $\mathbb{F}_{31}$.
Note that the Discriminant of the polynomial $f(X)=X^3+aX+b$ is $\Delta = -4a^3-27b^2$. Consequently, for $f(X)=X^3-X+1$ we get $\Delta = -23$; for $f(X)=X^3+X+1$ we get $\Delta=-31$. In both cases, $\Delta\equiv0\pmod{p}$ where $p$ is the prime characteristic of the prescribed coefficient field.
A vanishing discriminant indicates repeated roots, not necessarily in the base field. (Over $\mathbb{F}_{p^n}$, there are exceptions to this rule if $\deg f\geq p$, but that is not the case here.) The corresponding repeated factors of $f$ can be found by computing the polynomial GCD of $f$ with its first derivative $f'$. This is called square-free factorization. Remember to use arithmetic $\bmod{p}$ when doing the calculations, and rescale the resulting polynomial GCD to be monic.
Since $f$ has degree $3$, dividing out the linear factor (found as GCD) squared leaves another linear factor; that is, $f$ splits completely in $\mathbb{F}_p$.