0% found this document useful (0 votes)
9 views36 pages

Lecture # 04

Uploaded by

70135804
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views36 pages

Lecture # 04

Uploaded by

70135804
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 36

Junaid Asghar

BSCS (UET Lahore)


MSCS (UMT Lahore)

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 pq p ~ (p  q)  ~ (p 
q (pq) 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.

 E.g.: Give me a book or bag. It means either give me


a book or bag or possibly give him both bag and book.
 In the above statement, we are using OR in
Inclusive sense.

 E.g.: Tomorrow at 9’o clock, I will be in Lahore or


Islamabad.
 In the above statement, we are using OR in
Exclusive sense.
Exclusive OR
 When OR is used in exclusive sense, the
statement “p or q” means “p or q but not
both”

or

 “p or q and not p and q” which translates


into symbols as:
 “p or q and not p and q” which translates
into symbols as:

(p  q)  ~ (p  q)
Symbols for EXCLUSIVE OR
pq

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.

 IMPLLICATION and its CONVERSE they are not


equivalent to each other logically.

 Implication’s INVERSE and CONVERSE are


logically equivalent to each other.

 IMPLICATION and its CONTROPOSITIVE are


equivalent to each other.
Examples:
 If you work hard you get good grades.
w = “You work hard”
g = “You get good grades”

 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

“You get good grades if and only if you work


hard.”

By summing up we get a new connective and


we called this new connective
BICONDITIONAL.
Bi-Conditional Connective
 If p and q are statement variables, the
biconditional of p and q is

 “p if, and only if, q” and is denoted p  q.

 if and only if abbreviated iff.


TRUTH TABLE FOR
pq
p q pq
T T T
T F F
F T F
F F T
EXAMPLES:
 “1 + 1 = 3 if and only if earth is flat.”
TRUE

 “Sky is blue iff 1 = 0”


FALSE

 “Milk is white iff birds lay eggs.”


TRUE
 “33 is divisible by 4 if and only if horse has
four legs.”
FALSE

 “x > 5 iff x² > 25”


FALSE

 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

same truth values


REPHRASING BICONDITIONAL:
 p  q is also expressed as:

“p is necessary and sufficient for q”


“if p then q, and conversely”
“p is equivalent to q”

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.

 For you to win the contest it is necessary


and sufficient that you have the only
winning ticket.
You win the contest if and only if you have the
only winning ticket.
 If you read the news paper every day, you will
be informed and conversely.
You will be informed if and only if you read the
newspaper every day.

 It rains if it is a weekend day, and it is a


weekend day if it rains.
It rains if and only if it is a weekend day.

 This number is divisible by 6 precisely when it


is divisible by both 2 and 3.
This number is divisible by 6 if and only if it is
divisible by both 2 and 3.
 TRUTH TABLE FOR (p  q)  (~ q ~ p)
TRUTH TABLE FOR (p  q)  (~ q ~
p)
p q p ~ ~ ~ q ~ (p  q)  (~ q ~
q q p p p)
T T T F F T T
T F F T F F T
F T T F T T T
F F T T T T T
Note:
The result is TAUTOLOGY, It means both the expressions involved in
statement form are equivalent.
(p  q)  (r  q)
(p  q)  (r  q)
p q r p r (p  q)  (r 
q q 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
p  ~r  q  r
 In this statement form we have no
parenthesis.
 Here
p q pr  ~
~ r p~r
q  rqmeans
r (p ~r
p (~r))q 
 r (q  r)
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
Show that ~p  q and p  ~q are
logically equivalent

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  pq
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: pqqp

 Implication Laws: p q  ~p  q
 ~(p  ~q)

 Exportation Law: (p  q)r  p (q r)

 Equivalence: p  q  (p q)  (q p)

 Reduction and absurdum p q  (p 


~q) c
APPLICATION:
 Rewrite the statement forms without
using the symbols  or 
1. p~qr 2. (pr)(q r)

 Solution:
 p~q  r  (p  ~q)r order of operations
 ~(p~q)  r implication
law
2. (pr)(q r) p q  ~p  q
 ~(p  ~q)

(pr)(q r)  (~p  r)(~q  r) implication law


p  q  (p q)  (q p)
 [(~p  r) (~q  r)]  [(~q  r) (~p  r)]
equivalence of
biconditional

 [~(~p  r)  (~q  r)]  [~(~q  r)  (~p  r)]


implication law
Rewrite the statement form ~p  q 
r  ~q to a logically equivalent form
that uses only ~ and .
 Rewrite the statement form ~p  q  r  ~q
to a logically equivalent form that uses only ~
and .

 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)
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
qt Negation law
t Universal bound law

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy