CS 395 Solutions to Test



October 15, 1999



1. Express the assertions given below as a proposition of a predicate logic using the following predicates. The universe is the set of objects.[15]

F(x): x is a flower.
R(x): x is red.
P(x): x is a person.
L(x,y ): x likes y.


(a) Not everyone likes a flower.

$\neg \forall x \forall y [P(x) \wedge F(y) \rightarrow L(x,y)]$
or $\exists x \exists y [P(x) \wedge F(y) \wedge \neg L(x,y)] $

(b) Everyone likes a flower if it is red.

$\forall x [P(x) \rightarrow \exists y [F(y) \wedge R(y) \rightarrow L(x,y)] ]$
or $\forall x [P(x) \rightarrow \forall y [F(y) \wedge R(y) \rightarrow L(x,y)] ]$

(c) Some people like a flower only if it is red.

$\exists x \forall y [P(x) \wedge[ [F(y) \wedge L(x,y)] \rightarrow R(y) ] ]$

(d) Everyone likes some flowers.

$\forall x [P(x) \rightarrow \exists y [F(y) \wedge L(x,y)] ]$

(e) Some red flowers like only people.

$\exists y [F(y) \wedge R(y) \wedge \forall x [L(y,x) \rightarrow P(x)] ]$

2. State in English the negation of each of the propositions given below. Give a form other than simply putting "not" in front. [12]

(1) If it is raining, it is not snowing.

It is raining and snowing.

(2) Every student in this class has taken exactly two math courses at this school.

Some students in this class have taken less than two or more than two math courses at this school.

(3) It is not snowing only if it is raining.

It is not snowing and it is not raining.

(4) Someone has read every book in the library.

Everyone has not read some book in the library.

3. Find the converse and the contrapositive of the following statements. State them in English.[16]

(1) If it is raining, it is not snowing.

Converse: If it is not snowing, then it is raining.
Contrapositive: If it is snowing, then it is not raining.

(2) It is not snowing only if it is raining.

Converse: If it is raining, then it is not snowing.
Contrapositive: If it is not raining, then it is snowing.

(3) It can not be true that everything is expensive and everything breaks easily.

This can be restated as "Not everything is expensive or not everything breaks easily", which is equivalent to "If everything is expensive, then not everything breaks easily" or "If everything breaks easily, then not everything is expensive".

Converse: If not everything breaks easily, then everything is expensive.
Contrapositive: If everything breaks easily, then not everything is expensive.

(4) It is necessary for taking this course that one has taken at least two mathematics courses.

This can be restated as "If one takes this course, then one must have taken at least two mathematics courses."

Converse: If one has taken at least two mathematics courses, then one takes this courses.
Contrapositive: If one has not taken at least two mathematics courses, then one does not take this courses.

4(a) Express the argument given below using the symbol indicated for each proposition. [3]
(b) Using the symbols of (a) for the propositions, explain how the reasoning proceeds i.e. identify each application of inference rule in the argument. What conclusion do you draw ? It may be an if-then sentence. Give your reasons. [10]

Argument:
If a book is unhealthy in tone ($\neg$H), then I do not recommend it for reading ($\neg$R); if a book is bound (B), then it is well-written (W); if a book is about travel (T), then it is healthy in tone; if a book is not bound, then I do not recommend you to read it.

(a) (1) $\neg$ H $\rightarrow$ $\neg$R
(2) B $\rightarrow$ W
(3) T $\rightarrow$ H
(4) $\neg$ B $\rightarrow$ $\neg$R

(b) (5) $\neg$ W $\rightarrow$ $\neg$B from (2) by Contrapositive.
(6) $\neg$ W $\rightarrow$ $\neg$R from (4) and (5) by Hypothetical Syllogism.
(7) From (1), (4) and (6) by Addition, we can conclude that if a book is not well-written, not bound or not healthy in tone, then it is not recommended for reading.

5. Find the powerset of each of the following sets: [6]

(a) $\emptyset$
{$\emptyset$}
(b) {$\emptyset$}
{ $\emptyset$, {$\emptyset$} }
(c) {$\emptyset$ , {$\emptyset$}}
{ $\emptyset$, {$\emptyset$}, {{$\emptyset$}}, {$\emptyset$ , {$\emptyset$}} }

6. Find the following Cartesian products: [8]

(a) { $ 1 , 2, 3 \} \times \emptyset $
$\emptyset$
(b) { $ \emptyset \} \times \{ \emptyset \} \times \{ 1,2 \} $
{ $(\emptyset , \emptyset , 1), (\emptyset , \emptyset , 2)$ }
(c) { $ 1, 2 \} \times \{ 3 \} \times \{ 1 \} \times \{ 1,2 \} $
{ (1,3,1,1), (1,3,1,2), (2,3,1,1), (2,3,1,2) }

(d) $\emptyset \times \{ \{ \emptyset \}, \emptyset \}$
$\emptyset$

7. Indicate which of the following are true and which are false. [15]

(a) { $x\} \subseteq \{ x\}$
True
(b) $\emptyset \in \{ x \}$
False
(c) $\emptyset \subseteq \{ x \}$
True
(d) $ x \in \{\{x \}\}$
False
(e) $\{x \} \subseteq \{\{x \}\}$
False

8. Which rules of inference are used to establish the conclusion of the following argument ? [15]

Premises:
"No monkeys are soldiers."
"Some monkeys are mischievous."


Conclusion:
"Some mischievous creatures are not soldiers."

Give your answer using M(x), C(x) and S(x) to denote "x is a monkey", "x is mischievous" and "x is a soldier", respectively, and assuming the universe is the set of all creatures. Using these symbols, the statements given above can be expressed as follows:

$\forall x [M(x) \rightarrow \neg S(x) ]$
$\exists x [M(x) \wedge C(x) ]$
---------------------
$\exists x [C(x) \wedge \neg S(x) ]$

Solutions:
(1) Existential Instantiation on $\exists x [M(x) \wedge C(x) ]$produces $[M(a) \wedge C(a) ]$ for some a.
(2) For the same a Universal Instantiation on $\forall x [M(x) \rightarrow \neg S(x) ]$ gives $[M(a) \rightarrow \neg S(a) ]$.
(3) By Simplification on (1), C(a) and M(a) are obtained.
(4) By Modus Ponens on (2) and (3), $\neg S(a) $ is inferred.
(5) From (3) and (4) by Conjunction $C(a) \wedge \neg S(a) $ is derived.
(6) By Edxistential Generalization on (5), $\exists x [C(x) \wedge \neg S(x) ]$is concluded.