1
$\begingroup$

$(x,y) \in \mathbb Z \times\mathbb Z$ with $336x+378y=\gcd(336,378)$

Question: How can I get every possible combination of $x$ and $y$?

My solution so far:

First I have calculated the $\gcd(336,378)=42$. So using that I have $42= 1\cdot378-1\cdot336$

So $x=1$ and $y=-1$.

To get the general formula I have tried two things with gcd and lcm as a factor:

gcd: $42=1 \cdot 42 \cdot x \cdot 378- 1 \cdot 42 \cdot x \cdot 336, x \in \mathbb Z$

lcm: $42=1 \cdot 3024 \cdot x \cdot378 - 1 \cdot 3024 \cdot x, x\in \mathbb Z$

Unfortunately both do not make sense - it was just a guess.

  • 0
    The particular solution is $(x,y)=(-1,1)$.2017-02-16

3 Answers 3

1

You need to recall the following theorem for the Diophantine equation $ax+by=c$.

Theorem. Let $\gcd(a,b)=d$. If $(x_0,y_0)$ is a particular solution of $$ax+by=c$$ then all other solutions are given by $$x=x_0+\frac{b}{d}t$$ and $$y=y_0-\frac{a}{d}t$$ where $t\in\Bbb Z$.

In your question, we have $$336x+378y=42,$$ where $\gcd(336,378)=42$. The particular solution is $(x_0,y_0)=(-1,1)$. Thus, $$x=-1+\frac{378}{42}t=-1+9t$$ and $$y=1-\frac{336}{42}t=1-8t$$ where $t\in\Bbb Z$.

1

Let's look for integers $u,v$ such that $$(1+u)\cdot 336+(-1+v)\cdot 378=42$$ Expanding and cancelling by $42$, we want $$8u+9v=0$$

Can you see how to find all solutions now?

1

You have found the minimum solution to Bezout's identity where $x=-1,y=1$

Now all the solutions are given in pairs by:

$x+k\frac{b}{\gcd(a,b)},y-k\frac{a}{\gcd(a,b)}$

For example,

$k=1 \rightarrow x=8,y=-7$ and $8\cdot 336 + (-7)\cdot 378 = 42$

$k=2 \rightarrow x=17,y=-15$ and $17\cdot 336 + (-15)\cdot 378 = 42$