Create an expression that is true if exactly n bools in a series are true #26494
Unanswered
jakelamberson
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to create an expression that is only true if n boolean symbols are true and use it to solve for a possible set of boolean symbols. I have the following code:
Unfortunately, no combination of restrictions in the final test expression will cause
satisfiable
to solve for a, b, or any other symbols. It just returns that my generated piecewise functions should be true. What am I doing wrong? Is there an easier way to solve this?I have some other code where I attempted to solve this by constructing symbolic adders, but that was far too slow and I never saw a result:
Beta Was this translation helpful? Give feedback.
All reactions