3-Ordering and Uniqueness of Normal Forms-07!08!2024
3-Ordering and Uniqueness of Normal Forms-07!08!2024
Introduction
• Definition.
• Need of normal forms.
• Elementary sum.
• Elementary product.
• Factor.
• Types of Normal Norms:
a) DNF
b) CNF
Normal Forms
• Drawbacks with truth table:
– Very tedious and difficult as the number of entries
increases very rapidly as number of statement
variables (n) increases.
• Solution: Transform the statement formulas to
some standard forms (simple in nature).
• The standard forms are called canonical forms
or normal forms.
Definition
• Let A (P1, P2, … Pn) be a statement formula where P1,
P2, ... Pn are the primitive variables.
1. If A has the truth value ‘T’ for atleast one combination of
truth values assigned to P1, P2, … Pn then A is said to be
staisfiable.
2. If A has the truth value ‘T’ for all possible assignments to
the truth values assigned to P1, P2, … Pn then A is said to
be identically true or tautology.
3. If A has the truth value ‘F’ for all possible assignments to
the truth values assigned to P1, P2, … Pn then A is said to
be identically false or contradiction.
Need of reduction to normal forms
• Decision problem: It is the process of finding
whether a given statement formula is a tautology
or a contradiction or atleast satisfiable.
• (-) If more no.of variables involved then it is
difficult with decision problem. Therefore we are
in need of other procedures known as reduction
to normal forms.
• NOTE: use the word "product" in place of
"conjunction" and "sum" in place of
"disjunction".
Elementary product
• A product of the variables and their negations
in a formula is called an elementary product.
(product means conjunction (AND)).
• Example: Let P and Q be any two atomic
variables.
• Then P,˥PQ,˥QP, P˥P and Q˥P are
elementary products.
Elementary sum
• A sum of the variables and their negations in a
formula is called an elementary sum. (Sum
means disjunction (OR)).
• Example: Let P and Q be any two variables.
• Then P, ˥PQ, ˥QP, P˥P and Q˥P are
elementary sums.
Factor
• Any part of an elementary sum or product, which is itself
an elementary sum or product is called a factor of the
original elementary sum or product.
• Example: ˥Q, P˥P, and ˥Q P are some of the factors of
˥Q P ˥P.
• Note 1: A necessary and sufficient condition for an
elementary product to be identically false is that it
contains atleast one pair of factors in which one is
negation of the other example P˥P ↔ F
• Note 2: A necessary and sufficient condition for an
elementary sum to be identically true is that it contains
atleast one pair of factors in which one is negation of the
other example P˥P ↔T.
Normal Form
• We can convert any proposition in two normal
forms −
1. Disjunctive Normal Form (DNF)
2. Conjunctive Normal Form (CNF)
DNF and CNF
a) Disjunctive Normal Form (DNF)
• A compound statement is in disjunctive
normal form if it is obtained by operating OR
among variables (negation of variables
included) connected with ANDs.
• Example: (PQ) (˥P ˥Q) (P˥Q˥R)
• NOTE:
1. DNF is not unique for a given formula.
2. A given formula is false if every product in DNF is
identically false.
Procedure to obtain DNF
1. Replace the connectives “” and by ,,˥
in the given statement formula.
2. Apply De Morgan’s law, if negation is applied
in the formula.
3. Apply Distributive law is some part of the
formula contains product of sum (POS).
Example - 1
• Obtain DNF of P (PQ) .
• Solution:
P (PQ)
P (˥PQ) (use PQ ˥PQ)
(P˥P)(PQ) (use distributive law)
Example - 2
• Obtain DNF of ˥(PQ) (PQ)
Exercises
• Obtain a disjunctive normal form of the
following;
1. P((P Q)˥(˥Q ˥P))
2. P(˥(Q R)) (((PQ) ˥R) P)
3. (Q (P R)) (P R) Q)
4. (P(Q R)) ((˥ P ˥ Q) ˥ R))
5. (˥ P ˥ Q) (˥ P R)
6. (˥ P ˥ Q) (PQ)
b) Conjunctive Normal Form (CNF)
• A compound statement is in conjunctive normal form
if it is obtained by operating AND among variables
(negation of variables included) connected with ORs.
• Examples:
– 1. (P Q) (Q R)
– 2. (˥P Q R) (S R)
• NOTE:
1. CNF is not unique for a given formula.
2. A given formula is true if every elementary sum in CNF is
identically true.
Example-1
• Obtain a conjunctive normal form P(PQ)
• Solution:
P(PQ) P(˥P Q)
Example-2
• Obtain a conjunctive normal form ˥(PQ) (PQ)
• Solution:
˥(PQ) (PQ) (Use RS (R S) (S R)
(˥(PQ) (PQ)) ((PQ) ˥(PQ)) ( Use R S ˥(RS))
Û ((PQ) (PQ) ) (˥ (PQ) ˥(PQ))
Û ((PQ) (PQ) ) ((˥ P ˥ Q) (˥P ˥ Q)) (Use distributive law)
Û (PQ P) (P Q Q) (˥ P ˥ Q ˥ P) (˥P ˥ Q ˥ Q)
Example-3
• Show that the formula Q (P˥ Q) (˥P ˥Q) is
tautology, by obtaining a CNF, of the formula.
Exercises
• Obtain CNF for the followings;
1. Q (P˥Q) (˥P˥Q)
2. (P(QR))(˥ P ˥ Q ˥ R))
3. P ((P Q) ˥(˥Q ˥P))
4. (Q (P R)) ˥((P R) Q)
PDNF and PCNF
Principal Disjunctive Normal Form (PDNF) or
sum-of-products canonical (normal) form.
• Min terms (product term or boolean conjunction):
– If there are two statement variables, P and Q, then
minterm will contain (22) 4 possible formulas that have
conjunctions() of P and Q or its negation will be:
• PQ, P˥Q, ˥PQ, ˥P˥Q
– In general, there are 2n such formulas given by n statement
variable.
– If there are three variables P, Q R, then
• 23 = 8
• (P ∧ Q ∧ R), (P ∧ Q ∧ ˥R), (P ∧ ˥Q ∧ R), (P ∧ ˥Q ∧ ˥R), (˥P ∧ Q ∧
R), (˥P ∧ Q ∧ ˥R), (˥P ∧ ˥Q ∧R), (˥P ∧ ˥Q ∧ ˥R).
Min terms of P and Q
• No two minterms are equivalent. For example, PQ or QP is
included but not both.
• P˥P and Q˥Q are not allowed.
• Each minterm has the truth value T for exactly one
combination of the truth values of the variables P and Q.
PDNF - Definition
• For a given formula, an equivalent formula
consisting of disjunctions of minterms only is
known as its PDNF. Such a normal form is also
called the sum-of-products canonical (normal)
form.
• Example:
(PQ) (˥PQ) (˥P˥Q)
Method – 1
(Obtain PDNF with Truth table)
• Obtain the PDNF of the formulas: PQ, PQ,
and ˥(PQ) and the associated truth tables are
given below.
Solution
• Obtain a PDNF P Q using Truth Table:
P Q P Q Min Terms
T T T P∧Q
T F F
F T T ˥P∧Q
F F T ˥P ∧ ˥Q
F F T F F F F T T T
F T F T F F T F T T
T F F F T F T T F T
T T F F F T T T T F
Minterm should evaluate ‘T’ for each combination of P and Q, whereas the
maxterm is the complement of the minterm. i.e., evaluate ‘F’ for each
combination of P and Q.
Minterms: PQ, P˥Q, ˥PQ, ˥P˥Q
Maxterms: ˥P ˥Q, ˥P Q, P ˥ Q, P Q
Minterms and Maxterms of P and Q
P Q Minterms Maxterms
F F m0 = P Q M0 =˥P ˥Q
F T m1 = P ˥Q M1 =˥P Q
T F m2 = ˥P Q M2 = P ˥ Q
T T m3 =˥P ˥Q M3 = P Q
PCNF - Definition
• For a given formula, an equivalent formula consisting
of conjunctions of the maxterms only is known as its
PCNF. This normal form is called the product-of-sums
canonical (normal) form.
• Example:
(P Q) (˥P Q) (˥P ˥Q)
i. PCNF from PDNF
ii. PDNF from PCNF
Example -1
(Find PCNF from PDNF )
• Find PCNF from PDNF with the formula S (PQ)(˥PQ)
• Solution:
i. Write ˥S i.e., disjunction of the remaining (missing)
minterms:
• The minterms of P and Q are PQ, P˥Q, ˥PQ, ˥P˥Q.
• Given terms: PQ, ˥PQ
• Remaining (missing) terms: (P˥Q), (˥P˥Q)
• ˥S (P˥Q) (˥P˥Q)
ii. Apply duality principle to find ˥(˥S) :
• ˥ (˥S) ˥ [ (P˥Q) (˥P˥Q) ]
• Finally, S [ (˥ P Q) (P Q) ] is the PCNF.
Example-2
(Find PCNF from PDNF )
• Find PDNF from the PCNF with the given formula
S(PQ)(˥PQ)
• Solution:
i. Write ˥S i.e., conjunction of the remaining maxterms.
• The maxterms of P and Q are PQ, P ˥Q, ˥P Q, ˥P ˥Q.
• Given: P Q, ˥P Q
• Remaining term: (P ˥Q), (˥P ˥Q)
• ˥S (P ˥Q) (˥P ˥Q)
ii. Apply duality principle to find ˥(˥S) :
• ˥ (˥S) ˥ [(P ˥Q) (˥P ˥Q) ]
• Finally, S [ (˥ P Q) (P Q) ] is the PDNF.
Example-3
a) Obtain PCNF with the given formula
S (PQ) (˥PQ) (˥ P˥Q) (P˥ Q)
b) Obtain PDNF with the given formula
S (P Q) (˥P Q) (˥ P ˥Q) (P ˥ Q)
• Solution:
a) ˥S There is no remaining minterms.
PCNF No PCNF for the given formula.
b) ˥S There is no remaining maxterms.
PCNF No PDNF for the given formula.
Method-1
with truth table
Method - 1
(With truth table)
• Obtain the PDNF of PQ. Also find PCNF.
• Solution:
• Let S PQ ˥PQ
P Q ˥P S ˥PQ Minterm Maxterm
T T F T PQ --
T F F F -- ˥PQ
F T T T ˥PQ --
F F T T ˥P˥Q --