Thursday 28 February 2013

Predicates And Quantifiers

Introduction Of Predicates 

 A pred­i­cate is a state­ment for which we can input val­ues, such that it is turned into a state­ment and there­fore true or false. We use func­tion nota­tion (with­out type for input/output, though you can spec­ify the domain in the state­ment) for this: P(x)  is such.


n general you have predicates in the form of:
P(x) – this is a unary predicate (has one variable)
P(x,y) – this is a binary predicate (has two variables)
P(x1, x2, x…….., xn) – this is an n-ary or n-place predicate – (has n individual variables in a predicate)

For example x + y= z is written as:
Sum(x,y,z)
This stands for the predicate x + y = z

Quantifiers 

A predicates becomes a propositional when we assign it fixed value
 However , another way to make a predicate into a proposition is to quantify it.That is , the predicate is true or false for all possible values in the universe of discourse or for some value(s) in the universe of discourse.

      Quantification can be done with 2 quantifiers : 

1.       Universal quantifiers  ( ∀ )
§  P(x) is the proposition “P(x) is true for all values of x in the universe of disourse.
§   Read as “for all x”
§  ∀xP(x)
 2.        Existential quantifiers (∃)
§  P(x) nis the proposition “ There exist and x in the universe of discourse such that P(x) is true.
§  Read as “there exists an x”
§  ∃xP(x)


Examples of quantifiers

 “All lions are fierce.” 

 “Some lions do not drink coffee.” 


 “Some fierce creatures do not drink coffee.”

“All hummingbirds are richly colored.”

 “No large birds live on honey.”

 “Birds that do not live on honey are dull in color.”

 “Hummingbirds are small.”

Every glass in my recent order was chipped.

Some of the people standing across the river have white armbands.

Most of the people I talked to didn't have a clue who the candidates were.
A lot of people are smart.

That wine glass was chipped

Someone gets mugged in New York every 10 minutes










No comments: