Logic
Boolean Satisfiability
Truth Tables
Given a Boolean formula ϕx__1,…,x__n, the Boolean satisfiability problem asks whether there exists some choice of true and false values for x__1…,x__n such that ϕx__1,…,x__n=true. This choice of variables is called a satisfying assignment, and the formula is said to be satisfiable. The satisfiability problem is known to be computationally difficult and was one of the first problems shown to be NP-complete.
Maple 2016 introduces new efficient heuristics for determining satisfiability and testing equivalence of Boolean expressions.
withLogic:
Satisfiable x and y xor not z
true
Satisfyx and y xor not z
x=false,y=false,z=false
Satisfiablex and y and not x
false
formula ≔ Randoms,t,u,v,w,x,y,z,clauses=20,literals=3,form=CNF
s∨t∨y∧s∨u∨w∧s∨w∨¬x∧s∨y∨z∧t∨w∨y∧t∨¬u∨¬w∧t∨¬v∨¬w∧u∨w∨z∧u∨y∨¬z∧v∨y∨¬u∧w∨¬t∨¬z∧x∨¬t∨¬w∧x∨¬t∨¬z∧z∨¬t∨¬v∧¬s∨¬t∨¬w∧¬s∨¬u∨¬w∧¬s∨¬v∨¬y∧¬t∨¬u∨¬z∧¬t∨¬x∨¬z∧¬u∨¬w∨¬y
Satisfyformula
s=false,t=false,u=true,v=false,w=false,x=false,y=true,z=false
The Logic:-TruthTable command now returns a DataFrame with the truth assignments for a given formula.
TruthTablex and y xor not z
Download Help Document