CS 381 Test II



October 30, 2003



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



$Person(x)$: $x$ is a person.
$Happy(x)$: $x$ is happy.
$Healthy(x)$: $x$ is healthy.
$Love(x, y)$: $x$ loves $y$.



(a) Not everyone loves everyone.



$\neg \forall x \forall y [[Person(x) \wedge Person(y) ] \rightarrow Love(x,y)]$



(b) For a person to be happy it is necessary that the person is healthy.



$\forall x [[Person(x) \wedge Happy(x) ] \rightarrow Healthy(x)]$



(c) Everyone is happy only if he/she is healthy.



$\forall x [[Person(x) \wedge Happy(x) ] \rightarrow Healthy(x)]$



2. Translate the following wffs into English using the given predicates. The universe is the set of objects.[15]



$B(x)$: $x$ is a bee.
$F(x)$: $x$ is a flower.
$L(x,y)$: $x$ loves $y$.



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



Every bee loves some flowers.



(b) $\exists x \exists y [B(x) \wedge F(y) \wedge \neg L(x,y)] $



Some bee does not love some flower.



(c) $\neg \forall x \forall y [[B(x) \wedge F(y)] \rightarrow L(x,y)] $



Not every bee loves every flower.

3. Find the following Cartesian products: [10]



(a) $\{\{ \emptyset \}\} \times \{ \emptyset \} $



$\{ < \{ \emptyset \}, \emptyset > \}$



(b) $\emptyset \times \emptyset $



$\emptyset$



4. Find the power set of the following sets: [10]



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



$\{ \emptyset, \{\{\emptyset \}\}, \{\{\{\emptyset \}\}\}, \{\{ \emptyset \}, \{\{ \emptyset \}\}\} \}$



(b) $\{ \emptyset \}$



$\{\emptyset, \{\emptyset \}\}$



5. Prove $( A - B) \cup ( B - A) = (A \cup B) - (A \cap B) $. [15]



$(A \cup B) - (A \cap B)$
= $(A \cup B) \cap (A \cap B)'$
= $(A \cup B) \cap (A' \cup B')$
= $(A \cap A') \cup (A \cap B') \cup (B \cap A') \cup (B \cap B')$
= $( A - B) \cup ( B - A)$

6. Indicate which of the following are true and which are false. [20]



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



7 (a) Translate the statements given below into wffs of predicate logic.
Use C(x), F(x), P(x) and R(x) to denote "x is colorful", "x is a flower", "x is a plant" and "x is red", respectively, and assume that the universe is the set of all objects. [7]
(b) Draw all possible conclusions from the statements below. Show your reasoning. [8]



"Some things are flowers if they are plants."
"Some things are red if they are flowers."
"All flowers are colorful."



(a) $\exists x [P(x) \rightarrow F(x)]$
$\exists x [F(x) \rightarrow R(x)]$
$\forall x [F(x) \rightarrow C(x)]$



(b) $\exists x [P(x) \rightarrow F(x)]$
----------------------
$P(a) \rightarrow F(a)$ by EI.



$\forall x [F(x) \rightarrow C(x)]$
----------------------
$F(a) \rightarrow C(a)$ by UI.



$P(a) \rightarrow F(a)$
$F(a) \rightarrow C(a)$
----------------------
$P(a) \rightarrow C(a)$ by Hypothetical Syllogism.



$P(a) \rightarrow C(a)$
----------------------
$\exists x [P(x) \rightarrow C(x)]$ by EG.



Similarly we can obtain $\exists x [F(x) \rightarrow [R(x) \wedge C(x)]]$