Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7961131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:56:54+00:00 2026-06-04T04:56:54+00:00

Extension of Euclid’s Algorithm We already know that, for any two whole numbers a

  • 0

Extension of Euclid’s Algorithm

We already know that, for any two whole numbers a and b, there exist integers s and t such that as + bt = gcd(a,b). In other words, gcd(a,b) is a linear combination of a and b. gcd(a,b) is the least positive combination of the two integers. a and b themselves are expressed as trivial combinations: a = 1· + 0·b and b = 0·a + 1·b. Starting with these two, an extension of Euclid’s algorithm finds s and t whose existence was so far only established in a formal way.

Write the two linear combinations in a column and apply one step of Euclid’s algorithm to the left-hand side. Assuming a = bp + r. Multiply the second equation by p and subtract it from the first equation:
a = 1·a + 0·b
b = 0·a + 1·b
r = 1·a + (-p)·b

Apply the same procedure to the last two equations. Continue in this manner until Euclid’s algorithm on the left stops. On the right, there will be the linear combination we are after. Let check this with an example: let a = 2322, b = 654. I adopt the usual convention of solving linear equations and omit all the terms in a linear combination but the left-hand side and the two coefficients on the right. The results are placed into a table with the fourth column being equal to p (from a = bp + r, which changes on each step. Multiply three numbers to the left of p by p and subtract them from the numbers directly above them. Record the results on the next line.

int algoritmoeuclides(int a,int b)
if (a%b==0)
return b;
return algoritmoeuclides(b,a%b);
}


int main(array<System::String ^> ^args)
{
int a=525;
int b=231;
printf("%d",algoritmoeuclides(a,b));
getch();
}

this is my code so far, it works perfect . The problem is when i try to find s and t. I dont know how to find it , ive searched on forums but idk whats the best way to program this algorithm to find S and T.
Ive put all the explanation to give you guys an idea.
PD:Sorry for my english im not an english-speaker. Any idea d be aprecciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T04:56:55+00:00Added an answer on June 4, 2026 at 4:56 am

    Here you go

    http://en.wikipedia.org/wiki/Extended_Euclidean_algorithm

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My extension is an overlay that has some images inside a toolbar. I need
Extension methods are useful for types that you don't own and can't/don't want to
I'm developing an extension in Chrome, and there's a problem. In my inject.js ,
Does PHP have an extension that permits to use a tar.gz like a folder?
Extension methods can be assigned to delegates that match their usage on an object,
With extension methods we can easily add methods to any type. Obviously this opens
Extension method is a really helpful feature that you can add a lot of
Using extension syntax I'm trying to create a left-join using LINQ on two lists
I'm making an extension that gets the user current selection, uses it to change
xs:extension allows adding elements to the end. Is there a way to extend a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.