DS Lecture 3
DS Lecture 3
Lecture 3
1
Previous Lecture Summary
• Logical Equivalences.
• De Morgan’s laws.
• Tautologies and Contradictions.
• Laws of Logic.
• Logical Equivalences using Logical
Laws.
2
Lecture`s outline
• Conditional Propositions.
• Negation, Inverse and Converse of the
conditional statements.
• Contra positive .
• Bi conditional statements.
• Necessary and Sufficient Conditions.
• Conditional statements and their Logical
equivalences.
3
Conditional propositions
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 John lives in Islamabad, then he lives in Pakistan.
4
Implication (if - then)
P Q PQ
T T T
T F F
F T T
F F T
5
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.
7
Examples
8
Other forms of conditional propositions
John will break the world`s record for the mile run only
if he runs the mile in under four minutes.
is equivalent to
9
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’.
10
Solution
11
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.
12
Converse and inverse of the Conditional
13
Continue…..
Example
If today is Sunday, then tomorrow is Monday.
Contra positive:
If tomorrow is not Monday, then today is not Sunday.
15
The Biconditional
Definition Given proposition variables p and q, the
Bi conditional 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.
16
Truth table
p q p↔q
T T T
T F F
F T F
F F T
19
Necessary and Sufficient Conditions
Let r and s are two propositions
20
Logical Equivalence of Conditional propositions
(i) “The user has contacted the network administrator, but does
not enter a valid password.”
c∧¬v
22
Cont….
(c ∨ v) → a
(¬v ∨ ¬c) → ¬a 23
Conversion of statements in to symbols
(l ∨ e) → ¬ u
24
Lecture Summary
• Conditional Propositions.
• Negation, Inverse and Converse of the conditional
statements.
• Contra positive .
• Bi conditional statements.
• Necessary and Sufficient Conditions.
• Conditional statements and their Logical
equivalences.
• Translating English to Symbols.
25