3

I was asked to determine all possible couples $(a,b) \in \mathbb{Z}^2$ which satisfies $\text{gcd}(411,2016) = a411 + b2016$. Using the Euclidean division alogirthm, I have found that \begin{align} 2016 &= 4 \cdot 411 + 372\\ 411 &= 1 \cdot 372 + 39\\ 372 &= 9 \cdot 39 + 21\\ 39 &= 1 \cdot 21 + 18\\ 21 &= 1 \cdot 18 + 3\\ 18 &= 3 \cdot 6 \end{align} from which it folows that $\text{gcd}(411,2016) = 3$. Working back, I find that $3 = 21 \cdot 2016 - 103 \cdot 411$.

In order to determine the other solutions, I worked more generale: suppose we want to find $x,y \in \mathbb{Z}$ such that $ax + by = d$. Suppose that $(x,y), (x',y')$ are two solutions, then filling this in we find that $a(x-x') = b(y' - y)$. Supposing that $a,b$ are coprime (as is the case for my expansion of $3$, we must have that $a$ is a divisor of $y'-y$ and $b$ is a divisor of $x-x'$. Therefore, there are $k, k' \in \mathbb{Z}$ such that $ak = y'-y$ and $bk' = x-x'$. However, I have no idea how $k,k'$ are related. Any hints?

Student
  • 4,438
  • Note there is an Extended Euclidean algorithm which avoids having to go backwards, and in addition yields the values of $\dfrac a{a\wedge b}$ and $\dfrac b{a\wedge b}$. – Bernard Feb 14 '17 at 15:34
  • I Will have to look this up. Thanks for your hint, since this procedure felt quite awkward, so I already wondered if there was not a shorter way to do this. – Student Feb 14 '17 at 15:38
  • 1
    You may take a look at my answer to this question if you want to see the very simple layout of the alogorithm (to have the quotients by the g.c.d., one further step is required). – Bernard Feb 14 '17 at 15:43

3 Answers3

2

Suppose we have $\gcd(a,b)=d$, and write $a'=a/d$, $b'=b/d$. Now $a'$ and $b'$ are coprime. If $ax+by=ax'+by'=d$, we must have $a'x+b'y=a'x'+b'y'=1$. Now $a'(x-x')=b'(y'-y)$, so $b'|a'(x-x')$, and since $b',a'$ are coprime we must have $b'|(x-x')$. Writing $x'=x+nb'$, we get $y'=y-na'$. So the general solution for pairs with $ax'+by'=d$ is $(x+nb/d,y-na/d)$ for $n\in\mathbb Z$.

  • it is so obvious... I have no idea why I did not see this! – Student Feb 14 '17 at 15:31
  • 1
    @Student It is even more obvious using well-known properties of fractions - see my answer. (Note: I updated the link in my answer to a better one, which includes showing how this can be used very slickly in irrationality proofs of square-roots - one of John Conway's favorite ways). – Bill Dubuque Feb 14 '17 at 15:56
2

Hint $ $ Suppose $\, a/b = a'/b'\,$ where $a'/b'$ is reduced (in lowest terms). Then we have

$$ \begin{array}{}\large \frac{y'-y}{x'-x}\, =\, \frac{a}b\, =\, \frac{\color{#0a0}{a'}}{\color{#c00}{b'}}\\[.3em] \Rightarrow\,\ \begin{align}{y'-y} \:&=\: n\,\color{#0a0}{a'}\\ x'-x \:&=\: n\,\color{#c00}{b'}\end{align} \end{array}$$

for some integer $n,\,$ by a basic principality property of reduced fractions (Unique Fractionization)

Bill Dubuque
  • 272,048
0

This is a linear Diophantine equation. Have a look here or here.

mvw
  • 34,562
  • Thank you for your answer! I have never heard about Diophantine equatins, but I think that it is worth getting to know them. Really appreciate your help! – Student Feb 14 '17 at 15:32
  • My thought was that you compare the solution algorithm from the links with your effort. – mvw Feb 15 '17 at 07:57