Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

CITY MONTESSORI SCHOOL

SECTOR-D LDA KANPUR ROAD, LUCKNOW


PHONE: 0522 2435690 FAX: 0522 2435690

Propositional Logic (Chap 2)

It is also called Sententional or Sentential or Statement logic. It is the branch of logic


that sets logical relationships between propositions or statements using truth functional
connectives.

Applications of PL:

i) Logical arguments

ii) Logic circuits (e.g. electronic circuits)

iii) Boolean constraint modeling.

Fundamentals:

1. Proposition: It is defined as a declarative sentence, or part of a sentence, having a


truth value either true (1) or false(0), but not both. Propositions or statements are
denoted by letters p, q, r, ….., and so on. A proposition can be of two types:

Simple proposition: It is an atomic sentence that expresses an independent unit of


information. For e.g.,

p: It is cold

q: London is in Denmark

r: Paris is the capital of France

Compound proposition: It is a composite sentence which consists of two or more


simple statements joined logically by a connective. For e.g,

i) p: Roses are red q: Violets are blue

p and q: Roses are red and Violets are blue

ii) p: Take it q: Leave it

p or q: Take it or Leave it

2. Connective: A propositional connective (or operator) is a symbol used to construct a


propositional formula from simple propositions. The various types of connectives used in
PL are:
CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

Λ Or . – AND

V Or + – OR

~ Or ' – NOT

→ Or  – if….then

↔ Or  – if and only if (iff)

3. Truth Table: The truth value of a statement is its truth or falsity. A truth table is a list
giving all possible truth values of a proposition.

a) Conjunction or AND (Λ or .):

p q pΛ q

0 0 0

0 1 0

1 0 0

1 1 1

b) Disjunction or OR (V or +):

p q pVq

0 0 0

0 1 1

1 0 1

1 1 1
CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

c) Negation or NOT (~ or ’):

p p’

0 1

1 0

d) Implication or if….then (→):

p q p→q

0 0 1

0 1 1

1 0 0

1 1 1

e) Bi-conditional Implication or Double Implication or Equivalence (↔):

p q p q

0 0 1

0 1 0

1 0 0

1 1 1
CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

Additional Implications:

Let p  q implies: ‘ If I am clever then I can pass ’


Implication Symbol Statement
Inverse p q `If I am not clever then I can not pass’
Converse q p `If I can pass then I am clever’
Contrapositive q  p `If I can not pass then I am not clever’

Well Formed Formulae (Wff):

A propositional formula is compound statement comprising of propositional variables


(i.e. symbols A, B, P, Q, ….), logical connectives, and / or parentheses.

A Wff is a PL formula that:

i) satisfies certain syntax rules and

ii) has a well-defined meaning given the value of its propositional variables.

The truth vaue of a wff can be found using a truth table. The connectives are evaluated
in the order of:

i) Parenthesis ( ) and / or [ ]

ii) NOT

iii) IF...THEN/IFF

iii) AND

iv) OR

E.g.1: If A = 1, B = 0, C = 0 then find the value of:

i) A.(B’.A + C) ii) (A + B’).(B + C)

Solution:
i) A.(B’.A + C) = 1 . (1.1 + 0) = 1.1 = 1
ii) (A + B’).(B + C) = (1+1).(0+0) = 1.0 = 0
CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

E.g.2: Establish the truth value for the proposition (p V q) Λ r

p q r pVq (p V q) Λ r

0 0 0 0 0

0 0 1 0 0

0 1 0 1 0

0 1 1 1 1

1 0 0 1 0

1 0 1 1 1

1 1 0 1 0

1 1 1 1 1

Types of Wff:

Wff Type Property Definition


A statement is a tautology, if it is true or 1 for all
Valid tautology interpretations (i.e. possible values) of propositional
variables.
A statement is a contigency, if it is true for some
Satisfiable or Consistent contingent interpretations (i.e. possible values) of propositional
variables.
A statement is a contradiction, if it is false or 0 for all
Unsatisfiable or Inconsistent contradiction interpretations (i.e. possible values) of propositional
variables.

p p’ p V p’ p  p’ pVp
0 1 1 0 0

1 0 1 0 1

From the TT, p V p’ is a tautology and p Λ p’ is a contradiction, p V p is a contingency.


CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

E.g.3: With the help of the truth table, state whether the proposition X V ~(Y Λ X) is a
tautology or contradiction. [ISC 2K16]
Solution:

X Y Y X ~(Y  X) X V ~(Y  X)
0 0 0 1 1
0 1 0 1 1
1 0 0 1 1
1 1 1 0 1

From the TT, the given proposition is a tautology

Logical Equivalence (Ξ): Two propositions or wff’s P and Q are said to be logically
equivalent or simply equivalent (i.e. P Ξ Q), if they have identical truth values for all
interpretations in the truth table.
E.g.1: Verify using a truth table P → Q Ξ ~P V Q
Solution:

P Q ~P P Q ~P V Q
0 0 1 1 1
0 1 1 1 1
1 0 0 0 0
1 1 0 1 1

E.g.2: Verify if p.(~p + q’) Ξ (p → q)’ using a truth table. [ISC 2K10]
Solution:
CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

p q ~p q’ ~p + q’ p. (~p + q’) p q (p  q)’

0 0 1 1 1 0 1 0

0 1 1 0 1 0 1 0

1 0 0 1 1 1 0 1

1 1 0 0 0 0 1 0

E.g.3: Using a truth table, state whether the following proposition is valid, satisfiable or
unsatisfiable. ~ (A Λ B) V (~A  B) [ISC 2K18]
Solution:

A B ~A A B ~(A  B) ~AB ~(A  B) V (~AB)

0 0 1 0 1 0 1

0 1 1 0 1 1 1

1 0 0 0 1 1 1

1 1 0 1 0 1 1

From the TT, the given proposition is a tautology so it is a valid proposition.


Conjunctive Terms: They are AND terms whose value is 1.
Disjunctive Terms: They are OR terms whose value is 0.
E.g.1: Write the conjunctive term and disjunctive term when X = 0, Y = 0, Z = 1.
Solution:
Conjunctive term: X’.Y’.Z
Disjunctive term: X + Y + Z’
E.g.2: The Planning Committee of a particular town consists of a President, Secretary
and a Treasurer. Any decision taken on development plans of the town can be
implemented only if:
CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

• The President and Secretary or Treasurer agrees


OR
• All three agree
The inputs are:

INPUTS
P Denotes the President’s vote (1 indicates yes and 0 indicates no)
S Denotes the Secretary’s vote (1 indicates yes and 0 indicates no)

T Denotes the Treasurer’s vote (1 indicates yes and 0 indicates no)

OUTPUT: X - Denotes development plan (1 indicates agreed and 0 indicates refused in


all cases)
Draw the truth table for the inputs and outputs. Derive the conjunctive terms for each of
the true values (1’s) from the output column. Also, write a proposional expression by
joining the terms with disjunction operators.
Solution:
i) P=1, S=1 / T=1
ii) P=1, S=1,T=1

P S T X
0 0 0 0 -
0 0 1 0 -
0 1 0 0 -
0 1 1 0 -
1 0 0 0 -
1 0 1 1 P.S’.T
1 1 0 1 P.S.T’
1 1 1 1 P.S.T
CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

X = P.S’.T + P.S.T’ + P.S.T


E.g.3 The Past Pupil Association of R.K University Computer Science Department is
organizing a reunion function at the campus. The invitation card is issued to a person if:
• The person is an ex-student of the department and has passed out in 1995.
OR
• The person is not an ex-student of the same department but passed out from the
university in 1995 and has made a contribution of Rs. 1000.

INPUTS ARE
E The person is an ex-student of the department
P The person passed out in 1995

S The person contributes Rs. 1000

(1 indicates yes and 0 indicates no in all cases)


OUTPUT IS: I: Denotes the invitation card is issued (1 indicates yes and 0 indicates no)
Draw the truth table for the inputs and outputs. Derive the conjunctive terms for every
true value (1’s) from the output column. Also, write a propositional expression or wff by
joining the terms with disjunction operators.
Solution: i) E=1, P=1 ii) E=0, P=1, S=1

E P S I
0 0 0 0 -
0 0 1 0 -
0 1 0 0 -
0 1 1 1 E’.P.S
1 0 0 0 -
1 0 1 0 -
1 1 0 1 E.P.S’
1 1 1 1 E.P.S

I = E’.P.S + E.P.S’ + E.P.S


CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

Laws Well Formed Formula (Wff) Boolean Expression Remarks

Property of 0 and 1 p F  F p. 0 0


Domination laws
pV T  T p + 1 1

Inverse Law p  p’  F p . p’ = 0 Contradiction law


p V p’  T p + p’ = 1 Excluded Middle law

Identity Law p T  p p . 1 p


------
pV F  p p + 0 p

Idempotent Law p p  p p . p p


------
pV p  p p + p p
p V (p  q)  p p + p . q p
Absorption Law ------
p  (p V q)  p p . (p + q) p

Commutative Law p q  q  p p . q q . p


------
pV q  q V p p + q q + p

Associative Law (p  q)  r p  q  r) (p . q) . r p . (q . r)


------
(p V q) V rp V (q V r) (p + q) + r p + (q + r)

Distributive Law p  (q V r) p  q) V (p  r) p . (q + r) p . q + p . r


------
p V (q  r) p V q)  (p V r) p + q . r p + q) . (p + r)
Double Negation ~(~p) p (p’)’ p Involution law

DeMorgan’sLaw ~(p  q) ~p V ~q (p . q)’ p’ + q’


------
~(p V q) ~p  ~q (p + q)’ p’ . q’
Conditional
Elimination p  q ~p V q p  q p’ + q Implication law

Transposition Law p  q ~q  ~p p  q q’  p’ ------


Biconditional
Elimination p  q p  q)  (q  p) p  q p’. q’ + p . q ------

Material p  q p  q) V (p  q) p  q p. q’+ p’ . q’


------
Equivalence p  q p V q)  (p V q) p  q p’+ q) . (p + q’)

Application of Propositional Laws:


E.g.1: Verify the following wff giving reasons:
p V (p’ Λ q) Ξ p V q
Solution:
LHS = p + p’. q [changing symbols]
= (p + p’). (p + q) [by distributive law]
CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

= 1. (p + q) [by inverse law]


= (p + q) [x. 1 = x]
= (p V q)
Hence proved.
E.g.2: Show algebraically that: p → q Ξ ~q → ~p
Solution:
RHS = q’ → p’ [changing symbols]
= (q’)’ + p’ [conditional elimination]
= q + p’ [(x')' = x]
= p’ + q [x + y = y + x]
=p→q [conditional elimination]
Hence proved.

E.g. 3: Prove that (p → r) . (q → r) Ξ (p + q) → r. Give the law at each step.


Solution:
LHS = (p’+ r).(q’+ r) [by conditional elimination]
= p’. q’ + r [by distributive law]
= (p + q)’ + r [by DeMorgan’s law]
= (p + q) → r [by conditional elimination]
Hence proved.
E.g. 4: Reduce algebraically: x’yz + x.(x’ + y) + yz
Solution: = x’yz + x.x’ + xy + yz [dist. law]
= x’yz + x.y +y.z [p.p’ = 0, p+0 = p]
= x’yz + y.z + x.y [p+q = q+p]
= yz.(x’ + 1) + x.y [dist. law]
CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

= y.z + x.y [p+1 = 1, p.1 = p]


E.g. 5: Simplify the expression: A.B’ + B + C.D’ + D’
Solution: = A.B’ + B + C.D’ + D’.1 [p.1 = p]
= (A+B).(B’+B) + D’.(C+1) [dist. law]
= (A+B).1 + D’.1 [p’+p = 1, p+1 = 1]
= A+B+D’ [p.1 = p]

E.g. 6: Minimize X.Y + (X.Z)’ + X.Y.Z using Boolean laws


Solution: = X.Y + X.Y.Z + (X.Z)’ [p + q= q + p]
= X.Y(1+Z) + X’+ Z’ [dist. law, (p.q)’ = p’ + q’]
= XY + X’ + Z’ [p+1 = 1, p.1 = p]
= (X’+X).(X’+Y) + Z’ [dist law]
= 1.(X’ + Y + Z’) [p+1 = 1, p.1 = p]
= X’ + Y + Z’

Syllogism:
The logical process of drawing inferences from given premises is called Syllogism.
p1
p2
.
. Premises (1……n)
.
.
pn
__

q → conclusion
CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

a) The set of given propositions used to draw a conclusion are called premises.
b) A conclusion is said to be valid, if and only if the implication (p1 Λ p2 Λ ……Λ pn)
→ q is a tautology.
c) An invalid conclusion is called a fallacy.

Some Rules of Inference:


1. Modus Ponens (Law of Detachment) rule:
p
p→q
––––––

 q
2. Modus Tullens rule:
~q
p→q
––––––

 ~p
3. Hypothetical Syllogism (Transitivity) or Chain rule:
p→q
q→r
––––––

p→r
4. Disjunctive Syllogism rule:
pVq
~p
––––––

q
CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

5. Composition rule:
p→q
pΛr
–––––––––

 p → (q Λ r)
The validity of an inference can be proved using
a) Truth table
b) Propositional laws
E.g.1: Prove the validity of the following argument by using a truth table
p
p→q
––––––

 q
Solution: To prove [ p Λ (p → q) ] → q is a tautology.

p q p→ q p Λ (p→q) [p Λ (p→q)]→q

0 0 1 0 1

0 1 1 0 1

1 0 0 0 1

1 1 1 1 1

Solution: To prove [p Λ (p → q)] → q is a tautology.


[p Λ (p → q) ] → q
= [p. (p → q)] → q [changing symbols]
CITY MONTESSORI SCHOOL
SECTOR-D LDA KANPUR ROAD, LUCKNOW
PHONE: 0522 2435690 FAX: 0522 2435690

= [p. (p’ + q)] → q [a → b = a’ + b]


= [(p. p’) + (p. q)] → q [distributive law]
= [0 + (p. q)] → q [x’. x = 0]
= (p. q) → q [x + 0 = x]
= (p. q)’ + q [a → b = a’ + b]
= p’ + q’ + q [DeMorgan’s law]
= p’ + 1 [x' + x = 1]
=1 [x + 1 = 1]

You might also like