Top Banner
Nested Quantifiers Section 1.4
13

Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

Mar 26, 2015

Download

Documents

Taylor Cooper
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

Nested Quantifiers

Section 1.4

Page 2: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

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

Page 3: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

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)

Page 4: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

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)

Page 5: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

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)]

Page 6: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

Recap Section 1.3Summary 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)

Page 7: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

Recap Section 1.3Quick examples

• (13b) Determine truth value. U={ZZ} n (2n = 3n)

• (16b) Determine truth value U={RR} n (x2 = -1)

• Exercise 17

Page 8: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

Nested Quantifiers

• Quantifiers that occur within the scope of other quantifiers

• Example: P(x,y): x + y = 0, U={RR} x y P(x,y)

Page 9: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

Quantifications of Two Variables

• For all pair x,y P(x,y). xy P(x,y) yx P(x,y)

• For every x there is a y such that P(x,y). xy P(x,y)

• There is an x such that P(x,y) for all y. xy P(x,y)

• There is a pair x,y such that P(x,y). xy P(x,y) yx P(x,y)

Page 10: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

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

Page 11: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

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.

Page 12: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

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

Page 13: Nested Quantifiers Section 1.4. Recap Section 1.3 A predicate is generalization of a proposition. –It is a proposition that contains variables. A predicate.

Example

• U={RR}• Q(x,y): x+y=0• What are the truth values fory 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)