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

Pedro A. Garcia Sanchez pedro at ugr.es
Tue Dec 29 13:16:59 GMT 2020


Dear Sven, dear Forum,

You can use NormalizInterface

https://gap-packages.github.io/NormalizInterface/doc/chap3_mj.html#X8570F3C87B5B7DD7

or 4ti2Interface

https://homalg-project.github.io/homalg_project/4ti2Interface/doc/chap3.html#X7F5D3AAB7834A607

or numericalsgps FactorizationsVectorWRTList

https://gap-packages.github.io/numericalsgps/doc/chap11.html#X8780C7E5830B9AE2 


Depending on what do you have installed in your system it will use 
NormalizInterface or 4ti2Interface. By default it tries to solve the 
problem "by hand", so I recommend either loading first NormalizInterface 
or 4ti2Interface. You may want to have a look at

https://gap-packages.github.io/numericalsgps/doc/chap13.html#X84A2793F7A9F3E6A

The easiest way may be installing NormalizInterface and load it prior to 
numericalsgps.

Hope this helps,
Pedro

El 29/12/2020 a las 13:30, Sven Reichard escribió:
> 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
>
> _______________________________________________
> Forum mailing list
> Forum at gap-system.org
> https://mail.gap-system.org/mailman/listinfo/forum

-- 
Pedro A. Garcia-Sanchez :: https://www.ugr.es/local/pedro




More information about the Forum mailing list