What is asked?
As the title suggests I'm trying to solve a very simple Linear Diophantine Equation: $$12x + 18y = 54$$
Also find an expression for all integer solutions
What have I done?
- Firstly, I know that $ax+by = c$ has a solution $\iff$ gcd$(a,b \space | \space c)$
- Secondly, I need to compute the gcd $ (18,12) = 6 $
$$18 = 1 \cdot 12 + 6$$ $$12 = 2 \cdot 6 + 0$$
Therefore, gcd(18,12) = 6
- Does 6 | 54? Yes. Therefore the equation has integral solutions.
- Okay, all good so far. But it's the next stage that sort of stumps me.
So we can rearrange to get: $$6 = 18 - (1 \cdot 12)$$
Now do I multiply through 9? Whats the next step? I also need to do a generalised form for all integers.
I have seen this thread How to find solutions of linear Diophantine ax + by = c?, and it is very helpful but every time I come up with a value for $x$ and $y$ it always makes the LHS = 0. But it obviously needs to = 54.
$$\text{Thank you!}$$