A disjunctive normal form ( DNF ) in Boolean logic is a normal form in which a Boolean formula has the form of a disjunction of conjunctions of literals . Any Boolean formula can be reduced to DNF. [1] To do this, you can use the law of double negation , the law of de Morgan , the law of distributivity . The disjunctive normal form is convenient for the automatic proof of theorems .
Content
Examples
Formulas in DNF :
Formulas not in DNF :
But the last two formulas are equivalent to the following formulas in DNF:
Building DNFs
DNF Construction Algorithm
1) Get rid of all logical operations contained in the formula, replacing them with the basic ones: conjunction, disjunction, negation. This can be done using equivalent formulas:
2) Replace the negation sign relating to the entire expression with the negation signs relating to individual variable utterances based on the formulas:
3) Get rid of double negation signs.
4) Apply, if necessary, distributive properties and absorption formulas to conjunction and disjunction operations.
DNF Construction Example
We bring to the DNF formula
Express the logical operation → through
In the resulting formula, we transfer the negation to the variables and reduce the double negations:
Using the law of distributivity , we obtain:
Using idempotency of the conjunction, we get DNF:
k is a disjunctive normal form
A k- disjunctive normal form is a disjunctive normal form in which each conjunction contains exactly k literals .
For example, the following formula is written in 2-DNF:
Transition from DNF to SDNF
If a variable, for example, Z, is missing in some simple conjunction, we insert the expression
- ,
after which we open the brackets (in this case, we do not write repeated disjoint terms, since according to the law of idempotency ). For example:
Thus, from DNF received SDNF .
DNF Formal Grammar
The following formal grammar describes all the formulas reduced to DNF:
- <DNF> → <conjunct>
- <DNF> → <DNF> ∨ <conjunct>
- <conjunct> → <literal>
- <conjunct> → (<conjunct> ∧ <literal>)
- <literal> → <term>
- <literal> → ¬ <term>
- <DNF> → <DNF> ∨ <conjunct>
where <term> denotes an arbitrary Boolean variable.
See also
- Conjunctive normal form
- Perfect Disjunctive Normal Form
- Perfect conjunctive normal form
- Conjunctive monomial
- Disjunctive Monomial
Notes
- ↑ Pozdnyakov S.N., Rybin S.V. Discrete Math. - S. 303.
Literature
- Yu.I. Galushkina, A.N. Maryamov: Lecture notes on discrete mathematics - 2nd ed., Rev. - M .: Iris-press, 2008 .-- 176 p. - (Higher education).