Discrete Mathematics Unit-1
Discrete Mathematics Unit-1
DISCRETE
MATHEMATICAL
STRUCTURES
NOTES ON UNIT-1
Syllabus
UNIT – I: Mathematical Logic
Propositional logic and Predicate Calculus:
Statements and Notations, Connectives, Truth Tables,
Tautologies, Well-formed formulas, Equivalence of Formulas,
Tautological Implications, Normal Forms, Theory of Inference
for Statement Calculus, Consistency of Premises, Indirect
Method of Proof, Predicative Logic, Statement Functions,
Variables and Quantifiers, free and bound variables, inference
theory for predicate calculus.
UNIT – II: Sets, Relations & Functions
UNIT – III: Graph Theory I & II
UNIT – IV: Algebraic Structures & Combinatorics
UNIT – V: Recurrence Relation
TEXT BOOKS
Text Book:
1. Tremblay, Manohar, Discrete Mathematical Structures with Applications
to Computer Science, TMH Publications[1,2,3,4,5]
Course Outcomes: At the end of the course, the student will be able to:
T F
F T
1.The first column in the above truth table indicates the possible
truth values of p
2.The second column gives the corresponding truth vale of p
EXAMPLE FOR NEGATION
• Let the proposition
p: 3 is a prime number
p: 3 is not a prime number
• Let the proposition
p: New Delhi is in India
p: New Delhi is not in India
or
it is not the case that New Delhi is in India
or
it is false that New Delhi is in India
LOGICAL CONNECTIVES:
CONJUNCTION
• A Compound proposition obtained by
combining two given propositions by inserting
the word ‘and’ in between them is called the
conjunction of the given propositions.
• The symbol used for Conjunction is “”
• The conjunction of two propositions p and q is
denoted by pq( read “p and q”)
• The conjunction of pq is true only when p is
true and q is true; in all other cases it is false.
Truth table of Conjunction
• Truth table:
in the below truth table, the last column
indicates the truth value of p q for all
possible combinations of the truth values of p
and q given in the first 2 columns.
p q pq
T T T
T F F
F T F
F F F
Examples on Conjunction
Example-1:
p: It is raining
q: it is warm
pq : It is raining and it is warm
Now what is the truth value of pq is ______
Example-2:
p: 2+3=5
q: 1<2
pq : 2+3=5 and 1<2
Now what is the truth value of pq is ______
LOGICAL CONNECTIVES: DISJUNCTION
• A Compound proposition obtained by
combining two given propositions by inserting
the word ‘or’ in between them is called the
disjunction of the given propositions.
• The symbol used for Disjunction is “”
• The disjunction of two propositions p and q is
denoted by p q( read “p or q”)
• The Disjunction of p q is false only when p is
false and q is false; in all other cases it is true.
Truth table of Disjunction
• Truth table:
in the below truth table, the last column
indicates the truth value of p q for all
possible combinations of the truth values of p
and q given in the first 2 columns.
p q pq
T T T
T F T
F T T
F F F
Examples on Disjunction
Example-1:
p: Today is Sunday
q: 2+3=5
p q : Today is Sunday or 2+3=5
Now what is the truth value of p q is ______
Example-2:
p: 5-3=2
q: 1<2
p q : 5-3=2 or 1<2
Now what is the truth value of p q is ______
LOGICAL CONNECTIVES: EXCUSIVE- OR (XOR)
(or) EXCUSIVE DISJUNCTION
• A Compound proposition p q (read as either
p or q is true,but not both) is called the
exclusive disjunction of the propositions p and
q.
• The symbol used for Exclusive-or is “”
• The compound proposition of p q is true
only when either p is true or q is true but not
both; in all other cases it is false.
Truth table of Exclusive Disjunction
p q pq
T T F
T F T
F T T
F F F
Examples on Exclusive Disjunction
Example-1:
p: Today is Sunday
q: 2+3=5
p q : Either Today is Sunday or 2+3=5 is true, but not
both
Now what is the truth value of p q is ______
Example-2:
p: 5-3=2
q: 1<2
p q : Either 5-3=2 or 1<2 is true ,but not both
Now what is the truth value of p q is ______
LOGICAL CONNECTIVES:
CONDITIONAL (or) IMPLICATION
• A Compound proposition obtained by combining two given
propositions by using the words ‘if’ and ‘then’ at
appropriate place is called the conditional or implication of
the given propositions.
• The symbol used for Conditional or implication is “”
• The implication of two propositions p and q is denoted by
p q( read “if p, then q”)
• The implication of two propositions q and p is denoted by
q p ( read “if q, then p”) .
• The implication of p and q: p q is false only when p is
true and q is false; in all other cases it is true.
• The implication of q and p : q p is false only when q is
true and p is false; in all other cases it is true.
• It is important to note that p q is not equal to q p
Truth table of Conditional or
Implication
• Truth table:
in the below truth table, the last two
columns indicates the truth value of p q
and q p for all possible combinations of the
truth values of p and q given in the first 2
columns.
p q pq qp
T T T T
T F F T
F T T F
F F T T
Examples on Conditional or
Implication
Example-1:
p: 2 is a prime number
q: 6 is a perfect square
p q : if 2 is a prime number, then 6 is a perfect square
q p : if 6 is a perfect square, then 2 is a prime number
Now what is the truth value of p q is ______ and q p is _____
Example-2:
p: 3 is a prime number
q: 9 is multiple of 6
p q : if 3 is a prime number, then 9 is multiple of 6
q p : if 9 is multiple of 6, then 3 is a prime number
Now what is the truth value of p q is ______ and q p is _____
NOTE-1: in p q, p is called the hypothesis, antecedent,
premise
NOTE-2: in p q, q is called the conclusion, consequence
NOTE-3: p q ≠ q q
LOGICAL CONNECTIVES:
BICONDITIONAL
• If p and q are two propositions, the compound
proposition p q is called as p Biconditional
proposition q.
• The symbol used for Biconditional proposition is “”
• p q read it as “p if and only if q” or “ p iff q”
• q p read it as “q if and only if p” or “q iff p”
• p q can also be written as (p q) (q p) it can
be read it as “if p then q and if q then p”
• The compound proposition p q is true only when
both p and q have the same truth values; in all other
cases it false.
• It is important to note that p q is equal to q p
Truth table of Biconditional
• Truth table:
in the below truth table, the last column
indicates the truth value of p q for all possible
combinations of the truth values of p and q given
in the first 2 columns.
p q pq qp p q or
(p q ) (q p)
T T T T T
T F F T F
F T T F F
F F T T T
Examples on Biconditional
Example-1:
p: 2 is a prime number
q: 6 is a perfect square
p q : if 2 is a prime number, then 6 is a perfect square
q p : if 6 is a perfect square, then 2 is a prime number
p q: if 2 is a prime number, then 6 is a perfect square and if 6 is
a perfect square, then 2 is a prime number
Now what is the truth value of p q is _____
Example-2:
p: 3 is a prime number
q: 9 is multiple of 6
p q : if 3 is a prime number, then 9 is multiple of 6
q p : if 9 is multiple of 6, then 3 is a prime number
p q: if 3 is a prime number, then 9 is multiple of 6 and if 9 is
multiple of 6, then 3 is a prime number
Now what is the truth value of p q is _____
Converse, Inverse, Contrapositive
• Consider the proposition p q
i. p q converse is q p
ii. p q inverse is p q
iii. p q contrapositive is q p
Statement Formulas
• Statements which do not contain any connectives(and, or, if..then,
if and only if, either..or) are called “atomic” or “primary” or
“simple statements”.
T F T F F
F T T F F
F F F F T
Components : p ,q
Statement Formulas: (p q),(p q), (p q) (p q)
Examples on Truth Tables
• Example-2: Construct the truth table for
( p q) (p q)
p q p q ( p q) (p q) ( p q)
(p q)
T T F F F T F
T F F T T F F
F T T F T F F
F F T T T T T
Components : p ,q
Statement Formulas: p, q, ( p q), (p q), ( p q) (p q)
Examples on Truth Tables
• Example-3: Construct the truth table for
(p q) ( (p q) (q p) )
p q pq pq qp (p q) (q p) (p q) ( (p q)
(q p) )
T T T T T T T
T F F F T F T
F T F T F F T
F F T T T T T
Components : p ,q
Statement Formulas: p q, p q, q p, (p q) (q p),
(p q) ( (p q) (q p) )
Order of Precedence for Logical Connectives
• We will use the parentheses to specify the order in which
logical connectives in a compound proposition are to be
applied.
• The negation connective has precedence over all other
connectives.
• Ex:- p q means ( p) q
• The conjunction connective has precedence over the
disjunction connective.
• Ex:- p q r means (p q) r but not p (q r)
• Conditional() and Biconditional() operators have lower
precedence than other operators. Among them ,
Conditional() has precedence over Biconditional()
Exercise-1
Ex-1:- Write the following statement in Symbolic form
“ the crop will be destroyed if there is a flood”
Sol: The above statement can be divided into some simple
statements.
p: There is a flood
q: The crop will be destroyed
Symbolic form: p q
Exercise-2
Ex-2:- Write the following statement in Symbolic form
“ if Ramu takes B.Tech course or Seetha take
B.Arch course, then Lakshman takes B.Pharmacy
course”
Sol: The above statement can be divided into some simple
statements.
p: Ramu takes B.Tech course
q: Seetha take B.Arch course
r: Lakshman takes B.Pharmacy course
Symbolic form: (p q) r
Exercise-3
• Consider the following propositions concerned with a
triangle ABC.
p: ABC is isosceles
q: ABC is equilateral
r: ABC is equiangular
Write down the following compound propositions in
words
i. p ( q) ii. ( p) q iii. p q iv. q p
v. ( r) (q) vi. p ( q)
i. p ( q) : ABC is isosceles and ABC is not
equilateral
ii. ( p) q : ABC is not isosceles or ABC is
equilateral
iii. p q : if ABC is isosceles, then ABC is
equilateral
iv. q p: if ABC is equilateral, then ABC is isosceles
v. ( r) (q): if ABC is not equiangular , then ABC
is not equilateral
vi. p ( q): if ABC is isosceles, then ABC is not
equilateral and if ABC is not equilateral, then ABC is
isosceles
FUCTIONALLY COMPLETE SET
OF CONNECTIVES
(DISCRETE MATHEMATICS)
www.youtube.com/c/DIVVELASRINIVASARAO
91-9492704500
( Whats’up Number)
Functionally Complete Set of Connectives
• A set of connectives is said to be functionally complete set of
connectives if every compound statement or statement formula can
be expressed interms of an equivalent formula containing the
connectives only from this set.
• The sets of connectives {, } and {, } are functionally
complete sets.
• Example:
( i). p q ( p q)
p q can be expressed in {, }
( ii). p q ( p q)
p q can be expressed in {, }
( iii). p q p q
p q can be expressed in {, }
( iv) p q ( p q) ( q p)
p q can be expressed in {, }
• The sets of connectives {, } is not functionally complete
sets, because it is not possible to find an equivalent formula
containing connectives only from the set {, }
• {↑} and {↓} are functionally complete sets.
p p p (p p ) p ↓ p
p q ( p q) p ↓ q (p ↓ p) ↓ (q ↓ q)
{↓} is a functionally complete set because ↓ can be
expressed in {, }
p p p (p p ) p ↑ p
p q ( p q) (p ↑ q) (p ↑ p) ↑ (q ↑ q)
{↑} is a functionally complete set because ↓ can be
expressed in {, }
Note-1: , } and {, } are functionally complete sets.
Note-2:{, } is not a functionally complete set
Note-3: {↑} and {↓} are functionally complete sets
Tautology
• A Compound proposition or Statement formula
which is true for all possible truth values of its
components is called a “Tautology”
(or)
• A Compound proposition ‘P’ which contains
some components such as p1,p2,p3,……,pn is
called a Tautology, if it is true for every truth
value assignments for p1,p2,p3,……,pn.
• Tautology can also be called as “Universally
valid formula” or “logical truth”
Example on Tautology
• Example-1: Construct the truth table for
(p q) ( p q) and check whether it is a
Tautology or not?
p q p p q p q (p q) ( p q)
T T F T T T
T F F F F T
F T T T T T
F F T T T T
T F T F F
F T T F F
F F F T F
T T T T F F F
T F T T F F F
F T T T T T F
F F F T T F F
T T F F T F T F
T F F T T F T F
F T T F T F T F
F F T T T F T F
The given compound propositions p p and q q are true for all
possible truth values of its components, Hence the given compound
propositions are Tautologies.
The given compound propositions p p and q q are false for all
possible truth values of its components, Hence the given compound
propositions are Contradictions
Contingency
• A Compound proposition or Statement formula
which is true or false for all possible truth
values of its components is called a
“Contingency”
(or)
• A Contingency is a compound proposition
which is neither a Tautology nor a
Contradiction
Example on Contingency
• Example-1: Construct the truth table for
(p q) (p q) and check whether it is a
Contingency or not?
p q pq pq (p q) (p q)
T T F T F
T F T F F
F T T T T
F F F T F
p q pq p pq
T T T F T
T F F F F
F T T T T
F F T T T
p q pq p pq (p q) ( p q)
T T T F T T
T F F F F T
F T T T T T
F F T T T T
Example on Logical Equivalence
• Example-2: for any three propositions p, q, r. Show that
p (q r) (p q) r
Let us first construct the truth table for p (q r) and (p q)
r
p q r qr p (q r) pq (p q)
r
T T T T T T T
T T F F F T F
T F T T T F T
T F F T T F T
F T T T T F T
F T F F T F T
F F T T T F T
F F F T T F T
• We observe that from the above truth table,
these two columns p (q r) and (p q)
r, have identical truth values for all possible
truth values of its components: p, q and r.
Hence we can say that
p (q r) (p q) r
• If p (q r) (p q) r, then p (q
r) (p q) r is a Tautology shown in
below table
Show that p (q r) (p q) r is a tautology.
p q r q r p (q r) p q (p q) p (q r) (p
r q) r
T T T T T T T T
T T F F F T F T
T F T T T F T T
T F F T T F T T
F T T T T F T T
F T F F T F T T
F F T T T F T T
F F F T T F T T
T T T T T T T T
T T F F F T F F
T F T F F F T F
T F F F F F F F
F T T T T T T T
F T F F T T T T
F F T F T T T T
F F F F T T T T
• We observe that from the above truth table,
these two columns p (q r) and (p q)
(p r) , have identical truth values for all
possible truth values of its components: p, q
and r. Hence we can say that
p (q r) (p q) (p r)
• If p (q r) (p q) r, then p (q
r) (p q) r is a Tautology
Example on Logical Equivalence
Example-4: for any three propositions p, q, r. Show that
p ( q r) and p ( q r) are not logically Equivalent.
Let us first construct the truth table for
p ( q r) and p ( q r)
p q r q qr p ( q r) r qr p ( q r)
T T T F T T F F T
T T F F F F T T T
T F T T T T F F T
T F F T T T T F T
F T T F T F F F F
F T F F F F T T T
F F T T T F F F F
F F F T T F T F F
• We observe that from the above truth table,
these two columns p ( q r) and p ( q
r) , have not identical truth values for all
possible truth values of its components: p, q
and r. Hence we can say that
p (q r) (p q) (p r)
• If p (q r) (p q) r, then p (q
r) (p q) r is not a Tautology
EQUIVALENCE FORMULAS
PPP P PP Idempotent laws
(P Q) R P (Q R) (P Q) R P (Q R) Association laws
(P (P Q ) P (P (P Q ) P Absorption laws
P Q Q P
PQP Q
P Q (P Q )
(P Q ) P Q
( P Q ) ( P R ) P ( Q R)
( P R ) ( Q R ) (P Q ) R
( P Q ) ( P R ) P ( Q R)
( P R ) ( Q R ) (P Q ) R
EQUIVALENCE FORMULAS USING
BICONDITIONALS
P Q (P Q) ( Q P)
P Q P Q
P Q (P Q ) ( P Q )
(P Q ) (P Q )
Logical Equivalence with out using Truth tables
• Note: here we are using Equivalence formulas to check
whether the given compound statements are equal or not with
out using Truth table method.
• Example-1: With out using Truth table, prove the
following.
p (q r) (p q) r
• Sol: Take LHS : p (q r)
p ( q r ) [ by q r q r ]
p ( q r ) [ by p q p q ]
( p q) r [ by Associative law ]
( p q) r [ by De Morgan’s law ]
( p q) r [by p q p q ]
RHS
• Take RHS : ( p q) r
( p q) r [ by p r p r ]
( p q) r ) [ by De Morgan’s law ]
p ( q r ) [ by Associative law ]
p (q r) [ by q r q r ]
p (q r) [by p q p q ]
LHS
Therefore we can say that p (q r) (p q) r
• Example-2: With out using Truth table, prove the following.
(p r) (q r) (p q) r
Sol: Take LHS : (p r) (q r)
( p r ) ( q r ) [ by p r p r &
q r q r]
( p q ) r [ by taking negation common]
( p q) r [by p q p q ]
(p q) r
RHS
Take RHS : (p q) r
( p q) r [ by p r p r ]
( p q) r [ by applying negation ]
( p r ) ( q r ) [ by distributive law ]
(p r) (q r) [by p r p r & q r
qr]
LHS
hence we can say that (p r) (q r) (p q) r
• Example-3: With out using Truth table, prove the following.
[ p ( q r)] (q r ) (p r) r
• Sol: Take LHS : [ p ( q r)] (q r ) (p r)
[ by Associative Law & Commutative Law]
[( p q) r)] ( r q ) (r p)
[by Distributive Law & De Morgan’s Law]
[ (p q) r)] r (q p )
[ r (p q)] r (p q )
[ by Commutative Law]
r [ (p q) (p q ) ] [ by Commutative Law]
r [(p q ) (p q) ] [ by Complement Law]
r T [by Identity Law]
r
RHS
Therefore [ p ( q r)] (q r ) (p r) r
• Example-4: With out using Truth table, prove the following.
[(p q ) (p q ) ] q p q
• Sol: Take LHS : [(p q ) (p q ) ] q
[ by Distributive Law ]
[ p ( q q) ] q [by Complement Law]
[p F ] q [by Identity Law]
p q
RHS
Therefore [(p q ) (p q ) ] q p q
Example-5: with out using Truth table, prove the following.
p [ p (p q ) ] p
Sol: Take LHS : p [ p (p q ) ] [ by Absorption Law]
p p [by Idempotent law ]
p
RHS
Therefore p [ p (p q ) ] p
• Example-6: With out using Truth table, prove the following.
(p q ) [ q ( r q)] (q p)
• Sol: Take LHS : (p q ) [ q ( r q)]
[ by Commutative Law ]
(p q ) [ q ( q r)] [by Absorption
Law]
(p q ) q [by p q p q ]
( p q) q [ by Distributive Law]
( p q) (q q ) [ by Complement Law]
( p q) F [ by Identity Law]
( p q) [by Commutative Law ]
( q p) [by De Morgan’s Law ]
(q p)
RHS
Therefore (p q ) [ q ( r q)] (q p)
• Example-7: With out using Truth table, prove the following is a
Tautology.
[(p q) { p ( q r)}] ( p q) ( p r)
• Sol: Take A= [(p q) { p ( q r)}] ( p q)
( p r )
Take B= [(p q) { p ( q r)}]
Take C= ( p q) ( p r )
A= B C
Let us take B= (p q) { p ( q r)}
[Apply negation ]
(p q) {p ( q r)}
(p {q ( q r)}
(p {q q r}[ by Idempotent Law]
p (q r)
Now B= p (q r)
Let us take C= ( p q) ( p r )
(p q) (p r )
((p q) ( p r))
(p (q r))
B
B= (p (q r))
Therefore A= B C B B
( (p (q r)) (p (q r))
T [ by B B T]
Therefore, the given compound proposition [(p q) { p
( q r)}] ( p q) ( p r) is a Tautology.
DUALITY LAW
• Two formulas A and A* or Ad are said to be duals of
each other if either one can be obtained from the
other by replacing by and by . If the formula
A contains the special variables T or F, then A* or Ad
is obtained by replacing T by F and F by T.
• The connectives are also called duals of each
other.
• Example: Write down the duals of i. p (q r)
ii. ( p q) T
iii. (p q) (p (q s)
• The dual of p (q r) is p (q r)
• The dual of ( p q) T is ( p q) F
• The dual of (p q) (p (q s) is
(p q) (p (q s)
• Note-1: if any two compound statements are equivalent ,then
their duals are also equivalent to each other. This is known as
“Principle of Duality”
If A B, then A* B*
(or)
If A B, then Ad Bd
• Note-2: (Ad)d A (or) (A* ) * A (The dual of the dual of
A is logically equivalent to A
EXAMPLES ON DUALITY LAW
• Example-1: Write down the duals of the
following propositions.
i. p q dual is
(p q)* ( p q)* p q
ii. (p q) r dual is
[(p q) r]* [( p q) r]*
[( p q)) r]*
[(p q) r]*
(p q) r
iii. p (q r) dual is
[p (q r)]* [p (q r)]*
[ p (q r)]*
[ p (q r)]
p (q r)
iv. p (q r) dual is
[p (q r)]* [ p (q r)] *
[ p (q r)]
p (q r)
v. (p q) T dual is
[ (p q) T]* (p q) F
• Example-2: Verify the principle of duality for the
following logical equivalence
[ (p q) p ( p q)] p q
Sol: Let us take A= [ (p q) p ( p q)]
Let us take B = p q
A*= [ (p q) p ( p q)]*
[( (p q)) p ( p q)]*
[ (p q) p ( p q)]*
[ (p q) p p q]*
[ (p q) ( p q)]
[ (p p q)(q p q)]
[ (F q) (q q p)]
[ F ( p q)]
pq
B*= ( p q)*
pq
Therefore A* B* is proved
according to principle of Duality
If A B, then A* B*
Well-formed Formulas
• A Statement formula is an expression which is
a string consisting of statements, parentheses
and connective symbols.
• Not every string of these symbols is a formula.
• A recursive definition of a statement formula
often called a well-formed formula, it can be
generated by the following rules.
1. A statement variable standing alone is a
well-formed formula.
2. if A is a well-formed formula, then A is
a well-formed formula
3. if A and B are well-formed formulas, then (A
B),(A B),(A B) and (A B) are well-formed
formulas.
4. A string of symbols containing the statement
variables, connectives and parentheses is a well-
formed formula, iff it can be obtained by finitely
many applications of the rules 1,2 and 3.
Examples of Well-formed
Formulas
• (p q), (p q), ( p (p q)), ( p (q
r)), and ( (p q) (q r)) are well-formed
formulas.
• p q is not a well-formed formula, here p and
q are well-formed formula. A well-formed
formula would be either (p q) or (p q).
• (p q is not a well-formed formula. A well-
formed formula would be (p q).
• (p q) q) is not a well-formed formula, A
well-formed formula would be ((p q) q)
Tautological Implication
• A compound proposition A(p1,p2,...., pn) is said
to tautologically imply a another compound
proposition B(p1,p2,...., pn) if and only if A B
is a Tautology, where p1,p2,...., pn are
Statements or Components.
• A ⇒ B is true if and only if A B is a
Tautology.
• Tautological implication is denoted by the
symbol ⇒
• A ⇒ B can be read it as “ A implies B”
• ⇒ is not a logical connective.
Examples on Tautological
Implication using Truth Tables
• Example-1: Show that p (p q) ⇒ q
We know that A ⇒ B is true if A B is a Tautology.
T T T T T T T T T
T T F T F F F F T
T F T T T T T T T
T F F T F T F F T
F T T T T T T T T
F T F T T F F F T
F F T F T T T T T
F F F F T T T T T
Therefore (p q) (p r) (q r) r is a Tautology, Hence we can
that (p q) (p r) (q r) ⇒ r
NAND and NOR Connectives
• NAND is a combination of “not” and “and” connectives
• For any two propositions p and q, The DeMorgan’s laws state
that
i. (p q) p q
ii. (p q) p q
• The compound proposition (p q) is read as “ not ‘p and q’ ”
is also denoted by p ↑ q. The symbol ↑ is called the NAND
connective.
(p ↑ q) (p q) p q
• The compound proposition (p q) is read as “ not ‘p or q’ ”
is also denoted by p ↓ q. The symbol ↓ is called the NOR
connective.
(p ↓ q) (p q) p q
• (p ↑ q) and (p ↓ q) are also duals of each other
i. (p q) p q
ii. (p q) p q
Truth Table of (p ↑ q) and (p ↓ q) is shown
below.
p q (p q) (p q) p↑q p q (p q) p↓q
T T T F F T F F
T F F T T T F F
F T F T T T F F
F F F T T F T T
Examples on NAND and NOR Connectives
• Example-1: For any propositions p, q , prove the following.
i. (p ↑ q) ( p ↓ q)
Let us take LHS : (p ↑ q)
( (p q) )
( p q) )
p ↓ q
RHS
Therefore (p ↑ q) ( p ↓ q)
ii. (p ↓ q) ( p ↑ q)
Let us take LHS : (p ↓ q)
( (p q) )
( p q) )
p ↑ q
RHS
Therefore (p ↓ q) ( p ↑ q)
• Example-2: For any propositions p, q ,r prove the following.
i. p ↑ (q ↑ r) p (q r)
Let us take LHS : p ↑ (q ↑ r) [ by (q ↑r) (q r) ]
p ↑ (q r) ) [ by (p ↑q) (p q) ]
(p (q r) )
p ( (q r) )
p (q r) )
RHS
Therefore p ↑ (q ↑ r) p (q r)
ii. p ↓ (q ↓ r) p (q r)
Let us take LHS : p ↓ (q ↓ r) [ by (q ↓ r) (q r) ]
p ↓ (q r) ) [ by (p ↓ q) (p q) ]
(p (q r) )
p ( (q r) )
p (q r) )
RHS
Therefore p ↓ (q ↓ r) p (q r)
Examples on Tautological Implication with
out using Truth Tables
• Example-1: (p q) ( (p r) (q r)) ⇒ r
Let us take and prove that (p q) (p r) (q r))
r is a Tautology
Now consider (p q) ( (p r) (q r)) r
[ by (p r) (q r) (p q) r]
⇒ (p q) ((p q) r) r
⇒ (p q) (( p q) r )) r
⇒ ((p q) ( p q)) ((p q) r ) r
[ by ((p q) ( p q)) F ]
⇒ (F ((p q) r)) r
⇒ ((p q) r)) r
⇒ ((p q) r)) r
⇒ ((p q) r)) r
[ by Distributive Law]
⇒ ((p r) (q r )) r
⇒ ( (p r) (q r )) r
⇒ (( p r) ( q r )) r
⇒ (( p r r) ( q r r ))
[ by r r T ]
⇒ (( p T) ( q T ))
⇒TT
⇒T
Therefore (p q) ( (p r) (q r)) ⇒ r
• Example-2: ((p p) q) ( ( p p) r) ⇒ (q r)
Let us take and prove that
((p p) q) ( ( p p) r) (q r)) is a Tautology
Now consider ((p p) q) ( ( p p) r) (q r)
[ by (p p) T ]
⇒ ((T q) (T r)) (q r)
⇒ (( T q) ( T r)) (q r)
⇒ ((F q) (F r)) (q r)
[ by identity Law]
⇒ ( q r) (q r)
⇒ ( q r) ( q r)
⇒ ( q r) ( q r)
⇒ (q r) ( q r)
⇒ (q q r) ( r q r)
⇒ (q q r) ( r q r)
⇒ (q q r) ( r r q)
⇒ (q q r) ( r r q)
[ by q q T and r r T ]
⇒ (T r) (T q) [ by dominance Law]
⇒ T T
⇒ T
Therefore : ((p p) q) ( ( p p) r) ⇒ (q r)
I. NORMAL FORMS & ITS TYPES
(a) DISJUNCTIVE NORMAL FORM(DNF) WITH
EXAMPLE PROBLEMS
(b) CONJUNCTIVE NORMAL FORM(CNF) WITH
EXAMPLE PROBLEMS
(c) PRINCIPAL DISJUNCTIVE NORMAL FORM
(PDNF) WITH EXAMPLE PROBLEMS
(d)PRINCIPAL CONJUNCTIVE NORMALFORM
(PCNF) WITH EXAMPLE PROBLEMS
(DISCRETE MATHEMATICS)
www.youtube.com/c/DIVVELASRINIVASARAO
91-9492704500( Whats’up Number)
Why Normal Forms required
• We have to construct the Truth table to determine
whether the given compound proposition A(p1,p2,....,
pn) is a Tautology or Contradiction or atleast
satisfiable in a finite number of steps is called as
“Decision Problem”
• We have to construct the Truth table to determine
whether the given compound propositions
A(p1,p2,...., pn) and B(p1,p2,...., pn) are logically
equivalent by comparing the truth values.
• But the construction of truth tables may not be
practical, when the number of primary propositions
p1,p2,...., pn increases.
• We therefore consider alternate procedure known as
reduction to Normal Forms.
• There are four types of Normal Forms.
1. Disjunctive Normal Form(DNF)
2. Conjunctive Normal Form(CNF)
3. Principal Disjunctive Normal Form(PDNF)
4. Principal Conjunctive Normal Form(PCNF)
• A Product of the atomic variables(statements) and their
negations in a statement formula or compound statement(a
conjunction of primary statements and their negations) is
called an “Elementary Product”.
• Example: p p, p p, p p, p p, p q, p
q, p q are Elementary products in 2 variables.
• A Sum of the atomic variables(statements) and
their negations(a Disjunction of primary
statements and their negations) is called an
“Elementary Sum”.
• Example: p p, p p, p p, p q, p
q, p q are Elementary sums with 2
variables.
Disjunctive Normal Form(DNF)
• Disjunctive Normal Form:
A formula Compound proposition) which is equivalent to a given
formula and which consists of a sum of elementary products is
called a “Disjunctive Normal Form” of the given formula.
Example: (p q) (p q) ( p q) ( p q)
p q pq p (p q)
T T T T
T F F F
F T T F
F F T F
p q Minterms
T T pq
T F p q
F T pq
F F p q
Minterms
• The conjunctions in which each statement variable or its
negation, but not both, appears only once are called
“Minterms”.
• Let p, q and r be three statement variables, The possible
number of Minterms= 2n = 23 =8 Minterms are shown in final
column of the below table.
p q r Minterms
T T T pqr
T T F pqr
T F T pqr
T F F p q r
F T T pqr
F T F p q r
F F T p q r
F F F p q r
Maxterms
• The disjunctions in which each statement variable or
its negation, but not both, appears only once are
called “Maxterms”.
• Let p and q be two statement variables, the possible
number of Maxterms = 2n = 22 =4 Maxterms, that are
shown in final column of the below table.
p q Maxterms
T T p q
T F p q
F T pq
F F p q
Maxterms
• The disjunctions in which each statement variable or its
negation, but
not both, appears only once are called “Maxterms”.
• Let p, q and r be three statement variables, The possible
number of Maxterms = 2n = 23 = 8 Maxterms, that are shown
in final column of the below table.
p q r Maxterms
T T T pqr
T T F pqr
T F T pqr
T F F p q r
F T T pqr
F T F p q r
F F T pqr
F F F p q r
PRINCIPAL DISJUNCTIVE NORMAL
FORM(PDNF)
• A formula(Compound proposition) which is equivalent to a
given formula and which consisting of disjunctions of
Minterms is called a “Principal Disjunctive Normal
Form(PDNF)” of the given formula.
• Principal Disjunctive Normal Form(PDNF) is also called as
“Sum of Products Canonical Form”
• Example-1 : Obtain the PDNF of ( p q )
Let us consider ( p q )
(p T ) (T q)
[ by p T T & T q q ]
[ by Complementation Law]
(p (q q )) ((p p ) q)
[ by Distributive Law]
((p q ) (p q )) ((p q ) ( p q))
(p q) (p q) (p q ) ( p q)
[ by idempotent Law]
(p q) (p q) ( p q)
This is the required PDNF.
Truth Table Method:
p q q (pq)
T T F T
T F T T
F T F F
F F T T
T T T F T F T T T
T T F F T F T F T
T F T F F F F F F
T F F F F F F F F
F T T T F T T T T
F T F T F F F F F
F F T T F T T F T
F F F T F F F F F
Considering only True vales in the final column of the above Truth table , Take the
disjunctions of conjunctions of the truth values of the corresponding statements: p,q and r.
Then the corresponding PDNF is
(p q r) (p q r ) ( p q r) ( p q r))
Example-3 : Obtain the PDNF of p ((p q ) ( q p))
Let us consider p ((p q ) ( q p))
[ by p q p q ]
p (( p q ) (q p ))
p ( p (q p)) (q (q p))
[ by Distributive Law]
p (( p q p) (q q p))
[ by Commutative Law & idempotent Law ]
p (( p p q) (q p))
p ((F (q p)) [ by Identity Law]
p (q p)
( p T) (q p) [ by p T p & (q q) T]
( p (q q)) (q p)
[ by Distributive Law & Commutative Law]
(( p q ) ( p q)) (p q)
( p q ) ( p q) (p q)
This is the required PDNF
Truth Table Method: p ((p q ) ( q p))
T T F F T F T T T
T F F T F T F F F
F T T F T T F F T
F F T T T T F F T
T T T T T T
T F F T F F
F T T F F F
F F T T T T
Considering only False values in the final column of the above Truth table ,
Take the negation of conjunctions of truth values of the corresponding
statements: p and q. Then the corresponding PCNF is
((p q) ( p q)) (p q) ( p q) ( p q ) (p q )
Example-2 : Obtain the PCNF of ( p q) (q p)
Let us consider ( p q) (q p)
[ by p q (p q) (q p) &
by p q p q ]
( ( p ) q ) ((p q) (q p))
[ by ( p ) p & by p q p q ]
( p q ) (( p q ) ( q p ))
[ by Commutative Law]
( p q ) ( p q ) (p q )
p q p ( p q) (q p) ( p q) (q p)
T T F T T T
T F F T F F
F T T T F F
F F T F T F
Considering only False values in the final column of the above Truth table ,
Take the negation of conjunctions of truth values of the corresponding
statements: p and q. Then the corresponding PCNF is
((p q) ( p q) ( p q))
(p q) ( p q) ( p q)
( p q ) ( p q ) (p q )
Example-3 : Obtain the PCNF of ( p q ) ( p q)
By observing the above compound statement (p q )
( p q), it is in the form of PDNF, Now from PDNF, we have
to find out the PCNF in the following way.
Let us take S= ( p q ) ( p q)
By considering S, there are two statements p and q in S,
with two statement variables ,we generate 4 Minterms such as
(p q), ( p q), (p q), ( p q). Among 4 Minterms,
existing Minterms are ignored, missing Minterms are written in
S.
S= ( p q) ( p q)
( S)= (( p q) ( p q))
= ( p q) ( p q)
= (p q) ( p q)
This is the required PCNF
Truth Table Method: ( p q ) ( p q)
Considering only False values in the final column of the above Truth table ,
Take the negation of conjunctions of truth values of the corresponding
statements: p and q. Then the corresponding PCNF is
((p q) ( p q))
(p q) ( p q)
( p q ) (p q )
Example-4 : Obtain the PDNF of (p q) ( p r) (q r), then find
PCNF from PDNF.
Let us consider (p q) ( p r) (q r)
[ by p T T & T q q ]
(p q T) ( p r T) (q r T)
(p q ( r r )) ( p r ( q q)) (q r)
( p p)) [ by Distributive Law]
((p q r) (p q r )) ( p q r) ( p
q r)) ( (p q r) ( p q r))
((p q r) (p q r )) ( p q r) ( p
q r))
(p q r) (p q r ) ( p q r) ( p q r))
p q p q p p q (p q)
T T T F T F
T F F F F T Third row
F T T T F T
Fourth row
F F T T F T
DISCRETE MATHEMATICS
www.youtube.com/c/DIVVELASRINIVASARAO
What’s up Number 9492704500
Predicate Calculus
• The logic based upon the analysis of predicates in any statement is
called “Predicate Calculus”.
• Let us consider the statement : “ x is a student”
This statement has two parts.
i. First part : “x” is called the subject/object/variable of
the statement.
ii. Second part : “ is a student” is called the predicate.
• Predicate refers to a property that the subject of the statement can
have.
• We can denote the statement “ x is a student” by S(x), where S
denotes the predicate “is a student” and x is the variable. S(x) is
called the propositional function at x.
• Once a value has been assigned to the variable x ,the statement
S(x) has the truth value, then it becomes the Statement Function.
• Suppose we can take the statement “p is Q” where
“is Q” is a predicate
p is the subject/object
The above statement can be denoted by Q(p).
• A simple statement function of one variable is defined to be an
expression consisting of a predicate symbol and an individual
variable.
• Example: H(x): x is a man
M(y): y is mortal
• A compound statement function is obtained by combining one or
more simple statement functions and logical connectives.
• Example: H(x) M(y), H(x) M(y), H(x) M(y),
• Let us consider the compound statement :
“ Amulya is a student and this painting is blue” where
“ is a student” is the predicate.
“Amulya” is the subject/object
“is blue” is the predicate”
“this painting” is the subject/object.
The above compound statement can be denoted by
S(a) B(p)
• The other connectives can also be used to form the compound
statements such as
S(a) B(p),
B(p),
S(a) B(p) etc…
• Let us consider the compound statement :
“ Naveen is taller than Amul” where
“ is taller than” is the predicate.
“Naveen” is the subject/object
“Amul” is the subject/object
The above compound statement can be denoted by
T( n, a)
• 1-place predicate means the predicate belongs to one object.
Example: Amulya is a student
where the predicate “is a student” belongs to one object
called Amulya
• 2-place predicate means the predicate belongs to two objects.
Example: Naveen is taller than Amul
where the predicate “is taller than” belongs to two objects
called Naveen and Amul.
• m-place predicate means the predicate belongs to m objects
Quantifiers:
Certain statements containing the words such as “all”,
“every”, “some” , “there exists”, “none” , “there is at least”
are associated with the idea of quantity. Such word are called
Quantifiers.
Consider the following examples:
1. some men are tall.
2. All birds have wings
3. No air balloon is perfectly round
4. There is a real number less than 11.
Universal Quantifier:
i. The quantifier “all”, “every”, “each” and “every thing”
is called the Universal Quantifier.
ii. we denote it by the symbol ∀
iii. Universal quantifier(∀) represents each of the following
phrases, all phrases have the same meaning.
for all x
for every x
for each x
every thing x is such that
each thing x is such that
Existential Quantifier:
i. The quantifier “some”, “there exist” and “there is atleast” is
called the Existential Quantifier.
ii. we denote it by the symbol ∃
iii. Existential quantifier(∃) represents each of the following
phrases, all phrases have the same meaning.
for some x
some x such that
There exists an x such that
There is atleast one x such that
PREDICATE FORMULA
• Suppose we are taking n-place predicate, n-place predicate
symbol must me followed by n object variables. Such
variables are called objects or individual variables and are
denoted by lowercase letters.
• Example: P(x1,x2,x3,.......,xn) denotes an n-place predicate
formula in which the letter P is an n-place predicate and
x1,x2,x3,.......,xn are individual variables.
• P(x1,x2,x3,......., xn) will be called atomic formula of predicate
calculus.
• Examples of atomic formula of predicate calculus are
Q(x), P(x, y), A(x,y,z), P(a,y) and A(x,a,z)
• A well-formed formula of predicate calculus is obtained by
using the following rules.
1. An atomic formula is a well-formed formula.
2. if A is a well-formed formula, then A is a well-formed
formula
3. if A and B are well-formed formulas, then (A B),(A
B),(A B) and (A B) are also well-formed formulas.
4. if A is a well-formed formula and x is any variable, then
(∀x)A and (∃x)A are well-formed formulas.
5. Only those formulas obtained by using rules 1 to 4 are
well-formed formulas.
FREE AND BOUND VARIABLES
• Given a formula containing a part of the form (∀x)P (x) or
(∃x) P(x), such a part is called an x-bound part of the formula.
• Any occurrence of x in an x-bound part of a formula is called a
bound occurrence of x.
• Free Variable:
An occurrence of a variable x that is not bounded by any
quantifier such as (∀x)P(x) or (∃x) P(x) is called a “Free
variable”.
• Bounded Variable:
An occurrence of a variable x that is bounded by a
quantifier such as (∀x)P (x) or (∃x) P(x) is called a “Bounded
variable”
• Scope of the quantifier:
The scope of a quantifier is the predicate formula immediately
following the quantifier.
(OR)
The part of the logical expression or predicate formula to
which a quantifier is applied is called the “scope of the quantifier”.
S.NO PREDICATE BOUND FREE SCOPE OF THE
FORMULA VARIABLE VARIABLE QUANTIFIER
1 (∀x)P(x ,y ) x y P(x,y)
y __ R(y)