A function to compute Bezout coefficients ?

602 views
Skip to first unread message

ablondin

unread,
May 25, 2010, 3:58:54 PM5/25/10
to sage-devel
Hello, everyone !

I've been looking for a function that allows one to compute Bezout
coefficients of two numbers (say natural numbers). There is the GCD
function, but I haven't found anything about Bezout coefficients. This
is not complicated to write one, but it would be better if it was
included somehwere in Sage. Is there already something like that ?

Thank you for your help !

Alex

Mike Hansen

unread,
May 25, 2010, 4:10:47 PM5/25/10
to sage-...@googlegroups.com
Hello,

> I've been looking for a function that allows one to compute Bezout
> coefficients of two numbers (say natural numbers). There is the GCD
> function, but I haven't found anything about Bezout coefficients. This
> is not complicated to write one, but it would be better if it was
> included somehwere in Sage. Is there already something like that ?

You should use xgcd:

sage: xgcd(5, 7)
(1, 3, -2)
sage: g,a,b = xgcd(5, 7)
sage: a*5 + b*7
1

--Mike

Tim Daly

unread,
May 25, 2010, 4:28:22 PM5/25/10
to sage-...@googlegroups.com
Is anyone else getting duplicate copies of Sage messages? -- Tim

ablondin

unread,
May 25, 2010, 4:42:17 PM5/25/10
to sage-devel
Thanks !
I would never have guessed the name !
Alex

Robert Bradshaw

unread,
May 25, 2010, 4:44:10 PM5/25/10
to sage-...@googlegroups.com
On May 25, 2010, at 1:42 PM, ablondin wrote:

> Thanks !
> I would never have guessed the name !
> Alex

And I had never heard of the term "Bezout coefficients" :). The is an
abbreviation for "extended gcd."

> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org

ablondin

unread,
May 25, 2010, 11:40:47 PM5/25/10
to sage-devel
In fact, I'm not sure the term "Bezout coefficients" is standard, but
you can find it on Wikipedia.
http://en.wikipedia.org/wiki/B%C3%A9zout%27s_identity
They also call these "Bezout numbers", since they're linked to the
Bezout identity.
Alex

On 25 mai, 16:44, Robert Bradshaw <rober...@math.washington.edu>
wrote:

Florent Hivert

unread,
May 26, 2010, 2:02:59 AM5/26/10
to sage-...@googlegroups.com
Hi There,

On Tue, May 25, 2010 at 01:44:10PM -0700, Robert Bradshaw wrote:
> On May 25, 2010, at 1:42 PM, ablondin wrote:
>
>> Thanks !
>> I would never have guessed the name !
>> Alex
>
> And I had never heard of the term "Bezout coefficients" :). The is an
> abbreviation for "extended gcd."

I think this is pretty standard in the French community. According to
Alexandre it seems to be standard also in the French speaking community ;-)

Cheers,

Florent

Reply all
Reply to author
Forward
0 new messages