Discussion:
[sage-devel] Bug in sage.sat.boolean_polynomials.solve() with CryptoMiniSat 5.0.1
Steven Craighead
2018-12-09 18:20:53 UTC
Permalink
Equations three through six in keqs are nonlinear. I would expect if you left the var1 order alone and permuted the order of the equations you might even get different answers.

For instance if you swapped equation one with equation nine, you might get the same answer with the standard order on var1 that you are getting with your reversed order on var1.

Sent from my iPad
Just a reminder that there's still a bug in the communication with the experimental package CryptoMiniSat 5.0.1 when used via the function sage.sat.boolean_polynomials.solve().
varl = ['k{0}'.format(p) for p in range(29)]
B = BooleanPolynomialRing(names = varl)
B.inject_variables(verbose=False)
keqs = [
k0 + k6 + 1,
k3 + k9 + 1,
k5*k18 + k6*k18 + k7*k16 + k7*k10,
k9*k17 + k8*k24 + k11*k17,
k1*k13 + k1*k15 + k2*k12 + k3*k15 + k4*k14,
k5*k18 + k6*k16 + k7*k18,
k3 + k26,
k0 + k19,
k9 + k28,
k11 + k20]
from sage.sat.boolean_polynomials import solve as solve_sat
kpsol = solve_sat(keqs, n=1)
print type(kpsol)
print len(kpsol)
Changing the first statement to
varl = ['k{0}'.format(p) for p in range(28, -1, -1)]
which just re-orders the generators, a solution can be found.
Any ideas?
Jörg-Volker.
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Vincent Delecroix
2018-12-10 13:07:17 UTC
Permalink
Apply the wall crossing formula?

More seriously my advice is: if you report a problem, first open
a new thread and then report it completely, that is

1. describe your architecture and your operating system
2. describe your Sage installation (is it built from source, installed
from some package manager, etc)
3. describe the precise actions you have taken that led to the problem

Vincent
I'm trying to install cryptominisat for SAGEMATH 8.4. I'm hitting a wall.
Any advice?
Post by Steven Craighead
Equations three through six in keqs are nonlinear. I would expect if you
left the var1 order alone and permuted the order of the equations you might
even get different answers.
For instance if you swapped equation one with equation nine, you might get
the same answer with the standard order on var1 that you are getting with
your reversed order on var1.
Sent from my iPad
Just a reminder that there's still a bug in the communication with the
experimental package CryptoMiniSat 5.0.1 when used via the function
sage.sat.boolean_polynomials.solve().
varl = ['k{0}'.format(p) for p in range(29)]
B = BooleanPolynomialRing(names = varl)
B.inject_variables(verbose=False)
keqs = [
k0 + k6 + 1,
k3 + k9 + 1,
k5*k18 + k6*k18 + k7*k16 + k7*k10,
k9*k17 + k8*k24 + k11*k17,
k1*k13 + k1*k15 + k2*k12 + k3*k15 + k4*k14,
k5*k18 + k6*k16 + k7*k18,
k3 + k26,
k0 + k19,
k9 + k28,
k11 + k20]
from sage.sat.boolean_polynomials import solve as solve_sat
kpsol = solve_sat(keqs, n=1)
print type(kpsol)
print len(kpsol)
Changing the first statement to
varl = ['k{0}'.format(p) for p in range(28, -1, -1)]
which just re-orders the generators, a solution can be found.
Any ideas?
Jörg-Volker.
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Steven Craighead
2018-12-09 17:58:51 UTC
Permalink
Isn’t this like a situation that requires Groebner bases? Your equations can’t be solved when your variables go from 0 to 28, but can from 28 to 0.

This might be a neat little research problem figuring out why you need a specific order on your variable list.

Sent from my iPad
Just a reminder that there's still a bug in the communication with the experimental package CryptoMiniSat 5.0.1 when used via the function sage.sat.boolean_polynomials.solve().
varl = ['k{0}'.format(p) for p in range(29)]
B = BooleanPolynomialRing(names = varl)
B.inject_variables(verbose=False)
keqs = [
k0 + k6 + 1,
k3 + k9 + 1,
k5*k18 + k6*k18 + k7*k16 + k7*k10,
k9*k17 + k8*k24 + k11*k17,
k1*k13 + k1*k15 + k2*k12 + k3*k15 + k4*k14,
k5*k18 + k6*k16 + k7*k18,
k3 + k26,
k0 + k19,
k9 + k28,
k11 + k20]
from sage.sat.boolean_polynomials import solve as solve_sat
kpsol = solve_sat(keqs, n=1)
print type(kpsol)
print len(kpsol)
Changing the first statement to
varl = ['k{0}'.format(p) for p in range(28, -1, -1)]
which just re-orders the generators, a solution can be found.
Any ideas?
Jörg-Volker.
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+***@googlegroups.com.
To post to this group, send email to sage-***@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
Loading...