Download presentation

Presentation is loading. Please wait.

Published byAva O'Neill Modified over 2 years ago

1
1.3 Predicates and Quantifiers

2
Chapter 1, section 3 Predicates and Quantifiers Predicate E.g., If it is sunny, Ill buy X. Here the parameter is X.

3
Chapter 1, section 3 Predicates and Quantifiers Quantifiers Universal quantification Existential quantification

4
Chapter 1, section 3 Predicates and Quantifiers Universal Quantification Notation: ( x P(x)) –This is read: for all x P(x) is true. This could be used to express the concept: –Every sunny day I buy a red bag.

5
Chapter 1, section 3 Predicates and Quantifiers Example, universal quantification C(x) == "x has taken algebra D(x) == "x is enrolled in discrete math x ( D(x) C(x) ) {is True} but x ( C(x) D(x) ) {is False}

6
Chapter 1, section 3 Predicates and Quantifiers Existential Quantification Notation:( x P(x)) –This is read there exists an x such that P(x) is true This could be used to express the concept that at least once I bought a red bag.

7
Chapter 1, section 3 Predicates and Quantifiers Example, existential quantification x (C(x) D(x)) This is TRUE –if we can find one person who has taken algebra –AND is enrolled in discrete math, –OR find one person who hasn't taken algebra.

8
Chapter 1, section 3 Predicates and Quantifiers From English to logical expressions Equivalent to : –there exists –there is –there is at least one –there is some –for some –some –for at least one Equivalent to : –for all –all –any for every –every for any any –for arbitrary –an arbitrary –for each

9
Chapter 1, section 3 Predicates and Quantifiers Binding Variables E.g., y x P (x,y,z) –bound variables y and x, –and free variable z.

10
Chapter 1, section 3 Predicates and Quantifiers Consider: z y x P(x,y,z)

11
Chapter 1, section 3 Predicates and Quantifiers More Examples Suppose P(x,y,z) is the predicate When I teach discrete math in semester x, student y does well on exam z. Then x y z P(x,y,z) is the statement: Every time I teach discrete math, there is at least one student who does well on every exam."

12
Chapter 1, section 3 Predicates and Quantifiers Order matters! y x z P(x,y,z)

13
Chapter 1, section 3 Predicates and Quantifiers Negation of quantifiers: ~ x P(x) x ~P(x) –true: P(x) is false for every x. –false: There is an x for which P(x) is true. ~ x P(x) x ~ P(x) –true: There is an x for which P(x) is false. –false: P(x) is true for every x.

14
Chapter 1, section 3 Predicates and Quantifiers Self Quiz Simplify the following by moving ~ inside the quantifiers and connectors: ~ x y z ( P(x) V ( Q(y) R(z)))

15
Chapter 1, section 3 Predicates and Quantifiers Answer: ~ x y z ( P(x) V ( Q(y) R(z))) x y z (~ P(x) (~ Q(y) V ~ R(z)))

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google