Professional Documents
Culture Documents
CS103 Slides Lecture 3 PDF
CS103 Slides Lecture 3 PDF
54
Motivation
55
Implication (→)
56
Implication (→)
57
Implication (→)
58
Implication (→)
59
Implication (→)
Truth Table for
• Example: The truth value of an implication can be A+ →
better understood by the previous example of A+ A+→
“A+ → new car” T T T
• We shall see when “A+ → new car” becomes T F F
true or false
• Let us see when “A+ → new car” becomes true
• Suppose that you did not got A+ (so, A+ is false)
F
F
T
F
T
T }
• Now, whether your father gives you a new car or
not (new car true or false), his promise remains true
• So, this makes “A+ → new car” true for the two
cases based on the new car is true or false
• (continues to the next slide…)
60
Implication (→)
61
Bi-conditional ()
62
Bi-conditional ()
63
Bi-conditional ()
64
Truth Table for PQ
from (P→Q)(Q→P)
Bi-conditional () P Q P→Q Q→P PQ
T T T T T
T F F T F
• PQ has two parts: P→Q and Q→P F T T F F
• Q→P can also be written as PQ F F T T T
• P→Q and PQ combine to PQ
• PQ is actually (P→Q)(PQ)
• PQ is true when both P→Q and Q→P are true
• If any of P→Q or Q→P is false, then PQ is false
• This can be better understood by extending the truth
table by adding two more columns for P→Q and Q→P
before PQ (see here)
• The table is computed from left to right (P, Q given)
• For computing P→Q and Q→P, we can go back and
forth to the truth table of (→) in previous slides
65
Truth Table for
A+
Bi-conditional () A+ A+
T T T
T F F
• Example: Truth value of a bi-conditional can be F T F
better understood by the example “A+ new car” F F T
• Remember, the modified promise of your father:
“He will give you a new car if and only if you get A+”
• That means, A+ and new car should be the same
• So, if A+, then new car. If no A+, then no new car
• We can see this in the top-right corner truth table
• When A+ and new car are same (first and last rows),
() becomes true
• If they are different (two middle rows), () is false
• Exercise: Truth tables of (in this slide) and → (in
Slide 60-61) differ only in 3rd row. Why?
66
Truth Table for Compound Propositions
67
Truth Table for Compound Propositions
68
Truth Table for Compound Propositions
69
Truth Table for Compound Propositions
70
Operator Precedence
71
Operator Precedence
72
Contrapositive, Converse, Inverse
Truth Table for
p→q and q→p
• Contrapositive of an implication p→q
p q p q p→q q→p
is q→p
T T F F T T
• Implication and contrapositive are
T F F T F F
logically equivalent
• Their values are same for all values of p, q F T T F T T
73
Contrapositive, Converse, Inverse
74
Contrapositive, Converse, Inverse
75
Contrapositive, Converse, Inverse
Truth Table for
q→p and p→q
• Converse of an implication p→q is q→p
p q p q q→p p→q
• Inverse of p→q is p→q
T T F F T T
• Converse and inverse are equivalent
T F F T T T
• This can be seen from this truth table
F T T F F F
• Last two columns of q→p and
p→q are same F F T T T T
• This equivalency can also be proven by contrapositive:
• contrapositive of q→p is p→q =
• From previous slides, implication and contrapositive
are same. So, q→p and p→q are same
• Exercise: Show converse = inverse for the followings:
A+→ new car, q→p, p→q, q→p, q→q, p→p
76