Hi there,

did you check that your system has more than one solution? In any case,
solve_sat() takes a parameter `n` which tells it to recover more/all
solutions.

"""
   * "n" - number of solutions to return. If "n" is +infinity then
     all solutions are returned. If "n <infinity" then "n" solutions
     are returned if "F" has at least "n" solutions. Otherwise, all
     solutions of "F" are returned. (default: "1")
"""

Cheers,
Martin

Juan Grados writes:
> Hello
>
> I am trying to get different random solution for every loop in my code sage
>
>     from sage.sat.boolean_polynomials import solve as solve_sat # optional
> - cryptominisat
>     sr = mq.SR(1,1,1,4,gf2=True,polybori=True)
>     F,s = sr.polynomial_system()
>     iter = 0
>     while(iter < 5):
>         s = solve_sat(F)                                            #
> optional - cryptominisat
>         F.subs(s[0])                                            # optional
> - cryptominisat
>         s = solve_sat(F, n=1, s_verbosity=1, c_max_vars_sparse=4,
> c_cutting_number=8) # optional - cryptominisat
>         print s[0]
>         print '   '
>         iter = iter + 1
>
> but I get always the same solution. I try to use c_randomize=seed or
> set_random_seed(n), but I do not get different "random" solutions. Could
> you help me please?
>
> -- 
> ---------------------------------------------------------------------
> MSc. Juan del Carmen Grados Vásquez
> Laboratório Nacional de Computação Científica
> Tel: +55 21 97633 3228
> (http://www.lncc.br/)
> http://juaninf.blogspot.com
> ---------------------------------------------------------------------


-- 

_pgp: https://keybase.io/martinralbrecht
_www: https://martinralbrecht.wordpress.com
_jab: [email protected]
_otr: 47F43D1A 5D68C36F 468BAEBA 640E8856 D7951CCF

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to