0% found this document useful (0 votes)
16 views7 pages

Tutorial Predicate Logic Sol

The document contains a tutorial on Predicate Logic with various questions and solutions related to predicates, quantifiers, and logical statements. It covers topics such as truth values of predicates, rewriting statements using quantifiers, and evaluating logical arguments. Each question is followed by detailed solutions demonstrating the application of logical principles.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views7 pages

Tutorial Predicate Logic Sol

The document contains a tutorial on Predicate Logic with various questions and solutions related to predicates, quantifiers, and logical statements. It covers topics such as truth values of predicates, rewriting statements using quantifiers, and evaluating logical arguments. Each question is followed by detailed solutions demonstrating the application of logical principles.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

 

  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:

• P(2): 22 > 2 or 4 > 2 is true


• P ( 12 ) : ( 21 )2 > 1
2 or 1
4 > 1
2 is false
• P (− 12 ) : (− 12 )2 > − 12 or 1
4 > − 21 is true

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:

• P (2) ∧ P ( 12 ) : (22 > 2) ∧ (( 12 )2 > 21 ) = (4 > 2) ∧ ( 14 > 12 ) = T ∧ F = F


• P (2) ∨ P ( 12 ) : (22 > 2) ∨ (( 12 )2 > 21 ) = (4 > 2) ∨ ( 14 > 12 ) = T ∨ F = T

Question 3.

1. Let D = {1, 2, 3, 4}, and consider the following statement:

∀x ∈ D, x2 ≥ x.

Write one way to read this statement, and show that is it true.

2. Show that the following statement is false.

∀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

Hence, ”∀x ∈ D, x2 ≥ x” is true.

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.

1. Consider the following statement:

∃n ∈ Z+ such that n2 = n

Write one way to read this statement, and show that is it true.

2. Let E = {5, 6, 7, 8}, and consider the following statement:

∃n ∈ E, n2 = n.

Show that this statement is false.


Solution:

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.

1. All triangles have three sides.

2. No dogs have wings.

3. Some programs are structured.


Solution:

1. All triangles have three sides: ∀ triangle t, t has three sides.


Or, ∀t ∈ T , t has three sides (where T is set of all triangles)
2. No dogs have wings: ∀ dog d, d does not have wings.
Or, ∀d ∈ D, d does not have wings (where D is set of all dogs).
3. Some programs are structured: ∃ a program p such such that p is structured
Or: ∃p ∈ P, p is structured (where P is the set of all programs).

2
Question 6.
Rewrite the following statements in form of ∀ if then

1. If a real number is an integer, then it is a rational number

2. All bytes have eight bits

3. No fire trucks are green


Solution:

1. If a real number is an integer, then it is a rational number: ∀ real number x, if x is


an integer, then x is a rational number
Or: ∀x ∈ R, if x ∈ Z then x ∈ Q.
2. All bytes have eight bits: ∀x, if x is a byte, then x has eight bits.
3. No fire trucks are green: ∀x, if x is a fire truck, then x is not green.
it is common for (1) and (2) above, to omit explicit identification of the domain of
the predicate variables in universal conditional statements.

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.

1. ∀x(P (x) → Q(x))

2. ∃x(Q(x) → P (x))

3. ∀x(P (x) ∧ Q(x))


Solution:

1. ∀x(P (x) → Q(x)) : every professional athlete plays football.


2. ∃x(Q(x) → P (x)) : either someone does not play football or some football player is
a professional athlete.
3. ∀x(P (x) ∧ Q(x)) : everyone is a professional athlete and plays football.

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.

1. ∀x(P (x) → Q(x))

2. ∃x(Q(x) → P (x))

3. ∀x(P (x) ∧ Q(x))


Solution:

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:

• P (x) : “x is greater than 2”

• Q(x) : “x2 is greater than 4 ”

where, the universe of discourse for both P (x) and Q(x) is the set of real
number, R.

1. Use quantifiers and logical operators to write the following statement


formally
“ if a real number is greater 2, then its square is greater than 4.”

2. Write a formal and informal contrapositive, converse and inverse of the


statement above in (1).
Solution:

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. Rewrite each of the following statements in English as simply as possi-


ble without using the symbols ∀ or ∃ or variables.
(a) ∀ color c, ∃ an animal a such that a is colored c.
(b) ∃ a book b such that ∀ person p, p has read b.
(c) ∀ odd integer n, ∃ an integer k such that n = 2k + 1.
(d) . ∀ x ∈ R, ∃ a real number y such that x + y = 0.
2. Write a negation for each of the statements above.
Solution:

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:

∀x, if x is a good car, then x is NOT cheap.

1. No good cars are cheap


A Ferrari is a good car
∴ A Ferrari is not cheap
This is a valid argument, universal modus or universal instantiation.
2. No good cars are cheap
A BMW is not cheap
∴ A BMW is not a good car
This is invalid, converse error.

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:

(1) ∃x(C(x) ∧ ¬B(x))


(2) ∀x(C(x) → P (x))
∴ ∃x(C(x) → ¬B(x))
This a valid argument!.

End of questions

You might also like