Tutorial Predicate Logic Sol
Tutorial Predicate Logic Sol
Discrete Mathematics
Tutorial sheet Predicate Logic
Question 1.
Let P (x) be the predicate “x2 > x” with the domain the set R of all real num-
bers. Write P (2), P ( 12 ), and P (− 21 ) and indicate which of these statements
are true and which are false.
Solution:
Question 2.
Let P (x) be the predicate “x2 > x” with the domain the set R of all real
numbers. What are the values P (2) ∧ P ( 21 ), and P (2) ∨ P ( 21 ) ?
Solution:
Question 3.
∀x ∈ D, x2 ≥ x.
Write one way to read this statement, and show that is it true.
∀x ∈ R, x2 ≥ x
Solution:
1. “For every x in the set D, x2 is greater than or equal to x”. The inequalities below
show that that ” x2 ≥ x” is true for each individual x in D.
12 ≥ 1, 22 ≥ 2, 32 ≥ 3, 42 ≥ 4
1
2. the statement claims that x2 ≥ x for every real number x, however, this is not true
as for x = 12 for example ( 21 )2 = 14 6≥ 12 .
Hence, ”∀x ∈ R, x2 ≥ x” is false.
Question 4.
∃n ∈ Z+ such that n2 = n
Write one way to read this statement, and show that is it true.
∃n ∈ E, n2 = n.
1. There exists at least one positive integer n such that n2 = n. 1 is positive integer
and 1= 1. Thus n2 = n is true for a positive integer. Hence, ”∃n ∈ E, n2 = n” is
true.
2. 52 = 25 6= 5, 62 = 36 6= 6, 72 = 49 6= 7, 82 = 64 6= 8. Thus ”∃n ∈ E, n2 = n” is false.
Question 5.
Rewrite each of the following statements formally, Use quantifiers and vari-
ables.
2
Question 6.
Rewrite the following statements in form of ∀ if then
Question 7.
A prime number is an integer greater than 1 whose only positive integer
factors are itself and 1. Consider the following predicate Prime(n): “n is is
prime ” and Even(n): “n is even”. Use the notation Prime(n) and Even(n)
to rewrite the following statement:
“There is an integer that is both prime and even ”
Solution:
The statement “There is an integer that is both prime and even ” can be written in two
ways
∃n such that P rime(n) ∧ Even(n)
or
∃ an even number n such that P rime(n)
Question 8.
Determine the truth value each of the following where P (x, y) : y < x2 , where
x and y are real numbers:
1. (∀x)(∀y)P (x, y)
2. (∃x)(∃y)P (x, y)
3. (∀y)(∃x)P (x, y)
4. (∃x)(∀y)P (x, y)
Solution:
3
1. (∀x)(∀y)P (x, y) : this is false as there exists, x, y ∈ R where x = 2, and y = 5 such
that P (2, 5) is false.
2. (∃x)(∃y)P (x, y) : this true as there exists x=2 and y = 3 for example such that
P (2, 3) = 3 < 22 is true.
p
3. (∀y)(∃x)P (x, y) for all y ∈ mathbbR there is exists x = 2| |y|| with x2 = 4|y| > y.
this is true.
4. (∃x)(∀y)P (x, y) this is false as there exists x, y ∈ R where x = 1 and y = 5 such
that P (1, 5) is false as 5 > 12
Question 9.
Let P (x) denote the statement x is taking discrete mathematics course. The
domain of discourse is the set of all students. Write each of the following
statements in words.
∀xP (x), ∀x¬P (x), ¬(∀xP (x)), ∃xP (x), ∃x¬P (x), ¬(∃xP (x)).
Solution:
∀xP (x) : every students is taking discrete mathematics course.
∀x¬P (x) every student is not taking discrete mathematics course.
¬(∀xP (x)) some student is not taking discrete mathematics course.
∃xP (x) some student is taking discrete mathematics course.
∃x¬P (x) some student is not taking discrete mathematics course.
¬(∃xP (x)) every student is not taking mathematics course.
Question 10.
Let P (x) denote the statement ‘x is a professional athlete’, and let Q(x)
denote the statement ‘x plays football’. The domain of discourse is the set
of all people. Write each of the following in words.
2. ∃x(Q(x) → P (x))
4
Question 11.
Let P (x) denote the statement ‘x is a professional athlete’, and let Q(x)
denote the statement ‘x plays football’. The domain of dis- course is the
set of all people. Write the negation of each proposition symbolically and in
words.
2. ∃x(Q(x) → P (x))
1. ∀x(P (x) → Q(x)) : its negation is ∃x¬(P (x) → Q(x)) = ∃x(P (x) ∧ ¬Q(x)) :
2. ∃x(Q(x) → P (x)) : its negation is ∀x¬(Q(x) → P (x)) = ∀x(Q(x) ∧ ¬P (x)) :
3. ∀x(P (x) ∧ Q(x)) : its negation is ∃x¬(P (x) ∧ Q(x)) = ∃x(¬P (x) ∨ ¬Q(x)) :
Question 12.
Let P and Q denote the following propositional functions:
where, the universe of discourse for both P (x) and Q(x) is the set of real
number, R.
1. “ if a real number is greater 2, then its square is greater than 4” can be written
formally as ∀x(P (x)) → Q(x)).
2. The contrapositive of “if a real number is greater 2, then its square is greater than 4”
is the statement ”if the square of a real number is less or equal to 4 then the number
is less or equal to 2” . this can be written using quantifiers as ∀x(¬Q(x)) → ¬P (x)).
5
3. The converse of “ if a real number is greater 2, then its square is greater than 4” is
the statement ” if the square of a real number is greater than 4, then the number
is greater than 2” is the statement ∀x(Q(x(→ P (x)).
The inverse of “ if a real number is greater 2, then its square is greater than 4”
is the statement ” if a real number is less or equal to 2 , then its square is less or
equal 4” is the statement ∀x(¬(P ) → ¬Q(x)).
Question 13.
1. (a) ∀ color c, ∃ an animal a such that a is colored c. This can written as “For
every color, there is an animal of that color”.
(b) ∃ a book b such that ∀ person p, p has read b. This can written as “There is
a book that every person has read”.
(c) ∀ odd integer n, ∃ an integer k such that n = 2k + 1. This can be written as
“For every odd number n, we can find an integer k with n = 2k + 1”.
(d) ∀ x ∈ R, ∃ a real number y such that x + y = 0. This can be written as
“ Given any real, we can find another real number (possibly the same) such
that the sum of both numbers is equal to 0”.
2. (a) ∃ a color c, ∀ animal a, a is NOT colored c.
(b) ∀ book b, ∀ a person p, p has NOT read b.
(c) ∃ an odd integer n, such that ∀ integer k, n 6= 2k + 1.
(d) . ∃ x ∈ R, such that ∀ real number y, x + y 6= 0.
Question 14.
Rewrite the statement “No good cars are cheap ” in the form “∀x,if P (x)
then ¬Q(x)”. Indicate whether each of the following arguments is valid or
invalid, and justify your answers.
1. No good care are cheap
A Ferrari is a good car
∴ A Ferrari is not cheap
6
2. No good cars are cheap
A BMW is not cheap
∴ A BMW is no a good car
Solution:
Question 15.
Let x be any student and C(x), B(x) and P(x) be the following statements:
C(x): “x is in this class“.
B(x): “x has read the book”.
P (x): “x has passed the first exam”.
Rewrite the following symbolically and state whether it a valid argument.
A student in this class has not read the book
Everyone in this class passed the first exam
∴ Someone who passed the first exam has not read the book
Solution:
End of questions