Professional Documents
Culture Documents
Ds Lecture 6
Ds Lecture 6
Ds Lecture 6
(CSC 102)
Lecture 6
Todays Lecture
Predicates
Set Notation
Universal and Existential Statement
Translating between formal and informal language
Universal conditional Statements
Equivalent Form of Universal and Existential
statements
Implicit Qualification
Negations of Universal and Existential statements
Predicates
A predicate is a sentence which contains finite number of
variables and becomes a statement when specific values
are substituted for the variables.
The domain of a predicate variable is the set of all values that
may be substituted in place of the variable
Truth Set
If P(x) is a predicate and x has domain D, the truth set of
P(x) is the set of all elements of D that make P(x) true
when substituted for x. The truth set of P(x) is denoted by
{x D | P ( x)}
Notation
For any two predicates P(x) and Q(x), the notation
P( x) Q( x) means that every element in the truth set of
P(x) is in the truth set of Q(x). The notation P( x) Q( x)
means that P and Q have identical truth sets.
Consider the predicate:
x 0,
xR
x R
x0
Cont
Example
Let P(x) = x is a factor of 8, Q(x)= x is a factor of 4
and R(x)= x < 5 and x 3 . The domain of x is
Cont
Let Q(x, y) be the statement
x+y=xy
where the domain for x and y is the set of all real numbers.
Determine the truth value of:
(a) Q(5,2).
(b) Q(4.7, 0).
(c) Determine the set of all pairs of numbers, x and y, such that
Q(x, y) is true.
Solution:
(a) Q(5,2) says that 5 + (2) = 5 (2), or 3= 7, which is false.
(b) Q(4.7, 0) says that 4.7+ 0 = 4.7 0, which is true.
(c) x + y = x y if and only if x + 2y = x, which is true if and only if
y = 0. Therefore, x can be any real number and y must be zero.
22 2
42 4
62 6
Cont..
2
Hence x D, x x. is true.
1 1
2 2
2
R
,
x
x. is false.
Hence
Existential Quantifier
Let Q(x) be a predicate and D the domain of
x. An existential statement is of the form.
x R, x 2 0.
b)
x R, x 2 1.
c)
m Z s.t. m m
2
Cont.
b). Similarly we can translate the second statement in
these ways.
All real numbers have squares not equal to -1,
No real number have square equal to -1.
c). There is an integer whose square is equal to itself,
we can find at least one integer equal to its own
square
Cont
Write the following statement in English, using the
predicates
F(x): x is a Freshman
T (x, y): x is taking y
where x represents students and y represents courses:
x (F(x) T (x, Discrete Math))
Solution
The statement x (F(x)T (x, Discrete)) says that there
is a student x with two properties: x is a freshman and x
is taking Discrete. In English, Some Freshman is taking
Discrete Math.
Cont..
Every freshman at the College is taking some Computer
Science course.
Sol: If we take as our domain for people all freshmen at
the College and our domain for courses, all Computer
Science courses.
Then we can use the predicate
T (x, y): x is taking y
The statement can be written as
x y T(x, y).
Exercise
Rewrite the following statements in the form
,if
then
.
a) If a real number is an integer, then it is a rational
number.
a) All bytes have eight bits.
b) No fire trucks are green.
Sol: a). x R, ifx Z , thenx Q.
b). x, if x is a byte, then x has eight bits.
c). x, if x is a fire truck, then x is not green.
Contd.
The following statements are equivalent
polygons P, if P is square, then P is a rectangle.
And
squares P, P is a rectangle
The existential statements
x belongs to U such that P(x) and Q(x).
And
x belongs to D such that Q(x)
Are also equivalent provided D is taken to consist of all elements in
U that make P(x) true.
Implicit Quantifications
Consider If a number is an integer, then it is a
rational number
The clue to indicate its universal quantifications comes
from the presence of the indefinite article a.
Existential quantification can also be implicit.
for instance, the number 24 can be written as a sum of
sum of two integers
~ (x D, Q( x)) x D ~ Q( x).
Note: the negation of universal statement is
logically equivalent to existential statement.
Cont.
The negation of the statement of the form
x in D such that Q(x)
is logically equivalent to a statement of the
form
x in D, ~Q(x)
Symbolically:
~ (x D Q( x)) x D, ~ Q( x).
Note: the negation of existential statement is
logically equivalent to universal statement.
Examples
Negate Some integer x is positive and all integers
y are negative.
Solution: Using all integers as the universe for x and y,
the statement is x s.t. (x > 0) y, (y < 0). The
negation is
~{x (x > 0) y (y < 0)} ~x s.t. (x > 0) ~y, (y <
0):
by De Morgans law
x, ~(x > 0) y s.t. ~(y < 0) properties of negation
x, (x 0) y s.t. (y 0).
Therefore, the negation is Every integer x is non
positive or there is an integer y that is nonnegative.
Cont.
Negate There is a student who came late to class
and there is a student who is absent from class.
Solution: In symbols, if L(x) : x came late to class and
A(x) : x is absent from class, this statement can be
written as x st L(x) y st A(y).
Note that we must use a second variable y. By one of
De Morgans laws the negation can be written as
~( x st L(x)) ~( y st A(x)) x, ~L(x) y, ~A(x).
In English this is No student came late to class or no
student is absent from class.
Lecture Summary
Predicates
Set Notation
Universal and Existential Statement
Translating between formal and informal language
Universal conditional Statements
Equivalent Form
Implicit Qualification
Negations