0% found this document useful (0 votes)
42 views

2 Predicates Quantifiers

This document discusses predicates and quantifiers in logic. It defines predicates as statements involving variables that are neither true nor false until the variables are specified, such as P(x) denoting the statement "x is greater than 3". It introduces universal quantification (∀x) meaning a predicate is true for all values in the domain, and existential quantification (∃x) meaning there exists a value for which the predicate is true. Examples are provided to demonstrate how to determine the truth value of quantified statements and how to translate between logical expressions and English sentences.

Uploaded by

kopok98011
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

2 Predicates Quantifiers

This document discusses predicates and quantifiers in logic. It defines predicates as statements involving variables that are neither true nor false until the variables are specified, such as P(x) denoting the statement "x is greater than 3". It introduces universal quantification (∀x) meaning a predicate is true for all values in the domain, and existential quantification (∃x) meaning there exists a value for which the predicate is true. Examples are provided to demonstrate how to determine the truth value of quantified statements and how to translate between logical expressions and English sentences.

Uploaded by

kopok98011
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Predicates and Quantifiers

Slides are prepared by using Discrete Mathematics and Its


Applications by K. H. Rosen
Predicates (Yüklemler)
• Statements involving variables
• Example: x>3, x=y+3, x+y=z
• These statements neither true nor false when the values
of the variables are not specified.
• The statement x>3 can be denoted by P(x)
• x is the variable
• P denotes the predicate “is greater than 3”
• P(x) is the value of propositional function P at x.
• The statement x=y+3 can be denoted by Q(x,y)
• x and y variables
• Q denotes the predicate “is sum of y and 3”
• Q(x,y) is the value of propositional function Q at x and y.
Predicates (Yüklemler): Example
• Example: Let P(x) denote the statement “x>3”. What
are the truth values of P(4) and P(2)?

• 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)

• xP(x) is the same as the conjunction of


P(x1)  P(x2)  P(x3) ....  P(xn)
Example
• Example: Express the statement “Every student in this
class has studied calculus” as a universal quantification.

• Let P(x) denote the statement “x has studied calculus”


• solution becomes x P(x)
• the universe of discourse consists of the students in the class
• The statement can also be expressed as
• x (S(x)  P(x))
• where S(x) is “x is in this class”
Example
• Let P(x) be the statement “x+1>x”. What is the truth
value of quantification x P(x) where universe of
discorse is the set of real numbers?

• 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)

• x P(x) is the same as the disjunction of


P(x1)  P(x2)  P(x3) ....  P(xn)
Example
• Let P(x) be the statement “x>3”. What is the truth
value of quantification x P(x) where universe of
discourse is the set of real numbers?

• 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.
xyz ((( F(x,y)  F(x,z)  (yz))  ¬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)  ((zy)  ¬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.

Negation of this statement


• x ¬P(x)
• It is not the case that every student in the class has taken a
course in calculus.
• There is student in the class who has not taken a course in
calculus.

• ¬x P(x)  x ¬P(x)


Negating Quantifiers

Negation Equivalent When is Negation True? Whan False?


Statement
¬x P(x) x ¬P(x) P(x) is false for every x. There is an x for which
P(x) is true.
¬x P(x) x ¬P(x) There is an x for which P(x) is true for every x.
P(x) is false.
Example
• Let W(x,y) mean that x has visited y,
• where the universe of discorse for x is the set of all students in your school
and
• the universe of discorse for y is the set of all Web sites.
• Express the following statements by a simple English sentence.

• y (W(Fatma, y)  W(Ayşe, y))


Example
• Let W(x,y) mean that x has visited y,
• where the universe of discorse for x is the set of all students in your school
and
• the universe of discorse for y is the set of all Web sites.
• Express the following statements by a simple English sentence.

• y z (y (Can)  (W(Can, z)  W(y,z)))


Example
• Let W(x,y) mean that x has visited y,
• where the universe of discorse for x is the set of all students in your school
and
• the universe of discorse for y is the set of all Web sites.
• Express the following statements by a simple English sentence.

• x y z ((x y)  (W(x,z)  W(y,z)))


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.

a) Lois has asked Professor Michaels 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.

b) Every student has asked Professor Gross 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.

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.

d) Some student has not asked any 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 predicates to express each of the following statements.

e) There is a faculty member who has never been asked a question by a


student.
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.

f) Some student has asked every 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 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.

h) Some student has never been asked a question by a faculty member.


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.

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.

j) There is a student who has sent himself or herself 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.

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.

You might also like