0

That's the linear diophantine equation:

$Ax + By = c$ where $A,B,x,y,c \in Z$

We can represent A and B as below:

$GCD(A,B) = g$

$A = k_1*g$

$B= k_2*g$

So we can represent original equation like this:

$k_1*g*x + k_2 * g*y = c$

If we divide both sides by $g$, we get:

$k_1*x+k_2*y = c\div g$

So while $LHS \in Z$, then $RHS \in Z$ also if solution exists, so $c \mod g = 0$

Finally, the equation can be written as: $k_1*x + k_2*y = k_3*g$

Knowing this, can we be sure that solution will exists for every equation like

$A_1b_1 + A_2b_2 + A_3b_3 + ... + A_nb_n = c$

Can we? Any proof? Of course, our GCD will be $g = GCD(A_1,A_2,A_3,...,A_N)$ and $c \mod g = 0$

  • 1
    Your explanation is muddled, but if your question is "is there always an integer solution to $A_1 b_1 + \cdots + A_n b_n = c$ provided that $c$ is divisible by $\gcd(A_1,\ldots, A_n)$?", then the answer is yes, and the argument can proceed along these lines by adjoining one variable at a time – Erick Wong Jan 11 '24 at 17:57
  • Or by reasoning directly (similarly). Anyway, it is certainly a duplicate. Better look for some link than edit an answer. – Anne Bauval Jan 11 '24 at 18:04
  • I thought that the proof must be dressed in numbers, I don't know advanced math. Just needed it for some coding problem. Thanks you! – Szyszka947 Jan 11 '24 at 18:07

0 Answers0