Processing math: 100%

First time here? Check out the FAQ!

Ask Your Question
1

xgcd for several arguments

asked 1 year ago

Martin-Br gravatar image

SageMath has a built-in method for performing the extended Euclidean algorithm for two numbers (or polynomials), called xgcd. The algorithm also works for several arguments, by recursion. One can implement this easily with a SageMath helper function, but I was wondering: does SageMath have a built-in extension of xgcd to several arguments?

Preview: (hide)

Comments

Hi, are you working on this, otherwise do you mind if I implement this and contribute? I also need this functionality for my personal purpose.

seewoo5 gravatar imageseewoo5 ( 0 years ago )

1 Answer

Sort by » oldest newest most voted
1

answered 1 year ago

Max Alekseyev gravatar image

updated 1 year ago

Perhaps not. You are welcome to contribute the enhancement.

There is a related functionality implemented for multivariate polynomials via .lift() method, which works like this:

sage: R.<x,y> = QQ[]
sage: pols = [x^2-2*x+4,x^2-5*x+6,x^2-4]
sage: J = R.ideal(pols)
sage: gcd(pols).lift(J)
[1/4, -1/10, -3/20]
sage: sum(map(prod,zip(_,pols))) == gcd(pols)
True
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

1 follower

Stats

Asked: 1 year ago

Seen: 840 times

Last updated: Sep 30 '23