I know how to convert a formula to a CNF, but how do I convert to a DNF? Can I use the first three steps of CNF and change the distributive transformation to
$P \land (Q \lor R) \text{ becomes } (P \land Q) \lor (P \land R)$
$(P \lor Q) \land R \text{ becomes } (P\land R)\lor (Q \land R)$ ?
Yes. Like putting a statement into CNF, first rewrite all operators in terms of $\land$, $\lor$, and $\neg$, and then bring all negations inside (using DeMorgans's Laws) as far as possible, and removing any Double Negations. At this point, the statement is in Negation Normal Form (NNF)
Then, to get the statement into CNF, distribute $\lor$ over $\land$
But to get it into DNF, distribute $\land$ over $\lor$
Example:
Starting statement:
$P \rightarrow (Q \land (\neg (\neg R \land S))$
rewrite into $\land$, $\lor$, and $\neg$:
$\neg P \lor (Q \land (\neg (\neg R \land S))$
bring negations inside with DeMorgan:
$\neg P \lor (Q \land (\neg \neg R \lor \neg S))$
remove double negations:
$\neg P \lor (Q \land (R \lor \neg S))$
Now it is in NNF
To put NNF into CNF, distribute $\lor$ over $\land$:
$(\neg P \lor Q) \land (\neg P \lor R \lor \neg S)$
To put NNF into DNF, distribute $\lor$ over $\land$:
$\neg P \lor (Q \land R) \lor (Q \land \neg S)$