ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 03 Mar 2019 08:45:42 -0600How to get all the integer solutions to a system of linear equations ?https://ask.sagemath.org/question/45611/how-to-get-all-the-integer-solutions-to-a-system-of-linear-equations/ 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!
Sun, 03 Mar 2019 03:16:57 -0600https://ask.sagemath.org/question/45611/how-to-get-all-the-integer-solutions-to-a-system-of-linear-equations/Comment by user3203476 for <p>Hello all,</p>
<p>I am a beginner at Sage and Python.</p>
<p>Is it possible to get all the integer solutions to a system of linear equations ?</p>
<p>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.</p>
<p>Thank you in advance!</p>
https://ask.sagemath.org/question/45611/how-to-get-all-the-integer-solutions-to-a-system-of-linear-equations/?comment=45618#post-id-45618Yes 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.Sun, 03 Mar 2019 08:45:42 -0600https://ask.sagemath.org/question/45611/how-to-get-all-the-integer-solutions-to-a-system-of-linear-equations/?comment=45618#post-id-45618Comment by vdelecroix for <p>Hello all,</p>
<p>I am a beginner at Sage and Python.</p>
<p>Is it possible to get all the integer solutions to a system of linear equations ?</p>
<p>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.</p>
<p>Thank you in advance!</p>
https://ask.sagemath.org/question/45611/how-to-get-all-the-integer-solutions-to-a-system-of-linear-equations/?comment=45614#post-id-45614Do 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?Sun, 03 Mar 2019 06:47:08 -0600https://ask.sagemath.org/question/45611/how-to-get-all-the-integer-solutions-to-a-system-of-linear-equations/?comment=45614#post-id-45614