Presentation is loading. Please wait.

Presentation is loading. Please wait.

Nested Quantifiers Section 1.4.

Similar presentations


Presentation on theme: "Nested Quantifiers Section 1.4."— Presentation transcript:

1 Nested Quantifiers Section 1.4

2 Recap Section 1.3 A predicate is generalization of a proposition.
It is a proposition that contains variables. A predicate becomes a proposition if the variable(s) contained is(are) Assigned specific value(s) Quantified Universe of discourse : the particular domain of the variable in a propositional function

3 Recap Section 1.3 Universal quantification
P(x) is true for ALL the values of x in the universe of discourse. x P(x). Remember   All. “for all x, P(x)” If the elements in the universe of discourse can be listed, U = {x1, x2, …, xn} x P(x)  P(x1)  P(x2)  …  P(xn)

4 Recap Section 1.3 Existential quantification P(x) is true FOR SOME x in the universe of discourse, i.e. EXIST some x x P(x) Remember,   Exist “for some x, P(x)” If the elements in the universe of discourse can be listed, U = {x1, x2, …, xn} x P(x)  P(x1)  P(x2)  …  P(xn)

5 Recap Section 1.3 Universal quantifiers usually take implications
All CS students are smart students. x [C(x)  S(x)] Existential quantifiers usually take conjunctions Some CS students are smart students. x [C(x)  S(x)]

6 Recap Section 1.3 Summary of quantifiers
x P(x) True when: P(x) is true for every x False when: P(x) is false for at least one x. x P(x) True when: P(x) is true for at least one x False when: P(x) is false for every x Negation changes a universal to an existential and vice versa, and negates the predicate ~x P(x)  x ~P(x) ~x P(x)  x ~P(x)

7 Recap Section 1.3 Quick examples
(13b) Determine truth value. U={Z}  n (2n = 3n) (16b) Determine truth value U={R}  n (x2 = -1) Exercise 17

8 Nested Quantifiers Quantifiers that occur within the scope of other quantifiers Example: P(x,y): x + y = 0, U={R} x y P(x,y)

9 Quantifications of Two Variables
For all pair x,y P(x,y). xy P(x,y) yx P(x,y) For every x there is a y such that P(x,y). xy P(x,y) There is an x such that P(x,y) for all y. xy P(x,y) There is a pair x,y such that P(x,y). xy P(x,y) yx P(x,y)

10 Translating statements with nested quantifiers
U = {all real numbers} x y (x + y = y + x) x y (x + y = 0) x y ( (x > 0)  (y < 0)  (xy < 0) ) U = {all students in cs2813} C(x): x has a computer F(x,y): x and y are friends x ( C(x)  y (C(y)  F(x,y)) )

11 Translating Sentences
U = {all people} If a person is female and is a parent, then this person is someone’s mother. U = {all integers} The sum of two positive integers is positive.

12 Is the order of quantifiers important?
If the quantifiers are of the same type, then order does not matter If the quantifiers are of different types, then order is important

13 Example U={R} Q(x,y): x+y=0 What are the truth values for
y x Q(x,y) and x y Q(x,y) y x Q(x,y): There exist at least one y such that for every real number x, Q(x,y) is true, i.e. x+y=0. FALSE (not for every, only when y is –x). But… x y Q(x,y): For every real number x, there is a real number y such that Q(x,y) is true, i.e x+y =0. TRUE (for every x when y is –x)


Download ppt "Nested Quantifiers Section 1.4."

Similar presentations


Ads by Google