Logic behind the Extended Euclidean Algorithm

47 Views Asked by At

Thank you beforehand for reading my question.

In the terms that I want to understand the Extended version of the Euclidean Algorithm, I understand the Euclidean Algorithm as follows:

You find the reminders reciprocally of A and B until you get to a irreducible point.

That statement makes it intuitively understandable, taking into account what we want to get, which is precisely that or, in other words, the lower number that divides A and B.

I understand this Extended version of the algorithm until the point where I have to use the update formula to get the current values of X and Y.

The reason being because I don't certain things about it. These being:

$$ x_{i + 1} = x_{i - 1} - q_{i} \cdot x_{i} $$ $$ y_{i + 1} = y_{i - 1} - q_{i} \cdot y_{i} $$

Why do we substract from

$$ x_{i - 1} $$ $$ y_{i - 1} $$

Why do we multiply the quotient specifically by

$$ x_{i} $$ $$ y_{i} $$

Do we multiply the quotient because we want to get a number that multiplied by A or B (depending on the current step) we will get the same answer (the GCD)?

I don't know if these are common matters of interest in the operation or if I'm going "too far" but I honestly see no point in using this operation at all if I don't understand it thoroughly.

Thank you.