M . N . S H A H E N A A Z S U L T H A N A
A S S I S T A N T P R O F E S S O R ( C )
C S E D E P A R T M E N T
Nested Quantifiers
 Nested quantifiers consists one quantifier within the scope of another
Example : ∀x∃y(x + y = 0).
Example: Translate the following statement into English.
∀ x ∀ y (x + y = y + x)
Domain: real numbers
Solution: For all real numbers x and y, x + y = y + x.
Example: Translate the following statement into English.
∀x∃y(x + y = 0)
Domain: real numbers
Solution: For every real number x there is a real number y such that x + y = 0
Example : Translate the following statement into English
∀x∀y((x > 0) ∧ (y < 0) → (xy < 0)),
where the domain for both variables consists of all real numbers.
Solution: For every real number x and for every real number y, if x > 0 and y < 0, then xy < 0.
That is,
For real numbers x and y, if x is positive and y is negative, then xy is negative.
Example Translate the statement
∃x∀y∀z((F(x, y) ∧ F(x, z) ∧ (y ≠ z)) → ¬F(y, z))
into English, where F(a, b) means a and b are friends and the domain for x, y, and z
consists of all students in your school.
Solution: The expression (F(x, y) ∧ F(x, z) ∧ (y ≠ z)) → ¬F(y, z) says that if students x and y are
friends, and students x and z are friends, and furthermore, if y and z are not the same student,
then y and z are not friends.
It follows that the original statement, which is triply quantified, says that
there is a student x such that for all students y and all students z other than y, if x and y
are friends and x and z are friends, then y and z are not friends.
Quantifications of Two Variables
Statement When True? When False?
∀x∀yP(x, y)
∀y∀xP(x, y)
P(x, y) is true for every pair x,
y.
There is a pair x, y for which
P(x, y) is false
∀x∃yP(x, y) For every x there is a y for
which P(x,y) is true.
There is an x such that P(x, y)
is false for every y.
∃x∀yP(x, y) There is an x for which P(x, y)
is true for every y.
For every x there is a y for
which P(x, y) is false.
∃x∃yP(x, y)
∃y∃xP(x, y).
There is a pair x, y for which
P(x, y) is true.
P(x, y) is false for every pair x,
y.
Translating English Sentences into Logical Expressions
Example Express the statement “If a person is female and is a parent, then this person is
someone’s mother” as a logical expression involving predicates, quantifiers with a domain
consisting of all people, and logical connectives.
Solution: The statement
“If a person is female and is a parent, then this person is someone’s mother”
can be expressed as
“For every person x, if person x is female and person x is a parent, then
there exists a person y such that person x is the mother of person y.”
Let F(x) : x is female
P(x) : x is a parent
and
M(x, y) : x is the mother of y.
The original statement can be represented as
∀x((F(x) ∧ P(x)) → ∃yM(x, y)).
This expression is logically equivalent to
∀x∃y((F(x) ∧ P(x)) → M(x, y)).
 Negating Nested Quantifiers
Example Express the negation of the statement ∀x∃y(xy = 1) so that no negation precedes a
quantifier.
Solution: By successively applying De Morgan’s laws
¬ [∀x∃y(xy = 1) ] ≡ ¬ ∀x ¬[ ∃y (xy = 1)]
≡ ∃ x ¬ ∃y ¬[(xy = 1)]
≡ ∃ x ∀ y ¬(xy = 1)
≡ ∃ x ∀ y (xy ≠1)

Nested Quantifiers.pptx

  • 1.
    M . N. S H A H E N A A Z S U L T H A N A A S S I S T A N T P R O F E S S O R ( C ) C S E D E P A R T M E N T Nested Quantifiers
  • 2.
     Nested quantifiersconsists one quantifier within the scope of another Example : ∀x∃y(x + y = 0). Example: Translate the following statement into English. ∀ x ∀ y (x + y = y + x) Domain: real numbers Solution: For all real numbers x and y, x + y = y + x. Example: Translate the following statement into English. ∀x∃y(x + y = 0) Domain: real numbers Solution: For every real number x there is a real number y such that x + y = 0 Example : Translate the following statement into English ∀x∀y((x > 0) ∧ (y < 0) → (xy < 0)), where the domain for both variables consists of all real numbers. Solution: For every real number x and for every real number y, if x > 0 and y < 0, then xy < 0. That is, For real numbers x and y, if x is positive and y is negative, then xy is negative.
  • 3.
    Example Translate thestatement ∃x∀y∀z((F(x, y) ∧ F(x, z) ∧ (y ≠ z)) → ¬F(y, z)) into English, where F(a, b) means a and b are friends and the domain for x, y, and z consists of all students in your school. Solution: The expression (F(x, y) ∧ F(x, z) ∧ (y ≠ z)) → ¬F(y, z) says that if students x and y are friends, and students x and z are friends, and furthermore, if y and z are not the same student, then y and z are not friends. It follows that the original statement, which is triply quantified, says that there is a student x such that for all students y and all students z other than y, if x and y are friends and x and z are friends, then y and z are not friends.
  • 4.
    Quantifications of TwoVariables Statement When True? When False? ∀x∀yP(x, y) ∀y∀xP(x, y) P(x, y) is true for every pair x, y. There is a pair x, y for which P(x, y) is false ∀x∃yP(x, y) For every x there is a y for which P(x,y) is true. There is an x such that P(x, y) is false for every y. ∃x∀yP(x, y) There is an x for which P(x, y) is true for every y. For every x there is a y for which P(x, y) is false. ∃x∃yP(x, y) ∃y∃xP(x, y). There is a pair x, y for which P(x, y) is true. P(x, y) is false for every pair x, y.
  • 5.
    Translating English Sentencesinto Logical Expressions Example Express the statement “If a person is female and is a parent, then this person is someone’s mother” as a logical expression involving predicates, quantifiers with a domain consisting of all people, and logical connectives. Solution: The statement “If a person is female and is a parent, then this person is someone’s mother” can be expressed as “For every person x, if person x is female and person x is a parent, then there exists a person y such that person x is the mother of person y.” Let F(x) : x is female P(x) : x is a parent and M(x, y) : x is the mother of y. The original statement can be represented as ∀x((F(x) ∧ P(x)) → ∃yM(x, y)). This expression is logically equivalent to ∀x∃y((F(x) ∧ P(x)) → M(x, y)).
  • 6.
     Negating NestedQuantifiers Example Express the negation of the statement ∀x∃y(xy = 1) so that no negation precedes a quantifier. Solution: By successively applying De Morgan’s laws ¬ [∀x∃y(xy = 1) ] ≡ ¬ ∀x ¬[ ∃y (xy = 1)] ≡ ∃ x ¬ ∃y ¬[(xy = 1)] ≡ ∃ x ∀ y ¬(xy = 1) ≡ ∃ x ∀ y (xy ≠1)