Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
SREELATHA
ASST.PROFESSOR
ECM DEPT.
SYLLABUS AND TEXT BOOKS
P Q P ^Q
F F F
F T F
T F F
T T T
P Q P ^Q
0 0 0 Conjunctive syllogism: If p q
is false and p is true, then q is
0 1 0 false.
1 0 0
1 1 1
P Or Q: John is 6’ tall or there are 4 cows in
the barn.
This is a compound statement .If one of the
stmt is T then both will be true .This is called
as Inclusive OR.(OR)
Disjunctive syllogism: If p q is true and p is
false, then q is true.
P Q PVQ
0 0 0 P ¬P
0 1 1 0 1
1 0 1 1 0
1 1 1 UNARY OPERATOR
Connectives
Negation: If p is a statement, then the negation
of p, written as ~p and read as “ not p ” is a
statement.
Ex. p : London is a city.
~p : London is not a city.
The truth table for not p is given below.
p ~p
T F
F T
Truth tables
Our basic concern is to determine the truth value of a statement
formula for each possible combination of the truth values of the
component statements.
A table showing all such truth values is called the truth table of
the formula.
Ex.1 Construct truth table for the statement formula P Q
P Q Q P Q
F F T T
F T F F
T F T T
T T F T
Truth tables - Examples
Ex : 2 Construct the truth table for (PQ) P
P Q PQ P (PQ) P
F F F T T
F T T T T
T F T F T
T T T F T
Truth tables - Examples
Ex.3 Construct the truth table for (PQ) (QP)
F F T T T
F T T F F
T F F T F
T T T T T
Note:
(PQ) {(PQ) (QP)}
For definiteness let us list our assumptions about
propositions.
P Q PQ P PQ
F F T T T
F T T T T
T F F F F
T T T F T
P Q PQ ( P Q ) Q ( P Q ) (Q)
F F T F T T
F T T F F T
T F F T T T
T T T F F T
Equivalences
Commutative laws:
PQQP
PQQP
Asociative laws:
(PQ)RP(QR)
(PQ)RP(QR)
Distributive laws:
P(QR)(PQ)(PR)
P(QR)(PQ)(PR)
Demorgan’s laws:
( P Q) P Q
( P Q) P Q
More Equivalences
( P ) P (Double negation)
P P P
PP P
PPT
PPF
R(PP)R
R(PP)R
R(PP)T
R(PP)F
P Q ( P Q)
( P Q ) (P Q)
P Q ( Q P )
More Equivalences
• PFP
• PTT
• PFF
• PTP
• P ( Q R) ( P Q ) R
• ( P Q ) (P Q)
• (P Q ) [( P Q) ( Q P )]
• ( P Q ) [( P Q) ( P Q )]
• Absorption laws
• P(PQ)P
• P(PQ)P
Ex. Without using truth tables, Show that
P ( Q R) ( P Q ) R
Proof:
L.H.S = P (Q R)
P (Q R) (Since A B ( A B))
P (Q R)
(P Q) R (By associative property)
( P Q ) R (By demorgan’s law)
(PQ)R
= R.H.S
Ex. Without using truth tables, Show that
( P Q ) P is a tautology.
Proof:
Consider, ( P Q ) P
( Q P ) P ( By commutative law )
Q (P P ) ( By associative property)
Q T
T
( P Q ) P is a tautology.
Ex. Show that the Statement formula
( P Q ) (PQ) P is a tautology.
Proof : Consider,
{( P Q ) (PQ)} P (Associative law)
{(P Q ) (PQ)} P ( Demorgan’s law)
{P (Q Q)} P (Distributive law)
{P T } P
{P } P
T
( P Q ) (PQ) P is a tautology
Ex. Show that [{( P Q ) ( P Q )} R ] R
Proof: L.H.S = {( P Q ) ( P Q )} R
{T}R (Since P Q ( P Q))
R
= R.H.S
Proof : Consider,
{P (Q R)} ( Q R ) (P R)
{(P Q) R} {( Q R ) (P R)}, By associative
law
{ (P Q) R} {(Q P ) R} , By distributive
law
{(P Q) R} {(Q P ) R} , By Demorgan’s law
{(P Q) (Q P ) } R, By distributive law
{T } R (Since, A A T)
R
Ex. S.T. ((P Q) (P (Q R))) ( P Q) (P R)
is a tautology.
Consider,
[(P Q) {P (Q R)}] {(P Q) (P R)}
[(P Q) {P (Q R)}] {(P Q) (P R)}
(By De morgan’s laws)
[(P Q) {P (Q R)}] {(P Q) (P R)}
(By De morgan’s laws)
[(P Q) {P Q) (P R)}] {(P Q) (P R)}
(By Distributive law)
{(P Q) (P R)} {(P Q) (P R)}
(Since A A A)
T ( Since A A T)
Implications ,Arguments,Inferences
1) Simplification rules:
a) (P Q) P
(P Q) P is a tautology.
P logically follows from (P Q)
b) (P Q) Q
(P Q) Q is a tautology.
Q logically follows from (P Q)
Contd.,
2) Addition rules:
• a) P (P Q)
P (P Q) is a tautology
(P Q) logically follows from P
b) Q ( P Q )
Q (P Q) is a tautology
(P Q) logically follows from Q
Rules of Inference (contd.,)
3) P (P Q)
P (P Q) is a tautology
(P Q) logically follows from P
4) Q ( P Q)
Q (P Q) is a tautology
(P Q) logically follows from Q
Contd.,
5) (P Q) P
(P Q) P is a tautology (or)
P follows from (P Q)
6) (P Q ) (Q)
(P Q ) (Q) is a tautology
Q logically follows from (P Q)
Rules of Inference (Contd.,)
7) Disjunctive syllogism
{P, P Q} Q
8) Conjunctive syllogism
{(P Q) , P} Q
{(P Q) P } Q is a tautology.
{ PQ, Q } P
{ (PQ) Q} (P) is a Tautology
The argument
PQ
Q
------------
P is valid
Ex: The following argument is valid.
A) If today is a Sunday then today is a Holiday
B) Today is not Holiday
C : Hence, Today is not Sunday
Rule of Transitivity (Hypothetical Syllogism)
The Inference
PQ
PR
QR
------------
R is a valid Inference.
The Inference
PQ
PR
QS
------------
R S is a valid Inference.
The Inference
PR
QS
R S
----------------
P Q is a valid Inference.
P,Q
---------
R is a fallacy.
Ex: Consider the following argument:
1. India’s Capital is New Delhi
2. Milk is White
C: Sun rises in the East.
The conclusion does not follow from the premises.
Hence, the argument is invalid.
Ex: Show that R follows logically from the premises
PQ, QR, P
H1 : pq ….(1)
H2 : rs ….(2)
H3 : qr …..(3)
From (1) and (3), By the rule of transitivity, we have
pr ……(4)
From (4) and (2), By the rule of transitivity, we have
p s ……(5)
i.e., if Joe is a Mathematician, then he does not like oat meal.
The conclusion logically follows from the premises.
Hence, the argument is valid
Ex: Verify that the following argument is valid by using the rules of
inference (Here, H1 , H2 , …. are premises and C is conclusion) :
H1 : p q …..(1)
H2 : r …..(2)
H3 : p s …..(3)
H4 : q r …….(4)
From (2) and (4), By the rule of Disjunctive Syllogism,we have
q ……..(5)
(1) q p …….(6)
From (5) and (6), By the rule of Modus ponens, we have
P ……(7)
From (3) and (7), By the rule of Modus ponens, s follows
The conclusion logically follows from the premises.
Hence, the argument is valid
Ex:Using Symbolic logic, Show that the following premises
are inconsistent
p q …..(1) q r …..(2)
s r …..(3) p s …..(4)
From (1) and (2), By transitivity, p r …..(5)
From(3), By Contra positive equivalence, r s ….. (6)
From (5) and (6), By transitivity, we have
p s …..(7)
From(4), we have
p …..(8)
From (7) and (8), By the rule of modus ponens, s follows
From (4), s follows
But, s and s cannot be simultaneously true (Contradiction).
Hence, the given premises are inconsistent
Ex:Using Symbolic logic,prove the following argument
A (B C) ….(1) B A ….(2)
D C ….(3) A …. (4) ( Additional premise)
From, (1) and (4), By modus ponens, We have
(B C) ……(5)
(2) A B …. (6)
From, (4) and (6), By modus ponens, B ….(7) follows.
From (5) and (7), By the rule of Disjunctive Syllogism, we have
C ….(8)
(3) C D …. (9)
From (8) and (9), By modus ponens, D follows
Hence, By CP rule, A D follows
Properties of operations on implication
(P Q) ((~P) Q)
(P Q) (~Q ~P)
(P Q) ((P Q) (Q P))
~(P Q) (P ~Q)
~(P Q) ((P ~Q) (Q ~P))
P Q (P Q) (~P ~Q)
Normal forms
Examples
1. Obtain Disjunctive Normal Form of P (P Q).
P (P Q) P (~P Q)
(P ~P) (P Q)
2.Obtain Disjunctive Normal Form of ~(P Q) (P Q).
~(P Q) (P Q)
(~(P Q) (P Q)) ((P Q) ~(P Q))
since [R S (R S) (~R ~S)]
~(P Q) (P Q)
(~P ~Q P Q) ((P Q) (~P ~Q)
Examples
1. Obtain Conjunctive Normal Form of P (P Q).
P (P Q) P (~P Q)
2.Obtain Conjunctive Normal Form of ~(P Q) (P Q).
~(P Q) (P Q)
(~(P Q) (P Q)) ((P Q) ~(P Q))
since [R S (R S) (S R)]
~(P Q) (P Q)
((P Q) (P Q)) (~(P Q) (~P ~Q)
((P Q P) (P Q Q))
((~P ~Q) (~P ~Q)
(P Q P) (P Q Q)
(~P ~Q ~P) (~P ~Q ~Q)
3.Obtain Conjunctive Normal Form of Q (P ~Q) (~P ~Q).
Q (P ~Q) (~P ~Q)
Q ((P ~P) ~Q)
(Q (P ~P)) (Q ~Q)
(Q P ~P) (Q ~Q)
1. P {(P Q) ~(~Q ~ P))
2. ~{P(QR)}
3. (~P ~ Q) (P ~ Q)
4. (P (Q R))(~P (~Q ~ R))
5. (~P ~ Q) (P ~ Q) (CNF)
Principal Disjunctive Normal Forms
Solution:
P Q PQ P Q {(PQ) A
(P Q)}
F F T F F T
F T T F F T
T F F F F F
T T T T T T
A (PQ) (PQ) (PQ)
Which is the PDNF for A .
Ex. Obtain the Principal Disjunctive normal form of the following
(P Q) (Q R) (P R )
{(P Q) (R R)}
{(P P) (Q R) }
{(P R ) (Q Q)}
P Q R P Q P (P R) A
F F F T T F F
F F T T T T T
F T F F T F F
F T T F T T F
T F F F F T F
T F T F F T F
T T F T F T T
T T R) T
T (PQ
A (PQ R) F(PQTR) = (mT1, m6, m7)
Principal Conjunctive normal forms
(Product of Sums canonical forms)
Max terms: For a given number of variables, the max term
consists of disjunctions in which each variable or its
negation, but not both, appears only once.
For two variables P and Q, there are 22 such formulas given
by
(P Q), (P Q), (P Q), (P Q).
These formulas are called ‘max terms’.
For three variables P,Q and R, there are 23 such formulas
given by
PQR, P Q R, P Q R, P Q R,
P Q R, P Q R, P Q R, P Q
R
These max terms are denoted by M0, M1 , …, M7
respectively.
In general, there are 2n Max terms for n variables.
PCNF (Contd.,)
Mi = mi
M0 = m0
= (PQ R) = (P Q R)
M1 = m1
= (PQ R) = (P Q R)
M2 = m2
= (PQ R) = (P Q R)
Principal Conjunctive normal form (Product of Sums
canonical form) : For a given formula, an equivalent
formula consisting of conjunctions of max terms only is
known as Principal Conjunctive normal form.
Principal Conjunctive Normal Forms
F F T F T F
F T T F F T
T F F F F T
T T T T T F
The PCNF’s are
PQ (P Q)
P Q (P Q) (P Q) (P Q)
(PQ) (P Q) (P Q)
EX. Obtain the Principal Conjunctive normal form of the formula
given by (P R) (Q P)
Solution: (P R) (Q P)
(P R) {(PQ) (QP)}
(P R) (P Q) (Q P)
{ (P R) (Q Q) }
{ (P Q) (R R) }
{ (Q P) (R R) }
(P Q R) (P Q R) (P Q R)
( P Q R) (P Q R)
= (0,2,3,4,5)
Which is the required PCNF.
Max terms and Min terms
*
P Q R Min terms mi Max terms Mi
P Q R P Q P P R A
F F F F T F F
F F T F T T T
F T F F T F F
F T T F T T T
T F F F F F F
T F T F F F F
T T F T F F T
T of AT= (0,2,4,5)
The PCNF T T F F T
A (P Q R) (P Q R) (P Q R) (P Q R)
Contd.,