6

The following exercise is from Golan's book on linear algebra.

Problem: Is the polynomial $6x^4+3x^3+6x^2+2x+5$ irreducible over $GF(7)$, the field with 7 elements.

Work so far: If the polynomial is reducible, it facts into the product of a linear term and something else, or it factors as two quadratics. The first case is easy to exclude; simply plug all seven elements of $\mathbb{Z}_7$ into the polynomial and confirm none of them are a root. The second is harder. Of course, one could just set up the systems of equations resulting from

$$(ax^2+bx+c)(dx^2+ex+f)$$

and go through all the possible values of $a,c,d,f$ and see if the resulting values of $b$ and $e$ are permissible, and while I know that would eventually give me the answer, I have no desire to do all of those computations. Is there a slicker way?

Bill Dubuque
  • 272,048
Potato
  • 40,171
  • Careful! $x^6-1$ does not work because it evaluates to $-1$ at $0$. It is almost right, but not quite. – Arturo Magidin May 31 '12 at 02:49
  • 2
    Guess-and-check is really the best way to go here. But instead of picking values for the coefficients, I prefer to just find all the irreducible quadratics (checking, by exhaustion, to see which ones have roots) and then see if any of them divide the given polynomial. – Brett Frankel May 31 '12 at 02:59
  • 5
    Rather than find all $21$ irreducible quadratics, it should be easier to consider $x^{49}-x$ (the product of all the monic irreducible polynomials of degree $1$ and $2$) and use Euclid's algorithm to take the GCD of it with your polynomial. – Chris Eagle May 31 '12 at 03:03
  • 1
    As far as guess-and-check goes, note that you can assume WLOG that $a = 1$. – Qiaochu Yuan May 31 '12 at 03:11
  • 2
    Switch the signs, we are trying to see whether $x^4+4x^3+x^2+5x+2=(x^2+bx+c)(x^2+ex+f)$. Not a lot of work. – André Nicolas May 31 '12 at 03:31
  • @André: We don't know that the leading terms of the quadratics must be 1 though. For example, 2*4=1 mod 7. – Potato May 31 '12 at 03:32
  • 4
    @Potato: Then you can multiply the first by $4$ and the second by $2$, and get a decomposition in which the coefficient of $x^2$ in each factor is $1$. – André Nicolas May 31 '12 at 03:36
  • 1
    @Chris: That is a nice idea. Unfortunately $x^{49}-x$ has all the irreducible quadratics as factors. So if $p(x)$ is a product of two irreducible quadratics, then $$\gcd(p(x),x^{49}-x)=p(x)$$ doesn't help in finding the factorization. You can try and compute the gcd with one of the obvious factors in $$x^{49}-x=x(x^{24}-1)(x^{24}+1).$$ It may happen that the roots of one factor are squares in $GF(49)$, and those of the other are not. In that case computing the gcd with $x^{24}-1$ will give us a proper factor. – Jyrki Lahtonen May 31 '12 at 04:28
  • 1
    How about this variant: get a primitive root $\zeta$ of ${\mathbb{F}}_{49}$, i.e. a generator of the multiplicative group, which we know is cyclic of order $48$. Then plug $\zeta^m$ into your polynomial, for $0<m<48$, and if the result is ever zero, the irrducible polynomial for that $\zeta^m$ (over the prime field) will be a factor of the polynomial. – Lubin May 31 '12 at 06:48
  • 2
    @Jyrki: Fortunately, we aren't trying to find the factorization, so that's not a problem. – Chris Eagle May 31 '12 at 10:33
  • 1
    Ahh! I misread the question. We only need to prove that it factors. Very nice, @Chris. To reiterate: if this polynomial divides $x^{49}-x$, we know that it has at most quadratic factors. – Jyrki Lahtonen May 31 '12 at 10:39
  • @Jyrki In fact it takes only a few minutes by hand to compute the factorization - see my answer. – Bill Dubuque May 31 '12 at 18:48
  • 1
    I think the comments of Chris and Lubin (wow!) would make good answers. – Dylan Moreland May 31 '12 at 19:01
  • @Bill, (+1) to your answer, a nice trick getting rid of the cubic term! I knew that it can be done. You cut the number of choices to smaller number than I faced here, but the difference is not too great (I had to guess one coefficient modulo 3). – Jyrki Lahtonen May 31 '12 at 19:13

2 Answers2

3

Hint $ $ As suggested you could use trial-and-error, and program a computer to test the $7^4 = 2401$ cases that arise from $4$ undetermined coefficients in a factorization into two quadratics. But, as is often true, a little insight trumps brute force. By exploiting innate symmetry, we can reduce the $2401$ cases to $2$ cases. First, shifting $\rm\:x\to x\!-\!1\:$ to kill the $\rm\:x^3\:$ term yields

$$\rm\begin{eqnarray}\rm -f(x\!-\!1) &\equiv&\rm\ \ \ x^4\ +\ 2\ x^2\ -\ 3\ x\ +\ 2\pmod 7 \\[.2em]&\equiv&\rm\ (x^2\!- a\, x + b)\ (x^2\! + a\, x + c)\\[.2em] &\equiv&\rm\ \ x^4\! + (b\!+\!c\!-\!a^2)\!\: x^2\! + a(b\!-\!c)\:\!x + bc\end{eqnarray}\qquad $$

Up to $\rm\, b,c\, $ swaps, $\rm\: bc\equiv 2\!\iff\! (b,c)\, \equiv\, \pm(2,1),\, \pm\:\!(3,3).\:$ $\rm\:b\not\equiv c\:$ else coef of $\rm\,x\,$ is $\,0\not\equiv -3$.

If $\rm\ (b,c) \equiv\ \ \: (\ 2,\ 1\ )\ $ then $\rm\:-3 \equiv a(b\!-\!c)\equiv\ \: a\:\ $ so $\rm\:b\!+\!c\!-\!a^2\equiv\ \ \ \, 2\!+\!1\!-\!(-3)^2\equiv\ \ 1\:\not\equiv 2$

If $\rm\ (b,c) \equiv (-2,\!-1)\:$ then $\rm\:-3 \equiv a(b\!-\!c)\equiv -a\:$ so $\rm\:b\!+\!c\!-\!a^2\equiv\, -2\!-\!1\!-\!(+3)^2\equiv -5 \equiv 2$

So $\rm\:a,b,c \equiv 3,-2,-1,\:$ is a solution, which yields the factorization $$\begin{align}\rm -f(x\!-\!1)\, &\equiv\, x^4 + 2\,x^2 - 3\,x+2\\[.2em] &\equiv\,\rm (x^2-3\,x-2)(x^2+3\,x-1)\pmod 7\\[.2em] \underset{x\ \to\ x+1}\Longrightarrow \rm-f(x) \,&\equiv\,\rm (x^2+6\,x+3)(x^2+5\,x+3)\pmod 7\end{align}\qquad$$

Remark $ $ Alternatively, we can apply the Euclidean algorithm to compute $\rm\,gcd(f(x\!+\!c),x^{24}\!-\!1)\,$ for random $\rm\,c,\,$ which, $\,$ for $\rm\,c=1\,$ quickly yields $\rm\,x^2\!+\!2\,|\,f(x\!+\!1),\,$ hence $\rm\,f(x)\,$ has the factor $\rm\,(x\!-\!1)^2\!+\!2\, =\, x^2-2\,x+3.\,$ This is how some factoring algorithms work.

Bill Dubuque
  • 272,048
2

For the second answer, the best way really is guess and check (there are more complicated algorithms though). It factors into $$ f(x) \equiv -(x^2 + 5x + 3)(x^2 + 6x + 3)\pmod{7} $$

Bill Dubuque
  • 272,048
Eugene
  • 7,612
  • 4
  • 33
  • 66
  • A brute-force "guess and check" would require checking $2401$ cases! But one can prune the search space by exploiting innate symmetry - see my answer. – Bill Dubuque May 31 '12 at 18:57
  • I expect that a computer would make short work of it, although if one is allowed to do that then he could just call f.factor() in Sage. – Dylan Moreland May 31 '12 at 19:11