SlideShare a Scribd company logo
LOGICAL
STRUCTURES
Discrete Structures 1
Lecture 1
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 2
LOGIC
 is the study of reasoning.
 is specially concerned with whether
reasoning is correct
 focuses on the relationship among
statements as opposed to the content of
any particular statement
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 3
PROPOSITION
 A proposition is a declarative sentence
that is either true or false, but not both.
 Example:
Manila is the capital of the Philippines.
1 + 1 = 3.
2 < 5.
Today is Friday.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 4
PROPOSITION
 Consider the following sentences:
 What time is it?
 Read this carefully.
 x + 1 = 2.
 x + y = z.
 Sentences 1&2 are not propositions because
they are not declarative sentences. Sentences
3&4 are not propositions because they are
neither true nor false, since the variables in
these sentences have not been assigned
values.
Proposition
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 5
Prime Proposition- simple
statement that express a single
complete thought, and the whole
truth value is true
Ex.
1.The sun is shining.
2.I walk to work.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 6
Compound Proposition – are
propositions that are made of two or more
propostions and whose truth value is true
or false, but never both.
Ex.
1.The sun is shining and I work to work.
Socrates is a man or Socrates is a dog
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 7
PROPOSITION
 Conventional letters used to denote
propositions are p, q, r, s,…
 The truth value of a proposition is true,
denoted by T, if it is true and false,
denoted by F, if it is a false proposition.
Propositional Logic
Operators
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 9
NEGATION
 Let p be a proposition. The statement
“It is not the case that p”
is another proposition called the negation
of p.
 The negation of p is denoted by p. The
proposition is read “not p.”
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 10
NEGATION
 Example:
p: Today is Friday.
p: It is not the case that today is
Friday. Or Today is not Friday.
p: Michael’s PC runs Linux
p: It is not the case that Michael’s PC runs
Linux
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 11
NEGATION
 Truth Table
p p
T F
F T
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 12
Exercise
Give the negation of the following
propositions:
1.John missed the final examinations.
2.Mary is a vegetarian.
3.1 + 5 = 9.
4.4 > 0.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 13
CONJUNCTION
 Let p and q be propositions. The
proposition “p and q”, denoted p  q, is the
proposition that is true when both p and q
are true and is false otherwise. The
proposition p  q is called the conjunction
of p and q.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 14
CONJUNCTION
 Example:
p: Today is Friday.
q: It is raining today.
p  q: Today is Friday and it is raining
today.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 15
CONJUNCTION
 Truth Table:
p q p  q
T T T
T F F
F T F
F F F
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 16
Exercise
 Let p and q be the propositions
p: It is below freezing.
q: It is snowing.
Write these propositions using p and q and
logical connectives.
a. It is below freezing and snowing.
b. It is below freezing but not snowing.
c. It is not below freezing and it is not snowing.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 17
Exercise
 Calculate the truth values:
a. (1>0)  (2<1)
b. (0<1)  (1<2)
 Write out the truth tables for
a. p  (q)
b. (p  q)  r
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 18
DISJUNCTION
 Let p and q be propositions. The
proposition “p or q”, denoted p  q, is the
proposition that is false when p and q are
both false and true otherwise. The
proposition p  q is called the disjunction of
p and q.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 19
DISJUNCTION
 Example 1:
p: Today is Friday.
q: It is raining today.
p  q: Today is Friday or it is raining today.
 Example 2:
r: I want to eat chicken.
s: I want to eat spaghetti.
r  s: I want to eat chicken or spaghetti.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 20
DISJUNCTION
 Truth Table:
p q p  q
T T T
T F T
F T T
F F F
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 21
Exercise
 Let p and q be the propositions
p: The election is decided.
q: The votes have been counted.
Express each of these compound
propositions as an English sentence:
a. p  q
b. q  (p  q)
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 22
Exercise
 Calculate the truth values (assuming p =
T, q = F, r = F)
a.  p  (q  r)
b. (p  q)  (p  r)
 Write out the truth tables for
a. p  (p  q)
b. (q  r)  (p  q)
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 23
EXCLUSIVE OR
 Let p and q be propositions. The exclusive
or of p and q, denoted by pq, is the
proposition that is true when exactly one of
p and q is true and false otherwise.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 24
EXCLUSIVE OR
 Example:
p: Students who have taken calculus
can enroll in this class.
q: Students who have taken computer
science can enroll in this class.
p  q: Students who have taken
calculus or computer science,
but not both, can enroll in this class.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 25
EXCLUSIVE OR
 Truth Table:
p q p  q
T T F
T F T
F T T
F F F
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 26
IMPLICATION
 Let p and q be propositions. The
implication p  q is the proposition that is
false when p is true and q is false, and
true otherwise. In this implication p is
called the hypothesis (or antecedent or
premise) and q is called the conclusion (or
consequent).
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 27
IMPLICATION
 Example:
p: I am elected.
q: I will lower taxes.
p  q: If I am elected, then I will
lower taxes.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 28
IMPLICATION
 Ways to express implication:
“if p, then q” “p implies q”
“if p, q” “p only if q”
“q if p” “q whenever p”
“q when p” “q is necessary for p”
“q follows from p”“p is sufficient for q”
“a sufficient condition for q is p”
“a necessary condition for p is q”
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 29
Exercise
 State each statement in the form “if p, then
q” in English:
a. It snows whenever the wind blows from the
northeast.
b. The apple trees will bloom if it stays warm for a
week.
c. It is necessary to walk 8 miles to get to the top
of Long’s Peak.
d. To get tenure as a professor, it is sufficient to be
world-famous.
e. Your guarantee is good only if you bought your
CD player less than 90 days ago.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 30
IMPLICATION
 Truth Table:
p q p  q
T T T
T F F
F T T
F F T
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 31
IMPLICATION
 q  p is called the converse of p  q.
 q  p is called the contrapositive of
pq.
 p  q is called the inverse of pq
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 32
IMPLICATION
 What is the contrapositive, converse, and
inverse of the ff. propositions
a. The home team wins whenever it is raining.
b. That you get a job implies that you had the best
credentials.
c. To be a citizen of this country, it is sufficient that
you were born in the Philippines.
d. I will remember to send you the address only if
you send me an e-mail message.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 33
IMPLICATION
 The contrapositive, q  p, of an
implication p  q has the same truth value
(or equivalent) as p  q.
 Neither the converse nor the inverse have
the same truth value as p  q for all
possible truth values of p and q.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 34
Exercise
 Determine whether these implications
are true or false:
a. If 1+1=2, then 2+2=5.
b. If 1+1=3, then 2+2=4.
c. If pigs can fly, then 1+1=3.
d. If 1+1=3, then pigs can fly.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 35
Exercise
 Construct the truth table for each of
these compound propositions:
a. (p  q)  (p q)
b. (p  q)  (p  q)
c. p  (q  r)
d. (p  q)  (p  r)
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 36
BICONDITIONAL
 Let p and q be propositions. The
biconditional p  q is the proposition that
is true when p and q have the same truth
values, and is false otherwise.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 37
BICONDITIONAL
 Example:
p: You can take the flight.
q: You buy a ticket.
p  q: You can take the flight if and
only if you buy a ticket.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 38
BICONDITIONAL
 Ways to express biconditional statement:
“p if and only if q”
“p is necessary and sufficient for q”
“if p then q, and conversely”
“p if q”
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 39
BICONDITIONAL
 Truth Table:
p q p  q
T T T
T F F
F T F
F F T
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 40
Exercise
 Express each proposition in the form “p if
and only if q” in English.
a. For you to get a 5.0 in this course, it is
necessary and sufficient that you learn how to
solve discrete mathematics problems.
b. It rains if it is a weekend day, and it is a
weekend day if it rains.
c. You can see the wizard only if the wizard is not
in, and the wizard is not in only if you can see
him.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 41
Precedence of Logical Operators
Operator Precedence
 1


2
3


4
5
PROPOSITIONAL
EQUIVALENCES
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 43
Definitions
 A compound proposition that is always
true, no matter what the truth values of the
propositions that occur in it, is called a
tautology.
 A compound proposition that is always
false is called a contradiction.
 A proposition that is neither a tautology
nor a contradiction is called a contingency.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 44
Tautologies and Contradictions
 Examples of Tautology and Contradiction:
p  p and p  p
p p p  p p  p
T
F
F
T
T
T
F
F
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 45
LOGICAL EQUIVALENCES
 The propositions p and q are called
logically equivalent if p  q is a tautology.
The notation p  q denotes that p and q
are logically equivalent.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 46
LOGICAL EQUIVALENCES
 Example: Show that (p  q) and p  q are
logically equivalent. (one of De Morgan’s
laws)
p q p  q (p  q) p q p  q
T T
T F
F T
F F
T
T
T
F
F
F
F
T
F
F
T
T
F
T
F
T
F
F
F
T
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 47
Exercise
 Show that p  q and p  q are logically
equivalent.
 Show that p  (q  r) and (p  q)(p  r) are
logically equivalent. Identify the Law.
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 48
Logical Equivalences
Equivalence Name
p  T  p
p  F  p
Identity laws
p  T  T
p  F  F
Domination laws
p  p  p
p  p  p
Idempotent laws
(p)  p Double negation law
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 49
Logical Equivalences
Equivalence Name
p  q  q  p
p  q  q  p
Commutative laws
(p  q)  r p  (q  r)
(p  q)  r  p  (q  r)
Associative laws
p  (q  r)  (p  q)  (p  r)
p  (q  r)  (p  q)  (p  r)
Distributive laws
(p  q)  p  q
(p  q)  p  q
De Morgan’s laws
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 50
Logical Equivalences
p  (p  q)  p
p  (p  q)  p
Absorption laws
p  p  T
p  p  F
Negation laws
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 51
Logical Equivalences Involving
Implications
 p  q  p  q
 p  q  q  p
 p  q  p  q
 p  q  (p   q)
 (p  q)  p   q
 (p  q)  (p  r)  p  (q  r)
 (p  r)  (q  r)  (p  q)  r
 (p  q)  (p  r)  p  (q  r)
 (p  r)  (q  r)  (p  q)  r
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 52
Logical Equivalences Involving
Biconditionals
 p  q  (p  q)  (q  p)
 p  q  p   q
 p  q  (p  q)  (p  q)
 (p  q)  p  q
Discrete Mathematics and Its
Applications by Kenneth H. Rosen 53
Equational Reasoning
 Show that (p  q)  (p  q) is a tautology.
 Show that (p  (p  q)) and p  q are
logically equivalent.
 Show that (p  q)  ( p  q) is a tautology.
 Show that (p  q)  p and (q  p) are
logically equivalent.

More Related Content

PPT
1. LOGICAL STRUCTURES (INTRODUCTION FOR COMPUTER SYSTEMS
PPTX
Dm 10.12.2020
PPT
Universe of Discourse Quantifier in Discrete Structures
PPTX
DISCRTE STRUCTURES CSY1-QUANTIFIERS.pptx
PPT
Lec 01 proposition (Discrete Mathematics)
PPT
The propositional logic and its appl.ppt
PDF
Proof techniques and quantifiers : lecture 3
PPTX
1. LOGICAL STRUCTURES (INTRODUCTION FOR COMPUTER SYSTEMS
Dm 10.12.2020
Universe of Discourse Quantifier in Discrete Structures
DISCRTE STRUCTURES CSY1-QUANTIFIERS.pptx
Lec 01 proposition (Discrete Mathematics)
The propositional logic and its appl.ppt
Proof techniques and quantifiers : lecture 3

Similar to Applications of Propositional Logic in Logical Structures (20)

PPTX
PDF
dmsfyrtewertyuiouytruytrertyuioiuytrertyuiuytrertyuiuy
PPTX
CSE-203 Lec_1.pptx
PDF
Intro to Discrete Mathematics
PPT
CS202Ch1.ppt
PPTX
LEC 1oral pathology by lecture 23jn yh.pptx
PPTX
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
PPT
Lec 02 logical eq (Discrete Mathematics)
PPTX
Intro to disceret structure
PPT
Discrete Maths141 - Course Outline and Lecture Slides
PDF
UGC NET Computer Science & Application book.pdf [Sample]
PPTX
PDF
Module - 2 Discrete Mathematics and Graph Theory
PPTX
DiscreteMathematicsfor btechAsWeProgress.pptx
PPTX
Discrete Mathematics Details tree pt.pptx
PPTX
Lecture 1 Propositional logic
PPTX
Discreate structure presentation introduction
PPT
1606751772-ds-lecture-6.ppt
PPTX
1-Propositional Logic and Logical Connectives.pptx
PPTX
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negation
dmsfyrtewertyuiouytruytrertyuioiuytrertyuiuytrertyuiuy
CSE-203 Lec_1.pptx
Intro to Discrete Mathematics
CS202Ch1.ppt
LEC 1oral pathology by lecture 23jn yh.pptx
Disrete mathematics and_its application_by_rosen _7th edition_lecture_1
Lec 02 logical eq (Discrete Mathematics)
Intro to disceret structure
Discrete Maths141 - Course Outline and Lecture Slides
UGC NET Computer Science & Application book.pdf [Sample]
Module - 2 Discrete Mathematics and Graph Theory
DiscreteMathematicsfor btechAsWeProgress.pptx
Discrete Mathematics Details tree pt.pptx
Lecture 1 Propositional logic
Discreate structure presentation introduction
1606751772-ds-lecture-6.ppt
1-Propositional Logic and Logical Connectives.pptx
Logic, contrapositive, converse, Discrete Mathematics, conjunction, negation
Ad

Recently uploaded (20)

PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Pre independence Education in Inndia.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
Classroom Observation Tools for Teachers
PDF
RMMM.pdf make it easy to upload and study
PPTX
GDM (1) (1).pptx small presentation for students
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Sports Quiz easy sports quiz sports quiz
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Pre independence Education in Inndia.pdf
Pharma ospi slides which help in ospi learning
Classroom Observation Tools for Teachers
RMMM.pdf make it easy to upload and study
GDM (1) (1).pptx small presentation for students
TR - Agricultural Crops Production NC III.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Sports Quiz easy sports quiz sports quiz
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPH.pptx obstetrics and gynecology in nursing
102 student loan defaulters named and shamed – Is someone you know on the list?
Microbial diseases, their pathogenesis and prophylaxis
Module 4: Burden of Disease Tutorial Slides S2 2025
Supply Chain Operations Speaking Notes -ICLT Program
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Ad

Applications of Propositional Logic in Logical Structures

  • 2. Discrete Mathematics and Its Applications by Kenneth H. Rosen 2 LOGIC  is the study of reasoning.  is specially concerned with whether reasoning is correct  focuses on the relationship among statements as opposed to the content of any particular statement
  • 3. Discrete Mathematics and Its Applications by Kenneth H. Rosen 3 PROPOSITION  A proposition is a declarative sentence that is either true or false, but not both.  Example: Manila is the capital of the Philippines. 1 + 1 = 3. 2 < 5. Today is Friday.
  • 4. Discrete Mathematics and Its Applications by Kenneth H. Rosen 4 PROPOSITION  Consider the following sentences:  What time is it?  Read this carefully.  x + 1 = 2.  x + y = z.  Sentences 1&2 are not propositions because they are not declarative sentences. Sentences 3&4 are not propositions because they are neither true nor false, since the variables in these sentences have not been assigned values.
  • 5. Proposition Discrete Mathematics and Its Applications by Kenneth H. Rosen 5 Prime Proposition- simple statement that express a single complete thought, and the whole truth value is true Ex. 1.The sun is shining. 2.I walk to work.
  • 6. Discrete Mathematics and Its Applications by Kenneth H. Rosen 6 Compound Proposition – are propositions that are made of two or more propostions and whose truth value is true or false, but never both. Ex. 1.The sun is shining and I work to work. Socrates is a man or Socrates is a dog
  • 7. Discrete Mathematics and Its Applications by Kenneth H. Rosen 7 PROPOSITION  Conventional letters used to denote propositions are p, q, r, s,…  The truth value of a proposition is true, denoted by T, if it is true and false, denoted by F, if it is a false proposition.
  • 9. Discrete Mathematics and Its Applications by Kenneth H. Rosen 9 NEGATION  Let p be a proposition. The statement “It is not the case that p” is another proposition called the negation of p.  The negation of p is denoted by p. The proposition is read “not p.”
  • 10. Discrete Mathematics and Its Applications by Kenneth H. Rosen 10 NEGATION  Example: p: Today is Friday. p: It is not the case that today is Friday. Or Today is not Friday. p: Michael’s PC runs Linux p: It is not the case that Michael’s PC runs Linux
  • 11. Discrete Mathematics and Its Applications by Kenneth H. Rosen 11 NEGATION  Truth Table p p T F F T
  • 12. Discrete Mathematics and Its Applications by Kenneth H. Rosen 12 Exercise Give the negation of the following propositions: 1.John missed the final examinations. 2.Mary is a vegetarian. 3.1 + 5 = 9. 4.4 > 0.
  • 13. Discrete Mathematics and Its Applications by Kenneth H. Rosen 13 CONJUNCTION  Let p and q be propositions. The proposition “p and q”, denoted p  q, is the proposition that is true when both p and q are true and is false otherwise. The proposition p  q is called the conjunction of p and q.
  • 14. Discrete Mathematics and Its Applications by Kenneth H. Rosen 14 CONJUNCTION  Example: p: Today is Friday. q: It is raining today. p  q: Today is Friday and it is raining today.
  • 15. Discrete Mathematics and Its Applications by Kenneth H. Rosen 15 CONJUNCTION  Truth Table: p q p  q T T T T F F F T F F F F
  • 16. Discrete Mathematics and Its Applications by Kenneth H. Rosen 16 Exercise  Let p and q be the propositions p: It is below freezing. q: It is snowing. Write these propositions using p and q and logical connectives. a. It is below freezing and snowing. b. It is below freezing but not snowing. c. It is not below freezing and it is not snowing.
  • 17. Discrete Mathematics and Its Applications by Kenneth H. Rosen 17 Exercise  Calculate the truth values: a. (1>0)  (2<1) b. (0<1)  (1<2)  Write out the truth tables for a. p  (q) b. (p  q)  r
  • 18. Discrete Mathematics and Its Applications by Kenneth H. Rosen 18 DISJUNCTION  Let p and q be propositions. The proposition “p or q”, denoted p  q, is the proposition that is false when p and q are both false and true otherwise. The proposition p  q is called the disjunction of p and q.
  • 19. Discrete Mathematics and Its Applications by Kenneth H. Rosen 19 DISJUNCTION  Example 1: p: Today is Friday. q: It is raining today. p  q: Today is Friday or it is raining today.  Example 2: r: I want to eat chicken. s: I want to eat spaghetti. r  s: I want to eat chicken or spaghetti.
  • 20. Discrete Mathematics and Its Applications by Kenneth H. Rosen 20 DISJUNCTION  Truth Table: p q p  q T T T T F T F T T F F F
  • 21. Discrete Mathematics and Its Applications by Kenneth H. Rosen 21 Exercise  Let p and q be the propositions p: The election is decided. q: The votes have been counted. Express each of these compound propositions as an English sentence: a. p  q b. q  (p  q)
  • 22. Discrete Mathematics and Its Applications by Kenneth H. Rosen 22 Exercise  Calculate the truth values (assuming p = T, q = F, r = F) a.  p  (q  r) b. (p  q)  (p  r)  Write out the truth tables for a. p  (p  q) b. (q  r)  (p  q)
  • 23. Discrete Mathematics and Its Applications by Kenneth H. Rosen 23 EXCLUSIVE OR  Let p and q be propositions. The exclusive or of p and q, denoted by pq, is the proposition that is true when exactly one of p and q is true and false otherwise.
  • 24. Discrete Mathematics and Its Applications by Kenneth H. Rosen 24 EXCLUSIVE OR  Example: p: Students who have taken calculus can enroll in this class. q: Students who have taken computer science can enroll in this class. p  q: Students who have taken calculus or computer science, but not both, can enroll in this class.
  • 25. Discrete Mathematics and Its Applications by Kenneth H. Rosen 25 EXCLUSIVE OR  Truth Table: p q p  q T T F T F T F T T F F F
  • 26. Discrete Mathematics and Its Applications by Kenneth H. Rosen 26 IMPLICATION  Let p and q be propositions. The implication p  q is the proposition that is false when p is true and q is false, and true otherwise. In this implication p is called the hypothesis (or antecedent or premise) and q is called the conclusion (or consequent).
  • 27. Discrete Mathematics and Its Applications by Kenneth H. Rosen 27 IMPLICATION  Example: p: I am elected. q: I will lower taxes. p  q: If I am elected, then I will lower taxes.
  • 28. Discrete Mathematics and Its Applications by Kenneth H. Rosen 28 IMPLICATION  Ways to express implication: “if p, then q” “p implies q” “if p, q” “p only if q” “q if p” “q whenever p” “q when p” “q is necessary for p” “q follows from p”“p is sufficient for q” “a sufficient condition for q is p” “a necessary condition for p is q”
  • 29. Discrete Mathematics and Its Applications by Kenneth H. Rosen 29 Exercise  State each statement in the form “if p, then q” in English: a. It snows whenever the wind blows from the northeast. b. The apple trees will bloom if it stays warm for a week. c. It is necessary to walk 8 miles to get to the top of Long’s Peak. d. To get tenure as a professor, it is sufficient to be world-famous. e. Your guarantee is good only if you bought your CD player less than 90 days ago.
  • 30. Discrete Mathematics and Its Applications by Kenneth H. Rosen 30 IMPLICATION  Truth Table: p q p  q T T T T F F F T T F F T
  • 31. Discrete Mathematics and Its Applications by Kenneth H. Rosen 31 IMPLICATION  q  p is called the converse of p  q.  q  p is called the contrapositive of pq.  p  q is called the inverse of pq
  • 32. Discrete Mathematics and Its Applications by Kenneth H. Rosen 32 IMPLICATION  What is the contrapositive, converse, and inverse of the ff. propositions a. The home team wins whenever it is raining. b. That you get a job implies that you had the best credentials. c. To be a citizen of this country, it is sufficient that you were born in the Philippines. d. I will remember to send you the address only if you send me an e-mail message.
  • 33. Discrete Mathematics and Its Applications by Kenneth H. Rosen 33 IMPLICATION  The contrapositive, q  p, of an implication p  q has the same truth value (or equivalent) as p  q.  Neither the converse nor the inverse have the same truth value as p  q for all possible truth values of p and q.
  • 34. Discrete Mathematics and Its Applications by Kenneth H. Rosen 34 Exercise  Determine whether these implications are true or false: a. If 1+1=2, then 2+2=5. b. If 1+1=3, then 2+2=4. c. If pigs can fly, then 1+1=3. d. If 1+1=3, then pigs can fly.
  • 35. Discrete Mathematics and Its Applications by Kenneth H. Rosen 35 Exercise  Construct the truth table for each of these compound propositions: a. (p  q)  (p q) b. (p  q)  (p  q) c. p  (q  r) d. (p  q)  (p  r)
  • 36. Discrete Mathematics and Its Applications by Kenneth H. Rosen 36 BICONDITIONAL  Let p and q be propositions. The biconditional p  q is the proposition that is true when p and q have the same truth values, and is false otherwise.
  • 37. Discrete Mathematics and Its Applications by Kenneth H. Rosen 37 BICONDITIONAL  Example: p: You can take the flight. q: You buy a ticket. p  q: You can take the flight if and only if you buy a ticket.
  • 38. Discrete Mathematics and Its Applications by Kenneth H. Rosen 38 BICONDITIONAL  Ways to express biconditional statement: “p if and only if q” “p is necessary and sufficient for q” “if p then q, and conversely” “p if q”
  • 39. Discrete Mathematics and Its Applications by Kenneth H. Rosen 39 BICONDITIONAL  Truth Table: p q p  q T T T T F F F T F F F T
  • 40. Discrete Mathematics and Its Applications by Kenneth H. Rosen 40 Exercise  Express each proposition in the form “p if and only if q” in English. a. For you to get a 5.0 in this course, it is necessary and sufficient that you learn how to solve discrete mathematics problems. b. It rains if it is a weekend day, and it is a weekend day if it rains. c. You can see the wizard only if the wizard is not in, and the wizard is not in only if you can see him.
  • 41. Discrete Mathematics and Its Applications by Kenneth H. Rosen 41 Precedence of Logical Operators Operator Precedence  1   2 3   4 5
  • 43. Discrete Mathematics and Its Applications by Kenneth H. Rosen 43 Definitions  A compound proposition that is always true, no matter what the truth values of the propositions that occur in it, is called a tautology.  A compound proposition that is always false is called a contradiction.  A proposition that is neither a tautology nor a contradiction is called a contingency.
  • 44. Discrete Mathematics and Its Applications by Kenneth H. Rosen 44 Tautologies and Contradictions  Examples of Tautology and Contradiction: p  p and p  p p p p  p p  p T F F T T T F F
  • 45. Discrete Mathematics and Its Applications by Kenneth H. Rosen 45 LOGICAL EQUIVALENCES  The propositions p and q are called logically equivalent if p  q is a tautology. The notation p  q denotes that p and q are logically equivalent.
  • 46. Discrete Mathematics and Its Applications by Kenneth H. Rosen 46 LOGICAL EQUIVALENCES  Example: Show that (p  q) and p  q are logically equivalent. (one of De Morgan’s laws) p q p  q (p  q) p q p  q T T T F F T F F T T T F F F F T F F T T F T F T F F F T
  • 47. Discrete Mathematics and Its Applications by Kenneth H. Rosen 47 Exercise  Show that p  q and p  q are logically equivalent.  Show that p  (q  r) and (p  q)(p  r) are logically equivalent. Identify the Law.
  • 48. Discrete Mathematics and Its Applications by Kenneth H. Rosen 48 Logical Equivalences Equivalence Name p  T  p p  F  p Identity laws p  T  T p  F  F Domination laws p  p  p p  p  p Idempotent laws (p)  p Double negation law
  • 49. Discrete Mathematics and Its Applications by Kenneth H. Rosen 49 Logical Equivalences Equivalence Name p  q  q  p p  q  q  p Commutative laws (p  q)  r p  (q  r) (p  q)  r  p  (q  r) Associative laws p  (q  r)  (p  q)  (p  r) p  (q  r)  (p  q)  (p  r) Distributive laws (p  q)  p  q (p  q)  p  q De Morgan’s laws
  • 50. Discrete Mathematics and Its Applications by Kenneth H. Rosen 50 Logical Equivalences p  (p  q)  p p  (p  q)  p Absorption laws p  p  T p  p  F Negation laws
  • 51. Discrete Mathematics and Its Applications by Kenneth H. Rosen 51 Logical Equivalences Involving Implications  p  q  p  q  p  q  q  p  p  q  p  q  p  q  (p   q)  (p  q)  p   q  (p  q)  (p  r)  p  (q  r)  (p  r)  (q  r)  (p  q)  r  (p  q)  (p  r)  p  (q  r)  (p  r)  (q  r)  (p  q)  r
  • 52. Discrete Mathematics and Its Applications by Kenneth H. Rosen 52 Logical Equivalences Involving Biconditionals  p  q  (p  q)  (q  p)  p  q  p   q  p  q  (p  q)  (p  q)  (p  q)  p  q
  • 53. Discrete Mathematics and Its Applications by Kenneth H. Rosen 53 Equational Reasoning  Show that (p  q)  (p  q) is a tautology.  Show that (p  (p  q)) and p  q are logically equivalent.  Show that (p  q)  ( p  q) is a tautology.  Show that (p  q)  p and (q  p) are logically equivalent.

Editor's Notes

  • #12: Give the truth values of no. 3 and 4.