Is there an algorithm for finding x and y in a GCD problem?

  • MHB
  • Thread starter Poirot1
  • Start date
  • Tags
    Gcd
In summary, Euclid's Algorithm and Bezout's identity, also known as the Extended Euclidean Algorithm, can be used to find the integers x and y in the equation 2=2008x+8002y given that 2 is the gcd of 2008 and 8002. This method involves finding the remainder at each step and using it in the next equation until the final equation is reached, where the integers can be identified. It is recommended to update the Wikipedia article to include this example.
  • #1
Poirot1
245
0
Since 2 is gcd of 2008 and 8002, I can write 2=2008x+8002y for integers x and y. Is there an algorithm for finding x and y?
 
Mathematics news on Phys.org
  • #3
meaningless computer jargon I'm afraid. Can you apply the method to the example given please?
 
  • #4
Poirot said:
meaningless computer jargon I'm afraid. Can you apply the method to the example given please?

\( 8002 = 3 \times 2008 + 1978 \)

\( 2008 = 1 \times 1978 + 30 \)

\(1978 = 65 \times 30 + 28\)

\(30 = 1 \times 28 + 2\)

so:

\[ \begin{array}{ ccccc } 2 &=& 30& -& 28 \\ &=& 30 &-& (1978-65 \times 30 ) \\ &=& 66 \times 30 & - & 1978 \\ &=& 66 \times(2008-1978)&-&1978 \\ &=& 66 \times 2008& -& 67 \times 1978 \\ &=& 66 \times 2008&-& 67 \times (8002-3 \times 2008) \\ &=&(-67)\times 8002&+&267\times 2008 \end{array}\]

CB
 
  • #5
You should modify wikipedia article.
 

FAQ: Is there an algorithm for finding x and y in a GCD problem?

What is a GCD problem?

A GCD (Greatest Common Divisor) problem is a mathematical problem that involves finding the largest number that can evenly divide two or more given numbers. It is also known as the greatest common factor (GCF) problem.

Why is finding x and y in a GCD problem important?

Finding x and y in a GCD problem is important because it allows us to express the GCD of two numbers as a linear combination of those numbers. This can be useful in solving various mathematical problems, such as simplifying fractions and solving equations.

Is there a general algorithm for finding x and y in a GCD problem?

Yes, there is a general algorithm for finding x and y in a GCD problem. It is called the extended Euclidean algorithm and it works for any pair of positive integers. This algorithm is based on the fact that the GCD of two numbers can be expressed as a linear combination of those numbers.

How does the extended Euclidean algorithm work?

The extended Euclidean algorithm works by repeatedly dividing the larger number by the smaller number and using the remainders to find the coefficients of the linear combination. This process is continued until the remainder becomes zero, at which point the coefficients of the last non-zero remainder give the values of x and y.

Are there any other methods for finding x and y in a GCD problem?

Yes, there are other methods for finding x and y in a GCD problem, such as the Bezout's identity method and the binary GCD algorithm. However, the extended Euclidean algorithm is the most commonly used method as it is efficient and can be easily implemented in computer programs.

Back
Top