Lecture # 04
Lecture # 04
Lecture # 04
Truth table for EXCLUSIVE OR
(p q) ~ (p q)
p q p q p q ~ (pq) (p q) ~ (p 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 pq pq qp (p q) (q 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.
Note:
The result is TAUTOLOGY, It means both the expressions involved in statement
form are equivalent.
(p q) (r q)
p q r p q r q (p q) (r q)
T T T T T T
T T F T F F
T F T F F T
T F F F T F
F T T F T F
F T F F F T
F F T T F F
F F F T T T
HIERARCY OF CONNECTIVES
Resolve Innermost parenthesis, outmost parenthesis,.
Negation
Conjunction and Disjunction
Implication or Biconditional.
p ~r q r
In this statement form we have no parenthesis.
Here p ~ r q r means (p (~ r)) (q r)
p q r ~r p ~r qr p ~r q r
T T T F F T F
T T F T T T T
T F T F F T F
T F F T T F F
F T T F F T F
F T F T F T F
F F T F F T F
F F F T F F T
Show that ~p q and p ~q are
logically equivalent
p q ~p ~q ~p q 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
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)
SOLUTION
~p q r ~q Given statement form
(~p q) (r ~q) Order of operations
~[(~p q) ~ (r ~q)] Implication law
p q ~(p~
q)
~[~(p ~q) (~r q)] De Morgan’s law
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
EXERCISE:
Suppose that p and q are statements so that p q is false.
Find the truth values of each of the following:
~p q
TRUE
pq
TRUE
qp
FALSE