Minimal solution to a linear Diophantine equation

198 Views Asked by At

I solved many linear diophantine equation, but i found some exercises where, in addition to find the general solution of the equation, i have to find the minimal solutions of it. I've found a similar question, but still it's not totally clear to me.

For example i'm considering this linear diophantine equation:

$ 12x + 20y = 5528 $

General Solution:

$ x' = 2764 +5k \hspace{1cm} y' = -1382 -3k $ $\hspace{1cm} k\in \mathbb{Z}$

I thought that i can find the minimal solutions finding the smallest $k$. I also read an answer here How can we find the minimal solutions to a linear Diophantine equation? where the user "A.J." says that

"To find the minimal solution to $ ax+by=n $, we simply need to find $k$ such that $nx′−kb$ and $ny′+ka$ are as close as possible"

So, to find the minimal solutions like in the answer of the post i mentioned above i sould put $x'$ equal to $y'$, that in my case is $ 2764 +5k = -1382 -3k $ so that i can obtain a value of $k$ that will determine my minimal solutions.

I would like to know how would you answer this question and i would really appreciate an explanation or some advices for this type of excersise.