How to get all the integer solutions to a system of linear equations ?

asked 2019-03-03 10:16:57 +0200

user3203476 gravatar image

Hello all,

I am a beginner at Sage and Python.

Is it possible to get all the integer solutions to a system of linear equations ?

I thought i would try to use MLIP for this. The tutorial thematic_tutorials on linear_programming has a call round(p.get_values(x), 2) which shows how to return one solution, but i would like to access all possible solutions.

Thank you in advance!

edit retag flag offensive close merge delete

Comments

1

Do you have equations or inequations? If you want equations using MILP makes no sense since you can just do elementary linear algebra over ZZ. Could you also provide a detailed example of what you want and what you tried?

vdelecroix gravatar imagevdelecroix ( 2019-03-03 13:47:08 +0200 )edit

Yes you are quite right : upon checking, MLIP is not the best tool for what I need to do, and indeed, I can use linear algebra over ZZ. Thank you for your help.

user3203476 gravatar imageuser3203476 ( 2019-03-03 15:45:42 +0200 )edit