2 Predicates Quantifiers
2 Predicates Quantifiers
• P(4)
• x=4
• x>3 that is 4>3 is true.
• P(2)
• x=2
• 2>3 that is 2>3 is false.
Predicates (Yüklemler): Example
• Example: Let Q(x,y) denote the statement “x=y+3”.
What are the truth values of Q(1,2) and Q(3,0)?
• Q(1,2)
• 1=2+3 is false.
• Q(3,0)
• 3=0+3 is true.
Quantifiers (Niceleyiciler)
• Two types of quantification
• Universal quantification,
• Existential quantification,
Universal quantification,
• Definition. The universal quantification of P(x) is the
proposition “P(x) is true for all values of x in the
universe of discourse.”
• The notation xP(x)
• for all x P(x)
• for every x P(x)
• Solution:
• P(x) is true for all real numbers
• That is, x P(x) is true.
Example
• Let Q(x) be the statement “x<2”. What is the truth
value of quantification x Q(x) where universe of
discorse is the set of real numbers?
• Solution:
• Q(x) is not true for all real numbers
• Q(3) is false
• x Q(x) is false.
Existential Quantification,
• Definition. The existential quantification of P(x) is the
proposition “There exists an element x in the
universe of discorse such that P(x) is true.”
• The notation x P(x)
• There is an x such that P(x)
• There is at least one x such that P(x)
• For some x P(x)
• Solution:
• Since “x>3” is true for instance x=4
• x P(x) is true.
Example
• Let Q(x) be the statement “x=x+1”. What is the truth
value of quantification x Q (x) where universe of
discorse is the set of real numbers?
• Solution:
• Since Q(x) is false for every real number x,
• x Q (x) is false .
Statement When true? When false?
x P(x) P(x) is true for every x There is an x for which
P(x) is false.
x P(x) There is an x for which P(x) is false for every x.
P(x) is true.
x y P(x,y) P(x,y) is true for every There is a pair x,y for which
y x P(x,y) pair x,y. P(x,y) is false.
x y P(x,y) For every x there is a y There is an x such that P(x,y)
for which P(x,y) is true. is false for every y.
x y P(x,y) There is an x for which For every x there is a y for
P(x,y) is true for every y. whick P(x,y) is false.
x y P(x,y) There is a pair x,y for which P(x,y) is false for every
y x P(x,y) P(x,y) is true. pair x,y.
• Example: Translate the statement
x (C(x) y(C(y) F(x,y)) into english
• C(x) is “x has a computer”
• F(x,y) is “ x and y are friends”
• The universe of discourse for both x and y is the set of all
students in your school.
• Solution:
• x(C(x)) Every x has a computer in this school
• veya
• x y((C(y) F(x,y)) Some y has a computer and x and y
are friends in this school
Translating Logical Expressions Into
English
• Example: Translate following statement into english
x (C(x) y(C(y) F(x,y))
• C(x) is “x has a computer”
• F(x,y) is “ x and y are friends”
• The universe of discourse for both x and y is the set of all students in
your school.
• Solution:
• Every student x in your school x has a computer or there is a
student y such that y has a computer and x and y are friends.
• Every student in your school has a computer or has a friend
who has a computer.
Translating Logical Expressions Into
English
• Example: Translate following statement into english.
xyz ((( F(x,y) F(x,z) (yz)) ¬F(y,z)))
• F(a,b) means a and b are friends
• The universe of discourse for x, y and z is the set of all students
in your school.
• Solution:
• There is a student x such that for all students y and all
students z other than y, if x and y are friends and x and z
are friends, then y and z are not friends.
• There is a student none of whose friends are also
friends with each other.
Translating Sentence Into Logical
Expressions
• Example: Translate following sentences into logical
espressions using quantifiers.
1. “Some student in this class has visited Mexico” and
2. “Every student in this class visited either Canada or Mexico”
• Solution:
• Let x be the set of students in your class
• Let M(x) : x has visited Mexico
• Let C(x): x has visited Canada
• 1. “Some student in this class has visited Mexico” : x M(x)
• 2. “Every student in this class visited either Canada or
Mexico”: x(C(x)M(x)) (assuming that the inclusive)
Translating Sentence Into Logical
Expressions
• Example: Translate following sentences into logical
espressions using quantifiers.
“Everyone has exactly one best friend.”
• Solution:
• B(a,b) : “b is the best friend of a.”
• Note: For every person x there is another person y
such that y is the best friend of x and that if z is a
person other than y, then z is not the best friend of x.
• x y (B(x,y) ((zy) ¬B(x,z))).
Translating Sentence Into Logical
Expressions
• Example: Translate the following sentence into logical
espressions using quantifiers.
“If somebody is female and is a parent, then this person
is someone’s mother.”
• Solution:
• F(x): “ x is a female”
• P(x): “ x is a parent”
• M(x,y): “x is the mother of y”
• x (F(x) P(x)) y M(x,y)).
Translating Sentence Into Logical
Expressions
• Example: Translate the following sentences into
logical espressions using quantifiers.
“ There is a woman who has taken a flight on every
airline in the world.”
Examples With Variables
• Example: Let P(x,y) be the statement “x+y=y+x”.
What is the truth value of the quantification
x y P(x,y) ?
Examples With Variables
• Example: Let Q(x,y) denote “x+y=0”. What are the
truth value of the quantification
y x Q(x,y) and x y Q(x,y)?
Negations
• x P(x)
• Every student in the class has taken a course in calculus.
c)Every faculty member has either asked Professor Miller a question or been
asked a question by Professor Miller.
Example
• Let S(x) be the predicate “ x is a student”,
• F(x) the predicate “ x is a faculty member”,
• and A(x,y) the predicate “x has asked y a question”,
• where the universe of discorse is the set of all people associated with your
school. Use quantifiers to express each of the following statements.
g) There is a faculty member who has asked every other faculty member a
question.
Example
• Let S(x) be the predicate “ x is a student”,
• F(x) the predicate “ x is a faculty member”,
• and A(x,y) the predicate “x has asked y a question”,
• where the universe of discorse is the set of all people associated with your
school. Use quantifiers to express each of the following statements.
g) There is a student in your class who has sent everyone else in your class an
e-mail message.
Example 2
• Let M(x,y) be “ x has sent y an e-mail message”
• T(x,y) be “ “x has telephoned y”
• where the universe of discorse is the set of all students in your class.
• Use quantifiers to express each of the following statements.
h) There is someone in your class who has either sent an e-mail message or
telephoned everyone else in your classs.
Example 2
• Let M(x,y) be “ x has sent y an e-mail message”
• T(x,y) be “ “x has telephoned y”
• where the universe of discorse is the set of all students in your class.
• Use quantifiers to express each of the following statements.
i) There are two students in your class who have sent each other e-mail
messages.
Example 2
• Let M(x,y) be “ x has sent y an e-mail message”
• T(x,y) be “ “x has telephoned y”
• where the universe of discorse is the set of all students in your class.
• Use quantifiers to express each of the following statements.
k)There is a student in your class who has not received an email message
from anyone else in the class and who has not been called by any other
student in the class.
Example 2
• Let M(x,y) be “ x has sent y an e-mail message”
• T(x,y) be “ “x has telephoned y”
• where the universe of discorse is the set of all students in your class.
• Use quantifiers to express each of the following statements.
l) Every student in the class has either received an e-mail message or received
a telephone call from another student in the class.
Example 2
• Let M(x,y) be “ x has sent y an e-mail message”
• T(x,y) be “ “x has telephoned y”
• where the universe of discorse is the set of all students in your class.
• Use quantifiers to express each of the following statements.
m)There are at least wto students in your class such that one student has sent
the other e-mail and the second student has telephoned the first
Example 2
• Let M(x,y) be “ x has sent y an e-mail message”
• T(x,y) be “ “x has telephoned y”
• where the universe of discorse is the set of all students in your class.
• Use quantifiers to express each of the following statements.
n) There are two students in your class who between them have sent an e-
mail message to or telephoned everyone else in the class.