61.6k views
5 votes
Seek an integer solution to the equation 12345x + 67890y = gcd(12345, 67890).

User Thiyaga B
by
6.5k points

1 Answer

5 votes

Final answer:

To solve the equation 12345x + 67890y = gcd(12345, 67890) for integer solutions, we can use the Extended Euclidean Algorithm. The solution is x = 13 and y = -16048.

Step-by-step explanation:

To solve the equation 12345x + 67890y = gcd(12345, 67890) for integer solutions, we can use the Extended Euclidean Algorithm.

The gcd(12345, 67890) is 45. So, the equation becomes 12345x + 67890y = 45.

Using the Extended Euclidean Algorithm, we can find the values of x and y:

  1. Apply the algorithm:
    • Divide 67890 by 12345 to obtain a quotient of 5 and a remainder of 3635.
    • Divide 12345 by 3635 to obtain a quotient of 3 and a remainder of 2140.
    • Divide 3635 by 2140 to obtain a quotient of 1 and a remainder of 1495.
    • Divide 2140 by 1495 to obtain a quotient of 1 and a remainder of 645.
    • Divide 1495 by 645 to obtain a quotient of 2 and a remainder of 205.
    • Divide 645 by 205 to obtain a quotient of 3 and a remainder of 30.
    • Divide 205 by 30 to obtain a quotient of 6 and a remainder of 5.
    • Divide 30 by 5 to obtain a quotient of 6 and a remainder of 0.
  2. Work backward:
    • Starting with the last two equations, substitute the values of remainders into the equations:
    • 5 = 205 - 6 * 30
    • 30 = 645 - 3 * 205
    • 205 = 1495 - 2 * 645
    • 645 = 2140 - 1 * 1495
    • 1495 = 3635 - 1 * 2140
    • 2140 = 12345 - 3 * 3635
    • 3635 = 67890 - 5 * 12345
  3. Substitute these equations into the original equation:
    • 45 = 12345 - 3 * (67890 - 5 * (12345 - 3 * (3635 - 1 * (2140 - 1 * (1495 - 2 * (645 - 3 * (205 - 6 * 30)))))))
  4. Simplify the equation:
    • 45 = 12345 - 3 * 67890 + 15 * 12345 - 45 * 3635 + 135 * 2140 - 269 * 1495 + 404 * 645 - 1623 * 205 + 9711 * 30
  5. Rewrite the equation in terms of x and y:
    • 45 = (-16048) + (13 * 12345) + (-45 * 3635) + (135 * 2140) + (-269 * 1495) + (404 * 645) + (-1623 * 205) + (9711 * 30)
  6. The solution is x = 13 and y = -16048.

User Manabu
by
7.0k points