Discrete Structure Predicates and Quantifiers Part 1 of 3
Discrete Structure Predicates and Quantifiers Part 1 of 3
STRUCTURE
PREDICATES AND QUANTIFIER
Part 1
OVERVIEW
Predicate logic
Quantifiers
•Universal
•Existential
•Uniqueness
Domain / Universe of Discourse
Scope (bound and free)
Nested Quantifiers
PREDICATE LOGIC
x >3
x =y+3
x +y=3
PREDICATE LOGIC EXAMPLE #1
Let p(x) denote the statement “x > 3.”
What are the truth values of p(4) and p(2)?
PREDICATE LOGIC EXAMPLE #2
Let A(x) demote the statement “Computer x is
under attack by an intruder.”
Suppose that of the computers on campus
only CS2 and MATH1 are currently under
attack by intruders
What are truth values of A(CS1),A(CS2), and
A(MATH1)?
PREDICATE LOGIC EXAMPLE #3
Let Q(x,y) denote the statement “x = y + 3.”
What are the truth values of the proposition
Q(1,2) and Q(3,0)?
PREDICATE LOGIC EXAMPLE #4
Let A(c, n) denote the statement “Computer c
is connected to network n.” Where c is a
variable representing a computer and n is a
variable representing a network.
Suppose that the computer MATH1 is
connected to network CAMPUS2, but not to
network CAMPUS1
What are the values of A(MATH1, CAMPUS1)
and A(MATH1, CAMPUS2)?
PREDICATE LOGIC EXAMPLE #5
Let R(x, y, z) denote the statement “x + y =
z.”
When values are assigned to the variables x,
y, and z, this statement has a truth value.
What are the truth values of the propositions
R(1, 2, 3) and R(0, 0, 1)?
PREDICATE LOGIC EXAMPLE #6
We’ve seen this before:
if (x > 0) { x = x + 1; }
QUANTIFIERS
When considering P(x) what are all of the possible values of x?
We call that domain.
We use quantifiers to refer to a quantity of values in the domain
•Universal (∀) - P(x) is true for all values in the domain of discourse
•Existential (Ǝ) – P(x) is true for at least one value in the domain of
discourse
•Existential (Ǝ!) - P(x) is true for exactly one value in the domain of
discourse
UNIVERSAL QUANTIFIER
EXAMPLE
#1
Let P(x) be the statement "x + 1 > x.“
What is the truth value of the quantification
∀xP(x), where the domain consists of all real
numbers?
UNIVERSAL QUANTIFIER
EXAMPLE
#2statement "x < 2.“
Let Q(x) be the
What is the truth value of the quantification
xQ(x) where the domain consists of all real
numbers?
UNIVERSAL QUANTIFIER
EXAMPLE #3
Let P(x) is "x² > 0.“