Hi all,
When I am trying to install Cryptominisat, I am getting following error.
(base) santanu@Santanu-Laptop:~/Desktop/sage-8.9-Ubuntu_18.04-i686/SageMath$
./sage -i cryptominisat
***
Error building Sage.
The following package(s)
Yes, @vdelecroix, in these cases this might be a very good option.
sage: list( [x,y] for x in range(1,10) for y in range(1,10) if x+y==15)
[[6, 9], [7, 8], [8, 7], [9, 6]]
For a more general setting, normaliz, 4ti2 and other approaches are better;
some are available in sage as pointed above.
O
In this particular instance, I would rather write down the loop.
It is not hard to make the loop general for any bound on x and
y and any sum.
sum = 15
xmin = 1
xmax = 9
ymin = 1
ymax = 9
for x in range(max(xmin, sum-ymax), min(xmax, sum-ymin)+1):
print(x, sum-x)
which does run through
6 9
May be you want to use ` WeightedIntegerVectors(15,[1,1])` or restricted
partitions inside gap. This, for a single linear Diophantine equation like
yours might be a fast approach.
Pedro
On Friday, April 17, 2020 at 7:17:12 PM UTC+2, Bert Henry wrote:
>
> I have the equation
> x + y = 15
> an I'