simplifying large boolean expressions/equations

19 views
Skip to first unread message

רועי גרמיזו

unread,
Jul 7, 2019, 12:18:46 PM7/7/19
to sympy
 Hi, what is the best way to simplify a boolean equation with more than 8 variables? setting force to true on simplify_logic just takes too long, and to_dnf sometimes takes too long or don't really change the expression. I don't necessarily have to use sympy, but I belive it is the best (or least worst) option for me right now

רועי גרמיזו

unread,
Jul 7, 2019, 12:19:58 PM7/7/19
to sympy


בתאריך יום ראשון, 7 ביולי 2019 בשעה 19:18:46 UTC+3, מאת רועי גרמיזו:
 Hi, what is the best way to simplify a boolean equation with more than 8 variables? setting force to true on simplify_logic just takes too long, and to_dnf sometimes takes too long or don't really change the expression. I don't necessarily have to use sympy, but I belive it is the best (or least worst) option for me right now

I am using sympy 1.4 

Oscar Benjamin

unread,
Jul 13, 2019, 3:55:46 PM7/13/19
to sympy
Can you show a (short) example of some code that you've tried?

‪On Sun, 7 Jul 2019 at 17:18, ‫רועי גרמיזו‬‎ <roiga...@gmail.com> wrote:‬
>
> Hi, what is the best way to simplify a boolean equation with more than 8 variables? setting force to true on simplify_logic just takes too long, and to_dnf sometimes takes too long or don't really change the expression. I don't necessarily have to use sympy, but I belive it is the best (or least worst) option for me right now
>
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/1f2681fc-4973-4375-8839-819ac58e9112%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Aaron Meurer

unread,
Jul 13, 2019, 10:00:58 PM7/13/19
to sy...@googlegroups.com
The size of DNF is exponential in the number of variables, so it’s not surprising it is slower for expressions with many variables. CNF is the more standard form that scales well with the size of the expression. 

Aaron Meurer 

Reply all
Reply to author
Forward
0 new messages