Chapter 1: Propositions and Predicates
1.2
!Oil
11
NORMAL FORMS OF WELL-FORMED FORMULAS
We have seen various well-fonned fonnulas in tenns of two propositional
variables, say, P and Q. We also know that two such fonnulas are equivalent
if and only if they have the same truth table. The number of distinct truth
tables for fonnulas in P and Q is 24 . (As the possible combinations of truth
values of P and Q are IT, TF, FT, FF, the truth table of any fonnula in P
and Q has four rows. So the number of distinct truth tables is 24 .) Thus there
are only 16 distinct (nonequivalent) fonnulas, and any fonnula in P and Q is
equivalent to one of these 16 fonnulas.
In this section we give a method of reducing a given fonnula to an
equivalent fonn called the 'nonnal fonn'. We also use 'sum' for disjunction,
'product' for conjunction, and 'literal' either for P or for -, P, where P is any
propositional variable.
DefInition 1.6 An elementary product is a product of literals. An elementary
sum is a sum of literals. For example, P 1\ -, Q, -, P 1\ -, Q, P 1\ Q, -, P 1\ Q
are elementary products. And P v -, Q, P v -, R are elementary sums.
DefInition 1.7 A fonnula is in disjunctive nonnal fonn if it is a sum of
elementary products. For example, P v (Q 1\ R) and P v (-, Q 1\ R) are in
disjunctive nonnal fonn. P 1\ (Q v R) is not in disjunctive nonnal fonn.
1.2.1
CONSTRUCTION TO OBTAIN A
FORM OF A GIVEN FORMULA
Step 1 Eliminate ~ and
P ~ Q == (-, P v Q).)
:::}
~CTIVE
~
NORMAL
using logical identities. (We can use I 1e, l.e.
Step 2 Use DeMorgan's laws (/6) to eliminate -, before sums or products.
The resulting fonnula has -, only before the propositional variables, i.e. it
involves sum, product and literals.
Step 3 Apply distributive laws (/4) repeatedly to eliminate the product of
sums. The resulting fonnula will be a sum of products of literals, i.e. sum of
elementary products.
EXAMPLE 1.11
Obtain a disjunctive nonnal fonn of
P v (-,P
(Q v (Q
-,R)
Solution
P v (--, P
(Q v (Q
-, R)
== P v (--, P ~ (Q v (--, Q v -, R)
(step 1 using In)
== P v (P v (Q v (--, Q v -, R)
(step 1 using 112 and
h)
http://engineeringbooks.net
12
Theory of Computer Science
== P v P v
Q v -, Q v -, R
by using 13
== P v Q v -, Q v -, R
by using Ii
Thus, P v Q v -, Q v -, R is a disjunctive normal form of the given formula.
EXAMPLE 1.12
Obtain the disjunctive normal form of
(P ;\ -, (Q ;\ R))
v (P
=}
Q)
Solution
(P ;\ -, (Q ;\ R)) v (P
=}
Q)
1d
== (P ;\ -, (Q ;\ R) v (---, P v Q)
(step 1 using
== (P ;\ (-, Q v -, R)) v (---, P v Q)
(step 2 using 17)
== (P ;\ -, Q) v (P ;\ -, R) v -, P v Q
(step 3 using 14 and 13 )
Therefore, (P ;\ -, Q) v (P ;\ -, R) v -, P v Q is a disjunctive normal form
of the given formula.
For the same formula, we may get different disjunctive normal forms. For
example, (P ;\ Q ;\ R) v (P ;\ Q ;\ -, R) and P ;\ Q are disjunctive normal
forms of P ;\ Q. SO. we introduce one more normal form, called the principal
disjunctive nomwl form or the sum-of-products canonical form in the next
definition. The advantages of constructing the principal disjunctive normal
form are:
(i) For a given formula, its principal disjunctive normal form is unique.
(ii) Two formulas are equivalent if and only if their principal disjunctive
normal forms coincide.
Definition 1.8 A minterm in n propositional variables p], .,', P/1 is
QI ;\ Q2 ' " ;\ Q/l' where each Qi is either Pi or -, Pi'
For example. the min terms in PI and P 2 are Pi ;\ P 2, -, p] ;\ P 2,
p] ;\ -, P'J -, PI ;\ -, P 2, The number of minterms in n variables is 2/1.
Definition 1.9 A formula ex is in principal disjunctive normal form if ex is
a sum of minterms.
1.2.2 CONSTRUCTION TO OBTAIN THE PRINCIPAL
DISJUNCTIVE NORMAL FORM OF A GIVEN FORMULA
Step 1
Obtain a disjunctive normal form.
Step 2
Drop the elementary products which are contradictions (such as
P ;\ -, P),
Step 3 If Pi and -, Pi are missing in an elementary product ex, replace ex by
(ex;\ P) v (ex;\ -,PJ
http://engineeringbooks.net
Chapter 1: Propositions and Predicates
g,
13
Step 4 Repeat step 3 until all the elementary products are reduced to sum
of minterms. Use the idempotent laws to avoid repetition of minterms.
EXAMPLE 1.13
Obtain the canonical sum-of-products form (i.e. the principal disjunctive
normal form) of
ex = P v (-, P ;\ -, Q ;\ R)
Solution
Here ex is already in disjunctive normal form. There are no contradictions. So
we have to introduce the missing variables (step 3). -, P ;\ -, Q ;\ R in ex is
already a minterm. Now,
P == (P ;\ Q) v (P ;\ -, Q)
== ((P ;\ Q ;\ R) v (P ;\ Q ;\ -, R)) v (P ;\ -, Q ;\ R) v (P ;\ -, Q ;\ -, R)
== ((P ;\ Q ;\ R) v (P ;\ Q ;\ -, R)) v ((P ;\ -, Q ;\ R) v (P ;\ -, Q ;\ -, R))
Therefore. the canonical sum-of-products form of ex is
if;\Q;\mvif;\Q;\-,mvif;\-,Q;\m
v (P ;\ -, Q ;\ -, R) v (-, P ;\ -, Q ;\ R)
EXAMPLE 1.14
Obtain the principal disjunctive normal form of
ex
= (-, P v -, Q) ::::} (-, P ;\ R)
Solution
ex =
==
(-, P v -, Q) ::::} (-, P ;\ R)
hh P v -, Q)) v h
== (P ;\ Q) v
P ;\ R)
P ;\ R)
== ((P ;\ Q ;\ R) v (P ;\ Q ;\ -, R)) v
by using 1\2
by using DeMorgan's law
(h P
;\ R ;\ Q) v
P ;\ R ;\ -, Q))
==if;\Q;\mvif;\Q;\-,mvhP;\Q;\mv(-,p;\-,Q;\m
So, the principal disjunctive normal form of ex is
if;\Q;\mvif;\Q;\-,mvhP;\Q;\mVhP;\-,QAm
A minterm of the form
Ql ;\ Q2 A ... A Qn can be represented by
where (Ii = 0 if Qi = -, Pi and (Ii = 1 if Qi = Pi' So the principal
disjunctive normal form can be represented by a 'sum' of binary strings. For
L;.ample, (P ;\ Q ;\ R) v (P ;\ Q A -, R) v (-, P ;\ -, Q ;\ R) can be represented
by 111 v 110 v 001.
The minterms in the two variables P and Q are 00, 01, 10, and 11, Each
wff is equivalent to its principal disjunctive normal form. Every principal
disjunctive normal form corresponds to the minterms in it, and hence to a
(11(12 .. (I",
http://engineeringbooks.net
14
Theory of Computer Science
subset of {OO, 01, 10, 11}. As the number of subsets is 24 , the number of
distinct formulas is 16. (Refer to the remarks made at the beginning of this
section.)
The truth table and the principal disjunctive normal form of a are closely
related. Each minterm corresponds to a particular assignment of truth values
to the variables yielding the truth value T to a. For example, P 1\ Q 1\ --, R
corresponds to the assignment of T, T, F to P, Q and R, respectively. So, if
the truth table of a is given. then the minterms are those which correspond
to the assignments yielding the truth value T to ex.
EXAMPLE 1.1 5
For a given formula a, the truth values are given in Table 1.12. Find the
principal disjunctive normal form.
Truth Table of Example 1.15
TABLE 1.12
P
T
T
T
T
F
F
F
F
T
T
F
F
T
T
F
F
T
F
T
F
T
F
T
F
T
F
F
T
T
F
F
T
Solution
We have T in the a-column corresponding to the rows 1, 4, 5 and 8. The
minterm corresponding to the first row is P 1\ Q 1\ R.
Similarly, the mintem1S corresponding to rows 4, 5 and 8 are respectively
P 1\ --, Q 1\ ---, R, --, P 1\ Q 1\ Rand --, P 1\ ---, Q 1\ --, R. Therefore, the principal
disjunctive normal form of ex is
ifI\Ql\mvifl\--,QI\--,mvbPI\Ql\mvbPI\--,QI\--,m
We can form the 'dual' of the disjunctive normal form which is termed the
conjunctive normal form.
DefInition 1.10 A formula is in conjunctive normal form if it is a product
of elementary sums.
If a is in disjunctive normal form, then --, a is in conjunctive normal
form. (This can be seen by applying the DeMorgan's laws.) So to obtain the
conjunctive normal form of a, we construct the disjunctive normal form of
--, a and use negation.
Deimition 1.11
A maxterm in n propositional variables
PI, P2,
. ,
Pn is
Ql V Q2 V ... V QII' where each Qi is either Pi or --, Pi'
http://engineeringbooks.net
Chapter 1: Propositions and Predicates
J;;I,
15
DefInition 1.12 A formula ex is in principal conjunctive normal form if ex
is a product of maxterms. For obtaining the principal conjunctive normal form
of ex, we can construct the principal disjunctive normal form of -, ex and apply
negation.
EXAMPLE 1.16
Find the principal conjunctive normal form of
ex
=P
v (Q :::::} R).
Solution
-, ex=
-,(P v (Q:::::} R))
== -, (P v (-,
Q v R))
== -, P
1\ (-, (-,
== -, P
1\
(Q
by using 112
Q v R))
1\ -,
by using DeMorgan' slaw
by using DeMorgan's law and 17
R)
-, P /\ Q 1\ -, R is the principal disjunctive normal form of -,
the principal conjunctive normal form of ex is
-, (-, P
1\
1\ -,
R)
=P
ex. Hence,
v -, Q v R
The logical identities given in Table 1.11 and the normal forms of well-formed
formulas bear a close resemblance to identities in Boolean algebras and normal
forms of Boolean functions. Actually, the propositions under v, 1\ and -, form
a Boolean algebra if the equivalent propositions are identified. T and F act as
bounds (i.e. 0 and 1 of a Boolean algebra). Also, the statement formulas form
a Boolean algebra under v, 1\ and -, if the equivalent formulas are identified.
The normal forms of \vell-formed formulas correspond to normal forms
of Boolean functions and we can 'minimize' a formula in a similar manner.
The rules of inference are simply tautologies in the form of implication
(i.e. P :::::} Q). For example. P :::::} (P v Q) is such a tautology, and it is a rule
P
Q . Here P denotes a premise.
. ".Pv
The proposition below the line. i.e. P v Q is the conclusion.
of inference. We write this in the form
http://engineeringbooks.net