predicates & quantifiers
TRANSCRIPT
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 1/25
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 2/25
Predicate Logic is an extension of Propositional Logic.
It was used to express the meaning
of wide range of statements inmathematics and computer sciencein ways that permit us to reasonand explore relationships betweenobjects
04/28/12 2ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 3/25
Suppose we have the ff statements:
x+ 7 = 8
y + 3 < 5
Company x was attacked by thehackers.
Note: the above statement can neitherbe true nor false when the values of the variables are not specified.
These statements have TWO PARTS*The variable x, y etc. (subject of thestatement)
*The predicate (refers to a propertythat the sub ect of the statement can04/28/12 3
ACULA, D. (MATH 102C, UST-ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 4/25
x= 8
S: xP: is equal to eight
y + 3 < 5
S: y + 3P: is less than 5
Company x was attacked by thehackers.
S: Company x
P: was attacked by the hackers.
04/28/12 4ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 5/25
Let P(x) be a statement involving thevariable x and let D be a set. Wecall P a PROPOSITIONAL FUNCTION
(wrt D) if for each x in D, P(x) is aPROPOSITION. We call D theDOMAIN OF DICOURSE.
04/28/12 5ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 6/25
Let:
P(x) : x + 2x2 is a rational numbers.
D: set of rational numbers
P(x) : The students scored perfect in the test.
D: set of students
04/28/12 6ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 7/25
Determine the truth values of the ff.statements
(1)P(x) : 3x + 5 < 3 ; P(2), P(4)
(1)P(x, y) : 2x – 3y = 4 ; P(0, 1) , P(6, 1)
(1)P(x, y, z) : x – y < z ; P(1, 1,1), P(2, -1, 0)
04/28/12 7ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 8/25
QUANTIFICATION used to create aproposition from a propositionalfunction. It expresses the extent to
which a predicate is true over arange of elements.
TWO TYPES OF QUANTIFICATION(1)UNIVERSAL QUANTIFICATION
(2)EXISTENTIAL QUANTIFICATION
04/28/12 8ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 9/25
Let P(x) be a proposition function with domain of discourse D. The statement for every x, P(x)
is said to be UNIVERSALL QUANTIFIEDSTATEMENT.
The symbol (∀ universal quantifier ) means “forevery or for All”
The statement “for all x, P(x)” can be written asxP(x).∀
The statement for all x, P(x) is TRUE if P(x) is truefor every x in D.
The statement for all x, P(x) is FALSE if P(x) isfalse for at least one x in D.
04/28/12 9ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 10/25
(1) Let P(x) “ x + 2 < 2”. What is thetruth value of the quantification
xP(x), where the domain consist∀
of all non-negative integers?
(1) What is the truth value of xP(x),∀
where P(x) is the statement “x2 <9” and the domain consists of thepositive integers not exceeding 3?
04/28/12 10ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 11/25
Let P(x) be a proposition function with
domain of discourse D. The statement for some x, P(x) is said to be EXISTENTIALLY QUANTIFIED STATEMENT.
The symbol (∃ existential quantifier ) means“for some or there Exists”.
The statement “for some x, P(x) can bewritten as xP(x).∃
The statement for some x, P(x) is TRUE if P(x) is true for at least one x in D.
The statement for some x, P(x) is FALSE if P(x) is false for every x in D>
04/28/12 11ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 12/25
(1) Let P(x) “ x + 2 < 2”. What is thetruth value of the quantification
xP(x), where the domain consist of ∃
all non-negative integers?
(1) What is the truth value of xP(x),∃
where P(x) is the statement “x2 < 9”
and the domain consists of thepositive integers not exceeding 3?
04/28/12 12ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 13/25
UNIQUENESS QUANTIFIER The statement “There exists a unique x
such that P(x) is true” or “there is
exactly one” or “there is one and onlyone” is an example of quantificationusing UNIQUENESS QUANTIFIER.
And this can be written as !xP(x).∃
04/28/12 13ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 14/25
The quantifiers and have higher∃ ∀precedence than all logicaloperations.
Example.
(1) The conjunction of xP(x) and∃
Q(x) : ( xP(x)) Q(x) rather than∃ ∧
x(P(x) Q(x)).∃ ∧
04/28/12 14ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 15/25
The occurrence of the variable issaid to be BOUND when thequantifier is used on the variable.
The occurrence of the variable thatis not bound by a quantifier is saidto be FREE.
The part of a logical expression towhich a quantifier is applied calledthe SCOPE of quantifier.
04/28/12 15ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 16/25
(1) ∀x(4x + 4y <2z)
Bound: x (by universal quantifier)
Free: y & z
(1) ∃x(P(x) Q(x)) xR(x)⇒ ∧∀Bound: all variables
Free: d.n.e.
04/28/12 16ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 17/25
Statements involving predicates andquantifiers are LOGICALLY EQUIVALENT if and only if they have
the same truth value no matterwhich predicates are substitutedinto these statements and whichdomain of discourse is used for the
variables in these propositionalfunctions.
04/28/12 17ACULA, D. (MATH 102C, UST-ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 18/25
(1) Show that
∀x(P(x) Q(x)) xP(x) Q(x∧ ≡ ∀ ∧
(2)Show that∃x(P(x) Q(x)) xP(x) Q(x)∨ ≡ ∃ ∨
04/28/12 18ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 19/25
NEGATION EQUIVALENTSTATEMENT WHEN ISNEGATIONTRUE?
WHEN IS NEGATIONFALSE?
¬ xP(x)∃ ∀x¬P(x) For every x,
P(x) is false
There is an x
for which P(x)is true.
¬ xP(x)∀ ∃x¬P(x) There is anx for whichP(x) isfalse.
P(x) is true forevery x.
Note: The rules for negations for quantifiersare called DE MORGAN’S LAWS FOR
QUANTIFIERS 04/28/12 19ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 20/25
SHOW THAT¬ x(P(x) Q(x)) x(P(x) ¬Q(x).∀ ⇒ ≡ ∃ ∧
04/28/12 20ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 21/25
TWO-PLACE PREDICATES are referred to asrelational predicates, they express a relationbetween two components.
Let P = is easier than
∃xP(x, y): Some x is easier than y.
∀yP(x,y): Every y is easier than x.
04/28/12 21ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 22/25
Two quantifiers are NESTED if one quantifier iswithin the scope of the other quantifier.
EXAMPLE
∀x y((x<0) (y<0)) (xy < 0)
∀ ∨ ⇒
Consider that the domain of discourse for bothvariables are real numbers.
“For all real number x and for all real number
y, if x is less than 0 or y less than 0, then xyis less than 0.
04/28/12 22ACULA, D. (MATH 102C, UST-
ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 23/25
It is important to note that the order of the
quantifier important, unless all thequantifiers are universal(existential)quantifiers.
Let P(x, y): 2xy = 3x + y
What are the truth values of
∀x yP(x, y)∀ y xP(x, y)∀ ∀
∀x yP(x, y)∃ x yP(x, y)∃ ∀
∃x yP(x, y)∃ y xP(x, y)∃ ∃Where the domain for all variables consists of
all real numbers
04/28/12 23
ACULA, D. (MATH 102C, UST-ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 24/25
STATEMENT WHEN TRUE? WHEN FALSE?
∀x yP(x,∀
y)∀y xP(x,∀
y)
P(x, y) is true forevery pair x, y.
There is a pair x, y forwhich P(x, y) is false.
∀x yP(x,∃
y)For every x, thereis a y for which P(x,
y) is true.
There is an x such thatP(x, y) is false for
every y.∃x yP(x,∀
y)There is an x forwhich P(x, y) istrue for every y.
For every x there is a yfor which P(x, y) isfalse.
∃x yP(x,∃
y)There is pair x, yfor which P(x, y) is
P(x, y) is false forevery x, y.04/28/12 24
ACULA, D. (MATH 102C, UST-ENG'G ICS)
8/3/2019 Predicates & Quantifiers
http://slidepdf.com/reader/full/predicates-quantifiers 25/25
Discrete Math Book
04/28/12 25ACULA, D. (MATH 102C, UST-
ENG'G ICS)