0

Find GCD of $28844$ and $-15712$. Find integers $a$ and $b$ such that $d= 28844a - 15712b$.

My attempt

$$\begin{align*} 28844&= -15712(-2) + (-2580)\\ -15712 &= -2580 (6) + (-232)\\ -2580 &= -232(11) + (-28)\\ -232 &= -28(8) + (-8)\\ -28 &= -8(3) + (-4)\\ -8 &= -4(2) + 0 \end{align*}$$

$$\begin{align*} 1 - (-2)(0) &= 1\\ 0 - (-2)(1) &= 2\\ 1- (-6)(2) &= 13\\ 2-(11)(13) &= -141 \end{align*}$$

$$\begin{align*} 0 - (-2)(1) &= 2\\ 1 - (-2)(2) &= 5\\ 2 - (-6)(5) &= 32\\ 5 - (11)(32) &= -347 \end{align*}$$ I think I do something wrong now. How to find a and b I don't know Please help.

  • Use this version of the extended Euclidean algorithm. It's easier to remember, easier to compute, so less error prone. – Bill Dubuque Apr 10 '15 at 19:08
  • I don't get how to do it with negative numbers. – user230342 Apr 10 '15 at 19:14
  • Note $\ \gcd(a,-b) = \gcd(a,b)\ $ since $,d\mid -b \iff d\mid b,,$ so both $,a,-b,$ and $,a,b,$ have the same set of common divisors $,d,,$ so they have the same greatest common divisor. So you can restrict to nonnegative gcd arguments. – Bill Dubuque Apr 10 '15 at 20:02

1 Answers1

0

I think you could I have just used 28844 and 15712. Or when finding numbers such a=dq+r , I think you are suppose to choose q so that r is between 0 and |d| (not including d). But I guess you can say what you have instead of changing your work that the gcd(28844,-15712)=|-4|=4 (and just manipulate things afterwards). \ $-28-3(-8)=-4 \\ -28-3(-232-8(-28))=-4 \\ 25(-28)-3(-232)=-4 \\ 25(-2580-11(-232))-3(-232)=-4 \\ 25(-2580)-278(-232)=-4 \\ 25(-2580)-278(-15712-6(-2580))=-4 \\ 1693(-2580)-278(-15712)=-4 \\ 1693(28844+2(-15712))-278(-15712)=-4 \\ 1693(28844)+3108(-15712)=-4 \\ \text{ And finally just multiply both sides by -1. }$

randomgirl
  • 3,237