Propositional
Logics (II)
Course Name: Discrete Mathematics
Course Code: C1UC224T
Galgotias University 1
Can changing the order of
operations in a logical expression
change its truth value? Can you
think of an example?
Galgotias University 2
At the end of this session students will be able to
Understand and apply precedence
rules of logical operators.
Construct converse,
contrapositive, and inverse of
conditional statements.
Galgotias University 3
1 Recap: Compound Propositions
2 Precedence of Logical
Operators
Session 3 Converse, Contrapositive and
Inverse
Outline
4 Applications of Propositional
Logic
5 Wrap up and Reflection
Galgotias University 4
RECAP
Compound Propositions
logical operators notation definition
Negation p not p (the opposite of the truth value of p)
Conjunction pq p and q (T when both p and q are T and otherwise F)
Disjunction pq p or q (F when both p and q are F and otherwise T)
Exclusive or pq either p or q (T when exactly one of p and q is T and
otherwise F)
Conditional pq if p then q (F when p is T and q is F, and otherwise T)
Biconditional pq p if and only if q (T when p and q have the same truth
values, and otherwise F)
GSCALE full form and date 5
Precedence of Logical Operators
We generally use parentheses to specify the order in which logical operators in a compound
proposition are to be applied. However, to reduce the the number of parentheses, we have
the precedence levels of the logical operators:
What will be solved first?
¬p∨q∧r→s
Galgotias University 6
Learning Activity 1 (Pen-paper Activity)
Given Logical Expression:
Let’s assume and evaluate step by step:
Step 1 (Parentheses first):
Step 2 (Negation first):
Step 3 (Implication next):
Step 4 (AND operation):
Student Task:
Q1. Find and correct the mistake in the logical steps above.
Q2. Recalculate the final answer for different values of 𝑝, 𝑞, 𝑟 ( Hint: Prepare a truth
table).
Galgotias University 7
Answer 1 : The mistake in the given steps is in Step 4, where the final AND operation is evaluated
incorrectly.
Correction of the Mistake: Step 4 (AND operation) should be
Corrected final answer: F, not T.
Answer 2 :
Galgotias University 8
CONVERSE, CONTRAPOSITIVE, INVERSE
We can form some new conditional statements starting with a
conditional statement p → q
• Converse : q→p
• Contrapositive : ¬ q→ ¬ p
• Inverse : ¬ p → ¬ q
Galgotias University 9
• When two compound propositions always have
the same truth value, we call them equivalent.
• A conditional statement and its contrapositive are
equivalent.
• The converse and the inverse of a conditional
statement are also equivalent, but neither is
equivalent to the original conditional statement.
Galgotias University 10
Learning Activity 2
(Group-activity)
Galgotias University 11
Galgotias University 12
Applications of Propositional Logic
•Digital Circuit Design – Used in logic gates (AND, OR, NOT) for designing processors and memory
units.
•Artificial Intelligence – Helps in knowledge representation, decision-making, and expert systems.
•Databases (SQL Queries) – Logical operators (AND, OR, NOT) filter and retrieve relevant data.
•Software Verification – Ensures program correctness using logical assertions and formal methods.
•Cryptography & Security – Used in authentication systems and encryption protocols.
•Natural Language Processing – Helps AI understand and analyze sentence structures logically.
•Law & Ethics – Logical reasoning ensures consistency in legal arguments and ethical decision-
making.
•Machine Learning – Used in decision trees and artificial neural networks for classification.
Galgotias University 13
Ensure attainment of LOs in alignment to the
learning activities:
Understand and apply precedence
rules of logical operators.
Construct converse,
contrapositive, and inverse of
conditional statements.
Galgotias University 14
Exit Ticket:
Evaluate the following expression:
(true ∨ false) ∧ true
a) true
b) false
Galgotias University 15
Next topics of the course
are
Propositional Equivalences,
Predicates and Quantifiers.
Galgotias University 16
Write one new thing you
learned today and one
question you still have.
Galgotias University 17