Académique Documents
Professionnel Documents
Culture Documents
my
http://fskik.upsi.edu.my
Predicates
A predicate is a statement that contains variables. Example:
P(x) : x > 3 Q(x,y) : x = y + 3 R(x,y,z) : x + y = z
http://fskik.upsi.edu.my
Predicates
A predicate becomes a proposition if the variable(s) contained is(are)
Assigned specific value(s) Quantified
P(x) : x > 3. What are the truth values of P(4) and P(2)? Q(x,y) : x = y + 3. What are the truth values of Q(1,2) and Q(3,0)?
3
http://fskik.upsi.edu.my
Quantifiers
Two types of quantifiers
Universal Existential
http://fskik.upsi.edu.my
Universal Quantification
P(x) is true for all values of x in the universe of discourse. x P(x)
for all x, P(x) for every x, P(x) The variable x is bound by the universal quantifier, producing a proposition
5
http://fskik.upsi.edu.my
Example
U = {all real numbers}, P(x): x+1 > x
What is the truth value of x P(x)
http://fskik.upsi.edu.my
http://fskik.upsi.edu.my
Existential Quantification
P(x) is true for some x in the universe of discourse x P(x)
for some x, P(x) There exists an x such that P(x) There is at least one x such that P(x) The variable x is bound by the existential quantifier, producing a proposition
8
http://fskik.upsi.edu.my
Example
U = {all real numbers}, P(x): x > 3
What is the truth value of x P(x)
http://fskik.upsi.edu.my
http://fskik.upsi.edu.my
Binding Variables
Bound variable: if a variable is quantified Free variable: Neither bound nor assigned a specific value Example: x P(x) x Q (x , y ) Scope of Quantifiers: Part of a logical expression to which a quantifier is applied Example: x (P(x) Q(x)) x R(x)
11
http://fskik.upsi.edu.my
Negation of Quantifiers
Distributing a negation operator across a quantifier changes a universal to an existential and vice versa. ~x P(x) x ~P(x) ~x P(x) x ~P(x) Example:
P(x) : x has taken a course in calculus
12
http://fskik.upsi.edu.my
http://fskik.upsi.edu.my
Example
Every student in this class has studied Discrete Structures Solution 1
Assume, U = {all students in MTK 3013}
Solution 2
Assume, U = {all people}
14
http://fskik.upsi.edu.my
Example
Some student in this class has visited Mexico Solution 1
Assume, U = {all students in MTK 3013}
Solution 2
Assume, U = {all people}
15
http://fskik.upsi.edu.my
More Example
C(x): x is a COMPUTING student M(x): x is an MULTIMEDIA student S(x): x is a smart student U = {all students in MTK 3013}
16
http://fskik.upsi.edu.my
http://fskik.upsi.edu.my
18
http://fskik.upsi.edu.my
19
http://fskik.upsi.edu.my
More Example
No COMPUTING student is an MULTIMEDIA student.
If x is a COMPUTING student, then that student is not an MULTIMEDIA student. x [C(x) ~M(x)] There does not exist a COMPUTING student who is also an MULTIMEDIA student. ~x [C(x) M(x)]
http://fskik.upsi.edu.my
21
http://fskik.upsi.edu.my
Nested Quantifiers
Quantifiers that occur within the scope of other quantifiers Example:
P(x,y): x + y = 0, U={R} x y P(x,y)
22
http://fskik.upsi.edu.my
For every x there is a y such that P(x,y). There is an x such that P(x,y) for all y.
xy P(x,y)
http://fskik.upsi.edu.my
http://fskik.upsi.edu.my
Translating Sentences
U = {all people}
If a person is female and is a parent, then this person is someones mother.
U = {all integers}
The sum of two positive integers is positive.
25
http://fskik.upsi.edu.my
26
http://fskik.upsi.edu.my
U={R} Q(x,y): x+y=0 What are the truth values for y x Q(x,y) and x y Q(x,y)
Example