# Converting boolean logic to disjunctive normal form and conjunctive normal form

$$(\lnot q \lor \lnot r) \rightarrow (\lnot r \land (q \rightarrow p))$$

• Put the statement into disjunctive normal form
• Put the statement into conjunctive normal form

I don't know how to convert the statement into each of the forms it asks me to. Would be nice if someone could explain the steps to solving it.

• What have you tried so far? Are you familiar with the definitions of these two normal forms? – platty Nov 30 '18 at 0:07
• @platty I have read up on the forms and I am a little confuse on the forms but from what I can tell I assume disjunctive normal forms means the statement is connected through the OR operators and the conjunctive form is when the statement is combined with AND operators. But I don't know how to convert it to those forms. I assume you use properties that exists within boolean algebra to convert it, but I don't know how to start – Viserom Nov 30 '18 at 0:11

For example, given $$\neg (p \land (q \implies r)) \land \neg (p \implies \neg q)$$, we would first convert the implications: $$\neg (p \land (\neg q \lor r)) \land \neg (\neg p \lor \neg q)$$ Then move negations to single variables: $$(\neg p \lor \neg (\neg q \lor r)) \land (p \land q)$$ $$(\neg p \lor (q \land \neg r)) \land (p \land q)$$ If we want this to be in CNF, we have to make it a conjunction of disjunctions, so distribute: $$((\neg p \lor q) \land (\neg p \lor \neg r)) \land (p \land q)$$ $$(\neg p \lor q) \land (\neg p \lor \neg r) \land p \land q$$ This is now in CNF; you could further eliminate some redundancy further if you wanted to. The conversion to DNF is similar; follow the same steps, but distribute conjunction over disjunction, rather than the other way around, which we did above.