Discrete Structures Lecture 2
Discrete Structures Lecture 2
(Discrete Mathematics)
Lecture-2
¬(p ∨ q)
Translating English Sentences
• “If I go to Harry’s or to the country, I will not go shopping.”
• Let p = I go to Harry’s
• q = I go to the country.
• r = I will go shopping.
• If p or q then not r
(p ∨ q) → ¬r
Translating English Sentences
• Let p = It is below freezing
q = It is snowing
a) It is below freezing and it is snowing
b) It is below freezing but not snowing
c) It is not below freezing and it is not snowing
d) It is either snowing or below freezing (or both)
e) If it is below freezing, it is also snowing
f) It is either below freezing or it is snowing (not both), but it
is not snowing if it is below freezing
g) That it is below freezing is necessary and sufficient for it to
be snowing
Translating English Sentences
• “You can access the Internet from campus only if you are
a computer science major or you are not a freshman.”
• a only if c or not f
a → (c ∨¬f ).
Exercise
• Let p and q be the propositions “The election is decided”
and “The votes have been counted,” respectively. Express
each of these compound propositions as an English
sentence.
1. ¬p
2. p ∨ q
3. ¬p ∧ q
4. q → p
5. ¬q → ¬p
6. ¬p → ¬q
7. p ↔ q
8. ¬q ∨ (p ∧ q)
System Specifications
• System and Software engineers take requirements in
English and express them in a precise specification
language based on logic.
1. 𝒑 ∨ 𝒒2. ¬𝒑3. 𝒑 → 𝒒
• Is it remain consistent if the specification
“The diagnostic message is not retransmitted” is
added?
p: The diagnostic message is stored in the buffer
q: The diagnostic message is retransmitted
1. 𝒑 ∨ 𝒒2. ¬𝒑3. 𝒑 → 𝒒
4. ¬𝒒
Inconsistent
Propositional Equivalence
• An important type of step used in a mathematical
argument is the replacement of a statement with another
statement with the same truth value
p ¬p p ∨ ¬p p ∧ ¬p
T F T F
F T T F
p q pq p q ¬p q ¬p
T T T T T F T
T F F T F F F
F T T F T T T
F F T F F T T
Logical Equivalence
• Converse
The proposition q → p is converse of p → q.
• Contrapositive
The contrapositive of p → q is the proposition ¬q →¬p.
• Inverse
The proposition ¬p →¬q is called the inverse of p → q.
Logical Equivalence
p q r q r p (q r) (p q) (p r) (p q) (p
r)
T T T T T T T T
T T F F T T T T
T F T F T T T T
T F F F T T T T
F T T T T T T T
F T F F F T F F
F F T F F F T F
F F F F F F F F
Logical Equivalence
Equivalence Name
¬(p ∧ q) ≡ ¬p ∨¬q De Morgan’s laws
¬(p ∨ q) ≡ ¬p ∧¬q
p ∨ (p ∧ q) ≡ p Absorption laws
p ∧ (p ∨ q) ≡ p
p ∨¬p ≡ T Negation laws
p ∧¬p ≡ F
Logical Equivalence involving Implication
(p q) q
(p q) q DeMorgan’s
(p q) q Double negation
p (q q) Associative
p q Idempotent
•
Proof using Logical Equivalence
Show that (p q) q is a Tautology.
Proof:
(p q) q
(p q) q Implication
( p q) q De Morgan
p ( q q) Associative
p T Negation
T Dominations
Proof using Logical Equivalence
• Show that [p (p q)] q is a tautology.
[p (p q)] q
[p (p q)] q Substitution for
[(p p) (p q)] q Distributive
[ F (p q)] q Negation
(p q) q Identity
(p q) q Substitution for
(p q) q DeMorgan’s
p (q q ) Associative
p T Negation
T Domination
Proof using Logical Equivalence
Show that ( p (p q )) p q is logically equivalent.
L.H .S ( p (p q ))
p (p q ) DeMorgan's Law
p ((p ) q ) DeMorgan's Law
p ( p q ) Double Negation Law
( p p ) ( p q ) Distributive Law
F ( p q ) Negation Law
( p q ) F Commutative Law
p q Identity Law
R.H .S