Extended euclidian algorithm problem (HELP )

  • Thread starter Mathman23
  • Start date
  • Tags
    Algorithm
In summary, the extended Euclidean algorithm can be used to find integer solutions for equations of the form ax + by = gcd(a,b). By solving for the remainders and substituting the solution, then collecting terms and repeating the process, x and y values can be found that satisfy the equation. It is important to note that the extended algorithm is different from the standard Euclidean algorithm and may require additional steps.
  • #1
Mathman23
254
0
Extended euclidian algorithm problem (HELP!)

Hi

I have this here example problem:

9x - 65y = 1

I'm suppose to use the extended euclidian algorithm, but it has given me such much trouble.

I get the regular euclidian algorithm, but not the extended one.

Therefore if there is some good soul out there who would be so kind to explain the extended algorithm using this example I would be much greatful :-)

Sincerley and God Bless

Fred
 
Physics news on Phys.org
  • #2
One difficulty I have is that I don't see a problem here! An equation is not a problem. What do you want to do with the equation? Since you mention the (extended) Euclidean algorithm, are you trying to find integer values of x and y that satisfy the equation?

I notice that 9 divides into 65 3 times with a remainder of 2 and that 2 divides into 9 4 times with a remainder of 1.

In other words 9- 4(2)= 1 and 2= 65- 7(9). Does that help?
 
Last edited by a moderator:
  • #3
Hi and thank you for your answer,

As I wrote in my earlier post I know how to use the standard euclidian algorithm and thereby finding the gcd(a,b).

Having this in my mind is there an recipe that I can follow then I need to find an x,y this satisfies:

ax + by = gcd(a,b)

I know its the extended euclidian algorithm which I need to use. Would You please explain to me step by step, how by using ex.euclid that I'm able to find x,y ?

Best Regards and God Bless

Fred
 
  • #4
yes, you solve for the remainders and substitute the solution, collect the terms and solve for the next remainder, then substitute and collect terms, etc.
 
  • #5
Can you please elaborate :-)

Lets say we have 7x - 50y = 1 = gcd(7,50)

How do I go about solving this equation using ex. euclid ?

/Fred

ComputerGeek said:
yes, you solve for the remainders and substitute the solution, collect the terms and solve for the next remainder, then substitute and collect terms, etc.
 

1. What is the extended Euclidean algorithm?

The extended Euclidean algorithm is an efficient method for finding the greatest common divisor (GCD) of two integers, as well as the coefficients of a linear combination of these integers that equals the GCD.

2. How does the extended Euclidean algorithm work?

The algorithm uses a series of steps to find the GCD of two given integers. It starts by dividing the larger integer by the smaller one and finding the remainder. Then, it divides the smaller integer by this remainder and finds another remainder. This process is repeated until the remainder is equal to 0. The last non-zero remainder is the GCD, and the coefficients of the linear combination can be found by working backwards through the steps.

3. What is the purpose of the extended Euclidean algorithm?

The main purpose of the algorithm is to find the GCD of two integers, which is useful in many mathematical and computer science applications. It can also be used to solve linear Diophantine equations, which are equations in two variables with integer coefficients.

4. Are there any limitations to the extended Euclidean algorithm?

Yes, the extended Euclidean algorithm only works for positive integers. It also requires the input integers to be relatively prime (have no common factors other than 1). In addition, the algorithm may not work for very large numbers due to computational limitations.

5. How is the extended Euclidean algorithm different from the regular Euclidean algorithm?

The regular Euclidean algorithm only finds the GCD of two integers, while the extended Euclidean algorithm also finds the coefficients of a linear combination that equals the GCD. This makes the extended algorithm more useful in practical applications, such as solving linear Diophantine equations.

Similar threads

  • Programming and Computer Science
Replies
6
Views
972
Replies
9
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
442
  • Programming and Computer Science
Replies
14
Views
2K
  • Atomic and Condensed Matter
Replies
8
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Replies
1
Views
602
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
Replies
14
Views
1K
Back
Top