L8 Quantifiers

Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Mary Grace D.

Matias
Computer Engineering Department
College of Engineering
• A predicate is an expression of one or more variables defined on some
specific domain.

• The domain of a predicate variable is the set of all values that may be
substituted in place of the variable.
A predicate with variables can be made a proposition by either assigning a
value to the variable or by quantifying the variable.

Ex: Let E(x, y) denote "x = y"

Let M(x, y) denote "x is married to y"


Let P(x) be the predicate “x2 > x” with domain the set R of all real
numbers. Write P(2), P( 12 ) and P(- 12 ), and indicate which of these
statements are true and which are false.

• P(2) x2 > x 22 > 2 4>2 True

1 2 1 1 1
• P( )
𝟏
x2 >x > > False
𝟐 2 2 4 2

1 2 1 1 1
• P(- ) 𝟏
x2 > x − >− >− True
𝟐 2 2 4 2
• Let Q(n) be the predicate “n is a factor of 8.” Find the truth set of
Q(n) if

a. the domain of n is Z+, the set of all positive integers

b. the domain of n is Z, the set of all integers.

a. The truth set is {1, 2, 4, 8} because these are exactly the positive integers that
divide 8 evenly.

b. The truth set is {1, 2, 4, 8, -1, -2, -4, -8} because the negative integers -1, -2, -4,
and -8 also divide into 8 without leaving a remainder.
The variable of predicates is quantified by quantifiers. There are two
types of quantifier in predicate logic − Universal Quantifier and
Existential Quantifier.
Universal quantifier states that the statements within its scope are
true for every value of the specific variable. It is denoted by the
symbol ∀.

∀xP(x) is read as for every value of x, P(x) is true.


Ex:

"Man is mortal" can be transformed into the propositional form


∀xP(x) where P(x) is the predicate which denotes x is mortal and
the universe of discourse is all men.
Existential quantifier states that the statements within its scope
are true for some values of the specific variable. It is denoted by
the symbol ∃.

∃xP(x) is read as for some values of x, P(x) is true.


Ex:

"Some people are dishonest" can be transformed into the


propositional form ∃xP(x) where P(x) is the predicate which
denotes x is dishonest and the universe of discourse is some
people.
UNIVERSAL EXISTENTIAL

∀ ∃

“For all” “There exists”

When True? : When P(x) is true for every When True? : There is an x in the domain
x in the domain. for which P(x) is true.

When False? : There is an x in the When False? : When P(x) is false for
domain where P(x) is false. every x in the domain.

∀xP(x) ≡ P(x1) ^ P(x2) ^ … ^ P(xn) ∃xP(x) ≡ P(x1) v P(x2) v … v P(xn)


Let P(x) be the statement “x has taken a course in Java programming”
for the domain of first year students.

Every first year student has taken a course in Java


∀xP(x) programming.

∃xP(x) There is a first year student who has taken a course in


Java programming.
¬ ∀x P(x) ≡ ∃x ¬ P(x)
• True when there is an x in the domain where P(x) is false.

• False when P(x) is true for every x in the domain.

¬ ∃x P(x) ≡ ∀x ¬ P(x)
• True when P(x) is false for every x in the domain.
• False when there is an x in the domain for which P(x) is true.
Let P(x) be the statement “x has taken a course in Java programming”
for the domain of first year students.

¬ ∀x P(x) There is a first year student who hasn’t taken a course in


Java programming.

∃x ¬ P(x)

All first year students have not taken a course in Java


¬ ∃x P(x) programming.

∀x ¬ P(x)
There is an honest politician.

H(x) represents “x is honest” for domain of all politicians. ∃x H(x)

¬ ∃x H(x) ≡ ∀x ¬ H(x)

Every politician is dishonest.


All engineering students are good at math.

M(x) represents “x is good at math” for domain ∀x M(x)


of all engineering students.

¬ ∀x M(x) ≡ ∃x ¬ M(x)

Not all engineering student is good at math.


Some students in this class attended the webinar.

Domain: Students in this class


P(x) represents “x attended the webinar”. ∃x P(x)

Domain: Computer engineering students


P(x) represents “x attended the webinar”. ∃x (C(x) ^ P(x))
C(x) represents “x is a student in this class”.
Every student in this class has taken a course in programming or math.

Domain: Students in this class

P(x) represents “x has taken a programming course”.


∀x (P(x) v M(x))
M(x) represents “x has taken a math course”.

Domain: Computer engineering students


∀x (S(x) → (P(x) v M(x)))
S(x) represents “x is a student in this class”.
Let P(x) be x < 0 if the domain consists of all integers. Find the
truth values of:

∀xP(x) x = -1 x=0 0<0 FALSE


-1 < 0

∃xP(x) TRUE
Let P(x) be x+1 = 2x if the domain consists of all integers. Find the truth
values of:

∀xP(x) x+1 = 2x x=0 0+1 = 2(0) FALSE


1=x

∃xP(x) TRUE
Let U = {1, 2, 3, 4, 5}, where P(x) represents the statement “x2 ≥ x”.

∀xP(x) x2 ≥ x 12 ≥ 1 22 ≥ 2 32 ≥ 3 42 ≥ 4 52 ≥ 5 TRUE
1≥1 4≥2 9≥3 16 ≥ 4 25 ≥ 5

∃xP(x) TRUE
Let P(x) represent the statement “x2 ≥ x” if the domain consists of all
real numbers.

∀xP(x) x2 ≥ x 12 ≥ 1 (12)2 ≥ 12 FALSE


1 1
1≥1 ≥
4 2

∃xP(x) TRUE
The statement ∃!xP(x) tells us that the proposition P(x) is true for
exactly one value of x in the domain of discourse.

Ex: Let P(x) be 2x = 4 if the domain consists of all integers.

You might also like