Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question
0

Extended Euclid with polynomials

asked 11 years ago

erinb gravatar image

updated 11 years ago

calc314 gravatar image

Suppose given polynomials e,q,h,r in R[x], pR (R a ring), how can I use Sage to find f in R[x] so fe=qh+r(mod p)?

Similarly, given f,g in R[x] with gcd(f,g)=1, what function can I use to compute s,t in R[x] so sf+gh=1(mod p) ?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 11 years ago

wdoo gravatar image

p=7 R=PolynomialRing(IntegerModRing(7),'x') x=R.gen()

I'm not sure if f exist

Maybe f=(q*h+r)//e

Or you want something like this? q=f//g r=f.mod(g)

As for the next question:

f=x^14 + 4*x^7 + 7

g=x^3+1

xgcd(f,g)

Preview: (hide)
link
0

answered 11 years ago

erinb gravatar image

updated 11 years ago

Thanks!

and is there a way to work around the use of the integermodring? I'm writing an algorithm in which I have to succesively compute different functions e.g.

s_j g_j + t_j h_j = 1 modulo p^2^j
s_j g_j + t_j h_j = 1 modulo p^2^(j+1)

Would it be best to redefine

R=PolynomialRing(IntegerModRing(p^2^j),'x') every time?

Preview: (hide)
link

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: 11 years ago

Seen: 1,520 times

Last updated: Jan 09 '14