# Disjunctive normal form to conjunctive and vice-versa

Is there a way i can go from dnf to cnf quickly? Can I simply negate dnf to get cnf? and get negate cnf to get dnf?

e.g.

$P \to (Q\wedge \neg (P \to R))$

= $\neg P \vee (Q \wedge \neg ( \neg P \vee R))$

= $\neg P \vee (Q \wedge (P \wedge \neg R))$

= $\neg P \vee (Q \wedge P \wedge \neg R)$ --- is this correctly in DNF?

How could I go from CNF from here? I'm slightly stuck.

• Negating (and then using de Morgan) will get you a CNF from a DNF and vice versa, but they will not be equivalent. I doubt that this is what you want. – Klaus Draeger Oct 2 '15 at 16:25
• Yup, you're right, I need them to be equivalent. Would I use distrubtivity laws? – ak1652 Oct 2 '15 at 16:26

Yes. You've got it in DNF. To convert to CNF use the distributive law: $A \vee (B \wedge C) = (A \vee B) \wedge (A \vee C)$

$$\neg P \vee (Q \wedge P \wedge \neg R) \leftrightarrow (\neg P \vee Q) \wedge (\neg P \vee (P \wedge \neg R)) \leftrightarrow (\neg P \vee Q) \wedge (\neg P \vee P) \wedge (\neg P \wedge \neg R)$$

(of course the $\neg P \vee P$ can be canceled).