Using Euclidean Algorithm to find a solution for linear Diophantine equation

45 Views Asked by At

I am trying to find a solution to $823x + 4526y = 1$ using the Euclidean Algorithm.

Here is what I have so far, but I am doing something wrong because the answers don't work.

$823x\ +\ 4526y=1$

$4526\ =\ 823\ \cdot\ 5\ +\ 411$

$823\ =\ 411\ \cdot2\ +\ 1$

$411\ =\ 1\ \cdot411\ +\ 0$

Rewriting as Remainders

$411=4526\ +\ -5\ \cdot823$

$1=823\ +\ -2\ \cdot411$

Plug in

$1 =823 +-2 \cdot 4526 + -5 \cdot 823$

$x = -2$ and $y=-4$