CSCE 222 Chapter 1.3

From Notes
Jump to navigation Jump to search

« previous | Sunday, February 20, 2011 | next »


Predicates

A "function" that takes one or more inputs and evaluates to either true or false

EX: Let P(x)=x>3; P(1)=false; P(5)=true


Quantifiers

  • Higher precedence than all logical operators
  • Distribute across parenthesized terms: ∀x(P(x)∧Q(x))≡∀xP(x)∧∀xQ(x)

Universal Quantification

If a predicate P(x) is true for all values of x in the domain,

∀xP(x)≡P(x1)∧P(x2)∧…∧P(xn)

To be contradicted, we need to find only one value of x such that P(x) is false.

Existential Quantification

If a predicate P(x) is satisfiable for at least one value of x in the domain,

∃xP(x)≡P(x1)∨P(x2)∨…∨P(xn)

To be contradicted, every value of x has to be false.


Variable Binding

A variable is bound if a quantifier is used on that variable. For example, in ∃x(x+y=1), x is bound, but y is free (not bound). To fix this, we would write ∃x∃y(x+y=1).


Negating Quantifiers

"Every student in your class has taken a course in calculus" could be written as ∀xP(x).

Negation would be "There is a student in your class who has not taken a course in calculus", which could be written ∃x¬P(x)

¬∀xP(x)≡∃x¬P(x)¬∃xP(x)≡∀x¬P(x)