Predicate logic and quantifiers: solutions to the textbook exercises

In this article, you will see a video explaining predicate logic and quantifiers. After that, I’ll show the solution to the first five exercises from the text-book that professors are using to teach Discrete Mathematics in most universities.

Find below the solution to the first five exercises from the text-book: Discrete Mathematics and Application by Rosen.

Table of Contents

1- Let P(x) denote the statement “x ≤ 4.” What are these truth values?

a) P(0)  

b) P(4)

c) P(6)

Answer:

a) P(0) = “0≤ 4”. Therefore, the truth value is true.
b) P(4) = “4≤4”. Therefore, the truth value is true.
c) P(6) = “6≤4”. Therefore, the truth value is false.

2- Let P(x) be the statement “the word x contains the letter a.” What are these truth values?

a) P(orange)

b) P(lemon)
c) P(true)

d) P(false)

Answer:

a) P(orange) = “the word orange contains the letter a.”. Therefore, the truth value is true.
b) P(lemon) = “the word lemon contains the letter a.”. Therefore, the truth value is false.
c) P(true) = “the word true contains the letter a.”. Therefore, the truth value is false.
d) P(false) = “the word false contains the letter a.”. Therefore, the truth value is true.

3- Let Q(x, y) denote the statement “x is the capital of y.” What are these truth values?

a) Q(Denver,Colorado)

b) Q(Detroit, Michigan)

c) Q(Massachusetts,Boston)

d) Q(NewYork,NewYork)

Answer:

a) Q(Denver,Colorado) = “Denver is the capital of Colorado.” True.
b) Q(Detroit, Michigan) = “Detroit is the capital of Michigan.” False, the capital of Michigan is Lansing.
c) Q(Massachusetts, Boston) = “Massachusetts is the capital of Boston.” False. Boston is the capital of Massachusetts.
d) Q(NewYork, NewYork) = “NewYork is the capital of NewYork.” True.

4- State the value of x after the statement if P (x) then x := 1 is executed, where P(x) is the statement “x > 1,”

If the value of x when this statement is reached is
a) x=0. b) x=1. c)x=2.

Answer:

a) x=0.  x equals 0 before the condition. The statement “0>1” is false, therefore the value of x does not change.
b) x=1. x equals 1 before the condition. The statement “1>1” is false, therefore the value of x does not change.
c) x=2. x equals 2 before the condition. The statement “2>1” is true, therefore the value of x change to 1.

5- Let P (x) be the statement “x spends more than five hours every weekday in class,” where the domain for x consists of all students. Express each of these quantifications in English.

a) ∃xP(x)  b) ∀xP(x) c) ∃x¬P(x) b) ∀x ¬P(x)

Answer:

a) There is at least one student that spends more than five hours every weekday in class.
b) All students spend more than five hours every weekday in class.
c) There is at least one student that does not spends more than five hours every weekday in class.
d) No student spends more than five hours every weekday in class.

Are you struggling with a specific exercise? Leave it below in the comments session and I’ll come back to you with the solution.

See the solution to another exercise on predicates and quantifiers in the link below.

Related posts: