免費詳解 / 交大 / 數學 / 104

104 交大資工所考古題解答|數學逐題詳解

104 交大資工所數學考古題的逐題詳解,共 9 題,免費公開。

逐題詳解

116 分((a)–(d) 各 4)

Answer each problem below briefly. (4 points each) Suffice it to write down the solutions; no computations are required.

(a) Given the premises \(\forall x\forall y\,(P(x,y)\to Q(x,y))\) and \(\forall x\forall y\forall z\,(P(x,y)\wedge Q(y,z)\to Q(x,z))\). What is the weakest condition for \(Q(a,b)\) to be true? That is, write down the weakest formula \(F\ (\ne Q(a,b))\) such that \(F\to Q(a,b)\) is a logical consequence of the premises.

(b) For each pair of sets below, determine if \(|A|\lt|B|\), \(|A|=|B|\), or \(|A|\gt|B|\). (N.B. \(\mathbf N\) is the set of natural numbers.) 1) \(A\) = the set of all computable functions from \(\mathbf N\) to \(\mathbf N\); \(B\) = the set of all uncomputable functions from \(\mathbf N\) to \(\mathbf N\). 2) \(A\) = the set of all C++ programs that terminate; \(B\) = the set of all C++ programs that don't terminate.

(c) Consider the following primality testing algorithm based on Fermat's little theorem

function FermatPrimalityTest(n, k)
  for i = 1 to k do
    generate an integer b in the interval (1, n-1] uniformly at random
    if b^(n-1) ≢ 1 (mod n) then return false
  return true

Given the smallest Carmichael number \(561=3\cdot11\cdot17\), what is the probability that the call FermatPrimalityTest(561,1) returns true?

(d) Find all solutions, if any, to the system of congruences \(2x\equiv4\pmod 8\),\(x\equiv6\pmod9\).

(a) 能推出 \(Q(a,b)\) 的充分條件有兩種:

① 前提 1:\(P(a,b)\to Q(a,b)\);② 前提 2:\(\exists y\,[P(a,y)\wedge Q(y,b)]\to Q(a,b)\)

把兩個充分條件 OR 起來(\(Q(a,b)\) 本身不算):

\(F=P(a,b)\ \vee\ \exists y\,[P(a,y)\wedge Q(y,b)]\)

其他條件(例如 \(\exists x\,[P(a,x)\wedge P(x,b)]\))因為 \(P\to Q\) 已被這兩項涵蓋;每個 disjunct 都是充分條件,OR 起來比任何一個都弱

(b) 1) 每個 computable function 對應一支程式(有限字串),全體可數,\(|A|=\aleph_0\);全體 \(\mathbf N\to\mathbf N\) 有 \(2^{\aleph_0}\) 個,扣掉可數個仍是 \(2^{\aleph_0}\)

1) \(|A|\lt|B|\)

2) C++ 程式是有限字串,全體可數;會停的與不會停的各自都有無窮多支,都是 countably infinite

2) \(|A|=|B|\)

(c) \(k=1\),\(b\) 取自 \((1,560]\) 的整數 \(2,\ldots,560\),共 559 個,機率相同

561 是 Carmichael number:\(\gcd(b,561)=1\) 時 \(b^{560}\equiv1\pmod{561}\),回傳 true;\(\gcd(b,561)=d\gt1\) 時 \(b^{560}\equiv1\) 會逼出 \(d\mid1\),不可能

與 561 互質的 \(b\):\(\varphi(561)=2\cdot10\cdot16=320\),其中 \(b=1\) 不在取值範圍,剩 319 個

\(\dfrac{319}{559}\)

(d) \(\gcd(2,8)=2\mid4\),兩邊除以 2:\(x\equiv2\pmod4\)

與 \(x\equiv6\pmod9\) 合併,\(\gcd(4,9)=1\),CRT 模 36;\(x\equiv6\pmod9\) 的數 \(6,15,24,33\) 中只有 6 滿足 \(x\equiv2\pmod4\)

\(x\equiv6\pmod{36}\)

29 分((a) 4、(b) 5)

(a) (4 points) Give a recursive definition of the set \(S\) of odd integers.

(b) (5 points) Prove by induction that for all \(n\in\mathbf Z\), \(2n+1\in S\), where \(\mathbf Z\) is the set of integers.

(a) 要的是全體奇整數(含負數),兩個方向的規則都要給

Basis:\(1\in S\)

Recursive step:若 \(x\in S\),則 \(x+2\in S\) 且 \(x-2\in S\)

(b) 對所有 \(n\in\mathbf Z\) 證 \(2n+1\in S\),\(n\) 可正可負,從 \(n=0\) 往兩邊推

Basis:\(n=0\),\(2\cdot0+1=1\in S\)

往正向:設 \(2k+1\in S\)(\(k\ge0\)),則 \(2(k+1)+1=(2k+1)+2\in S\)

往負向:設 \(2k+1\in S\)(\(k\le0\)),則 \(2(k-1)+1=(2k+1)-2\in S\)

兩個方向從 \(n=0\) 各自遞推,涵蓋所有整數 \(n\),得證

39 分(各 3)

In the following questions, just give the answer, do not give any explanation.

(a) (3 points) A computer randomly prints three-digit codes, with no repeated digits in any code (for example, 387, 072, 760). What is the minimum number of codes that must be printed in order to guarantee that at least five of the codes are identical?

(b) (3 points) What is the largest value of \(n\) for which \(K_n\) (a complete graph on \(n\) vertices) is planar?

(c) (3 points) If the permutations of 1,2,3,4,5,6 are written in lexicographic order, with 123456 in position #1, 123465 in position #2, etc., find the permutation in position #484.

(a) 三位、數字不重複的 code 共 \(10\cdot9\cdot8=720\) 種

鴿籠原理:每種各出現 4 次共 \(4\cdot720=2880\) 個時,仍可能沒有任何一種出現 5 次;再多印一個就一定有

2881

(b) planar simple graph 要滿足 \(e\le3v-6\);\(K_5\):\(e=10\gt3\cdot5-6=9\),不是 planar;\(K_4\) 可以畫成平面圖

\(n=4\)

(c) 位置 484,前面有 483 個。首位固定後各有 \(5!=120\) 個:\(483=4\cdot120+3\) → 第 1 位是第 5 小的數 5,剩 \(\{1,2,3,4,6\}\)

\(3=0\cdot24+3\) → 第 2 位取 1,剩 \(\{2,3,4,6\}\);\(3=0\cdot6+3\) → 第 3 位取 2,剩 \(\{3,4,6\}\)

\(3=1\cdot2+1\) → 第 4 位取 4,剩 \(\{3,6\}\);\(1=1\cdot1+0\) → 第 5 位取 6,最後 3

512463

416 分(各 4)

In the following questions, just give the answer, do not give any explanation.

(a) (4 points) \(a_n\) = the number of bit strings of length \(n\) with an even number of 0s. Describe the sequence recursively. Include initial condition and assume that the sequence begins with \(a_1\).

(b) (4 points) Find the number of ways in which nine identical blocks can be given to four children, if the oldest child gets at most three blocks.

(c) (4 points) Suppose \(A\) is a set with \(n\) symbols, \(|A|=n\). Find the number of symmetric binary relations on \(A\).

(d) (4 points) How many non-isomorphic simple undirected graphs with 5 vertices and 3 edges?

(a) 長度 \(n-1\) 的字串中 0 的個數為偶數的有 \(a_{n-1}\) 個、為奇數的有 \(2^{n-1}-a_{n-1}\) 個;前者後面補 1、後者後面補 0,都得到 0 的個數為偶數的長度 \(n\) 字串

\(a_n=a_{n-1}+(2^{n-1}-a_{n-1})=2^{n-1}\),代入 \(a_{n-1}=2^{n-2}\),可寫成 \(a_n=2a_{n-1}\)

\(a_n=2a_{n-1}\ (n\ge2),\ \ a_1=1\)

\(a_1=1\):長度 1 只有「1」含偶數個(0 個)0;\(a_2=2\):11、00

(b) \(x_1+x_2+x_3+x_4=9\),\(x_i\ge0\),最大的小孩 \(x_4\le3\)

無限制:\(\binom{12}{3}=220\);扣掉 \(x_4\ge4\) 的:令 \(x_4'=x_4-4\),總和 5,\(\binom{8}{3}=56\)

\(220-56=164\)

(c) symmetric relation = 對稱的 \(n\times n\) 0/1 矩陣:對角線 \(n\) 格加上上三角 \(\binom n2\) 格可自由選

\(2^{\,n+\binom n2}=2^{\,n(n+1)/2}\)

(d) 3 條邊 5 個點,degree 總和 6,三條邊不能兩兩不相鄰(需要 6 個點)

圖degree sequence
\(K_3\) 加 2 個孤立點2,2,2,0,0
\(P_4\) 加 1 個孤立點2,2,1,1,0
\(K_{1,3}\) 加 1 個孤立點3,1,1,1,0
\(P_3\) 加一條不相鄰的邊2,1,1,1,1

4 種

58 分(各 2)

Let \(A\) be an \(m\times n\) matrix, \(\mathbf x\in\mathcal R^n\) denote a vector, and \(L(\mathbf x)=A\mathbf x\) be a linear transformation. row(\(A\)), col(\(A\)), and N(\(A\)) respectively represent the row space, the column space, and the null space of \(A\). rank(\(A\)) and nullity(\(A\)) respectively represent the rank and nullity of \(A\). kernel(\(L\)) and range(\(L\)) respectively represent the kernel and the range of \(L\). If \(V\) is a vector space/subspace, dim(\(V\)) denotes the dimension of \(V\). Consider the following statements:

(A) row(\(A\)) \(=\mathcal R^n\). (B) col(\(A\)) \(=\mathcal R^m\). (C) dim(col(\(A\))) \(\lt m\). (D) \(A\mathbf x=\mathbf 0\) has infinite solutions. (E) \(A\mathbf x=\mathbf 0\) has exactly one solution. (F) \(A\mathbf x=\mathbf 0\) has no solutions. (G) \(A\mathbf x=\mathbf 0\) is an inconsistent system. (H) \(A\mathbf x=\mathbf 0\) is a consistent system. (I) N(\(A\)) \(=\emptyset\). (J) rank(\(A\)) \(=m\). (K) nullity(\(A\)) \(=m\). (L) kernel(\(L\)) \(=\mathcal R^n\). (M) range(\(L\)) \(\subseteq\mathcal R^m\). (N) \(AA^T\) is not symmetric.

(a) (2 points) Which statements are always false? (b) (2 points) Which statements are always true? (c) (2 points) Which statements are equivalent to the statement (B)? (d) (2 points) What does the statement (L) imply about \(L\)?

(a) \(A\mathbf x=\mathbf 0\) 永遠有 \(\mathbf x=\mathbf 0\) 這個解:(F) 無解、(G) inconsistent 恆為 F;\(N(A)\) 至少含 \(\mathbf 0\),(I) 恆為 F;\((AA^T)^T=AA^T\) 永遠 symmetric,(N) 恆為 F

(F), (G), (I), (N)

(b) (H) homogeneous system 恆 consistent;(M) \(L(\mathbf x)=A\mathbf x\) 是 \(\mathcal R^m\) 中的向量,range \(\subseteq\mathcal R^m\) 無條件成立

(H), (M)

(c) col(\(A\)) 是 \(\mathcal R^m\) 的 subspace,\(\dim\operatorname{col}(A)=\operatorname{rank}(A)\);subspace 等於整個空間 ⇔ 維度相同

(J):\(\operatorname{col}(A)=\mathcal R^m\iff\operatorname{rank}(A)=m\)

(d) \(\ker(L)=\mathcal R^n\):每個 \(\mathbf x\) 都有 \(L(\mathbf x)=\mathbf 0\),所以 \(A=O\)

\(L\) 是 zero transformation:\(\operatorname{range}(L)=\{\mathbf 0\}\),\(\operatorname{rank}(A)=0\),\(\operatorname{nullity}(A)=n\)

65 分

Assume \(A\), \(B\), and \(C\) are respectively \(m\times p\), \(p\times q\), and \(q\times n\) matrices, and \(M=ABC\). Let \(M^{kl}=\mathbf a_k\mathbf c^l\) for \(1\le k\le p\) and \(1\le l\le q\), here \(\mathbf a_k\) and \(\mathbf c^l\) respectively denote the \(k\)-th column vector of \(A\) and the \(l\)-th row vector of \(C\). Prove that \(M=\sum_{k=1}^p\sum_{l=1}^qb_{kl}M^{kl}\).

\(\mathbf a_k\) 是 \(m\times1\),\(\mathbf c^l\) 是 \(1\times n\),\(M^{kl}\) 是 \(m\times n\),\((i,j)\) 項 \((M^{kl})_{ij}=(\mathbf a_k)_i(\mathbf c^l)_j=A_{ik}C_{lj}\)

展開 \(M=ABC\) 的 \((i,j)\) 項:

\(M_{ij}=\sum_{k=1}^p\sum_{l=1}^qA_{ik}\,b_{kl}\,C_{lj}=\sum_{k=1}^p\sum_{l=1}^qb_{kl}\,A_{ik}C_{lj}=\sum_{k=1}^p\sum_{l=1}^qb_{kl}\,(M^{kl})_{ij}\)

對每一組 \((i,j)\) 都成立,故 \(M=\sum_{k=1}^p\sum_{l=1}^qb_{kl}M^{kl}\),得證

712 分(各 4)

Let \(L:\mathcal R^2\to\mathcal R^3\) be a linear transformation. Assume \(L\!\begin{pmatrix}1\\2\end{pmatrix}=\begin{bmatrix}3\\0\\1\end{bmatrix}\) and \(L\!\begin{pmatrix}2\\3\end{pmatrix}=\begin{bmatrix}5\\1\\3\end{bmatrix}\). In addition, \(B_1=\left\{\begin{bmatrix}1\\2\end{bmatrix},\begin{bmatrix}2\\3\end{bmatrix}\right\}\) is an ordered basis of \(\mathcal R^2\), and \(B_2=\left\{\begin{bmatrix}1\\0\\0\end{bmatrix},\begin{bmatrix}0\\1\\0\end{bmatrix},\begin{bmatrix}0\\0\\1\end{bmatrix}\right\}\) and \(B_3=\left\{\begin{bmatrix}1\\0\\0\end{bmatrix},\begin{bmatrix}5\\1\\3\end{bmatrix},\begin{bmatrix}3\\0\\1\end{bmatrix}\right\}\) are ordered bases of \(\mathcal R^3\).

(a) (4 points) Find the matrix representation of \(L\) with respect to the bases \(B_1\) and \(B_3\). (b) (4 points) Find the (coordinate) transition matrix from the basis \(B_2\) to the basis \(B_3\). (c) (4 points) Solve \(L\!\begin{pmatrix}1\\0\end{pmatrix}\) and \(L\!\begin{pmatrix}0\\1\end{pmatrix}\).

記 \(\mathbf v_1=(1,2)^T,\ \mathbf v_2=(2,3)^T\),\(L(\mathbf v_1)=(3,0,1)^T,\ L(\mathbf v_2)=(5,1,3)^T\)

(a) \(L(\mathbf v_1)\) 正好是 \(B_3\) 的第 3 個向量,\(L(\mathbf v_2)\) 正好是第 2 個

\([L(\mathbf v_1)]_{B_3}=(0,0,1)^T,\ [L(\mathbf v_2)]_{B_3}=(0,1,0)^T\)

\([L]_{B_1}^{B_3}=\begin{bmatrix}0&0\\0&1\\1&0\end{bmatrix}\)

(b) \(B_2\) 是 standard basis,\([\mathbf x]_{B_2}=\mathbf x\)。\(B_3\) 的向量並排成 \(P=\begin{bmatrix}1&5&3\\0&1&0\\0&3&1\end{bmatrix}\),\(\mathbf x=P[\mathbf x]_{B_3}\),所以 \([\mathbf x]_{B_3}=P^{-1}[\mathbf x]_{B_2}\);\(\det P=1\)

\(P^{-1}=\begin{bmatrix}1&4&-3\\0&1&0\\0&-3&1\end{bmatrix}\)

驗:\(P\,P^{-1}\) 第 1 列 \((1,5,3)\) 與第 2 欄 \((4,1,-3)\) 內積 \(4+5-9=0\)

(c) 把 standard basis 用 \(B_1\) 表示:\((1,0)^T=-3\mathbf v_1+2\mathbf v_2\),\((0,1)^T=2\mathbf v_1-\mathbf v_2\)

\(L(1,0)^T=-3(3,0,1)+2(5,1,3)=(1,2,3)\);\(L(0,1)^T=2(3,0,1)-(5,1,3)=(1,-1,-1)\)

\(L\!\begin{pmatrix}1\\0\end{pmatrix}=\begin{bmatrix}1\\2\\3\end{bmatrix},\ \ L\!\begin{pmatrix}0\\1\end{pmatrix}=\begin{bmatrix}1\\-1\\-1\end{bmatrix}\)

810 分

If \(A\) is a real symmetric matrix, find a matrix \(V\) such that \(VAV^T=I\). You need to prove your answer is correct.

\(A\) real symmetric,spectral theorem:存在 orthogonal \(Q\)(\(Q^TQ=QQ^T=I\))與 \(D=\operatorname{diag}(\lambda_1,\ldots,\lambda_n)\),使 \(A=QDQ^T\)

取 \(D^{-1/2}=\operatorname{diag}(\lambda_1^{-1/2},\ldots,\lambda_n^{-1/2})\),令 \(V=D^{-1/2}Q^T\)

驗證(\(D^{-1/2}\) 是 diagonal,\((D^{-1/2})^T=D^{-1/2}\)):

\(VAV^T=D^{-1/2}Q^T\,(QDQ^T)\,QD^{-1/2}=D^{-1/2}\,D\,D^{-1/2}=I\)

\(V=D^{-1/2}Q^T\)

\(V\) 存在的條件是所有 \(\lambda_i\gt0\),即 \(A\) positive definite

只給 real symmetric 不夠:\(A\mapsto VAV^T\) 保持 signature,\(I\) 的 eigenvalue 全正,所以 \(A\) 有 0 或負的 eigenvalue 就無解;例如 \(A=\operatorname{diag}(1,0)\) 是 singular,\(VAV^T\) 也是 singular,不可能等於 \(I\)

915 分((a) 9、(b) 6)

The inner product of the vector space \(C[-1,1]\) is defined as \(\langle f,g\rangle=\int_{-1}^1f(x)g(x)\,dx\).

(a) (9 points) Find an orthonormal basis for the subspace spanned by \(1,x\), and \(x^2\). (b) (6 points) Find the best quadratic least squares approximation to \(e^x\) on \([-1,1]\).

(a) Gram–Schmidt 對 \(1,x,x^2\)

\(u_1=1\),\(\|u_1\|^2=\int_{-1}^11\,dx=2\)

\(\langle x,1\rangle=0\),所以 \(u_2=x\),\(\|u_2\|^2=\int_{-1}^1x^2dx=\tfrac23\)

\(\langle x^2,1\rangle=\tfrac23,\ \langle x^2,x\rangle=0\) → \(u_3=x^2-\dfrac{2/3}{2}\cdot1=x^2-\tfrac13\)

\(\|u_3\|^2=\int_{-1}^1\left(x^4-\tfrac23x^2+\tfrac19\right)dx=\tfrac25-\tfrac49+\tfrac29=\tfrac{8}{45}\)

各自除以長度:

\(\left\{\dfrac1{\sqrt2},\ \ \sqrt{\dfrac32}\,x,\ \ \dfrac{3\sqrt{10}}{4}\left(x^2-\dfrac13\right)\right\}\)

(b) 最佳近似 = \(e^x\) 在 \(\operatorname{span}\{1,x,x^2\}\) 上的正交投影,用 \(1,\ x,\ x^2-\tfrac13\)(正交)展開

\(\int_{-1}^1e^xdx=e-e^{-1}\);\(\int_{-1}^1xe^xdx=[xe^x-e^x]_{-1}^1=2e^{-1}\);\(\int_{-1}^1x^2e^xdx=[e^x(x^2-2x+2)]_{-1}^1=e-5e^{-1}\)

係數 \(\langle e^x,u_i\rangle/\|u_i\|^2\):

\(1\):\(\dfrac{e-e^{-1}}{2}\);\(x\):\(\dfrac{2e^{-1}}{2/3}=3e^{-1}\)

\(x^2-\tfrac13\):\(\langle e^x,x^2-\tfrac13\rangle=(e-5e^{-1})-\tfrac13(e-e^{-1})=\tfrac23(e-7e^{-1})\),除以 \(\tfrac8{45}\) 得 \(\dfrac{15}{4}(e-7e^{-1})\)

\(p(x)=\dfrac{e-e^{-1}}{2}+3e^{-1}x+\dfrac{15}{4}\,(e-7e^{-1})\left(x^2-\dfrac13\right)\approx0.5367x^2+1.1036x+0.9963\)

109–115 的詳解也是這樣寫的。

國立陽明交通大學 109–115 的詳解收錄在付費版;106–115 全年度完整詳解共 579 頁,逐題推導。

購買 · NT$ 850 看交大其他免費詳解

其他年度與考科

同一年的其他科

同一科的其他年度

聯絡我們

題目有錯、詳解看不懂,都歡迎來信

想許願補哪一份、對購買有疑問也可以,收到後會盡快回覆。

william.chou.123123@gmail.com