Distributivity
Note that we can show the following equalities e.g., by truth tables:
By recursively applying these laws, we obtain the following:
Theorem (Distributing DNFs to CNFs and vice-versa)
- Let be a DNF with . Then is computed by a CNF with at most clauses of size at most .
- Similarly, if be a CNF with . Then is computed by a DNF with at most clauses of size at most .
Example
Proof of distribution theorem
DNF to CNF
where , .
a CNF equivalent to with clauses of size
Proof: induction on n
- Base: A is already a CNF of appropriate complexity
- Inductive Step:
- By inductive hypothesis we have where
- By distributivity we have