ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 21 Oct 2012 07:10:02 -0500Trying to display the roots of a polynomial over a finite fieldhttp://ask.sagemath.org/question/9451/trying-to-display-the-roots-of-a-polynomial-over-a-finite-field/So I'm trying to use the .roots() command on a polynomial over the quotient ring F_2[x]/x^5 + x^2 + 1, which is a field isomorphic to F_32. But it keeps giving me the following error:
NotImplementedError: root finding with multiplicities for this polynomial not implemented (try the multiplicities=False option)
Is there a way to get this to work?
ThanksSat, 20 Oct 2012 17:20:48 -0500http://ask.sagemath.org/question/9451/trying-to-display-the-roots-of-a-polynomial-over-a-finite-field/Answer by Francis Clarke for <p>So I'm trying to use the .roots() command on a polynomial over the quotient ring F_2[x]/x^5 + x^2 + 1, which is a field isomorphic to F_32. But it keeps giving me the following error:</p>
<p>NotImplementedError: root finding with multiplicities for this polynomial not implemented (try the multiplicities=False option)</p>
<p>Is there a way to get this to work?</p>
<p>Thanks</p>
http://ask.sagemath.org/question/9451/trying-to-display-the-roots-of-a-polynomial-over-a-finite-field/?answer=14167#post-id-14167Sage allows you to construct finite fields with a root of any irreducible polynomial as a generator. Thus
sage: PF2.<x> = GF(2)[]
sage: f = x^5 + x^2 + 1
sage: F32.<a> = GF(32, modulus=f)
sage: a.minimal_polynomial()
x^5 + x^2 + 1
sage: PF32.<s> = F32[]
sage: PF32.random_element().roots()
[(a^2 + a + 1, 1), (a^4 + a^3 + a^2, 1)]
Sat, 20 Oct 2012 23:05:02 -0500http://ask.sagemath.org/question/9451/trying-to-display-the-roots-of-a-polynomial-over-a-finite-field/?answer=14167#post-id-14167Comment by Zaubertrank for <p>Sage allows you to construct finite fields with a root of any irreducible polynomial as a generator. Thus</p>
<pre><code>sage: PF2.<x> = GF(2)[]
sage: f = x^5 + x^2 + 1
sage: F32.<a> = GF(32, modulus=f)
sage: a.minimal_polynomial()
x^5 + x^2 + 1
sage: PF32.<s> = F32[]
sage: PF32.random_element().roots()
[(a^2 + a + 1, 1), (a^4 + a^3 + a^2, 1)]
</code></pre>
http://ask.sagemath.org/question/9451/trying-to-display-the-roots-of-a-polynomial-over-a-finite-field/?comment=18839#post-id-18839Thank you!Sun, 21 Oct 2012 07:10:02 -0500http://ask.sagemath.org/question/9451/trying-to-display-the-roots-of-a-polynomial-over-a-finite-field/?comment=18839#post-id-18839