Ask Your Question
0

given a list of coefficients how can I get a polynomial

asked 2014-09-23 11:26:39 +0200

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
0

answered 2014-09-23 13:54:45 +0200

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

Comments

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

algebraicallyclosed gravatar imagealgebraicallyclosed ( 2014-09-24 09:58:06 +0200 )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

Stats

Asked: 2014-09-23 11:26:39 +0200

Seen: 1,514 times

Last updated: Sep 23 '14