“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
Quantification
1.
2. Universal Quantification
oTo change predicates into statements is to assign specific
values to all their variables.
if x represents the number 35, the sentence “x is divisible by
5” is a true statement since 35 = 5· 7.
oAnother way is to add quantifiers.
Quantifiers are words that refer to quantities such as "some"
or "all" and tell for how many elements a given predicate is
true.
3. Universal Quantification
oLet P(x) be a predicate (propositional function).
oUniversally quantified sentence:
For all x in the universe of discourse P(x) is true.
oUsing the universal quantifier :
" x ϵ D,Q(x).“ universal statement
It is defined to be true if, and only if, Q(x) is true for every x in D.
It is defined to be false if, and only if, Q(x) is false for at least one x
in D.
A value for x for which Q(x) is false is called a counterexample to
the universal statement.
4. Universal Quantification
oWhen all the elements in the universe of discourse can be listed
—say x1, x2, ..., xn — it follows that the universal quantification
o ∀x P(x) is the same as the conjunction
P(x1) ∧ P(x2) ∧ · · · ∧ P(xn)
o because this conjunction is true if and only if P(x1), P(x2), ...,P(xn)
are all true.
oExample: Let the universe of discourse be U = {1,2,3}. Then
o ∀x P(x) ≡ P(1)∧ P(2)∧ P(3).
5. Truth and Falsity of Universal Statements
Sentence:
o All UAJ&K students are smart.
oAssume: the domain of discourse of x are UAJ&K students
oTranslation:
∀ x Smart(x)
oAssume: the universe of discourse are students (all students):
∀ x at(x, UAJ&K) Smart(x)
oAssume: the universe of discourse are people:
∀ x student(x) Λ at(x, UAJ&K) Smart(x)
6. Truth and Falsity of Universal Statements
oLet D = {1, 2, 3, 4, 5}, and consider the statement
∀x ∈ D, x2 ≥ x.
Show that this statement is true.
Check that “x2 ≥ x” is true for each individual x in D.
12 ≥ 1, 22 ≥ 2, 32 ≥ 3, 42 ≥ 4, 52 ≥ 5.
Hence “∀x ∈ D, x2 ≥ x” is true.
7. The Existential Quantifier: ∃
oThe symbol ∃ denotes “there exists” and is called the
existential quantifier.
o“There is a student in Math 140” can be written as
∃ a person p such that p is a student in Math 140,
or, more formally,
∃p ∈ P such that p is a student in Math 140,
where P is the set of all people.
oAt least one member of the group satisfy the property
8. The Existential Quantifier: ∃
oLet Q(x) be a predicate and D the domain of x. An existential
statement is a statement of the form “∃x ∈ D such that Q(x).” It
is defined to be true if, and only if, Q(x) is true for at least one x
in D. It is false if, and only if, Q(x) is false for all
ox in D:
o Let T(x) denote x > 5 and x is from Real numbers.
o What is the truth value of ∃ x T(x)?
o Answer:
o Since 10 > 5 is true. Therefore, it is true that ∃ x T(x).
9. The Existential Quantifier: ∃
oConsider the statement
∃m ∈ Z+ such that m2 = m.
Show that this statement is true.
Observe that 12 = 1. Thus “m2 = m” is true for at least one integer m.
Hence “∃m ∈ Z
such that m2 = m” is true.
10. The Existential Quantifier: ∃
oAssume two predicates S(x) and P(x)
oUniversal statements typically tie with implications
o All S(x) is P(x)
∀x ( S(x) P(x) )
o No S(x) is P(x)
∀x( S(x) ¬P(x) )
oExistential statements typically tie with conjunctions
o Some S(x) is P(x)
∃x (S(x) P(x) )
o Some S(x) is not P(x)
∃x (S(x) ¬P(x) )
11. Quantifiers:Example
oThere exist an x such that x is black
o∃xb(x) where b(x):x is black.
o|x|=
𝑥 𝑖𝑓 𝑥 ≥ 0
−𝑥 𝑖𝑓 𝑥 < 0
1. (∀x)(x2 ≥0) 2. (∀x)(|x| >0)
12. Nested quantifiers
oMore than one quantifier may be necessary to capture the
meaning of a statement in the predicate logic.
oExample:
Every real number has its corresponding negative.
Translation:
Assume:
a real number is denoted as x and its negative as y
A predicate P(x,y) denotes: “x + y =0”
Then we can write:
(∀x)(∃y)P(x,y)
13. Nested quantifiers
oTranslate the following English sentence into logical expression
“There is a rational number in between every pair of distinct
rational numbers”
Use predicate Q(x), which is true when x is a rational number
x,y (Q(x) Q (y) (x < y) u (Q(u) (x < u) (u <
y)))
14. Understanding Multiply Quantifiers
A college cafeteria line has four stations: salads, main courses, desserts, and
beverages.
1. The salad station offers a choice of green salad or fruit salad.
2. The main course station offers spaghetti or fish;
3. The dessert station offers pie or cake;
4. The beverage station offers milk, soda, or coffee.
Three students, Uta, Tim, and Yuen, go through the line and make the following
choices:
o Uta: green salad, spaghetti, pie, milk
o Tim: fruit salad, fish, pie, cake, milk, coffee
o Yuen: spaghetti, fish, pie, soda
15. Understanding Multiply Quantifiers
a) ∃ an item I such that ∀
students S, S chose I .
b) ∃ a student S such that ∀
items I, S chose I .
c) ∃ a student S such that ∀
stations Z, ∃ an item I in Z
such that S chose I .
d) ∀ students S and ∀
stations Z, ∃ an item I in Z
such that S chose I .
16. Understanding Multiply Quantifiers
a) ∃ an item I such that ∀ students
S, S chose I .
b) ∃ a student S such that ∀ items
I, S chose I .
c) ∃ a student S such that ∀
stations Z, ∃ an item I in Z such
that S chose I .
d) ∀ students S and ∀ stations Z, ∃
an item I in Z such that S chose I
.
a) There is an item that was chosen
by every student. This is true;
every student chose pie.
b) There is a student who chose
every available item. This is
false; no student chose all nine
items.
c) There is a student who chose at
least one item from every
station. This is true; both Uta
and Tim chose at least one item
from every station.
d) Every student chose at least one
item from every station. This is
false; Yuen did not choose a
salad.
17. Order of quantifiers
oThe order of nested quantifiers matters if quantifiers are of
different type
1. ∀ people x, ∃ a person y such that x cares y.
2. ∃ a person y such that ∀ people x, x cares y.
o∀ x ∃ y C(x,y) is not the same as ∃y ∀ x C(x,y)
1. Given any person, it is possible to find someone whom that person cares,
2. whereas the second means that there is one amazing individual who is cared
by all people.
oIf one quantifier immediately follows another quantifier of the
same type, then the order of the quantifiers does not affect the
meaning.
18. Order of quantifiers
oLet Q(x, y, z) be the predicate:“x + y = z.”
o∀x ∀y ∃z Q(x, y, z) True
“For all real numbers x and for all real numbers y there is a real number
z such that x + y = z,”
o∃z ∀x ∀y Q(x, y, z) False
“There is a real number z such that for all real numbers x and for all real
numbers y it is true that x + y = z,”
because there is no value of z that satisfies the equation x + y = z for all
values of x and y.