Quantifiers are expressions that indicate the scope of the term to which they are attached, here predicates. A predicate is a property the subject of the statement can have.
For example, in the statement “the sum of x and y is greater than 5”, the predicate ‘Q’ is- sum is greater than 5,
and the statement can be represented as Q(x, y) where x and y are variables.
The scope of a quantifier or a quantification is the range in the formula that the quantifier engages in.
Types of quantification or scopes:
- Universal(∀) – The predicate is true for all values of x in the domain.
- Existential(∃) – The predicate is true for at least one x in the domain.
To know the scope of a quantifier in a formula, just make use of Parse trees. Two quantifiers are nested if one is within the scope of the other.
∀x ∃y (x+y=5)
Here ‘∃’ (read as-there exists) and ‘∀’ (read as-for all) are quantifiers for variables x and y.
The statement can be represented as-
Q(x) is ∃y P(x, y) Q(x)-the predicate is a function of only x because the quantifier applies only to variable x.
P(x, y) is (x + y = 5)
∀x ∀y ((x> 0)∧(y< 0) → (xy< 0))
For every real number x and y, if x is positive and y is negative, implies xy is negative.
where Q(x) is ∀y P(x, y)
Example to convert a statement into a nested quantifiers formula:
“There is a pupil in this lecture who has taken at least one course in Discrete Maths.”
A statement consists of quantifiers and predicates, split it into it's two constituents.
Here x and y are the pupil and the course and their respective quantifiers are attached in front of them.
Write it down as-
For some x pupil, there exist a course in Discrete Maths such that x has taken y.
∃x ∃y P (x, y), where P (x, y) is "x has taken y".
- Theorem-1: The order of nested existential quantifiers can be changed without changing the meaning of the statement.
- Theorem-2: The order of nested universal quantifiers can be changed without changing the meaning of the statement.
Assume P(x, y) is xy=8,
∃x ∃y P(x, y) domain: integers
There is an integer x for which there is an integer y such that xy = 8,
which is same as-
There is a pair of integers x, y for which xy = 8.
Meaning ∃x ∃y P(x, y) is equivalent to ∃y ∃x P(x, y).
Assume P(x, y) is (xy = yx).
∀x ∀y P(x, y) domain: real numbers
For all real numbers x, for all real numbers y, xy = yx or,
For every pair of real numbers x, y, xy = yx.
again ∀x ∀y P(x, y) is equivalent to ∀y ∀x P(x, y).
However, when the nested quantifiers are not same, changing the order changes meaning of statement.
Assume P(x, y, z) is (x + y = z).
∀x ∀y ∃z P(x, y, z) domain: real numbers
For all real numbers x and y there is a real number z such that x + y = z (True)
∀z ∃x ∃y P(x, y, z) domain: real numbers
There is a real number z such that for all real numbers x and y, x + y = z (False)
Negation of nested quantifiers:
To negate a sequence of nested quantifiers, you change each quantifier in the sequence to the other type and then negate the predicate.
So the negation of ∀x ∃y : P(x, y) is ∃x ∀y : ~P(x, y)
“ ∃x at Cornell, x is at least 18 years old.”
To disagree with this, you’re negating the statement by flipping the ∃ to ∀ and then
negating the predicate:
“ ∀x at Cornell such that x is not at least 18 years old.”
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Mathematics | Predicates and Quantifiers | Set 1
- Mathematics | Predicates and Quantifiers | Set 2
- Boolean Algebraic Theorems
- Counting Boolean function with some variables
- Last Minute Notes - Engineering Mathematics
- Mathematics | Set Operations (Set theory)
- Mathematics | The Pigeonhole Principle
- Mathematics | Matrix Introduction
- Mathematics | Introduction to Propositional Logic | Set 1
- Mathematics | Propositional Equivalences
- Mathematics | L U Decomposition of a System of Linear Equations
- Mathematics | Introduction of Set theory
- Mathematics | Mean, Variance and Standard Deviation
- Mathematics | Conditional Probability
- Mathematics | Sum of squares of even and odd natural numbers
- Mathematics | Eigen Values and Eigen Vectors
- Mathematics | Rolle's Mean Value Theorem
- Mathematics | Lagrange's Mean Value Theorem
- Mathematics | Random Variables
- Mathematics | Classes (Injective, surjective, Bijective) of Functions
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.