---
# System prepended metadata

title: Discreate Math HW 1

---

## 1

### a)

$\neg[\forall x(-2\leq x < 5)]=\exists x\neg(-2\leq x<5)=\exists x(x\notin[-2,5))$

### b)

$\neg[\exists x(-5<x\leq -1)]=\forall x\neg(-5<x\leq -1)=\forall x(x\notin(-5,-1])$

## 2

### a)

let $S(x)$ indicates a student is in this class and $H(x)$ indicates a student can speak Hindi, 
then the statement can be expressed as

$$
\exists x (S(x)\wedge H(x))
$$

### b)

let $S(x)$ indicates a student is in this class and $P(x)$ indicates a student has at least learned one programming language, 
then the statement can be expressed as

$$
\forall x(S(x)\rightarrow P(x))
$$

### c)

let $S(x)$ indicates a student is in this class and $C(x)$ indicates a student has taken every course offered by one of the departments in this school, 
then the statement can be expressed as

$$
\exists x(S(x)\wedge C(x))
$$

### d)

let $S(x)$ indicates a student is in this class and $CH(x)$ indicates a student has chatted with at least one other student in at least one chat group,
then the statement can be expressed as

$$
\forall x(S(x)\rightarrow CH(x))
$$

## 3

7) the expression of the conjuction from $\forall xP(x)$ and $\forall xQ(x)$ are wrong, should be $\forall xP(x)\wedge \forall xQ(x)$

## 4

|$P(x)$|$Q(x)$|$R(x)$|$P(x)\vee Q(x)$|$(\neg P(x)\wedge Q(x))\rightarrow R(x)$|$(4)\vee (5)$|
|------|------|------|---------------|-------------------------------------|--|
|0|0|0|0|1|0|
|0|0|1|0|1|0|
|0|1|0|1|0|0|
|0|1|1|1|1|1|
|1|0|0|1|1|1|
|1|0|1|1|1|1|
|1|1|0|1|1|1|
|1|1|1|1|1|1|

by the statement we have already eliminated some $x$ which is out of the domain, now we check the rest of them with the requirement $\neg R(x)\rightarrow P(x)$ 

|$P(x)$|$Q(x)$|$R(x)$|$R(x)\rightarrow P(x)$|
|------|------|------|----------------------|
|0|1|1|1|
|1|0|0|1|
|1|0|1|1|
|1|1|0|1|
|1|1|1|1|

thus shows that the statement of the problem is always true

<!----------
the problem can be transfered as
$$
\begin{split}
&((P(x)\vee Q(x))\wedge ((\neg P(x)\vee Q(x))\rightarrow R(x)))\rightarrow (\neg R(x)\rightarrow P(x))\\
\implies &((P(x)\vee Q(x))\wedge ((P(x)\wedge \neg Q(x))\vee R(x)))\rightarrow (R(x)\vee P(x))\\
\implies &
\end{split}
$$
---------->
## 5

### a)
let $A(n)$ indicates that $n$ is even, $B(n)$ indicates that $3\times n+2$ is even,
the statement can be expressed as
$$
B(n)\rightarrow A(n)
$$

the contrapositive is 
$$
\neg A(n) \rightarrow \neg B(n)
$$
which is always true since when $n$ is odd, $3\times n+2$ is also odd, thus proving that when $3\times n+2$ is even, $n$ is also even (i.e. $B(n)\rightarrow A(n)$ is always true) 

### b)
let $A(n)$ indicates that $n$ is even, $B(n)$ indicates that $3\times n+2$ is even,
to prove the statement by contradiction,we have to find a counter example of
$$
\begin{split}
\forall n\in \mathbb{N}, &\neg(B(n)\rightarrow A(n))\\
= &\neg(\neg B(n)\vee A(n))\\
= &\neg A(n)\wedge B(n)
\end{split}
$$

considering the case of $n=2$, we easily find that $3\times n +2 = 8$, which is even, making B(n) true. However, $n=2$ means that $\neg A(n)$ is false, thus further proving that the original statement $B(n)\rightarrow A(n)$ is always true


## 6

|$p$|$q$|$r$|$(p\vee q)$|$(p\wedge \neg r)$|$(p\vee q)\rightarrow (p\wedge \neg r)$|
|---|---|---|-----------|------------------|-------------------------------------|
|0|0|0|0|0|1
|0|0|1|0|0|1
|0|1|0|1|0|0
|0|1|1|1|0|0
|1|0|0|1|1|1
|1|0|1|1|0|0
|1|1|0|1|1|1
|1|1|1|1|0|0

## 7

$A\times B = \lbrace(a,b)|a\in A,b\in B\rbrace$
$C\times D = \lbrace(c,d)|c\in C,d\in D\rbrace$
$A\subseteq C, B\subseteq D \implies (a\in C)\vee (b\in D)=T$
$\implies \lbrace(a,b)|a\in A,b\in B\rbrace\subseteq C\times D$

## 8

### a)
![](https://media.discordapp.net/attachments/1161339161622630480/1215661066881728563/IMG_5147.png?ex=65fd8f98&is=65eb1a98&hm=80bfa7d3b44f222ab577ac1d2a97d4b1e907474755aa7938116a6182fc5b99f3&=&format=webp&quality=lossless&width=707&height=701 =400x400)

### b)
![](https://media.discordapp.net/attachments/1161339161622630480/1215661433103319100/IMG_5148.png?ex=65fd8fef&is=65eb1aef&hm=b4b870fcfb8d8ddec95f891582604e1cf3afa50014a7ee2d3248b81a2cbd433c&=&format=webp&quality=lossless&width=686&height=701 =400x400)

### c)
![](https://media.discordapp.net/attachments/1161339161622630480/1215661754651123792/IMG_5149.png?ex=65fd903c&is=65eb1b3c&hm=373d23671b18583b431ec61dec4ad51f6e6393faceeab336fbb77a19832fb041&=&format=webp&quality=lossless&width=699&height=701 =400x400)

pardon my drawing, I'm not really good at it

## 9

$A\oplus B=\lbrace x|(x\in A)\oplus(x\in B)\rbrace=\lbrace x|((x\in A)\vee(x\in B))\wedge \neg ((x\in A)\wedge (x\in B))\rbrace$


## 10

### a)
**True**

$$
\begin{split}
&\lbrace a,a\rbrace \cup \lbrace a,a,a\rbrace\\
=&\lbrace a\rbrace \cup \lbrace a\rbrace\\
=&\lbrace a\rbrace\\
=&\lbrace a,a,a,a,a\rbrace
\end{split}
$$
as A is an ordinary set, the number of appearance doesn't effect the content of it.

### b)
**True**
as explained in the previous solution

### c)
**True**
$$
\begin{split}
&\lbrace a,a,a\rbrace \cap \lbrace a,a\rbrace\\
=&\lbrace a\rbrace \cap \lbrace a\rbrace\\
=&\lbrace a\rbrace\\
=&\lbrace a,a\rbrace
\end{split}
$$

### d)
**True**
as explained in the previous solution

### e)
**False**
$$
\begin{split}
&\lbrace a,a,a\rbrace - \lbrace a,a\rbrace\\
=&\lbrace a\rbrace-\lbrace a\rbrace\\
=&\emptyset\\
\ne&\lbrace a\rbrace
\end{split}
$$