On Sunday 09 Dec 2012, Georgi Guninski wrote:
> On Sat, Dec 08, 2012 at 11:44:19AM +0530, Santanu Sarkar wrote:
> > Dear all,
> >
> > I have a system of non linear equations over GF(2). How to solve
> >
> > them in Sage?
>
> If you need to solve large nonlinear systems over GF(2) and don't
> insist on using sage I suspect a better choice is to convert
> them to conjunctive normal form (CNF) and then use state of the
> art SAT solver like lingeling/cryptominisat.
>
> There are sage programs for converting ANF to CNF, don't know if
> they are in vanilla sage.
Yes, it's all here:
On the shell
$ sage -i cryptominisat-2.9.5
$ sage -b
In Sage:
sage: B = BooleanPolynomialRing(10,'x')
sage: I = Ideal(B.random_element() for _ in range(10))
sage: import sage.sat.boolean_polynomials
sage: sage.sat.boolean_polynomials.solve(I.gens())
[{x7: 1, x8: 0, x9: 1, x6: 0, x5: 0, x4: 1, x3: 1, x1: 1, x2: 1, x0: 1}]
sage: I.groebner_basis()
[x0 + 1, x1 + 1, x2 + 1, x3 + 1, x4 + 1, x5, x6, x7 + 1, x8, x9 + 1]
Cheers,
Martin
--
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x8EF0DC99
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF
_www: http://martinralbrecht.wordpress.com/
_jab: [email protected]
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.