Professional Documents
Culture Documents
DS Lecture 2
DS Lecture 2
Lecture 2
1
Previous Lecture Summery
2
Today’s Lecture
• Logical Equivalences.
• De Morgan’s laws.
• Tautologies and Contradictions.
• Laws of Logic.
• Conditional propositions.
3
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.
4
Equivalence of Two Compound
Propositions P and Q
5
Equivalence Check
6
Example
Solution
p ¬p ¬ (¬p)
T F T
F T F
7
Example
Show that the proposition forms ¬(pq) and ¬p ¬q
are NOT logically equivalent.
8
De Morgan’s laws
De Morgan’s laws state that:
The negation of an and proposition is
logically equivalent to the or proposition in
which each component is negated.
9
Symbolically (De Morgan’s Laws)
1. ¬(pq) ≡ ¬p¬q
2. ¬(pq) ≡ ¬p¬q
10
Applying De-Morgan’s Law
Question: Negate the following compound Propositions
11
Solution
12
Inequalities and De Morgan’s Laws
-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. 13
Tautology and Contradiction
14
Example
Show that the proposition form p¬p is a
tautology and the proposition form p¬p is a
contradiction.
p ¬p p ¬p p ¬p
T F T F
F T T F
15
Laws of Logic
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)
16
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
17
Laws of Logic
9. Absorption laws
p (pq) ≡ p ; p (p q) ≡ p
18
Exercise
20
Lecture Summary
• Logical Equivalence
• Equivalence Check
• Tautologies and Contradictions
• Laws of Logic
• Simplification of Compound Propositions
21
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.
23
Implication (if - then)
P Q PQ
T T T
T F F
F T T
F F T
24
Interpreting Conditional Statements
25
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.
27
Examples
28
Activity
• Show that
p→q ≡ ¬p q
This shows that a conditional proposition is simple a
proposition form that uses a not and an or.
• Show that
¬(p→q) ≡ p ¬q
This means that negation of ‘if p then q’ is logically
equivalent to ‘p and not q’.
29
Solution
30
Negations of some Conditionals
Proposition: If my car is in the repair shop, then I
cannot get the class.
Negation: My car is in the repair shop and I can get the
class.
Greece.
Negation: Sara lives in Athens and she does not live in
Greece.
31
Contraposition
Definition
The contrapositive of a conditional proposition of the form ‘if p
then q’ is ‘if ¬q then ¬p’. Symbolically, the contrapositive of
p→q is ¬q→¬p.
Example
If today is Sunday, then tomorrow is Monday.
Contrapositive:
If tomorrow is not Monday, then today is not Sunday.
32
Converse and inverse of the Conditional
33
34
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.
35
Truth table
p q p↔q
T T T
T F F
F T F
F F T
38
Necessary and Sufficient Conditions
Let r and s are two propositions
39
Lecture Summary
• Logical Equivalence
• Equivalence Check
• Tautologies and Contradictions
• Laws of Logic
• Simplification of Compound Propositions
40