DS Lecture 3
DS Lecture 3
Quantitative Reasoning-II
(QTR-2328)
Lecture 3
Previous Lecture Summery
• Logical Equivalences.
• De Morgan’s laws.
• Tautologies and Contradictions.
• Laws of Logic.
• Conditional propositions.
Truth Table for ( p ∧ q) ∨
∼r
Logical Equivalence
Definition
Two proposition form are called logically equivalent if
and only if they have identical truth values for each
possible substitution of propositions for their
proposition variable.
Solution
p ¬p ¬ (¬p)
T F T
F T F
1. ¬(pq) ≡ ¬p¬q
2. ¬(pq) ≡ ¬p¬q
Applying De-Morgan’s Law
Question: Negate the following compound Propositions
-1< x 4
Solution: The given proposition is equivalent to
-1 < x and x 4,
By De Morgan’s laws, the negation is
-1 ≥ x or x > 4.
Tautology and Contradiction
p ¬p p ¬p p ¬p
T F T F
F T T F
1. Commutative laws
pq ≡ qp ; pq ≡ qp
2. Associative laws
p (q r) ≡ (p q) r ; p(q r) ≡ (pq)r
3. Distributive laws
p (q r ) ≡ (p q) (p r)
p (q r) ≡ (p q) (p r)
Laws of Logic
4. Identity laws
p t ≡ p ; pc ≡ p
5. Negation laws
p¬p ≡ t ; p ¬p ≡ c
7. Idempotent laws
p p ≡ p ; pp ≡ p
Laws of Logic
9. Absorption laws
p (pq) ≡ p ; p (p q) ≡ p
• Logical Equivalence
• Equivalence Check
• Tautologies and Contradictions
• Laws of Logic
• Simplification of Compound Propositions
Conditional Statements
Implication
Definition: Let p and q be propositions. The conditional
statement p q, is the proposition “If p, then q”.
The conditional statement p q is false when p
is true and q is false and is true otherwise.
Definition
If p and q are propositions, the conditional of q by p
is if p then q or p implies q and is denoted by p→q.
It is false when p is true and q is false otherwise it is
true.
Examples
If you work hard then you will succeed.
If sara lives in Islamabad, then she lives in Pakistan.
Implication (if - then)
P Q PQ
T T T
T F F
F T T
F F T
Representation of Implication
Interpreting Conditional Statements
Examples
“The online user is sent a notification of a link error if
the network link is down”.
The statement is equivalent to
“If the network link is down, then the online user is sent a
notification of a link error.”
Using
p : The network link is down,
q : the online user is sent a notification of a link error.
• Show that
¬(p→q) ≡ p ¬q
This means that negation of ‘if p then q’ is logically
equivalent to ‘p and not q’.
Solution
Greece.
Negation: Sara lives in Athens and she does not live in
Greece.
Converse and inverse of the Conditional
Example
If today is Sunday, then tomorrow is Monday.
Contrapositive:
If tomorrow is not Monday, then today is not Sunday.
Facts of Inverse, Converse and Contrapositive
The Biconditional
Definition Given proposition variables p and q, the
biconditional of p and q is p if and only if q and is
denoted p↔q.
It is true if both p and q have the same truth values
and is false if p and q have opposite truth values.
The words if and only if are sometime abbreviated iff.
• Logical Equivalence
• Equivalence Check
• Tautologies and Contradictions
• Laws of Logic
• Simplification of Compound Propositions