Converting $3$-variable truth table to 3CNF

78 Views Asked by At

I have a truth table for length $3$ binary strings, say $110$ and $001$ map to $1$ and everything else to $0$. Is there an an algorithm to represent this table as a 3CNF which is satisfied only by $110$ and $001$?

1

There are 1 best solutions below

0
On BEST ANSWER

Yes, rewrite rules can be used: $$(A \land B \land C) \rightarrow (A \land B) \land C$$ $$ A \lor (B \land C) \rightarrow (A \lor B) \land (A \lor C)$$ $$(A \land B) \lor C \rightarrow C \lor (A \land B)$$

The input is $$(X \land Y \land \neg Z) \lor (\neg X \land \neg Y \land Z)$$ where $X$, $Y$ and $Z$ are Boolean variables.