3 ms·
As an aside - I have a bunch of logical expressions and I need to see if they are mutually exclusive. As in, if one is true given some combination of the variab
by manojlds 3y ago
As an aside - I have a bunch of logical expressions and I need to see if they are mutually exclusive. As in, if one is true given some combination of the variables, none of the other expressions must be true for the same combination.
For example Country="US" and Type="Sales" is not exclusive with Type in ("Sales", "Purchase")
What would be an approach to solving this?
- pizza 3y agoMaybe prolog (or other logic programming language) or z3 (or other SAT solver)?
- jlokier 3y agoIf your logical expressions aren't too strange, and there aren't too many, that's well suited to an SMT solver, such as Z3. You might, for example, create a new logical expression for each pair of your original expressions, joining each pair with AND, and then join those AND pairs with OR. Then ask the SMT solver to generate an unsatisfiability proof.
- manojlds 3y agoThanks the suggestion was very useful and I am even close to having a prototype. Z3 is cool!