squarefree factorization of polynomials we consider here

a polynomial f ∈ F[X] is squarefree, if there is no polynomial g ∈ F[X] of
positive degree such that g 2 | f
in other words: if
f = α pe11 pe22 · · · pekk
squarefree factorization of polynomials
we consider here polynomials f ∈ F[X] where F is a field of characteristic zero;
take F = Q or R or C as examples;
computation over Z is also possible because everything relies on
gcd -computations.
be careful if you want to carry over these ideas to fields of prime characteristic
is the unique factorization of f into powers of distinct normed (monic),
irreducible polynomials, where α = u(f ) ∈ F, then all exponents ei are equal
to 1
in other words: f does not have multiple roots, i.e., if
Y
(X − αi )
f =α·
1≤i≤n
is the complete factorization of f (over some suitable extension field of F),
then the roots αi are pairwise distinct
1
2
proof of the criterion
some general remarks:
• irreducible polynomials are squarefree, but squarefree polynomials need
not be irreducible
• there is an easy test whether a polynomial is squarefree or not:
P
define the derivative of a polynomial f = 0≤i≤n fi X i as
P
f 0 := 1≤i≤n i · fi X i−1 , then
f is squarefree ⇔
gcd(f, f 0 ) = 1
(Note: this holds over ANY field)
first note that “taking derivatives”, i.e. the mapping f 7→ f 0 , is a linear
mapping from F[X] onto itself that satisfies the “chain rule”
(f · g)0 = f 0 · g + f · g 0
now first
f is not squarefree
⇒ f = g 2 · h for some g, h ∈ F[X] with deg g ≥ 1
⇒ f 0 = 2 g · g 0 + g 2 · h0 = g · (2 g 0 · h + g · h0 )
• squarefreeness is an important concept, even crucial in situations like the
integration problem for rational functions
⇒ g | f ∧ g | f 0 ⇒ g | gcd(f, f 0 )
(this argument is correct over any field!)
3
4
let f ∈ F[X] be a monic polynomial (for convenience), let
f = pe11 pe22 · · · pekk
now conversely
be the factorization of f ∈ F[X] into monic, irreducible polynomials pj , where
ej > 0 (1 ≤ j ≤ k)
f is squarefree
⇒ f = p1 · p2 · · · pk for distinct, irreducible pj
X
⇒ f0 =
p1 · · · pi−1 · p0i · pi+1 · pk
1≤i≤k
then
m
f = g1 · g22 · g33 · · · gm
where the polynomials
assume now that gcd(f, f 0 ) 6= 1
let p be an irreducible divisor of both f and f 0
then p = pi for some 1 ≤ i ≤ k, and pi | f 0 the leads to
pi |p1 · · · pi−1 · p0i · pi+1 · · · pk and hence to pi | p0i — a contradiction!
(this argument is correct only in characteristc zero! why?)
gi :=
Y
{ pj ; ej = i }
1≤j≤k
are squarefree polynomials which satisfy
gcd(gi , gj ) = 1 (1 ≤ i < j ≤ m)
this (unique!) decomposition of f into pairwise relatively prime squarefree
polynomials is the squarefree decomposition of f
5
6
the key to compute the squarefree factorization (SFF)
let f ∈ F[X] and let
m
f = g1 · g22 · g33 · · · gm
the important points are
denote the SFF, then
• the squarefree factorization of a polynomial can be computed just by
gcd-operations, without knowledge of the “true” factorization that was
used to define it
• the squarefree factorization is an “approximation” of the “true”
factorization, much cheaper to compute, but often as useful as the “true”
factorization
7
f0 =
X
i−1
i+1
m
g1 · g22 · · · gi−1
· i gii−1 · gi0 · gi+1
· · · gm
1≤i≤m
and one claims that
m−1
gcd(f, f 0 ) = g2 · g32 · g43 · gm
=: d
to see that this is true, note that
P
f /d = g1 · g2 · · · gm and f 0 /d = 1≤i≤m g1 · · · gi−1 · i gi0 · gi+1 · · · gm
cannot have a common divisor, because this would have to be one of the gi ’s,
and then gi | gi0 — a contradiction.
8
the computation of the SFF of f proceeds then (in principle) as follows
– compute d := gcd(f, f 0 )
m−1
this is g2 · g32 · · · gm
this is g1 · g2 · · · gm
– compute e := f /d
– compute h := gcd(d, d0 )
m−2
this is g3 · g42 · · · gm
this is g2 · g3 · · · gm
– compute k := d/h
– compute e/k : this is g1 !
– now that g1 has been isolated, apply the procedure to d etc.
the algorithms by Tobey/Horowitz, Musser, and Yun are all variations of
this idea
• the algorithm by Tobey and Horowitz
input(f ∈ F[X])
d1 ← gcd(f, f 0 )
e1 ← f /d1
i ← 1
while di 6= 1 do
di+1 ← gcd(di , d0i )
ei+1 ← di /di+1
gi ← ei /ei+1
i ← i+1
od
return(g1 , g2 , . . .)
end
9
m−1
g2 g32 . . . gm
g1 g2 . . . g m
2
m−i−1
gi+2 gi+3
. . . gm
gi+1 gi+2 . . . gm
gi
10
• the algorithm by Yun
• the algorithm by Musser
input(f ∈ F[X])
d1 ← gcd(f, f 0 )
e1 ← f /d1
i ← 1
while ei 6= 1 do
ei+1 ← gcd(di , ei )
di+1 ← di /ei+1
gi ← ei /ei+1
i ← i+1
od
return(g1 , g2 , . . .)
end
m−1
g2 g32 . . . gm
a1 a2 . . . am
input(f ∈ F[X])
d ← gcd(f, f 0 )
e1 ← f /d
m−1
g2 g32 . . . gm
g1 g2 . . . gm
b1 ← f 0 /d − e01
g1
m
X
(j − 1)g2 . . . gj0 . . . gm
j=2
gi+1 gi+2 . . . gm
2
m−i−1
gi+2 gi+3
. . . gm
gi
i ← 1
while ei 6= 1 do
gi ← gcd(ei , bi )
ei+1 ← ei /gi
gi
gi+1 gi+2 . . . gm
bi+1 ← bi /gi − e0i+1
gi
m
X
j=i+1
i ← i+1
od
return(g1 , g2 , . . .)
end
11
12
(j − i)gi+1 . . . gj0 . . . gm
what happens if f 0 6= 0 ?
m
• let f = g1 g22 g33 · · · gm
be the SFF, then
X
m−1
f 0 = g2 · g32 · · · gm
·
i g1 · · · gi−1 · gi0 · gi+1 · · · gm
p-i
some comments on the situation in characteristic p > 0:
|
• the complication that happens is that over a field F of characteristic p > 0
there are polynomials f ∈ F[X] with deg f > 0 such that f 0 = 0
• now it follows that
• obviously: f 0 = 0 iff there is a polynomial g s.th. f (X) = g(X p )
• if the field F is perfect, i.e. if any element has a p-th root, then this is
equivalent to: there is a polynomial h s.th. f (X) = h(X)p
• in the perfect case, the squarefree factorization of f with f 0 = 0 is
obtained from the squarefree factorization of h via p-th powers
{z
h
8
<1
gcd(gi , h) =
:gi
}
if p|i
if p - i
• as a consequence
gcd(f, f 0 ) =
Y
p-i
gii−1 ·
Y
gii
p|i
• from
k=
Y
gi = f / gcd(f, f 0 )
p-i
Q
the gi with p - i can be successively computed and p|i gii can be isolated
Q
• note that p|i gii is a polynomial with zero drivative
13
14