Lecture # 04
Lecture # 04
Lecturer
Computer Sciences and IT Department
The University of Lahore
DOUBLE IMPLICATION/BICONDITIONAL
Lecture # 04
Truth table for EXCLUSIVE OR
(p q) ~ (p q)
p q pq p ~ (p q) ~ (p
q (pq) q)
T T T T F F
T F T F T T
F T T F T T
F F F F T F
EXCLUSIVE OR
In English when we use OR in this sense, when we
say p or q. It means either p is true or q is true or
possibly both are true.
or
(p q) ~ (p q)
Symbols for EXCLUSIVE OR
pq
or
p XOR q
Note:
Basically
p q ≡ (p q) ~ (p q)
Examples of Implication
p = “Aslam lives in Multan”
q = “Aslam lives in Pakistan”
“if p then q”
“p implies q”
“if p, q”
“p only if q”
“p is sufficient for q”
Note:
IMPLICATION is logically equivalent to its
CONTROPOSITIVE.
w g = If w then g
= “If you work hard then you get good
grades”.
Converse: True
g w = If g then w
= g only if w
= “You get good grades only if you work
hard.”
If we sum up the implication (w g) and its
converse
(g w) we get
Note:
Biconditional is logically equivalent to
conjunction of two implications:
p q (p q) (q p)
p q (p q) (q p)
p q (p q) (q p)
p q p p q (p q) (q
q q p p)
T T T T T T
T F F F T F
F T F T F F
F F T T T T
Note:
p q and q p are EQUIVALENT.
p iff q and q iff p are EQUIVALENT.
REPHARASING ENGLISH SENTENCES
IN BICONDITIONAL CONECTIVE.
If it is hot outside you buy an ice cream
cone, and if you buy an ice cream cone it
is hot outside.
You buy an ice cream cone if and only if it is
hot outside.
p q ~ ~q ~p q p
p ~q
T T F F F F
T F F T T T
F T T F T T
F F T T F F
same truth values
Show that ~(p q) and p q are logically
equivalent
EXERCISE:
Show that ~(p q) and p q are logically
equivalent
p q p ~(p pq
q q)
T T F T T
T F T F F
F T T F F
F F F T T
same truth
values
Laws of Logic
Commutative Law: pqqp
Implication Laws: p q ~p q
~(p ~q)
Solution:
p~q r (p ~q)r order of operations
~(p~q) r implication
law
2. (pr)(q r) p q ~p q
~(p ~q)
SOLUTION
~p q r ~q Given statement
form
(~p q) (r ~q) Order of
operations
~[(~p q) ~ (r ~q)] Implication law
pq
~(p~ q)
Show that ~(p q) p is a tautology
without using truth tables.
SOLUTION
~(p q) p Given statement form
~[~(p ~q)] p Implication law p q ~(p
~q)
(p ~q) p Double negation law
~(p ~q) p Implication law p q ~p
q
(~p q) p De Morgan’s law
(q ~p) p Commutative law of
q (~p p) Associative law of
qt Negation law
t Universal bound law