P(x, y)

advertisement
Sections 1.4 Predicates
A predicate P(x) is a statement
Consider the statement x + 3 = 7.
1)
2) Quantify the variable(s)
a)
b)
Quantifying a statement containing two or more variables
Q(x, y) is the statement x + y = 5
xy Q(x, y)
xy Q(x, y)
xy Q(x, y)
xy Q(x, y)
domain
Definition (p. 43)
1. The symbol 
2. The symbol  means
3. The symbol  means
4. The symbols  and 
5. A counterexample is
P(x): x + 3 = 7
Predicate: x P(x)
Domain:
R(x): x3 ≥ 0
Predicates x R(x) and x R(x)
Domain
More examples
Translating Quantified Statements
Every student in EECS 210 has taken a programming class.
S(x):
Q(x):
P(x):
Some student in EECS 210 bought the textbook.
B(x):
When are the statements false?
Expressing Negations:
P(x): x is a professor
Q(x): x is ignorant
R(x): x is vain
a) "No professors are ignorant"
b) "All ignorant people are vain"
c) "No professors are vain"
Does statement c follow from a and b?
Negating Quantified Statements
Negation

(x P(x))
Equivalent
Statement
x (P(x))

(x P(x))
x (P(x))
When true
For some x,
P(x) is false
When false
P(x) is false for For some x,
all values of x P(x) is true
P(x) is true for
all x
Stmt: Every student in EECS 210 is a sophomore or junior.
Negation:
Q(n, r): For every nonzero integer n there is a rational number r
such that n = 1/r
There is a unique x such that for every y, xy = y.
R(x, y): xy = y
More Examples
D(x) is “x is a day”
S(x) is “x is sunny”
R(x) is “x is rainy”
M is “Monday”
Some days are not rainy.
No day is both sunny and rainy.
Monday was sunny; therefore every day will be sunny
Quantifications of Two Variables
Statement
When true
When false
xy P(x, y) P(x, y) true for all choices
yx P(x, y) of x and y
Some pair x, y makes
P(x, y) false
xy P(x, y)
Given x a y can be found
to make P(x, y) true
For some x, every choice
of y makes P(x, y) false
xy P(x, y)
For some value of x every
y makes P(x, y) true
For every x, there is some
y for which P(x, y) is false
xy P(x, y)
yx P(x, y)
There is an x, y pair that
makes P(x, y) true
P(x, y) is false for every
pair x, y
More Examples
Use the predicates given below to write each of the statements that
follow them in symbolic notation. The domain is the set of all
movies.
M(x): “x is a mystery”
D(x): “x is a drama”
C(x): “x is a comedy”
B(x, y): “x is better than y”
a. Some mysteries are dramas.
b. Some comedies are better than all dramas.
c. For every drama there is a comedy better than it.
d. Only comedies are better than mysteries.
e. Not every comedy is a mystery.
Negating Implications
The implication p  q is logically equivalent to p V q. Thus, the
negation of p  q is the statement p  q
p
q
T
T
T
F
F
T
F
F
F(x): x is a fruit
pq

p

pVq

q
p  q
V(x): x is a vegetable S(x, y): x is sweeter than y
Some vegetable is sweeter than all fruits
Every fruit is sweeter than some vegetable
Only fruits are sweeter than vegetables
Logical Equivalences for Conditional Statements

p  q  p V q
(p  q)  p  q
p  q  q  p
(p  q)  (p  r)  p  (q  r)
p V q  p  q
(p  q) V (p  r)  p  (q V r)
p  q  (p  q)
“No professor has been asked questions by all of his students.”
S(x): x is a student
P(x): x is a professor
A(x, y): x has asked y a question
What does each translation actually mean?
x y ((S(x)  P(y))  A(x, y)
x  y ((S(x)  A(x, y))  P(y)
x y (A(x, y))
x y (((S(x)  P(y) )A(x, y))
x y ((P(y)  S(x))  A(x, y))
x y(P(x)  A(x, y))
 x  y(P(x)  (S(y)  A(x, y) ))
A correct translation:
Let the domain be all students at KU. Use the given predicates to
write each of the statements below in symbolic notation.
C(x): “x is a computer science major”
D(x): “x is a computer engineering major”
E(x): “x has attained upper level eligibility”
T(x, y): “x is taking course y”
A(y): “y is an advanced course”
P: Physics 212
M: Discrete Structures
a. No computer engineering major is taking Physics 212.
b. Every computer engineering major who has attained upper
level eligibility is taking an advanced course.
c. Only advanced courses are being taken by computer science
majors who have attained upper level eligibility.
d. Advanced courses are being taken only by computer science
majors who have attained upper level eligibility.
Download