Find all solutions to the diophantine equation

109 Views Asked by At

QUESTION : Given integers $k_1, k_2, r,s$ such that they can take any integer (negative, positive or zero) in any of the given equations, find all possible values of $a,b,c,d$ that satisfy that criteria.

Equations : $$ ar+cs=k_1, br+ds=k_2$$

1

There are 1 best solutions below

1
On BEST ANSWER

Actually this question is simpler than you think. You can observe that if we are trying to solve for $a, b, c, d$ from $r, s, k_1, k_2$, the two equations are irrelevant to each other.

Let $d = \gcd(r, s)$. Then it is known that $k$ can be written as $rm + sn$ for some $m, n \in \mathbb Z$ if and only if $d \ | \ k$. Therefore the necessary and sufficient condition for the solution $(a, b, c, d)$ to exist is $d \ | \ k_1$ and $d \ | \ k_2$.

In this case, $(a, b)$ and $(c, d)$ can be solved separately. In fact, if $d = ru + sv$, and $k_1 = dk'$, then one solution of $(a, b)$ will be $a = k'u, b = k'v$ and all other solutions $(a', b')$ must take the form $a' = a + sd^{-1}t, b' = b - rd^{-1}t$.