Docsity

Predicates and Quantifiers - Lecture Slides | CSE 2813, Study notes of Discrete Structures and Graph Theory

Partial preview of the text

Download Predicates and Quantifiers - Lecture Slides | CSE 2813 and more Study notes Discrete Structures and Graph Theory in PDF only on Docsity!

Predicates and Quantifiers

Section 1.

Predicates

  • (^) A predicate is a statement that

contains variables.

  • (^) Example: P ( x ) : x > 3 Q ( x ,y) : x = y + 3 R ( x , y , z ) : x + y = z

Quantifiers

  • (^) Two types of quantifiers
    • (^) Universal
    • (^) Existential
  • (^) Universe of discourse - the

particular domain of the variable in

a propositional function

Universal

Quantification

  • (^) P ( x ) is true for all values of x in the

universe of discourse.

 x P ( x )

  • (^) “for all x , P ( x )”
  • (^) “for every x , P ( x )”
  • (^) The variable x is bound by the universal quantifier, producing a proposition

For universal quantification P ( x )  P ( x 1 )  P ( x 2 )  …  P ( x n )

  • (^) If the elements in the universe of discourse can be listed, U = { x 1 , x 2 , …, xn }  x P ( x )  P ( x 1 )  P ( x 2 )  …  P ( xn )
  • (^) Example U = {positive integers not exceeding 3} and P ( x ): x^2 < 10 - (^) What is the truth value of  x P ( x ) P(1) ^ P(2) ^ P (3) T ^ T ^ T T

Existential

Quantification

  • (^) P ( x ) is true for some x in the

universe of discourse

  x P ( x )

  • (^) “for some x , P ( x )”
  • (^) “There exists an x such that P ( x )”
  • (^) “There is at least one x such that P ( x )”
  • (^) The variable x is bound by the existential quantifier, producing a proposition

For existential quantification P ( x )  P ( x 1 )  P ( x 2 )  …  P ( x n )

  • (^) If the elements in the universe of discourse

can be listed, U = { x 1 , x 2 , …, xn }

x P ( x )  P ( x 1 )  P ( x 2 )  …  P ( xn )

  • (^) Example U = {positive integers not exceeding 4} and P ( x ): x^2 > 10
    • (^) What is the truth value of  x P ( x ) P(1) v P(2) v P(3) v P(4)

Binding Variables

  • (^) Bound variable: if a variable is quantified
  • (^) Free variable: Neither bound nor

assigned a specific value

  • (^) Example:  x P ( x )  x Q ( x , y )
  • (^) Scope of Quantifiers: Part of a logical

expression to which a quantifier is

applied

  • (^) Example:  x ( P ( x )  Q ( x ))   x R ( x )

Translating from

English

  • (^) Many ways to translate a given sentence
  • (^) Goal is to produce a logical expression

that is simple and can be easily used in

subsequent reasoning

  • (^) Steps:
    • (^) Clearly identify the appropriate quantifier(s)
    • (^) Introduce variable(s) and predicate(s)
    • (^) Translate using quantifiers, predicates, and logical operators

Example

  • (^) Every student in this class has

studied calculus

  • (^) Solution 1
    • (^) Assume, U = {all students in CSE 2813}
  • (^) Solution 2
    • (^) Assume, U = {all people}

More Example

  • (^) C ( x ): x is a CSE student
  • (^) E ( x ): x is an ECE student
  • (^) S ( x ): x is a smart student
  • (^) U = {all students in CSE 2813}

More Example (Cont..)

  • (^) Everyone is a CSE student.  x C ( x )
  • (^) Nobody is an ECE student.  x ~E ( x ) or ~x E ( x )
  • (^) All CSE students are smart students.  x [ C ( x )  S ( x )]
  • (^) Some CSE students are smart students.  x [ C ( x )  S ( x )]

Use implication or

conjunction?

  • (^) Existential quantifiers usually take

conjunctions

  • (^) Some CSE students are smart

students.

x [ C ( x )  S ( x )] Correct  x [ C ( x )  S ( x )] Incorrect

More Example

  • (^) No CSE student is an ECE student.
    • (^) If x is a CSE student, then that student is not an ECE student.  x [ C ( x )  ~E ( x )]
    • (^) There does not exist a CSE student who is also an ECE student. ~ x [ C ( x )  E ( x )]
  • (^) If any ECE student is a smart student then he is also a CSE student.  x [( E ( x )  S ( x ))  C ( x )]