CS 381 Test



October 19, 2002



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



(a) $\neg[\neg P \vee [Q \wedge R ]] \Leftrightarrow P \wedge
[ \hspace*{0.1cm} \fr...
...]{$\neg Q$\ }\hspace*{0.1cm}
\framebox [1.0in]{$\vee$\ }\hspace*{0.1cm} \neg R$ ]
(b) $[ P \rightarrow Q ] \rightarrow Q \Leftrightarrow [P
\hspace*{0.1cm} \framebox...
...{$\wedge$}\hspace*{0.1cm} \framebox [1.0in] {$\neg Q$}\hspace*{0.1cm}
] \vee Q$
$\Leftrightarrow [P \vee Q ] \wedge [ \neg Q \vee \hspace*{0.1cm} \framebox [1.0in] {$Q$}\hspace*{0.1cm} ]$
$\Leftrightarrow [P \vee Q ] \wedge \hspace*{0.1cm} \framebox [1.0in] {True}\hspace*{0.1cm}
]$
(c) $\neg[[ P \wedge Q ] \rightarrow R ] \Leftrightarrow
[ P \wedge Q ] \wedge \hspace*{0.1cm} \framebox [1.0in]{$\neg R$\ }\hspace*{0.1cm}$
(d) $P \vee [Q \wedge R ] \Leftrightarrow [P \vee Q ]
\hspace*{0.1cm} \framebox [1....
...hspace*{0.1cm} [ P \hspace*{0.1cm}
\framebox [1.0in]{$\vee $}\hspace*{0.1cm} R $]
(e) $ [P \rightarrow Q ] \wedge \neg Q \Rightarrow \hspace*{0.1cm} \framebox [1.0in]{$\neg Q $}$



2. Negate each of the propositions given below in English. Give a form other than simply putting $\neg$ in front. [15]



(a) Every number is larger than or equal to some number.
Negation: Some number is smaller than every number.
(b) There is a number which is greater than or equal to every other number.
Negation: Every number is smaller than some number.
(c) If some number is greater than or equal to some other number then there is a number which is less than or equal to some number.
Negation: Some number is greater than or equal to some other number and every number is greater than every number.



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



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


(a) Not everyone likes a red car.
$\neg \forall x \forall y [[P(x) \wedge C(y) \wedge R(y)] \rightarrow L(x,y)]$
(b) Someone likes a car only if it is red.
$\exists x \forall y [[P(x) \wedge C(y) \wedge L(x,y)] \rightarrow R(y)]$
(c) Someone likes all cars.
$\exists x \forall y [[P(x) \wedge C(y)] \rightarrow L(x,y)]$
or $\exists x [P(x) \wedge \forall y [C(y) \rightarrow L(x,y)]] $

4. State each of the following formulas in English , if it is a wff. If it is not a wff, then give a reas on why it is not a wff. Here the universe is the set of integers, $P(x)$ means $x$ is even and $Q(x,y)$ means $x$ is divisible by $y$. [15]



(a) $\forall x \exists y Q(x,y)$
Every integer is divisible by some integer.
(b) $\neg P(5)$
5 is not even.
(c) $\forall x [ P(x) \rightarrow \exists y Q(x,y)]$
Every even integer is divisible by some integer.
(d) $P(\forall x ) \wedge \exists \forall y Q(x,y)$
Not a wff because quantifiers can not be an argument of a predicate.
(e) $Q( P(x), y) \wedge P(x)$
Not a wff because predicates can not be an argument of a predicate.



5. Indicate which of the following statements are true and which are false. [16]



(a) $\{ 1, 2, 3 \} = \{ 1, 3, 1, 2 \}$
True
(b) $\{ 2, \{ 3 \}, \{\emptyset \} \} = \{ 2, 3, \{\emptyset \} \} $
False
(c) $\{ x \} \subseteq \{ x \}$
True
(d) $\{ \emptyset \} \subseteq \{ \{ \emptyset \} \} $
False
(e) $ \emptyset \in \{ \emptyset , \{ \emptyset \} \} $
True
(f) $\emptyset \times \{ \emptyset , \{ 1 \} \} = \{ < \emptyset , \emptyset >,
< \emptyset , \{ 1 \} > \} $
False
(g) $\{ 1, 2 \} \times \{ 3 \} = \{ < 3, 1 >, <3, 2> \} $
False
(h) Power set of $\{ \emptyset , \{ \emptyset \} \} $ is $ \{ \emptyset , \{ 1 \},
\{ \emptyset \}, \{ 1, \{ \emptyset \} \} $.
False

6 (a) Express the argument given below using the symbol suggested for each proposition. [5]
(b) Check whether or not the reasoning is correct using inference rules on the wffs (symbolic form) of (a). No credit will be given if your reasoning is not in symbolic form. [9]



If it is sunny (S), then I am happy (H). If it is noisy (N), then I don't rest well (R). Either I am not happy or it is noisy. But I am well rested. Therefore it is sunny.



(a) $S \rightarrow H$
$N \rightarrow R$
$\neg H \vee N$
$\neg R$
-----------------
$S$



(b) $N \rightarrow R$
$\neg R$
---------
$\neg N$
$\neg H \vee N$
---------
$\neg H$
$S \rightarrow H$
---------
$\neg S$
This contradicts $S$ of the conclusion of the argument.
Hence the argument is not correct.



7. Prove that for any sets $A$ and $B$, $A - (A-B) = A \cap B$ holds. [10]



$A - (A - B) = A \cap \overline{(A - B)}$
= $ A \cap \overline{(A \cap \overline{B})}$ = $ A \cap (\overline{A} \cup B)$
= $ (A \cap \overline{A} ) \cup (A \cap B)$ = $ \emptyset \cup (A \cap B)$
= $ A \cap B$.