0% found this document useful (0 votes)
30 views18 pages

Understanding Normal Forms in Logic

This chapter brief more about how to make normal Forms and how to eliminate conditional statements

Uploaded by

Bayisa Gutema
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views18 pages

Understanding Normal Forms in Logic

This chapter brief more about how to make normal Forms and how to eliminate conditional statements

Uploaded by

Bayisa Gutema
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

Ambo University Institute of Technology

School of Informatics and Electrical Engineering


Department of Computer Science

Logic In Computer Science


Chapter Three: Normal Forms

Bayisa Gutema(MSc)

08/14/2025 Hachalu Hundessa Campus 1


Normal Forms

Definition: Let 𝜙 and 𝜓 be formula of propositional logic. We


say that ⊧ and ⊧ are semantically equivalent iff 𝝓 ⊧ 𝜓 and 𝜓 ⊧

 In that case we can write 𝝓 𝝣 𝜓.Further, we call 𝝓 is valid if


𝝓 holds.

• Note that we could also defined 𝝓 𝝣 𝜓 to mean that ⊧ (𝝓


⊧ 𝝓.

→ 𝜓)˄(𝜓 → 𝝓)holds.
• Because of its soundness and completeness semantic
equivalence is identical.

08/14/2025 Hachalu Hundessa Campus 2


Lemma
• Given formulas , and 𝜓 propositional logic , ⊢ 𝜓 holds iff
⊧ → 𝜓) holds.
• For current purpose, we want to transform formulas in to one
which don’t contain at all and occurrence of ˄ and ˅ are
confined to separate layers such that validity checks are easy.

1. Using equivalence 𝝓→𝜓𝝣¬ϕ˅𝜓 to remove all occurrence of


This is being done by

→ from formulas.
2. By specifying an algorithm takes the formula without any in
to normal forms(still without )for which validity is easy.

08/14/2025 Hachalu Hundessa Campus 3


Conjunctive Normal Form(CNF)
• A literal L is either an atom p or negation an atom ¬p. A
formula C is in Conjunctive normal forms(CNF) if it is
conjunction of clauses, where each clause D is a Disjunctive
of a literal.
1. L ::= P / ¬P
2. D ::= L / L ˅ D
3. C ::= D/ D ˄ C
Example of formulas of Conjunctive normal forms
)
In the first case, there are three clause of type D. , and .

08/14/2025 Hachalu Hundessa Campus 4


Cont..
• A literal is either a propositional variable or its negation. e.g.,
A and ¬ A are literals.
• A disjunctive normal form (DNF) is a wff of the form C1  … 
Cn, where each Ci is a conjunction of literals, called a
fundamental conjunction.
• A conjunctive normal form (CNF) is a wff of the form D1 
…  Dn, where each Di is a disjunction of literals, called a
fundamental disjunction.
• Examples. (A  B)  (¬ A  C  ¬ D) is a DNF. (A  B)  (¬ A 
C)  (¬ C  ¬ D) is a CNF. The wffs A, ¬ B, A  ¬ B, and A  ¬
B are both DNF and CNF.

08/14/2025 Hachalu Hundessa Campus 5


Notation

08/14/2025 Hachalu Hundessa Campus 6


Any wff has a DNF and a CNF
• For any propositional variable A we have True  A  ¬ A
and False  A  ¬ A. Both forms are DNF and CNF. For
other wffs use basic equivalences to:
1. remove conditionals,
2. move negations to the right, and
3. transform into required form. Simplify where desired.
Example.
(A  B  C)  (A  D)
 ¬ (A  B  C)  (A  D) (X  Y ¬ X  Y)
 (A  ¬ (B  C))  (A  D) (¬ (X  Y)  X  ¬ Y)
 (A  ¬ B  ¬ C)  (A  D) (¬ (X  Y)  ¬ X  ¬ Y) (DNF)
08/14/2025 Hachalu Hundessa Campus 7
Example…
 ((A  ¬ B  ¬ C)  A)  ((A  ¬ B  ¬ C)  D) (distribute  over )
 A  ((A  ¬ B  ¬ C)  D) (absorption)
 A  (A  D)  (¬ B  D)  (¬ C  D) (distribute  over ) (CNF)
 A  (¬ B  D)  (¬ C  D) (absorption) (CNF).
Exercise: Transform (A  B)  ¬ (C  D) into DNF and into CNF.

08/14/2025 Hachalu Hundessa Campus 8


Every Truth Function Is a Wff
• A truth function is a function whose arguments take result
values in {true, false}.
• So a truth function can be represented by a truth table. The
task is to find a wff with the same truth table.
• We can construct both a DNF and a CNF.
Technique. To construct a DNF, take each line of the table with a
true value and construct a fundamental conjunction that is true
only on that line.
To construct a CNF, take each line with a false value and
construct a fundamental disjunction that is false only on that line.

08/14/2025 Hachalu Hundessa Campus 9


Example

08/14/2025 Hachalu Hundessa Campus 10


Full CNF and Full DNF
• A DNF for a wff W is a Full DNF if each fundamental
conjunction contains the same number of literals, one for each
propositional variable of W.
• A CNF for a wff W is a Full CNF if each fundamental
disjunction contains the same number of literals, one for each
propositional variable of W.
Example. The wffs in the previous example are full DNF and full
CNF
Constructing Full DNF and Full CNF
• We can use the technique for truth functions to find a full DNF
or full CNF for any wff with the restriction that a tautology
does not have a full CNF and a contradiction does not have a
full DNF.
08/14/2025 Hachalu Hundessa Campus 11
Example
• True  A  ¬ A, which is a full DNF and a CNF, but it is not a
full CNF.
• False  A  ¬ A, which is a full CNF and a DNF, but it is not a
full DNF.
Alternative Constructions for Full DNF and Full CNF. Use
basic equivalences together with the following tricks to add a
propositional variable A to a wff W:
1. W  W  True  W  (A  ¬ A)  (W  A)  (W  ¬ A).
2. W  W  False  W  (A  ¬ A)  (W  A)  (W  ¬ A).
Example. Find a full DNF for (A  ¬ B)  (A  C).
• Answer. (A  ¬ B  C)  (A  ¬ B  ¬ C)  (A  C  ¬ B)  (A  C 
B), which can be simplified to: (A  ¬ B  C)  (A  ¬ B  ¬ C) 
(A  C  B),
08/14/2025 Hachalu Hundessa Campus 12
Example 2
Find a full CNF for ¬ A  B.
Answer
(¬ A  B)  (¬ A  ¬ B)  (B  A)  (B  ¬ A)
 (¬ A  B)  (¬ A  ¬ B)  (B  A).

08/14/2025 Hachalu Hundessa Campus 13


Negation Normal Forms(NNF)
• A formula is in NNF if ¬appears only in front of the
propositional variables.
• For every formula F there is another formula in NNF i.e. F ≡ F
´.
• NNF is Normal form that neither CNF nor DNF.
Example
(

08/14/2025 Hachalu Hundessa Campus 14


Solved Example on CNF and DNF

1. Consider .Convert to CNF

2. Reduce to Negative Normal Forms (NNF)


Solution

08/14/2025 Hachalu Hundessa Campus 15


Example#3

3. Reduce to Negative Normal Forms (NNF) the formula

Solution

08/14/2025 Hachalu Hundessa Campus 16


Example#4

4. Reduce to Conjunctive Normal Forms (CNF) the formula



Solution

08/14/2025 Hachalu Hundessa Campus 17


Example#5

5. Reduce to Conjunctive Normal Forms (CNF) the formula

08/14/2025 Hachalu Hundessa Campus 18

You might also like