Convert form from CNF to DNF

2.8k Views Asked by At

I have a few question about converting forms to DNF, CNF and from CNF to DNF.

1) How can I convert this to DNF $(p \vee q) \wedge (q \vee \neg r) $

2) How can I convert this to CNF $(p \wedge q) \vee (q \wedge\neg r)$

3) Is there any fast way to convert one form from CNF to DNF or DNF to CNF?

2

There are 2 best solutions below

2
On BEST ANSWER

$$ 1.\quad (p\vee q)\wedge (q\vee\neg r) = q\wedge(p\vee q) \vee\neg r\wedge(p\vee q) = q \vee \neg r p\vee \neg rq = q\vee p\neg r $$ $$ 2. \quad (p\wedge q)\vee (q\wedge\neg r) = q(p\vee\neg r) $$

0
On

This is mechanized in Maple. For example,

with(Logic):
Export(Normalize(`&and`(`&or`(p, q), `&or`(q, `&not`(r))))), form = DNF));

$$ p \land q \lor p \land \neg r \lor q \lor q \land \neg r $$ See ?Logic for info.

PS. It should be noted that the original Maple input is not exactly represented in the above code.