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.
 

1. 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.

2. 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.

3. 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.

4. 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.

5. 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.

Similar threads

Replies
1
Views
1K
  • Precalculus Mathematics Homework Help
Replies
5
Views
841
  • Calculus and Beyond Homework Help
Replies
7
Views
2K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
13
Views
715
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
Replies
19
Views
5K
  • Linear and Abstract Algebra
Replies
8
Views
901
Replies
15
Views
1K
Back
Top