[GAP Forum] Non-negative solutions to linear Diophantine equations

Sven Reichard sven.reichard at tu-dresden.de
Tue Dec 29 12:30:26 GMT 2020


Dear Forum,

I have a system Ax=b of linear Diophantine equations and I would like to find the set of all non-negative solutions x.

This looks like a reasonable problem, but so far I have not found anything on it. My current solution works but not very efficiently. It does the following:
- Lattice reduction on A
- Find a rational solution x' (by SolutionMat)
- Find an integral basis of the nullspace of A (by TriangulizedNullspaceMat)
- Perform a backtrack search for non-negative integer solutions.

If anybody could point me in the direction of other things to try I would be grateful.

Best wishes for the New Year,
Sven Reichard.

Dresden International University



More information about the Forum mailing list