Ask Your Question

given a list of coefficients how can I get a polynomial

asked 2014-09-23 04:26:39 -0500

algebraicallyclosed gravatar image

In sage,

given a list/vector v of coefficients, how can I get the polynomial v[i]*x^i ?

Here is my environment;

n = 11
K = GF(4,'a')
R = PolynomialRing(GF(4,'a'),"x")
x = R.gen()
a = K.gen()
v = vector([1,a,0,0,1,1,1,a,a,0,1])

I want to get the polynomial v(x) in x, having v as the list of coefficients. This seems simple but I couldn't write it... Can anyone help?

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2014-09-23 06:54:45 -0500

FrédéricC gravatar image

Like that

sage: R(v.list())
x^10 + a*x^8 + a*x^7 + x^6 + x^5 + x^4 + a*x + 1
edit flag offensive delete link more


Ah, thanks, little before that, I wrote R(v) and it worked. Thank you for answering.

algebraicallyclosed gravatar imagealgebraicallyclosed ( 2014-09-24 02:58:06 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2014-09-23 04:26:39 -0500

Seen: 435 times

Last updated: Sep 23 '14