Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: In which sense is simplified dnf minimal? #13649

Open
jachymb opened this issue Nov 29, 2017 · 2 comments
Open

Documentation: In which sense is simplified dnf minimal? #13649

jachymb opened this issue Nov 29, 2017 · 2 comments

Comments

@jachymb
Copy link

jachymb commented Nov 29, 2017

I run sympy.logic.boolalg.to_dnf(expr, simplify=True) to get the simplest dnf formula for expr. However, the documentation does not tell in which sense is the resulting formula minimal. There are more conceivable minimization criteria which may yield different results, e.g.

  • simply the total number of literals (not preferable for me)
  • the total number of literals when the number of terms is minimized first
  • the maximal number of literals in a term when the number of terms is minimized first
    I would like to know and the documentation should be updated.
@asmeurer
Copy link
Member

asmeurer commented Dec 8, 2017

It uses simplify_logic, though the docs for it aren't very clear either.

@oscargus
Copy link
Contributor

oscargus commented Mar 3, 2019

simplify_logic uses SOPform and POSform that returns the smallest two-level And-Or or Or-And expression. With smallest meaning minimum number of terms, where each term has as few terms as possible. Quine-McCluskey/Karnaughmap style.

The docs can be clearer though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants