Chapter 1 301 Logic Part 2
Chapter 1 301 Logic Part 2
DISCRETE MATHEMATICS
MATH301
Chapter 1: The Foundations: Logic and
Proofs
Propositional Satisfiability
T T T F F T
T F F T F F
F T T F T T
F F T T T T
Copyright © Nahid Sultana, 2016-2017. 3/1/2023
Logical Equivalence
7
Example: Show using truth tables that the converse and inverse of an
implication are not equivalent to the implication.
T T T T F F T
T F F T F T T
F T T F T F F
F F T T T T T
Copyright © Nahid Sultana, 2016-2017. 3/1/2023
De Morgan’s Laws
8
Identity Laws: ,
Domination Laws: ,
Idempotent laws: ,
Negation Laws: ,
Copyright © Nahid Sultana, 2016-2017. 3/1/2023
Key Logical Equivalences (cont)
10
Commutative Laws: ,
Associative Laws:
Distributive Laws:
Absorption Laws: ,
Predicates
Variables
Quantifiers
Universal Quantifier
Existential Quantifier
Negating Quantifiers
De Morgan’s Laws for Quantifiers
Translating English to Logic
Copyright © Nahid Sultana, 2016-2017. 3/1/2023
Introducing Predicate Logic
15
Example: Suppose p(x): x >3. What are the truth values of p(2)
and p(4).
We can also have statement involve more than one variable. For
example consider the statement p(x, y): x=y+3.
Example: Suppose p(x, y): x=y+3. What are the truth values of
16
p(1,2) and p(3,0). Copyright © Nahid Sultana, 2016-2017. 3/1/2023
Examples of Propositional Functions
17
Let “x + y = z” be denoted by R(x, y, z) and the domain U (for all three variables)
be the integers. Find these truth values:
R(2,-1,5)
Solution: F
R(3,4,7)
Solution: T
R(x, 3, z)
Solution: Not a Proposition
Now let “x - y = z” be denoted by Q(x, y, z), with U as the integers. Find these truth
values:
Q(2,-1,3)
Solution: T
Q(3,4,7)
Solution: F
Q(x, 3, z)
Copyright © Nahid Sultana, 2016-2017. 3/1/2023
Solution: Not a Proposition
Quantifiers
18
19
20
Copyright © Nahid Sultana, 2016-2017. 3/1/2023
Quantifier (cont…)
21
21
Thinking about Quantifiers
24
22
x (S(x) ∧ J(x))
is not correct. --all people are students in this class and have taken a course in Java.
Copyright © Nahid Sultana, 2016-2017. 3/1/2023
Translating from English to Logic
26
x (S(x)→ J(x))
--is not correct. –is true when there is someone not in the class
--because, in that case, for such a person x, S(x) → J(x) becomes either F→T
or F→F, both of which are true.
Copyright © Nahid Sultana, 2016-2017. 3/1/2023
Equivalences in Predicate Logic
27
Even if the domains are infinite, you can still think of the quantifiers in this fashion,
but the equivalent expressions without quantifiers will be infinitely long.
Examples:
1. “Some student in this class has visited Mexico.”
Suppose the premises are all true, then conclusion may be either
true or false.
When the conclusion is true then the argument is said to be valid.
When the conclusion is false then the argument is said to be invalid
32
or fallacy. Copyright © Nahid Sultana, 2016-2017. 3/1/2023
Arguments (cont…)
33
Nested Quantifiers
Order of Quantifiers
Translating from Nested Quantifiers into English
Translating Mathematical Statements into Statements
involving Nested Quantifiers.
Translated English Sentences into Logical Expressions.
Negating Nested Quantifiers.
Examples:
Let P(x,y) be the statement “x + y = y + x.”
Assume that U is the real numbers.
Then x yP(x,y) andy xP(x,y) have the same truth value.