Finding order of a polynomial over finite field
order of a polynomial f(x) in Fp[x] is defined as minimum e such that f(x)|xe−1 . Do we have an inbuilt function in sage to find the same ?
order of a polynomial f(x) in Fp[x] is defined as minimum e such that f(x)|xe−1 . Do we have an inbuilt function in sage to find the same ?
I would expect that you mainly need this for irreducible polynomials. In that case it's the multiplicative order of one of its roots in an appropriate extension:
L = GF(p^f.degree(),name='b')
[a[1].multiplicative_order() for a in f.roots(L)]
(all those numbers should be equal and you only need to compute one of them)
If your polynomial is square-free, you'd have to do this for each of the irreducible factors and take the LCM.
If your polynomial has higher multiplicity factors, you have to take the appropriate powers before taking LCMs
Asked: 8 years ago
Seen: 1,202 times
Last updated: Aug 28 '16