Converting CNF to DNF: Does it Always Work?

  • Thread starter gnome
  • Start date
  • Tags
    Work
In summary, the process of converting a CNF formula to an equivalent DNF formula involves negating the entire formula, negating each literal, and simplifying using DeMorgan's laws. However, this method is not valid for all formulas, as demonstrated by the counterexample of (p+q).(q+r).
  • #1
gnome
1,041
1
Will this method always convert a CNF formula to an equivalent DNF formula:

1. negate the ENTIRE formula
2. negate each literal
3. simplify using DeMorgan's laws

For example, given:

[tex]
\begin{equation}
\begin{split}
A:&\quad(p \vee q) \wedge (q \vee r ) \wedge (p \vee r )\notag \\
&\quad\overline{(\overline p \vee \overline q) \wedge (\overline q \vee \overline r) \wedge (\overline p \vee \overline r )}\notag \\
&\quad\overline{(\overline p \vee \overline q)} \vee \overline{(\overline q \vee \overline r)} \vee \overline{(\overline p \vee \overline r )}\notag \\
B:&\quad(p \wedge q) \vee (q \wedge r ) \vee (p \wedge r )\notag \\
\end{split}
\end{equation}
[/tex]

A truth table shows that A and B are equivalent. But is this valid for ANY formula?
 
Physics news on Phys.org
  • #2
No; for example, it does not work on (p + q).(q + r). You would get (p.q) + (q.r) which is not equivalent since when q is true and p and r are false, the formulas yield different truth values.
 
  • #3
You're right. Thanks.
 

1. What is CNF and DNF?

CNF and DNF are two different forms of logical expressions used in propositional logic. CNF stands for Conjunctive Normal Form, while DNF stands for Disjunctive Normal Form. These forms are used to represent logical statements in a standardized way.

2. What is the process of converting CNF to DNF?

The process of converting CNF to DNF involves the use of logical equivalences and distribution laws. The goal is to transform the given logical expression into a disjunction of conjunctions, where each conjunction represents a term in DNF form.

3. Does converting CNF to DNF always work?

Yes, converting CNF to DNF always works. This is because both CNF and DNF are equivalent forms of logical expressions, meaning that they represent the same set of truth values. Therefore, any logical expression in CNF can be transformed into an equivalent expression in DNF.

4. Are there any limitations to converting CNF to DNF?

While converting CNF to DNF is always possible, there may be instances where the resulting DNF expression is significantly longer and more complex than the original CNF expression. This can make the converted expression harder to understand and work with.

5. Why would someone want to convert CNF to DNF?

Converting CNF to DNF can be useful in certain cases, such as when trying to find contradictions or tautologies in a logical expression. It can also make it easier to apply other logical operations or simplify the expression further.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
Replies
1
Views
905
  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
6K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
11K
  • Math Proof Training and Practice
3
Replies
93
Views
6K
  • Math Proof Training and Practice
2
Replies
60
Views
8K
Back
Top