SchoolWork-LaTeX/离散数学/平时作业/第二周作业.tex

201 lines
8.0 KiB
TeX
Raw Normal View History

2024-09-02 17:47:53 +08:00
\documentclass[全部作业]{subfiles}
\usepackage{mylatex}
\pagestyle{fancy}
\fancyhead{}
\fancyhead[C]{\mysignature}
\setcounter{chapter}{1}
\setcounter{section}{2}
\begin{document}
\section{集合运算的性质}
\begin{enumerate}
\item[9.] \ExplSyntaxOn
\begin{zhongwen}
$设A、B、C是集合证明下列结论$
\end{zhongwen}
\ExplSyntaxOff
\begin{enumerate}
\item[(3)] \ExplSyntaxOn
\begin{zhongwen}
$若A\cap B=\varnothing则A-B=A$
\end{zhongwen}
\ExplSyntaxOff
\begin{proof}
\ExplSyntaxOn
\begin{zhongwen}
$$
\begin{aligned}
&\because A\cap B=\varnothing\\
&\therefore \forall x \in A \implies x\notin B\\
&\therefore \forall x \in A\implies x\in \bar{B}\\
&\therefore A \subseteq \bar{B}\\
&\therefore A\cap \bar{B}=A\\
&\therefore A-B=A\\
\end{aligned}
$$
\end{zhongwen}
\ExplSyntaxOff
\end{proof}
\end{enumerate}
\item[11.] \ExplSyntaxOn
\begin{zhongwen}
$指出下列集合等式成立的充分必要条件其中A、B和C是集合$
\end{zhongwen}
\ExplSyntaxOff
\begin{enumerate}
\item[(5)] $(A-B)\cap (A-C)=\varnothing$
$$
\begin{aligned}
&(A-B)\cap (A-C)=A\cap \bar{B}\cap A \cap \bar{C}=A\cap \bar{B}\cap \bar{C}=A-B-C=\varnothing\\
&\iff A-B-C=\varnothing\\
\end{aligned}
$$
\end{enumerate}
\item[13.] \ExplSyntaxOn
\begin{zhongwen}
$设A和B是集合集合运算对称差\oplus 定义如下A\oplus B=(A-B)\cup (B-A).\\证明下列恒等式其中A、B和C是任意集合$
\end{zhongwen}
\ExplSyntaxOff
\begin{enumerate}
\item[(5)] $A\oplus B=(A\cup B)-(A\cap B)$
\begin{proof}
\ExplSyntaxOn
\begin{zhongwen}
$$
\begin{aligned}
(A\cup B)-(A\cap B) & = (A\cup B)\cap \overline{A\cap B} \\
& = (A\cup B)\cap (\bar{A}\cup \bar{B}) \\
& = ((A\cup B)\cap \bar{A})\cup ((A\cup B)\cap \bar{B}) \\
& = (B\cap \bar{A})\cup (A\cap \bar{B}) \\
& = (A-B)\cup (B-A) \\
& = A\oplus B \\
\end{aligned}
$$
\end{zhongwen}
\ExplSyntaxOff
\end{proof}
\end{enumerate}
\item[21.] \textit{设A、B、C和D是任意集合.请证明:}
\begin{enumerate}
\item $(A\times C)\cap (B\times D)=(A\cap B)\times (C\cap D)$
\begin{proof}
\ExplSyntaxOn
\begin{zhongwen}
$$
\begin{aligned}
\forall (x,y), \quad&(x,y)\in (A\times C)\cap (B\times D)\\
\iff &(x,y)\in (A\times C)且(x,y)\in (B\times D)\\
\iff &x\in A,y\in C且x\in B,y\in D\\
\iff &x\in A\cap B且y\in C\cap D\\
\iff &(x,y)\in (A\cap B)\times (C\cap D)\\
\therefore \quad&(A\times C)\cap (B\times D)=(A\cap B)\times (C\cap D)\\
\end{aligned}
$$
\end{zhongwen}
\ExplSyntaxOff
\end{proof}
\end{enumerate}
\item[22.] \textit{$\{ A_\beta|\beta\in B \}$是以B为下标集的集合族.证明下列恒等式.}
\begin{enumerate}
\item $\overline{\displaystyle \bigcup_{\beta\in B} A_\beta}=\displaystyle \bigcap_{\beta\in B} \overline{A_\beta}$
\begin{proof}
% \ExplSyntaxOn
\begin{zhongwen}
$$
\begin{aligned}
\forall x, \quad&x\in \overline{\bigcup_{\beta\in B}A_\beta}\\
\iff& x\notin \bigcup_{\beta\in B} A_\beta\\
\iff&\lnot (\exists \beta\in B, x\in A_\beta)\\
\iff&\forall \beta\in B, x\notin A_\beta\\
\iff&\forall \beta\in B, x\in \overline{A_\beta}\\
\iff&x\in \bigcap_{\beta\in B} \overline{A_\beta}\\
\therefore \quad&\overline{\bigcup_{\beta\in B} A_\beta}=\bigcap_{\beta\in B} \overline{A_\beta}\\
\end{aligned}
$$
\end{zhongwen}
% \ExplSyntaxOff
\end{proof}
\end{enumerate}
\item[24.] \textit{设集合族$\{A_n|n\in \mathbb{N}\}$,令$B_0=A_0$$B_n=A_n-\displaystyle \bigcup_{k=0}^{n-1} A_k(n>0) $.证明:}
\begin{enumerate}
\item[(2)] $\displaystyle\bigcup_{ n\in \mathbb{N}} A_n =\displaystyle \bigcup_{n\in \mathbb{N}} B_n$
\begin{proof}
\begin{zhongwen}
$$
\begin{aligned}
&\because B_n=A_n-\displaystyle \bigcup_{k=0}^{n-1}A_k(n>0)\\
&\therefore \forall n>0, B_n\in A_n\\
&\forall x\in \bigcup_{n\in \mathbb{N}} B_n \iff\exists n_0\in \mathbb{N},x\in B_{n_0}\implies x\in A_{n_0}\\
&\therefore \displaystyle \bigcup_{n\in \mathbb{N}}A_n\supseteq \bigcup_{n\in \mathbb{N}} B_n \\
&\forall x\in \displaystyle \bigcup_{n\in \mathbb{N}} A_n, 则 \exists n\in \mathbb{N},x\in A_{n} \\
&设C_x=\{ n|x\in A_n \} \\
&设n_1=\min{C_x} \\
&则x\in A_{n_1}\forall n_2<n_1,x\notin A_{n_2} \\
&\therefore x\notin \displaystyle \bigcup_{k=0}^{n_1-1}A_k \\
&\therefore x\in A_{n_1}-\bigcup_{k=0}^{n_1-1}A_k \\
&\therefore x\in B_{n_1} \\
&\therefore x\in \displaystyle \bigcup_{n\in \mathbb{N}} B_n \\
&\therefore \bigcup_{n\in \mathbb{N}}A_n \subseteq \bigcup_{n\in \mathbb{N}} B_n \\
&\therefore \bigcup_{n\in \mathbb{N}} A_n =\bigcup_{n\in \mathbb{N}} B_n \\
\end{aligned}
$$
\end{zhongwen}
\end{proof}
\end{enumerate}
\end{enumerate}
\section{有限集合的计数}
\begin{enumerate}
\item[26.] \textit{以1开头或者以00结束的不同的字节8位的二进制串有多少个}
\begin{zhongwen}
$$
\begin{aligned}
&设A为以1开头的不同的字节B为以00结束的不同的字节。 \\
&\left\vert 以1开头或者以00结束的不同的字节 \right\vert =\left\vert A\cup B \right\vert =\left\vert A \right\vert +\left\vert B \right\vert -\left\vert A\cap B \right\vert =2^{7}+2^{6}-2^{5} = 160 \\
\end{aligned}
$$
\end{zhongwen}
\item[27.] \begin{zhongwen}
$1\sim 200的正整数中,$
\end{zhongwen}
\begin{enumerate}
\item[(3)] \begin{zhongwen}
$含因子35,但不同时含因子35的正整数共有多少个?$
\end{zhongwen}
\begin{zhongwen}
$$
\begin{aligned}
&设A为1\sim 200中含因子3的正整数B为1\sim 200中含因子5的正整数 \\
&\left\vert 在1\sim 200的正整数中 含因子3或5但不同时含因子3和5的正整数 \right\vert \\
&= \left\vert A\oplus B \right\vert =\left\vert A \right\vert +\left\vert B \right\vert -2\left\vert A\cap B \right\vert =66+40-2*13 = 80 \\
\end{aligned}
$$
\end{zhongwen}
*用JavaScript再验证一下
\begin{minted}{javascript}
> a =[]
[]
> for (let i = 1; i<=200; i++){
... a.push(i);
... }
> a.reduce((out, cur) => {
... if ((cur%3==0 || cur%5==0) && cur%15!=0) out.push(cur);
... return out;
... }, Array()).length
80
\end{minted}
\item[(5)] \begin{zhongwen}
$15互素的正整数(即与15之间的最大公因子为1的那些正整数)共有多少个?$
\end{zhongwen}
\begin{zhongwen}
$$
\begin{aligned}
&A与B的定义和上题相同 \\
&\left\vert 在1\sim 200的正整数中与15互素的正整数 \right\vert \\
&=\left\vert 1\sim 200的正整数 \right\vert -\left\vert A\cup B \right\vert \\
&=200-(\left\vert A \right\vert +\left\vert B \right\vert -\left\vert A\cap B \right\vert )=200-(66+40-13) = 107 \\
\end{aligned}
$$
\end{zhongwen}
\end{enumerate}
\end{enumerate}
\end{document}