Processing math: 100%

Distinct degree factorization

The calculator finds distinct degree factors of a polynomial in finite field

The calculator below decompose an input polynomial to the number of distinct degree factors in a finite field. It is also can be used as a simple test of irreducibility if the result is an only factor of the input polynomial degree.

PLANETCALC, Distinct degree factorization

Distinct degree factorization

Input polynomial
x9+7x8+x7+7x6+10x5+2x4+6x2+9x+4
The file is very large. Browser slowdown may occur during loading and creation.

Factors

FactorDegreeExponent
x2+10x+811
x3+8x2+4x+1231
x4+2x3+3x2+4x+641



If a degree of a result factor is greater than a distinct degree of this factor the further decomposition can be done using Berlekamp algorithm or Cantor-Zassenhaus factorization algorithm. If a factor degree is equal to a distinct degree of this factor then the factor is not reducible.
Before starting main algorithm, described below, this calculator performs the decomposition into square-free factors, if any, the exponent of such a factor will be reflected in the Exponent column.

The distinct degree decomposition algorithm

The algorithm uses the fact that an irreducible polynomial of degree d is a divisor of the xpd-x and it is not a divisor of xpc-x, where 0<c<d. 1

  1. // v(x) - Input polynomial (must be square-free)
  2. // p - field order
  3. w x+0
  4. d 0
  5. loop while d+1 deg(v)/2
  6. w w^p mod v
  7. g gcd( w - x, v)
  8. if g 1 then
  9. output g,d
  10. v v / g
  11. w w mod v
  12. end if
  13. end loop
  14. if v 1 then output v,deg(v)

  1. Donald Knuth, The art of computer programming vol.2, par. 4.6.2 Factorization of polynomials 

URL copied to clipboard
PLANETCALC, Distinct degree factorization

Comments