Sie sind auf Seite 1von 71

Foundations of Discrete

Mathematics
3.1 Propositions and Logical Operations
3.2 Truth Tables and Propositions Generated by a
Set

By Dr. Dalia M. Gil, Ph.D.


Edited by Dr. Lisa Macon, Ph.D.
Definition of Proposition

 A proposition is a sentence to
which one and only one of the
terms true or false can be
meaningfully applied.
Examples of Propositions

• Four is even.  True

• 4  {1, 3, 5}.
 False

• 43 > 21.
 True
Examples of Propositions

• “There are 168 primes less than 1000.”


True

 “Seventeen is an even number.” False

 “√3 is a rational number.” False

 “Zero is not negative.” True


Examples of No Propositions

• Open the door.  a command

• What time is it?


 a question

• X + 5 = 7.
 the value of x is
unknown
• What bad luck!
 an exclamation
Propositions and Statements

• In traditional logic, a declarative statement with a


definite truth value (true or false) is considered a
proposition.

• Compound statements are constructed from two or


more statements connected with connectives like the
words “and” and “or.”
Examples 1: Compound Statements

• “Mars supports life” or “Europe supports life.”

• This compound statement has two simple statements


connected with the connective “or.”
Example 2: Compound Statements

• “I don’t get this job” and “I take another class.”

• This compound statement has two simple statements


connected with the connective “and.”
Logical Operators

• There are several ways to combine simple statements


into compound ones.

• The words/phases “and”, “or”, “not”, “if…then”, and


“if and only if” can be added to one or more
propositions to create a new proposition.
Logical Operators

• With the exception of negation (not), all of the


operators act on pairs of propositions.

• Each proposition has two possible truth values (true


or false).

• p and q will be used as logical variables. That means


that any proposition can take the place of p and q.
Logical Operators

• The truth table will be used to see the effect that a


logical operator has on two propositions. The
following cases will be analyzed:

• Conjunction
• Disjunction
• Negation
• The conditional operator
• Biconditional operator
Conjunction

• Conjunction (and). If p and q


p q pq
are propositions, their
conjunction, p and q, 0 0 0
denoted p  q, is defined by
the truth table: 0 1 0
1 0 0
1 1 1
Conjunction

p q pq
• Any one line represents a
case: one possible set of 0 0 0
values for p and q. 0 1 0
1 0 0
1 1 1
Conjunction

p q pq
• The numbers 0 and 1 are
used to denote false and 0 0 0
true, respectively. 0 1 0
1 0 0
1 1 1
Conjunction

• For each case, the symbol p q pq


under p represents the 0 0 0
value of p. The same is true
for q. 0 1 0
1 0 0
1 1 1
Conjunction

• The symbol under p  q


represents the truth value of p 
q for that case. p q pq
0 0 0
0 1 0
 Example: second row
represents the case in 1 0 0
which p is false, q is true, 1 1 1
and the resulting truth
value for p  q is false
Example 1: Conjunction

“9 = 32 and 3.14 <”

• This compound statement is formed from two simple propositions:

• “9 = 32” and
• “3.14 < ”
Rules for Conjunctions

 Given the propositions p and q.

 The compound statement “p and q”


is true if both p and q are true.

 “p and q” is false if either p is false


or q is false.
Example 2: Conjunction

 “-22 = -4 and 5 < 100” True

 “-22 + 32 = 42 and 3.14 < ”


 False
Disjunction

• Disjunction (or). If p and q


p q pq
are propositions, their
disjunction is p or q, 0 0 0
denoted p  q, is defined by
the truth table: 0 1 1
1 0 1
1 1 1
Disjunction

• The only case in which


disjunction is false is when
both propositions are false. p q pq
0 0 0
0 1 1
1 0 1
 This interpretation of the
word “or” is called the 1 1 1
inclusive (nonexclusive)
or.
Example 1: Disjunction

“It is cloudy or it is raining”


 This compound statement is formed
from two simple statements:

 “It is cloudy”
 “it is raining”
A Compound Statement with “or”

 There are

 Inclusive OR
 Exclusive OR

 In this course, we will use Inclusive


OR, which includes the possibility of
both p and q statements being true.
Rule for a Compound Statement
with “or”

 Given the statements p and q.

 The compound statement “p or q”


is true if p is true or q is true or
both are true.

 “p or q” is false only when p and q


are false.
Example 2: Disjunction

 “7 + 5 = 12 or 571 is True
the 125th prime.”

 “5 is an even number or √8 > 3.”

 False
Negation

• Negation (Not). If p is a
proposition, its negation, not p, is
denoted p and is defined by the
truth table. p p
0 1
1 0
 Negation is the only
standard operator that
acts on a single
proposition.
Negation

• The negation of an “or” statement is always an “and”


statement and the negation of an “and” is always an
“or.”

 The negation of “p and q” is the assertion


“p or q.”

 The negation of “p or q” is the assertion


“p and q.”
Example 1: Negation

 The statement “x equals to 4”


(“x = 4”)

 The negation is “x does not


equal to 4” (“x ≠ 4”)

 ≠ means “not equal.”


Negation

 “not p” can be expressed as


“It is not the case that p.”

 “25 is a perfect square.”

 “It is not the case that 25 is a


perfect square.”
Negation

 The negation of an “or”


statement is always an “and”
statement.

 The negation of an “and”


statement is always an “or.”
Example 2: Negation

 The negation of “p and q” is the


assertion “¬p or ¬q.”

 The negation of
“a2 + b2 = c2 and a > 0” is

“a2 + b2 ≠ c2 or a  0.”
Example 3: Negation

 The negation of “p or q” is the


assertion “¬p and ¬q.”

 The negation of
“x + y = 6 or 2x + 3y < 7” is

“x + y ≠ 6 and 2x + 3y  7.”
The Conditional Operator

 Statement of the form “if p then q”

 Where p and q are propositions.


 p is called the hypothesis.
 q is called the conclusion.
 The symbol  is the conditional
operator.
The Conditional Operator

p q pq
• The conditional statement if p
then q, denoted p  q, is defined 0 0 1
by the truth table. 0 1 1
1 0 0
1 1 1
The Conditional Operator

a) I’m going to quit if I don’t get a raise.


b) If I pass the final, then I’ll graduate.
c) I’ll be going to the movies provided that my car starts.

 The three propositions are conditional


because they fit into the form “if Condition,
then Conclusion.”
Example: The Conditional Operator

• Assume your instructor told you “If you receive a


grade of 95 or better in the final examination,
then you will receive an A in the course.”

 Your instructor has made a promise to


you (set a condition with you). If you
fulfill his condition you expect the
conclusion (getting an A) to be
forthcoming.
Example: The Conditional Operator

• Has your instructor told the truth (kept the


promise) or is your instructor guilty of a
falsehood?

 Case I: Your final exam score was less


than 95 (the condition is false) and you
did not receive an A (the conclusion is
false). The instructor told the truth.
Example: The Conditional Operator

• Case II: Your final exam score was less than 95,
yet you received an A for the course. The
instructor told the truth (Perhaps your overall
course average was excellent).

 Case III: Your final exam score was


greater than 95, but you did not
receive an A. The instructor lied.
Example: The Conditional Operator

• Case IV: Your final exam score was greater than


95, and you received an A. The instructor told
the truth.

 To sum up, the only case in which a


conditional is false is when the
condition is true and the conclusion is
false.
The Conditional Operator

• The order of the condition and conclusion in a


conditional proposition is important.

• If the condition and conclusion are exchanged, a


different proposition is produced.
Example: The Conditional Operator

 “2 is an even  4 is an even
integer integer”

 
Hypothesis Conclusion
The Conditional Operator

 The conditional operator often


appears with the word implies.

“2 is an even integer, then 4 is an


even integer.”

implies
The Conditional Operator

• Alternate forms of conditional:


• If p then q
• p implies q
• q follows from p
• p, only if q
• q, if p
• p is sufficient for q
• q is necessary for p.
The Conditional Operator

 “p  q” is false only when

 the hypothesis p is true and


 the conclusion q is false.

 In all other situations, it is true.


The Conditional Operator

 “If -1 is a positive number, then


2+2=5.”
 True

Why?

“If -1 is a positive number” False

“2+2=5”  False
The Conditional Operator

 “If -1 is a positive number, then


2+2=4.”
 True

Why?

“If -1 is a positive number” False

“2+2=4”  True
Converse

• The converse of the proposition p  q is the


proposition q  p.
Example: Converse

• The converse of “If you receive a grade of 95 or


better in the final exam, then you will receive an A
in this course,” is

• If you receive an A in this course, then you


received a grade of 95 or better in the final exam.”
Example: Converse

Given the proposition

“2 is an even integer, then 4 is an


even integer.”
The converse is

“4 is an even integer, then 2 is an


even integer.”
Example: Converse

Given

“If 42 = 16, then -12 = 1”

The converse is

“If -12 = 1, then 42 = 16”


Biconditional Operator

 The biconditional operator in


p  q is read “p if and only if q.”

“p  q” and “p  q” or

“p  q” and “q  p”
Biconditional Operator

• If p and q are
propositions, the p q pq
biconditional statement 0 0 1
“p if and only if q,”
0 1 0
denoted p  q, is
defined by the truth 1 0 0
table. 1 1 1
Biconditional Operator

• p  q is true when p
and q have the same p q pq
true value. 0 0 1
0 1 0
• iff : abbreviation of if 1 0 0
and only if
1 1 1
Biconditional Operator

 “p  q” is true if p and q have the


same truth values;

 “p  q” is false if p and q have


different truth values.
Examples: Biconditional Operator

 “2 is an even number  4 is an
even number”
 True

“2 is an even number”  True

“4 is an even number”  True

 Both statements are true.


Examples: Biconditional Operator
 “2 is an even number  5 is an
even number”
 False

“2 is an even number”  True

“5 is an even number”  False

 The two statements have different


truth values.
Is this Statement True or False?

1. “42 = 16  -12 = -1”


 True

“42 = 16”  True

“-12 = -1”  True

 Both statements are true.


Is this Statement True or False?

2. “42 = 16 if and only if (-1)2 = -1”


 False

“42 = 16”  True

“(-1)2 = -1”  False

 The two statements have different


truth values.
Is this Statement True or False?

3. “42 = 15 if and only if -12 = -


1”  False

“42 = 15”  False

“-12 = -1”  True

 The two statements have different


truth values.
Is this Statement True or False?

4. “42 = 15  (-1)2 = -1”


 True

“42 = 15”  False

“(-1)2 = -1”  False

 Both statements are false.


Biconditional Operator

• Alternate forms of biconditional:


• p if and only if q
• p is necessary and sufficient for q
• p is equivalent to q
• If p, then q, and if q, then p
• If p, then q and conversely
Truth Tables and Propositions Generated by
a Set

• Consider the compound proposition c = (p 


q)  (q  r)
where p, q, and r are propositions.
• Each simple proposition has two possible truth
values
• There are 23 = 8 eight different combinations of
true values that determine a value for c.
Truth Tables and Propositions Generated by
a Set
p q r p  q q q  r (p  q)  (q  r)
0 0 0 0 1 0 0
0 0 1 0 1 1 1
0 1 0 0 0 0 0
0 1 1 0 0 0 0
1 0 0 0 1 0 0
1 0 1 0 1 1 1
1 1 0 1 0 0 1
1 1 1 1 0 0 1
Truth Tables and Propositions Generated by
a Set

 In general, if c is generated by n
simple propositions, then the truth
table for c will have 2n rows with the
first n columns being an enumeration
of the n digit binary integers.

 For example, 4 simple propositions,


the truth table will have 16 rows.
Truth Tables and Propositions Generated by
a Set

 Reviewing the table of the previous


example, c will be true in rows 2, 6, 7,
and 8 (the value of the last column
was 1 or true).
Proposition Generated by a Set

Let S be any set of propositions.

A proposition generated by S is any valid


combination of propositions in S with
conjunction, disjunction, and negation.
Hierarchy of Logical Operations

It is customary to use the following


hierarchy for interpreting propositions,
with parentheses overriding this order:
 First: Negation.
 Second: Conjunction.
 Third: Disjunction.
Hierarchy of Logical Operations

 Within any level of the hierarchy, work


from left to right.
 For example, p  q  r is taken to mean
(p  q)  r.
 These precedence rules are universal
and are used by computer languages to
interpret logical expressions.
Hierarchy of Logical Operations

 Examples:

 p  q  r is (p  q)  r
 p  r is (p)  (r)
 p is  ( p)
Topics covered

 Propositions

 Logical Operators

 Truth Tables

 Hierarchy of Logical Operators


Reference

 “Applied Discrete Structures”, Version 1.0,


March 2012, Alan Doerr and Kenneth
Levasseur, Department of Mathematical
Sciences, University of Massachusetts Lowell.
Chapter 3.

 K. H. Rosen, Discrete Mathematics and Its


Applications, Sixth Edition, McGraw Hill,
2007, page 1-23.

Das könnte Ihnen auch gefallen