Discrete Structures
Discrete Structures
Discrete Structures
Lecture 2
Previous Lecture Summery
• Logical Equivalences.
• De Morgan’s laws.
• Tautologies and Contradictions.
• Laws of Logic.
• Conditional propositions.
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
⌐(⌐p q) (p q) ≡ p.
Solution
Take ⌐(⌐p q) (p q)
≡ (⌐(⌐p) ⌐q) (p q), (by De Morgan’s laws)
≡ (p ⌐q) (p q), (by double negative law)
≡ p (⌐q q), (by distributive law)
contd…
• Logical Equivalence
• Equivalence Check
• Tautologies and Contradictions
• Laws of Logic
• Simplification of Compound Propositions
Another Example
Prove that ¬[r ∨ (q ∧ (¬r →¬p))] ≡ ¬r ∧ (p∨ ¬q)
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 P→Q
T T T
T F F
F T T
F F T
Interpreting Conditional Statements
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
Example
If today is Sunday, then tomorrow is Monday.
Contrapositive:
If tomorrow is not Monday, then today is not Sunday.
Converse and inverse of the Conditional
• Logical Equivalence
• Equivalence Check
• Tautologies and Contradictions
• Laws of Logic
• Simplification of Compound Propositions