Module-3 Propositional Logic
Module-3 Propositional Logic
Study Material
(Discrete Mathema cs (PCC-CSM405)
_____________________________________________________________________________________________
Table of Contents
Module III:
Propositional Logic
Department of Mathema cs
Brainware University, Kolkata 1
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
P ropositional logic, also known as sentential logic or statement logic, is a branch of classical logic that deals
with the logical relationships between propositions (statements) that are either true or false. In propositional
logic, the basic building blocks are simple propositions, and complex propositions are formed by combining
these using logical connectives.
Proposi onal Logic is concerned with statements to which the truth values, “true” and “false”, can be assigned. The
purpose is to analyses these statements either individually or in a composite manner.
Defini on: A proposi on is a collec on of declara ve statements that has either a truth value "true” or a truth value
"false". A proposi onal consists of proposi onal variables and connec ves. We denote the proposi onal variables
by capital le ers (A, B, etc). The connec ves connect the proposi onal variables.
(1) Let p: 4+5=10. p is proposi on which is false So p takes the Truth value F or 0.
(2) q: Every ac on has an equal and opposite reac on. This is a proposi on which is true. So, the truth value of q is
T or 1.
Note: The le ers p, q, … etc. are also known as proposi onal variables because these may take the two different
values T or F.
A B A∨B
T T T
T F T
F T T
F F F
Department of Mathema cs
Brainware University, Kolkata 2
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
2. AND (∧): The AND operation of two propositions A and B (written as A∧B) is true if both the
proposi onal variable A and B is true.
A B A∧B
T T T
T F F
F T F
F F F
A ∼A
T F
F T
4. Implica on / if-then (→): An implication A→B is the proposition “if A, then B”. It is false
if A is true and B is false. The rest cases are true.
A B A→ B
T T T
T F F
Department of Mathema cs
Brainware University, Kolkata 3
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
F T T
F F T
5. If and only if (↔): A↔B is bi-condi onal logical connec ve which is true when p and q are same, i.e. both are
false or both are true.
A B A↔B
T T T
T F F
F T F
F F T
Tautologies
A Tautology is a formula which is always true for every value of its proposi onal variables.
A B A→ B (A → B) ∧ [(A → B) ∧ A]
A →B
T T T T T
T F F F T
F T T F T
F F T F T
Contradictions
A Contradic on is a formula which is always false for every value of its proposi onal variables.
Department of Mathema cs
Brainware University, Kolkata 4
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
A B A ∨ ∽A ∼B (∼ A) ∧ ( ∼ (A ∨ B) ∧ [( ∼ A) ∧
B B) (∼ B)]
T T T F F F F
T F T F T F F
F T T T F F F
F F F T T T F
As we can see every value of (A∨B) ∧[(∼A) ∧(∼B)] is “False”, it is a contradic on.
Contingency
A Con ngency is a formula which has both some true and some false values for every value of its proposi onal
variables.
A B A∨B ∼A (A ∨ B) ∧ (∼ A)
T T T F F
T F T F F
F T T T T
F F F T F
Department of Mathema cs
Brainware University, Kolkata 5
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
As we can see every value of (A∨B)∧(∽A) has both “True” and “False”, it is a contingency.
Propositional Equivalences
Two statements X and Y are logically equivalent if any of the following two
conditions hold −
●The truth tables of each statement have the same truth values.
●The bi-condi onal statement X↔Y is a tautology.
Example − Prove ∼(A∨B)and[(∽A)∧(∼B)] are equivalent
T T T F F F F
T F T F F T F
F T T F T F F
F F F T T T T
Here, we can see the truth values of (A∨B)and[( A)∧( B)] are same, hence the statements are
equivalent.
Testing by 2nd method (Bi-conditionality)
A B ∼ (A ∨ B ) [(∼A) ∧ (∼ B)] [∼ (A ∨ B)] ↔ [(∼ A ) ∧ (∼ B)]
T T F F T
T F F F T
F T F F T
F F T T T
Example of Condi onal Statement − “If you do your homework, you will not be punished.”
Here, "you do your homework" is the hypothesis, p, and "you will not be punished" is
the conclusion, q.
Example − The inverse of “If you do your homework, you will not be punished” is “If
you do not do your homework, you will be punished.”
Example − The converse of "If you do your homework, you will not be punished" is "If
you will not be punished, you do your homework”.
Example − The Contra-positive of " If you do your homework, you will not be
punished” is "If you are punished, you did not do your homework”.
● When we were looking at proposi onal logic opera ons, we defined several things using and/or/not.
o For example:
p⊕q ≡(p∨q)∧¬(p∧q)
p→q ,≡¬p∨q
p↔q≡(p→q)∧(q→p)≡(¬p∨q)∧(¬q∨p).
● We did that to help us understand the new symbols in terms of things we already knew.
o But it is also nice to have a standard defini on of the operators we can use.
o When proving equivalences, it let us apply equivalences we already had that used and/or/not.
● We also had some equivalence rules that helped us rearrange proposi ons so we could get at the parts we
needed:
Department of Mathema cs
Brainware University, Kolkata 7
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
Name Equivalences
p∨q≡q∨p
Commuta ve
p∧q≡q∧p
(p∨q)∨r≡p∨(q∨r)
Associa ve
(p∧q)∧r≡p∧(q∧r)
p∨(q∧r)≡(p∨q)∧(p∨r)
Distribu ve
p∧(q∨r)≡(p∧q)∨(p∧r)
¬(p∧q)≡¬p∨¬q
De Morgan's Law
¬(p∨q)≡¬p∧¬q
Normal Forms
● Remember that we also called “or” “disjunc on” and “and” “conjunc on”.
● A clause that contains only ∨ is called a disjunc ve clause and only ∧ is called a conjunc ve clause.
o Nega on is allowed, but only directly on variables.
o p∨¬q∨r: a disjunc ve clause
o ¬p∧q∧¬r: a conjunc ve clause
o ¬p∧¬q∨r: neither
● If we put a bunch of disjunc ve clauses together with ∧, it is called conjunc ve normal form.
o For example: (p∨r)∧(¬q∨¬r)∧q is in conjunc ve normal form.
● Similarly, pu ng conjunc ve clauses together with ∨, it is called disjunc ve normal form.
o For example: (p∧¬q∧r)∨(¬q∧¬r) is in disjunc ve normal form.
● More examples:
o (p∧q∧¬r∧s)∨(¬q∧s)∨(p∧s) is in disjunc ve normal form.
o (p∨q∨¬r∨s)∧(¬q∨s)∧¬s is in conjunc ve normal form.
o (p∨r)∧(q∧(p∨¬q)) is not in a normal form.
o ¬p∨q∨r and ¬p∧q∧r are in both normal forms.
● It turns out we can turn any proposi on into either normal form.
o We can use the definitions to get rid of →, ↔, and ⊕.
o Use DeMorgan's laws to move any ¬ in past parens, so they sit on the variables.
o Use double nega on to get rid of any ¬¬ that showed up.
o Use the distribu ve rules to move things in/out of parens as we need to.
≡¬(p∨¬q)∨¬¬r [DeMorgan's]
≡(¬p∧¬¬q)∨r [DeMorgan's]
● Another example:
≡(¬¬p∧¬q)∨(¬r∧q) [DeMorgan's]
P Q P↔Q
T T T
T F F
F T F
F F T
P Q ~P P→ ~P ∧ (P →
Q Q)
T T F T F
T F F F F
F T T T T
F F T T T
Answer:
P Q R P→ Q→ (P → Q) ∧ (Q →
Q R R)
T T T T T T
T T F T F F
T F T F T F
T F F F T F
Department of Mathema cs
Brainware University, Kolkata 10
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
F T T T T T
F T F T F F
F F T T T T
F F F T T T
Answer:
P Q P→Q Q→ (P → Q) ∨ (Q → P
Exercise: Verify the distribu ve Law
P ) 𝑝⋀(𝑞⋁𝑟) ≡ (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟)
T T T T T Solu on: We are using truth table to verify
the law
T F F T T
The truth table of 𝑝 ∧ (𝑞 ∨ 𝑟)
F T T F T
F F T T T
p q r q∨ 𝑟 𝑝 ∧ (𝑞 ∨ 𝑟)
T T T T T
T F T T T
F T T T F
F F T T F
F T F T F
F F F F F
T T F T T
T F F F F
p q r q∧ 𝑞 𝑝∧𝑟 (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟)
T T T T T T
T F T F T T
F T T F F F
F F T F F F
Department of Mathema cs
Brainware University, Kolkata 11
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
F T F F F F
F F F F F F
T T F T F T
T F F F F F
From the above we see the two proposi ons 𝑝 ∧ (𝑞 ∨ 𝑟) and (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟) have same truth table.
p q 𝑝∨𝑞 ∼ (𝑝 ∨ 𝑞)
T T T F
F F F T
T F T F
F T T F
p q ∼𝑝 ∼𝑞 (∼ 𝑝) ∧ (
∼ 𝑞)
T T F F F
F F T T T
T F F T F
F T T F F
Theorem: 𝑝 → 𝑞 ≡∼ 𝑝 ∨ 𝑞
p q 𝑝→𝑞
T T T
T F F
F T T
Department of Mathema cs
Brainware University, Kolkata 12
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
F F T
p q ∼𝑝 ∼𝑝∨𝑞
T T F T
T F F F
F T T T
F F T T
We see the truth tables of 𝑝 → 𝑞 and ∼ 𝑝 ∨ 𝑞 are same. Hence the theorem is proved.
Theorem: 𝑝 ↔ 𝑞 ≡ (𝑝 → 𝑞)⋀(𝑞 → 𝑝)
Proof:
p q 𝑝↔𝑞
T T T
T F F
F T F
F F T
T T T T T
T F F T F
F T T F F
Department of Mathema cs
Brainware University, Kolkata 13
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
F F T T T
We see both the two truth tables are iden cal. So 𝑝 ↔ 𝑞 ≡ (𝑝 → 𝑞)⋀(𝑞 → 𝑝)
Example: Find the truth tables of the followings: (i) ∼ (𝑝 ∧∼ 𝑞) (ii) (𝑝 → 𝑞) ↔ (∼ 𝑞 →∼ 𝑝) (iii) [(p∧ 𝑞) ∨ (∼
𝑟)] ↔ 𝑝
Solu on:
p q ∼𝑞 𝑝 ∧∼ 𝑞 ∼ (𝑝 ∧∼ 𝑞)
T T F F T
T F T T F
F T F F T
F F T F T
p q ∼𝑝 ∼𝑞 𝑝→𝑞 ∼𝑞→ (𝑝 → 𝑞) ↔ (∼ 𝑞 →∼ 𝑝)
∼𝑝
T T F F T T T
T F F T F F T
F T T F T T T
F F T T T T T
T T T T F T T
T T F T T T T
T F T F F F F
F T T F F F T
T F F F T T T
Department of Mathema cs
Brainware University, Kolkata 14
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
F T F F T T F
F F T F F F T
F F F F T T F
Answer:
p q r q∨ 𝑟 𝑝 ∧ (𝑞 ∨ 𝑟)
T T T T T
T F T T T
F T T T F
F F T T F
F T F T F
F F F F F
T T F T T
T F F F F
p q r q∧ 𝑞 𝑝∧𝑟 (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟)
T T T T T T
T F T F T T
F T T F F F
F F T F F F
F T F F F F
F F F F F F
T T F T F T
T F F F F F
From the above we see the two proposi ons 𝑝 ∧ (𝑞 ∨ 𝑟) and (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟) have same truth table.
Department of Mathema cs
Brainware University, Kolkata 15
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
p q 𝑝∨𝑞 ∼ (𝑝 ∨ 𝑞)
T T T F
F F F T
T F T F
F T T F
p q ∼𝑝 ∼𝑞 (∼ 𝑝) ∧ (
∼ 𝑞)
T T F F F
F F T T T
T F F T F
F T T F F
Theorem1:𝑝 → 𝑞 ≡∼ 𝑝 ∨ 𝑞
p q 𝑝→𝑞
T T T
T F F
F T T
F F T
p q ∼𝑝 ∼𝑝∨𝑞
T T F T
T F F F
F T T T
Department of Mathema cs
Brainware University, Kolkata 16
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
F F T T
We see the truth tables of 𝑝 → 𝑞 and ∼ 𝑝 ∨ 𝑞 are same. Hence the theorem is proved.
Theorem 2: 𝑝 ↔ 𝑞 ≡ (𝑝 → 𝑞)⋀(𝑞 → 𝑝)
p q 𝑝↔𝑞
T T T
T F F
F T F
F F T
T T T T T
T F F T F
F T T F F
F F T T T
We see both the two truth tables are iden cal. So 𝑝 ↔ 𝑞 ≡ (𝑝 → 𝑞)⋀(𝑞 → 𝑝)
Example: Find the truth tables of the followings: (i) ∼ (𝑝 ∧∼ 𝑞) (ii) (𝑝 → 𝑞) ↔ (∼ 𝑞 →∼ 𝑝) (iii) [(p∧ 𝑞) ∨ (∼
𝑟)] ↔ 𝑝
Solu on:
(i)
p q ∼𝑞 𝑝 ∧∼ 𝑞 ∼ (𝑝 ∧∼ 𝑞)
T T F F T
T F T T F
F T F F T
F F T F T
Department of Mathema cs
Brainware University, Kolkata 17
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
(ii)
p q ∼𝑝 ∼𝑞 𝑝→𝑞 ∼𝑞→ (𝑝 → 𝑞) ↔ (∼ 𝑞 →∼ 𝑝)
∼𝑝
T T F F T T T
T F F T F F T
F T T F T T T
F F T T T T T
T T T T F T T
T T F T T T T
T F T F F F F
F T T F F F T
T F F F T T T
F T F F T T F
F F T F F F T
F F F F T T F
Department of Mathema cs
Brainware University, Kolkata 18
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
1.
Express ¬(𝑝 ∨ 𝑞) ∨ (𝑝 ∧ ¬𝑞) in simplest form
a. p b. p
c.
q d.
a.
x y , p ( x , y ) b. x y , p ( x, y )
a. p q b. q p
q p q p
c. d.
5. Identify the truth value of the statement x2 = x holds for all real values of x.
a. T b. F
c. Neither T nor F d. none of these
6. If p:”Ashok is rich” and q:”Kamal is poor” then express the symbolic form of the statement
“Either Ashok or Kamal is rich”.
a.
pq b.
p q
c. p q d. ( p q )
7. For the statement p and q, ( p q ) can be converted to
Department of Mathema cs
Brainware University, Kolkata 19
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
a.
p q b. p q
c. ( p q ) d. None of these
8. p q p q r
If , then illustrate the value of r
a. pq b. p
c.
q p d.
q
9. Select the correct option. A statement T is called tautology if
a. T is true for all possible values of its b. T is false for all values of its
variables variables
c. T is true as well as false for few d. None of these
possible values of its variables
10. Illustrate the negation of “All students live in dormitories”
a. All students do not live in b. No student live in dormitories.
dormitories.
c. One student does not live in d. Some students do not live in
dormitories. dormitories.
11. Let P: We should be honest., Q: We should be dedicated., R: We should be overconfident.
Then ‘We should be honest or dedicated but not overconfident.’ is best expressed by
a. ~P V ~Q V R b. P ∧ ~Q ∧ R
c. P V Q ∧ R d. P V Q ∧ ~R
12. Let P: If Sahil bowls, Saurabh hits a century. Q: If Raju bowls , Sahil gets out on first ball.
Now if P is true and Q is false then identify the correct statement.
a. Raju bowled and Sahil got out on first b. Raju did not bowled
ball
c. Sahil bowled and Saurabh hits a d. Sahil bowled and Saurabh got out
century
13. 2
“ ∀𝑥 ∈ ℝ such that x 4 ” can be expressed as
2 b. Some real numbers have square 4
a. If x is real number then x 4
c. Square of no real number is 4 d. None of these
14. Estimate the Truth value of the proposition “All the angles of an equilateral triangle are
equal”
a. True b. False
Department of Mathema cs
Brainware University, Kolkata 20
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
a. p b. q
a. pq b. p q
c.
p q d.
q p
18. Converse of “ p q ”can be expressed as
a. p q b. q p
c.
q p d.
q p
19. Select the correct option. p → q is logically equivalent to
a. ¬p ∨ ¬q b. p ∨ ¬q
c. ¬p ∨ q d. ¬p ∧ q
a. U b. V
c. W d. None of these
Department of Mathema cs
Brainware University, Kolkata 21
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
3. Show that the following compound proposition is a Tautology (using truth table)
p q q r p r .
4. Show that the following compound proposition is a Tautology (using truth table) (𝑝 → (𝑞 →
𝑝)).
6. If p: Today is Friday
q: It is raining
r: It is hot
Cite the following Symbol
(i) ∽ 𝑞 → (𝑟 ⋀ 𝑝) (ii) (𝑝⋀ ∽ 𝑞) →∽ 𝑟.
Department of Mathema cs
Brainware University, Kolkata 22
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
8. Deduce that (p q) (r s) and (p r) (q s) are not logically equivalent.
Department of Mathema cs
Brainware University, Kolkata 23
Programme Name and Semester: B. Tech CSE (AIML_DS_General), 4th semester
Course Name (Course Code): Discrete Mathema cs (PCC-CSM405_ PCC-CSD405_ PCC-CSG405)
Academic Session: 2024-25
10. Deduce that p → q and ∼q → ∼p are logically equivalent by using truth table as well as
without using the truth table.
References:
1. “Discrete Mathematics and Its Applications”, Kenneth H. Rosen, McGraw-Hill.
2. “Discrete Mathematics with Applications”, Susanna S Epp, Wadsworth Publishing Co. Inc, 4th edition
3. “Elements of Discrete Mathematics: a computer oriented approach”, C L Liu and Mohapatra, McGraw
Hill, 3rd edition.
4. “Discrete Mathematical Structures and its Application to Computer Science”, J P Trembley, R
Manohar, TMG Edition, Tata McGraw-Hill.
5. “Discrete Mathematics”, Norman L Biggs, Oxford University Press, 2nd Edition.
6. “Discrete Mathematics”, Schaum’s Outlines Series, Semyour Lipschutz and Marc Lipson
Department of Mathema cs
Brainware University, Kolkata 24