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

Tutorial 2: Predicate Logics

The document is a tutorial on Predicate Logics from the Department of Computer Science and Engineering at Hong Kong University of Science and Technology. It includes questions and solutions related to expressing statements using predicate and quantifiers, determining logical equivalences, and analyzing quantifications. The tutorial also discusses counterexamples to illustrate logical equivalences.

Uploaded by

王少甫
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)
8 views7 pages

Tutorial 2: Predicate Logics

The document is a tutorial on Predicate Logics from the Department of Computer Science and Engineering at Hong Kong University of Science and Technology. It includes questions and solutions related to expressing statements using predicate and quantifiers, determining logical equivalences, and analyzing quantifications. The tutorial also discusses counterexamples to illustrate logical equivalences.

Uploaded by

王少甫
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

Tutorial 2: Predicate Logics

Department of Computer Science and Engineering


Hong Kong University of Science and Technology

Tutorial 2: Predicate Logics 1/7


Question 1

Consider the statement:

“For all prime number p, p is odd or p is 2”

(a) Express the above statement using predicate and universal


quantifiers.
(b) Express the negation of the statement in (a) using an
existential quantifier.

Solution:
(a) Let r (p) stand for “p is a prime”, s(p) stand for “p is odd”.
The statement is: ∀p ∈ Z + (r (p) → (s(p) ∨ p = 2)).
(b) ∃p ∈ Z + (r (p) ∧ ¬s(p) ∧ p 6= 2)).

Tutorial 2: Predicate Logics 2/7


Question 2
For each of the following parts, select the answer (from (i) to (iv))
that are logically equivalent to it.
(a) ∃x(P(x) ∨ Q(x))
(i) ∀x(P(x) ∧ Q(x))
(ii) ¬(∀x¬P(x)) ∨ ¬(∀x¬Q(x))
(iii) ¬(∀x¬P(x)) ∧ ¬(∀x¬Q(x))
(iv) ¬(∀x¬P(x)) ∨ (∀x¬Q(x))
(b) ∃xP(x) → ∀yQ(y )
(i) ∃x¬P(x) ∨ ∀yQ(y )
(ii) ∃x¬P(x) ∧ ∀yQ(y )
(iii) ∃x¬P(x) → ∀yQ(y )
(iv) ∀x¬P(x) ∨ ∀yQ(y )
(c) ¬∀x∃y (P(y ) ∧ Q(x, y ))
(i) ∀x∀y (P(y ) → ¬Q(x, y ))
(ii) ∃x∀y (P(y ) → ¬Q(x, y ))
(iii) ∀x∀y (P(y ) → Q(x, y ))
(iv) ∀x∃y (P(y ) → Q(x, y ))
Tutorial 2: Predicate Logics 3/7
Question 2

Solution:
(a) (ii)
(b) (iv)
(c) (ii)

Tutorial 2: Predicate Logics 4/7


Question 3

Consider the following quantification about elements in some


universe U:

¬∀x ∈ U (∃y ∈ U (P(x, y ) ∧ Q(x, y ))) (1)

Let R(x, y ) = ¬P(x, y ) and S(x, y ) = ¬Q(x, y )


Express the quantification in Equation (1) in terms of R(x, y ) and
S(x, y ). The negation sign (¬) should not appear in the answer.
Show how you derived your new quantification.

Tutorial 2: Predicate Logics 5/7


Question 3

Solution:
Using the facts:
* ¬∀x ∈ U (p(x)) is equivalent to ∃x ∈ U (¬p(x))
* ¬∃x ∈ U (p(x)) is equivalent to ∀x ∈ U (¬p(x))
* DeMorgan’s laws
we get

¬∀x ∈ U (∃y ∈ U (P(x, y ) ∧ Q(x, y )))


= ∃x ∈ U (¬∃y ∈ U (P(x, y ) ∧ Q(x, y )))
= ∃ ∈ U (∀y ∈ U ¬(P(x, y ) ∧ Q(x, y )))
= ∃ ∈ U (∀y ∈ U (¬P(x, y ) ∨ ¬Q(x, y )))
= ∃x ∈ U (∀y ∈ U (R(x, y ) ∨ S(x, y )))

Tutorial 2: Predicate Logics 6/7


Question 4

Is (∃x ∈ U (p(x))) ∧ (∃y ∈ U (q(y ))) logically equivalent to


∃z ∈ U (p(z) ∧ q(z))?

Solution:
No. Consider the following counterexample.
Set U = Z + , p(x) =“x is even” and q(x) =“x is odd”.

Obviously, (∃x ∈ U (p(x))) is true because there exists some even


integers in Z + and (∃y ∈ U (q(y ))) is true because there exists
some odd integers in Z + . So, (∃x ∈ U (p(x))) ∧ (∃y ∈ U (q(y )))
is true.

However, ∃z ∈ U (p(z) ∧ q(z)) is false because there is no integer


z ∈ Z + that is both even and odd.

Therefore, they are not logically equivalent.


Tutorial 2: Predicate Logics 7/7

You might also like