Solutions to CS 381 Test



October, 2003



1. Fill in the blanks with the SHORTEST string of characters so that the resultant proposition is valid. [20]



(a) $\neg (P \rightarrow ( P \wedge Q))$ $\Leftrightarrow$ $P \hspace*{0.3cm} \framebox [1.0in]{$\wedge$}\hspace*{0.3cm}
\neg ( P \wedge Q )$
$\Leftrightarrow$ $P \wedge ( \neg P \hspace*{0.3cm} \framebox [1.0in]{$\vee$}\hspace*{0.3cm}
\neg Q )$
$\Leftrightarrow$ $P \wedge \hspace*{0.3cm} \framebox [1.0in]{$\neg Q$}\hspace*{0.3cm}$


(b) $(P \rightarrow Q ) \wedge ( P \rightarrow \neg Q ) $ $\Leftrightarrow$ $ \neg P \vee \hspace*{0.3cm} \framebox [1.0in]{$Q$}\hspace*{0.3cm}) \wedge
( \neg P \vee \hspace*{0.3cm} \framebox [1.0in]{$\neg Q$}\hspace*{0.3cm}) $
$\Leftrightarrow$ $ \neg P \vee ( Q \hspace*{0.3cm} \framebox [1.0in]{$\wedge$}\hspace*{0.3cm} \framebox [1.0in]{$\neg Q$}\hspace*{0.3cm} ) $
$\Leftrightarrow$ $ \neg P \vee \hspace*{0.3cm} \framebox [1.0in]{F}\hspace*{0.3cm} $
$\Leftrightarrow$ $ \hspace*{0.3cm} \framebox [1.0in]{$\neg P$}\hspace*{0.3cm} $


(c) $ P \rightarrow ( Q \rightarrow R )$ $\Leftrightarrow$ $( P \hspace*{0.3cm} \framebox [1.0in]{$\wedge$}\hspace*{0.3cm} Q ) \rightarrow R $



2. State each of the following formulas in English, if it is a wff. If it is not a wff, then give a reason why it is not a wff. Here $L(x,y)$ means $x$ likes $y$ and $N(x,y)$ means $x \neq y$ and the universe is the set of people: [15]



(a) $\exists x \forall y L(x,y)$
Someone likes everyone.
(b) $\forall x \exists y [N(x,y) \wedge L(x,y)]$
Everyone likes someone other than oneself.
(c) $\forall x \exists y L(x, N(x, y))$
Not wff
(d) $\forall x \exists y L(x,y) \rightarrow \exists x \forall y L(x,y)$
If everyone likes someone, then someone likes everyone.
(e) $\forall x L(x, \exists y)$
Not wff.



3 (a) Express the argument given below as propositions of propositional logic using the symbols suggested for each proposition. [8]
(b) Check whether or not the reasoning is correct using inference rules on the wffs (symbolic form) of (a). Show your reasoning (in symbolic form). [15]



Argument: If a chocolate cake is allowed by my doctor (D), then it must not be very rich ($\neg$R). Neither I like a chocolate cake (L) but it is not suitable for supper ($\neg$S), nor is a chocolate cake suitable for supper but not allowed by my doctor. A chocolate cake is very rich. Therefore I don't like a chocolate cake.



(a) $D \rightarrow \neg R$
$\neg (L \wedge \neg S) \wedge \neg (S \wedge \neg D)$
$R$
--------
$\neg L$



(b) $D \rightarrow \neg R$
$R$
--------
$\neg D$



$ \neg (L \wedge \neg S) $
$ \neg (L \wedge \neg S) \rightarrow \neg L \vee S$
--------------
$ \neg L \vee S$



$\neg (S \wedge \neg D)$
$\neg (S \wedge \neg D) \rightarrow \neg S \vee D $
--------------
$\neg S \vee D $



$\neg S \vee D $
$\neg D$
--------------
$\neg S $



$ \neg L \vee S$
$\neg S $
--------------
$\neg L$



Thus the argument is correct.



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



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



(a) Everyone likes a (any) flower if it is red.
$\forall x \forall y [[ P(x) \wedge F(y) \wedge R(y)] \rightarrow L(x,y)]$
(b) Not everyone likes a (any) flower.
$\neg \forall x \forall y [[P(x) \wedge F(y)] \rightarrow L(x,y)]$
(c) Mary likes a (some) flower.
$\exists x [F(x) \wedge L(Mary, x)]$
(d) Some person likes a (any) flower only if it is red.
$\exists x [P(x) \wedge \forall y [ [F(y) \wedge L(x,y)] \rightarrow R(y)]]$



5. Find the power set of each of the following sets: [7]



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



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



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





S. Toida
2003-10-21