I am searching for a way to use the GAP System to find a solution of a linear Diophantine equation over the non-negative integers. Explicitly, I have a list L
of positive integers for each of which there exists a solution of the linear Diophantine equation s = 11*a + 7*b
such that a
and b
are non-negative integers. I would like to have the GAP System return for each element s
of L
the ordered pair(s) [a, b]
corresponding to the above solution(s).
I am familiar already with the command SolutionIntMat
in the GAP System; however, this produces only some solution of the linear Diophantine equation s = 11*a + 7*b
. Particularly, it is possible (and far more likely) that one of the coefficients a
and b
is negative. For instance, I obtain the solution [-375, 600]
when I use the aforementioned command on the linear Diophantine equation 75 = 11*a + 7*b
.
For additional context, this query arises when working with numerical semigroups generated by generalized arithmetic sequences. Use the command LoadPackage("numericalsgps");
to implement computations with such objects. For instance, if S := NumericalSemigroup(11, 29, 36, 43, 50, 57, 64, 71);
, then each of the minimal generators of S
other than 11
is of the form 2*11 + 7*i
for some integer i in [1..7]
. One can ask the GAP System for the SmallElements(S);
, and the GAP System will return all elements of S
up to FrobeniusNumber(S) + 1
. Clearly, every element of S
is of the form 11*a + 7*b
for some non-negative integers a
and b
; I would like to investigate what coefficients a
and b
arise. In fact, the answer is known (cf. Proposition 2.5 of this paper); I am just trying to get an understanding of the intuition behind the proof.
Thank you in advance for your time and consideration.