DM 4 Predicates Quantifires
DM 4 Predicates Quantifires
Lecture Outline
Predicates
Predicates
Example 1
Example 2
Multivariable Predicates
• Multivariable Predicates ==> Predicates that have
more than one variable.
• For example, Q(x, y): “x = y + 3” ,
where x and y are variables and Q is the predicate.
Example 3
Quantifiers
Quantifiers
Example 8
Example 9
(Modified) Example 10
Example 11
Another Example
What is the truth value of x P(x ), where P(x) is the statement “x2<10” and the
domain consists of the positive integers less than 4?
Solution: The statement x P(x ) is the same as the conjunction P(1) P(2)
P(3) , because the domain consists of the integers 1, 2, 3.
So, the truth value of x P(x ) is true.
How?----------See Below-------------------------------------
P(1): “12<10”, is true
P(2): “22<10” is true
P(3): “32<10” is true
P(1) P(2) P(3) T T T T
20
Practice
What is the truth value of x P(x ), where P(x) is the statement “x3<10” and the
domain consists of the positive integers not exceeding 3?
Solution: The statement x P(x ) is the same as the conjunction P(1) P(2)
P(3) , because the domain consists of the integers 1, 2, 3.
So, the truth value of x P(x ) is false for x=3 as 3x3x3 =27.
What is the truth value of x P(x ), where P(x) is the statement “x3<10” and the
domain consists of the positive integers not exceeding 3?
Example 14
Example 15
Example 16
• What is the truth value of x P(x), where P(x) is the statement
“x2>10” and the universe of discourse consists of the positive
integers not exceeding 4?
Class Work
1. Let P(x) denote the statement “x>0”. What is the truth value of the quantification
x P (x)” , where the domain consists of integers?
2. Let P(x) denote the statement “x>0”. What is the truth value of the quantification
x P (x)” , where the domain consists of non-negative integers?
3. Let P(x) denote the statement “x>0”. What is the truth value of the quantification
x P (x)” , where the domain consists of negative integers?
4. Let P(x) denote the statement “x<2”. What is the truth value of the quantification
x P (x)” , where the domain consists of all prime numbers?
5. Let P(x) denote the statement “x ≤ 2”. What is the truth value of the
quantification x P (x)” , where the domain consists of all prime numbers?
27
Answers
1. True
2. False
3. False
4. False
5. True
28
Precedence of Quantifiers
Since the quantifiers are the same as taking a bunch of AND’s () or OR’s (),
we have:
• Universal Negation: x P(x ) x P(x )
Solution: First, we rewrite the statement so that we can clearly identify the
appropriate quantifiers to use. Doing so, we obtain:
“For every student in the class, that student has studied calculus”.
Next, we introduce a variable x so that our statement becomes –
“For every student x in the class, x has studied calculus”
Continuing, we introduce the predicate C(x), which is the statement “x has studied
calculus”
Consequently, if the universe of discourse for x consists of the students in the
class, we can translate our statement as x C(x).
32
Example 23 (p.40)
Note: There are other correct approaches; different domains of discourse and
other predicates can be used. For example, If we change the domain to
consists of all people, we need to express our statement as
“For every person x, if person x is a student in this class, then x has studied
calculus.”
If S(x) represents the statement that person x is in this class, our statement can be
expressed as x S(x) → C(x).
Note: For the second way (when the domain is all people), we always want to use
conditional statements with universal quantifiers and conjunctions with
existential quantifiers.
33
Extra Example
Exercise 9 (p.43)
• Let P(x) be the statement “x can speak Russian” and let Q(x) be the
statement “x knows the computer language C++”, Express each of these
sentences in terms of P(x), Q (x), quantifiers, and logical connectives. The
domain for quantifiers consists of all students at your school.
a) There is a student at your school who can speak Russian and who knows
C++.
b) There is a student at your school who can speak Russian but who doesn’t
know C++.
c) Every student at your school either can speak Russian or knows C++.
d) No student at your school can speak Russian or knows C++
35
Answers
a) x (p(x) Q(x))
b) x (p(x) Q(x))
c) x (P(x ) Q(x))
d) x (P(x ) Q(x))
36
Solution
a) x P(x )
b) x P(x )
c) x ( F(x) P (x) )
d) x (F(x) P(x))
e) x (F(x ) P(x)) or (x (F(x )) (x P(x))
f) (¬x (F(x )) ∨ ( x¬ P(x ))
38
Propositional logic is the logic that deals with a collection of Predicate logic is an expression consisting of variables with a
declarative statements which have a truth value, true or false. specified domain. It consists of objects, relations and
functions between the objects.
It is the basic and most widely used logic. Also known as It is an extension of propositional logic covering predicates
Boolean logic. and quantification.
A proposition has a specific truth value, either true or false. A predicate’s truth value depends on the variables’ value.
It cannot deal with sets of entities. It can deal with set of entities with the help of quantifiers
Practice @ Home