19

Quantification

Embed Size (px)

Citation preview

Page 1: Quantification
Page 2: Quantification

Universal QuantificationoTo 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.

Page 3: Quantification

Universal QuantificationoLet 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.

Page 4: Quantification

Universal QuantificationoWhen all the elements in the universe of discourse can be listed —say x1, x2, ..., xn — it follows that the universal quantificationo ∀x P(x) is the same as the conjunctionP(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}. Theno ∀x P(x) ≡ P(1)∧ P(2)∧ P(3).

Page 5: Quantification

Truth and Falsity of Universal StatementsSentence: 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)

Page 6: Quantification

Truth and Falsity of Universal StatementsoLet 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.

Page 7: Quantification

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

Page 8: Quantification

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 allox 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).

Page 9: Quantification

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 ∈ Zsuch that m2 = m” is true.

Page 10: Quantification

The Existential Quantifier: ∃oAssume two predicates S(x) and P(x)oUniversal statements typically tie with implicationso 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 conjunctionso Some S(x) is P(x) ∃x (S(x) P(x) )o Some S(x) is not P(x)

∃x (S(x) ¬P(x) )

Page 11: Quantification

Quantifiers:ExampleoThere exist an x such that x is blacko∃xb(x) where b(x):x is black.o|x|=1. (∀x)(x2 0) 2. (∀x)(|x| 0)

Page 12: Quantification

Nested quantifiersoMore 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)

Page 13: Quantification

Nested quantifiersoTranslate 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 numberx,y (Q(x) Q (y) (x < y) u (Q(u) (x < u) (u < y)))

Page 14: Quantification

Understanding Multiply QuantifiersA 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, milko Tim: fruit salad, fish, pie, cake, milk, coffeeo Yuen: spaghetti, fish, pie, soda

Page 15: Quantification

Understanding Multiply Quantifiersa) ∃ 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 .

Page 16: Quantification

Understanding Multiply Quantifiersa) ∃ 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.

Page 17: Quantification

Order of quantifiersoThe 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.

Page 18: Quantification

Order of quantifiersoLet 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.

Page 19: Quantification

Home Work