Find integers $x, y$ such that $242x + 2240y = \gcd(242, 2240)$. I am not sure what to do. I found the $\gcd(242, 2240)=2$. Not sure where to go from there. Please help.

- 206,697

- 104
-
Are you familiar with the Euclidean Algorithm? – QC_QAOA Nov 05 '16 at 03:24
-
This form of the extended Euclidean algorithm is generally the simplest manual method for problems like this. – Bill Dubuque Nov 05 '16 at 03:25
-
No, I am not. .. – mathguy Nov 05 '16 at 03:26
-
How about the Division Algorithm? – Wang Kah Lun Nov 05 '16 at 03:36
-
@AlanWang you mean long division? I understand that. – mathguy Nov 05 '16 at 03:38
2 Answers
Since Extended Euclidean algorithm is unknown we proceed directly. Cancelling an obvious factor of $\,2\,$ reduces to $\,11^2 x + 1120 y = (11^2, 1120) = 1\,$ since $11$ is coprime to $112$ and $10$.
$${\rm mod}\ 121\!:\,\ y \equiv \dfrac{1}{1120}\equiv \dfrac{1}{31}\equiv \dfrac{4}{124}\equiv \dfrac{4}3\equiv\dfrac{-117}{3}\equiv -39$$
Finally $\ x = (1 - 1120y)/121 = 361$
Beware $ $ Modular fraction arithmetic is valid only for fractions with denominator coprime to the modulus. See here for further discussion.

- 272,048
-
-
-
@ahmed I just cancelled $2$.Multiply by $2$ to go back to your problem. – Bill Dubuque Nov 05 '16 at 03:49
-
-
1
First, find the GCF by applying the euclidean algorithm as follows:
\begin{align*} 2240 &= 242(9) + 62 &\quad&\mbox{(equivalently, $62=2240 - 242(9)$)}\\ 242 &= 62(3) + 56 &\quad&\mbox{(equivalently, $56=242 - 62(3)$)}\\ 62 &= 56(1) + 6 &\quad&\mbox{(equivalently, $6=62 - 56(1)$)}\\ 56 &= 6(9) + 2 &\quad&\mbox{(equivalently, $2=56 - 6(9)$)}\\ 6 &= 3(2) + 0 \end{align*}
So, we have the GCF, which is $2$. Now, we need to write $2$ as a linear combination of $242$ and $2240$. To do this, we start with the equation on the bottom of the far right, $2=56-6(9)$ and substitute backwards.
\begin{align*} 2&=56 - 9(62-56) = 10(56) - 9 (62)\\ 2&=10(242-3(62)) - 9(62) = 10(242) - 39(62)\\ 2&=10(242) - 39(2240 - 242(9)) = 361(242) - 39(2240)\\ \end{align*}
Therefore, $x=361$ and $y=-39$. Keep in mind that as you substitute backwards the goal is writing $242$ and $2240$ as a linear combination. I recommend looking up the euclidean algorithm on Wikipedia as suggested and also diophantine equations on Wolfram.

- 1,487