I realize there already is a question almost identical to this (here), but the answers given are a bit too vague. The problem I have is that I'm looking to factor the polynomial $$x^2+23x+18 \text{ in } \mathbb{Z}_{28}$$ into as many ways as possible. I've tried through trial and error since we're looking for $a,b \in \mathbb{Z_{28}}$ such that $$(x+a)(x+b)=x^2+23x+18$$ So $ab=18$ and $a+b=23$. But this seems too tedious and I haven't found an answer yet. So if anyone has a method for me to follow (sort of a recipe) or some clues as to how I can discover the method myself it would be much appreciated. Thanks.
-
If $(x-a)(x-b)$ is a factorization, then $(a-b)^2=(a+b)^2-4ab=9 \pmod{28}$ and so $a-b=3$ or $a-b=11$ modulo 28. The problem then turns into a linear system since $a+b=-23$ modulo 28. – Marco Sep 04 '18 at 02:43
-
@Marco $(a-b)^2 \equiv 9 \mod 28$ has $4$, solutions, not just two: $a-b = 3$, $11$, $17$, $25$. – Robert Israel Sep 04 '18 at 03:58
-
I expect that there can be as many as $d^{k-1}$ ways to factorize a $d$-th degree polynomial in $(\mathbb{Z}/n\mathbb{Z})[x]$, if $n$ has exactly $k$ distinct prime factors. If $n$ is squarefree, then $d^{k-1}$ is a sharp upper bound on the number $N_n(p)$ of ways to factorize $p(x)\in(\mathbb{Z}/n\mathbb{Z})[x]$. Not sure about the case when $n$ is not squarefree. The case $n=8$ alone can give you a glimpse of how complicated this may be: $$x^2-1=(x-1)(x+1)=(x-3)(x+3),.$$ – Batominovski Sep 04 '18 at 08:07
-
Things can get really ugly if $p(x)$ does not factor into linear terms over $\mathbb{Z}/r\mathbb{Z}$ for some prime divisor $r$ of $n$. Factors with multiplicities greater than $1$ can also cause a lot of trouble when computing $N_n(p)$. Your question is very interesting nonetheless. – Batominovski Sep 04 '18 at 08:13
-
@Marco How did you arrive at the first equalities? – D. Brito Sep 04 '18 at 12:41
-
@D.Brito, if $(a-b)^2=9$, then we have to solve $x^2=9$ modulo 28. Clearly $\pm 3$ modulo 28 are roots, but there are two other roots. In general to solve $x^2=a \pmod{n}$, one has to solve $x^2=a \pmod{p}$ for each prime power factor of $p$. This is a computational problem and there are algorithms such as this one: https://en.wikipedia.org/wiki/Tonelli%E2%80%93Shanks_algorithm – Marco Sep 04 '18 at 12:46
3 Answers
Factoring a polynomial over a ring that is not a domain is tricky because the degree of the factors need not be smaller than the degree of the original polynomial.
Indeed, over $\mathbb{Z}_{28}$ we have $$ x^2+23x+18 = (4x^2+8 x + 23)(7x^2+ 21x + 2) $$ which is somewhat surprising.
- 221,500
-
There may be even more surprising factorizations, such as a cubic times a quadratic or a product of two cubics. I haven't searched for them. – lhf Sep 06 '18 at 01:03
Hint: Solve mod $4$ and mod $7$ and use the Chinese Remainder Theorem.
EDIT: OK, let's do the mod $4$ part. You want $$ x^2 + 3 x + 2 \equiv (x+a)(x+b) \mod 4 $$ Thus $$ \eqalign{a b &\equiv 2 \mod 4\cr a + b &\equiv 3 \mod 4\cr} $$ One of $a$ and $b$, let's say $a$, must be even, but can't be $0$, so it's $2$. Then the second equation tells you $b = 1$.
I'll let you do it mod $7$: let's say the result is $(x+c)(x+d)$, where $c$ and $d$ are different.
Now you'll have two possibilities for the factorization $(x+a)(x+b) \mod 28$, because the factors mod $4$ and the factors mod $7$ can pair up in two ways: either $$a \equiv 2 \mod 4, \; a \equiv c \mod 7, b \equiv 1 \mod 4, b \equiv d \mod 7$$ or $$a \equiv 2 \mod 4, \; a \equiv d \mod 7, b \equiv 1 \mod 4, b \equiv c \mod 7$$
In either case, once you have chosen $a$ and $b$ mod $4$ and mod $7$, CRT gives you the values mod $28$.
- 470,583
-
-
In general, suppose $n = a b$ with $a, b$ coprime, $P(x) \equiv Q_a(x) R_a(x) \mod a$ and $P(x) \equiv Q_b(x) R_b(x) \mod b$. Using CRT on each of the coefficients, we get integer polynomials $Q(x), R(x)$ such that $Q(x) \equiv Q_a(x) \mod a$ and $Q(x) \equiv Q_b(x)\mod b$, and similarly for $R, R_a, R_b$. Then $P(x) \equiv Q(x) R(x) \mod ab$. – Robert Israel Sep 05 '18 at 16:20
-
I'm finding it hard to understand. Can you give a full answer so I can study it? – D. Brito Sep 05 '18 at 16:55
-
When there are zero divisor factoring a polynomial becomes very hairy. You have to define the terms very carefully to get much done. I suppose you can have fun with this, but I list a few things you need to be aware of:
- Are linear polynomials irreducible? Modulo $28$ we have "factorizations" like $$(7x-1)(8x+1)=-x-1.$$ The leading coefficients in the left are necessarily zero divisors, but?
- When the modulus is not square-free we have non-trivial units in the ring. Here $$(14x+1)^2=1.$$
For more information, check out:
- The sources Bill Dubuque dug out.
- More local discussion - not sure if they get to the bottom of it.
- 140,891