Content deleted Content added
Görre Mörre (talk | contribs) Square-Free Factorization algorithm: The algorithm was written in a strange/bad way and was over complicated and wasn't even working properly, take for example f=1, that lead to infinite recursion. I fixed the errors in the algorithm, changed name of variable z to fac, and added some explaining comments to the algorithm. |
Görre Mörre (talk | contribs) →Square-free factorization: Noticed some errors in my last edit, removed the erroneous comments. |
||
Line 58:
'''Algorithm''': '''SFF''' (Square-Free Factorization)
'''Input''': A [[monic polynomial]] ''f'' in '''F'''<sub>''q''</sub>[''x''] where ''q=p<sup>m</sup>''
'''Output''': Square-free factorization of ''f
''R'' ← 1
# Make ''w''
# multiplicity not divisible by ''p''
''c'' ← '''gcd'''(''f'', ''f''′)
''w'' ← ''f''/''c''
Line 75 ⟶ 74:
''w'' ← ''y''; ''c'' ← ''c''/''y''; ''i'' ← ''i+1''
'''end while'''
# ''c'' is now the product (with multiplicity) of the remaining factors of ''f''
# Step 2
# Note that the factors will have multiplicity divisible by p
'''if''' ''c'' ≠ 1 '''then'''
''c'' ← ''c''<sup>1/''p''</sup>
Line 86 ⟶ 85:
'''Output'''(''R'')
The idea is to identify the product of all irreducible factors of ''f'' with the same multiplicity. This is done in two steps. The first step uses the formal derivative of ''f'' to find all the factors with multiplicity not divisible by ''p''
====Example of a square-free factorization====
|