115 年 國立成功大學工程科學系碩士班己組《計算機數學》

📄 試題原卷 免費註冊後即可對照原始考卷 PDF免費註冊

第 1.1 題

1.1. Which of the following is the contrapositive of the statement: "If n2n^2 is an even integer, then nn is an even integer"?
(A) If nn is an even integer, then n2n^2 is an even integer.
(B) If nn is an odd integer, then n2n^2 is an odd integer.
(C) If n2n^2 is an odd integer, then nn is an odd integer.
(D) nn is even if and only if n2n^2 is even.

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查邏輯敘述的逆否命題。
原敘述為「若 P 則 Q」,即 P→QP \rightarrow Q。
其逆否命題為「若非 Q 則非 P」,即 ¬Q→¬P\neg Q \rightarrow \neg P。

原敘述:「若 n2n^2 是偶數(P),則 nn 是偶數(Q)。」
這裡的 P 是「n2n^2 是偶數」,Q 是「nn 是偶數」。

我們需要找 ¬Q→¬P\neg Q \rightarrow \neg P。
¬Q\neg Q 是「nn 不是偶數」,也就是「nn 是奇數」。
¬P\neg P 是「n2n^2 不是偶數」,也就是「n2n^2 是奇數」。

所以,逆否命題是:「若 nn 是奇數,則 n2n^2 是奇數。」

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 1.2 題

1.2. Let f:A→Bf : A \rightarrow B and g:B→Cg: B \rightarrow C be two functions. If the composite function g∘fg \circ f is an injection (one-to-one), which of the following statements must be true?
(A) gg must be an injection.
(B) ff must be an injection.
(C) Both ff and gg must be injections.
(D) gg must be a surjection.

登入後即可作答並保存紀錄。

這一題的完整詳解

核心觀念

函數 h:A→Bh:A\to B 為單射(injection),是指:

h(x1)=h(x2)⟹x1=x2h(x_1)=h(x_2)\Longrightarrow x_1=x_2

本題已知合成函數 g∘f:A→Cg\circ f:A\to C 為單射,也就是:

(g∘f)(x1)=(g∘f)(x2)⟹x1=x2(g\circ f)(x_1)=(g\circ f)(x_2)\Longrightarrow x_1=x_2

其中

(g∘f)(x)=g(f(x))(g\circ f)(x)=g(f(x))

要判斷由 g∘fg\circ f 為單射,能否推出 ff 或 gg 必為單射。


解題方法

假設 f(x1)=f(x2)f(x_1)=f(x_2)。兩邊同時套用函數 gg,可得:

g(f(x1))=g(f(x2))g(f(x_1))=g(f(x_2))

也就是:

(g∘f)(x1)=(g∘f)(x2)(g\circ f)(x_1)=(g\circ f)(x_2)

因為 g∘fg\circ f 是單射,所以必有:

x1=x2x_1=x_2

因此符合單射定義,得到:

f 必為單射f\text{ 必為單射}

但是,gg 不必為單射。原因是 gg 在整個集合 BB 上即使有不同元素映射到相同值,只要這些元素不是由 ff 的值域取得,就不會影響合成函數 g∘fg\circ f 的單射性。


選項分析

(A) gg must be an injection.

錯誤。

令

A={1},B={a,b},C={0}A=\{1\},\qquad B=\{a,b\},\qquad C=\{0\}

定義

f(1)=a,g(a)=0,g(b)=0f(1)=a,\qquad g(a)=0,\qquad g(b)=0

由於 AA 只有一個元素,g∘f:A→Cg\circ f:A\to C 必為單射;但 g(a)=g(b)g(a)=g(b) 且 a≠ba\ne b,所以 gg 不是單射。

因此 g∘fg\circ f 為單射,不能保證 gg 為單射。


🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 1.3 題

1.3. Using Fermat's Little Theorem, what is 2100(mod101)2^{100} \pmod{101}? (Note: 101 is prime).
(A) 1
(B) 2
(C) 100
(D) 0

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查費馬小定理(Fermat's Little Theorem)的應用。

費馬小定理指出,如果 pp 是一個質數,那麼對於任意整數 aa 不被 pp 整除,都有 ap−1≡1(modp)a^{p-1} \equiv 1 \pmod{p}。

題目中給定 p=101p=101,它是一個質數。
我們要計算 2100(mod101)2^{100} \pmod{101}。
根據費馬小定理,取 a=2a=2。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 1.4 題

1.4. A Bernoulli trial has a probability of success p=0.4p = 0.4. If the trial is repeated independently 5 times, what is the variance of the total number of successes?
(A) 0.24
(B) 1.2
(C) 2.0
(D) 0.8

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查二項分布(Binomial Distribution)的方差計算。

一個伯努利試驗(Bernoulli trial)是指一個只有兩種結果(成功或失敗)的隨機試驗。
成功機率為 pp,失敗機率為 q=1−pq = 1-p。

當一個伯努利試驗獨立重複 nn 次時,總成功次數 XX 服從二項分布,記為 X∼Binomial(n,p)X \sim \text{Binomial}(n, p)。
二項分布的期望值為 E[X]=npE[X] = np。
二項分布的方差為 Var(X)=npq=np(1−p)\text{Var}(X) = npq = np(1-p)。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 1.5 題

1.5. Suppose a 3x3 matrix A is diagonalizable and has eigenvalues λ1=1\lambda_1 = 1, λ2=2\lambda_2 = 2, and λ3=3\lambda_3 = 3. If B=A2−3A+2IB = A^2 - 3A + 2I, what is the determinant of BB?
(A) 0
(B) 2
(C) 6
(D) 12

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查矩陣的特徵值與多項式函數的關係,以及行列式的性質。

已知矩陣 AA 是一個 3x3 的可對角化矩陣,其特徵值為 λ1=1\lambda_1 = 1, λ2=2\lambda_2 = 2, λ3=3\lambda_3 = 3。
我們需要計算矩陣 B=A2−3A+2IB = A^2 - 3A + 2I 的行列式 det⁡(B)\det(B)。
其中 II 是 3x3 的單位矩陣。

由於矩陣 AA 是可對角化的,存在一個可逆矩陣 PP 使得 A=PDP−1A = P D P^{-1},其中 DD 是一個對角矩陣,其對角線元素是 AA 的特徵值。
D=(100020003)D = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 3 \end{pmatrix}。

對於多項式函數 p(x)=x2−3x+2p(x) = x^2 - 3x + 2,如果 AA 的特徵值是 λi\lambda_i,那麼矩陣 p(A)p(A) 的特徵值就是 p(λi)p(\lambda_i)。
所以,矩陣 B=A2−3A+2IB = A^2 - 3A + 2I 的特徵值是:
p(λ1)=λ12−3λ1+2=12−3(1)+2=1−3+2=0p(\lambda_1) = \lambda_1^2 - 3\lambda_1 + 2 = 1^2 - 3(1) + 2 = 1 - 3 + 2 = 0
p(λ2)=λ22−3λ2+2=22−3(2)+2=4−6+2=0p(\lambda_2) = \lambda_2^2 - 3\lambda_2 + 2 = 2^2 - 3(2) + 2 = 4 - 6 + 2 = 0
p(λ3)=λ32−3λ3+2=32−3(3)+2=9−9+2=2p(\lambda_3) = \lambda_3^2 - 3\lambda_3 + 2 = 3^2 - 3(3) + 2 = 9 - 9 + 2 = 2

因此,矩陣 BB 的特徵值為 0,0,20, 0, 2。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 1.6 題

1.6. What is the maximum number of edges in a simple undirected graph with 6 vertices and no cycles?
(A) 5
(B) 6
(C) 15
(D) 30

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查圖論中關於無環圖(acyclic graph)的性質,特別是樹(tree)的定義。

一個簡單無向圖(simple undirected graph)是指圖中任意兩點之間最多只有一條邊,且沒有自環(loop)。
無環圖(graph with no cycles)是指圖中不存在任何閉合的路徑。

一個連通的無向圖,如果它沒有環,那麼它一定是樹。
一棵有 nn 個頂點的樹,恰好有 n−1n-1 條邊。

題目要求的是「最大」邊數,這暗示我們需要考慮圖的連通性。
如果一個圖有 nn 個頂點且沒有環,那麼它最多可以有 n−1n-1 條邊。
這是因為每增加一條邊,如果這條邊連接了兩個已經在同一個連通分支中的頂點,就會形成一個環。如果連接了兩個不同連通分支的頂點,則會將兩個分支合併成一個更大的連通分支,但不會形成環。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 1.7 題

1.7. If an algorithm has a time complexity defined by the recurrence T(n)=2T(n/2)+n2T(n) = 2T(n/2) + n^2, what is the Big-O complexity of the algorithm?
(A) O(nlog⁡n)O(n \log n)
(B) O(n2)O(n^2)
(C) O(n2log⁡n)O(n^2 \log n)
(D) O(n3)O(n^3)

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查遞迴關係式(Recurrence Relation)的求解,以確定演算法的時間複雜度,通常使用主定理(Master Theorem)。

給定的遞迴關係式為 T(n)=2T(n/2)+n2T(n) = 2T(n/2) + n^2。
這個遞迴關係式的形式是 T(n)=aT(n/b)+f(n)T(n) = aT(n/b) + f(n),其中:
a=2a = 2 (遞迴調用的次數)
b=2b = 2 (每次遞迴調用時問題規模的縮小因子)
f(n)=n2f(n) = n^2 (合併或處理步驟的時間複雜度)

我們需要將 f(n)f(n) 與 nlog⁡ban^{\log_b a} 進行比較。
首先計算 nlog⁡ban^{\log_b a}:
log⁡ba=log⁡22=1\log_b a = \log_2 2 = 1。
所以,nlog⁡ba=n1=nn^{\log_b a} = n^1 = n。

現在我們將 f(n)=n2f(n) = n^2 與 nlog⁡ba=nn^{\log_b a} = n 進行比較。
我們看到 f(n)=n2f(n) = n^2 相對於 nlog⁡ba=nn^{\log_b a} = n 是「漸進地更大」的。
具體來說,對於足夠大的 nn, n2n^2 比 nn 要大得多。

我們檢查主定理的第三種情況:
若 f(n)=Ω(nlog⁡ba+ϵ)f(n) = \Omega(n^{\log_b a + \epsilon}) 對於某個常數 ϵ>0\epsilon > 0,且 af(n/b)≤cf(n)af(n/b) \le c f(n) 對於某個常數 c<1c < 1 和足夠大的 nn。

在這裡,f(n)=n2f(n) = n^2。
nlog⁡ba=n1n^{\log_b a} = n^1。
我們有 n2=Ω(n1+ϵ)n^2 = \Omega(n^{1+\epsilon})。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 1.8 題

1.8. Boolean Algebra: Which of the following is logically equivalent to the Boolean expression X⊕(X⊕Y)X \oplus (X \oplus Y)?
(A) X
(B) Y
(C) X · Y
(D) X + Y

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查布林代數(Boolean Algebra)中的異或(XOR)運算性質。

布林代數中的異或運算符號通常用 ⊕\oplus 或 XOR 表示。
其運算規則為:
0⊕0=00 \oplus 0 = 0
0⊕1=10 \oplus 1 = 1
1⊕0=11 \oplus 0 = 1
1⊕1=01 \oplus 1 = 0

異或運算有以下性質:

  1. 交換律:A⊕B=B⊕AA \oplus B = B \oplus A
  2. 結合律:(A⊕B)⊕C=A⊕(B⊕C)(A \oplus B) \oplus C = A \oplus (B \oplus C)
  3. 單位元素(恆等元素):存在一個元素 00 使得 A⊕0=AA \oplus 0 = A 對於所有 AA。
🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 2.(A) 題7 分

  1. Consider a binary communication channel. Due to noise, a transmitted '0' is received as a '1' with probability 0.1, and a transmitted '1' is received as a '0' with probability 0.2. Suppose the transmitter sends '0' with probability 0.6 and '1' with probability 0.4.
    (A) Calculate the total probability that a '1' is received. (7%)

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查條件機率與全機率定理(Law of Total Probability)的應用。

我們定義以下事件:
T0T_0: 發送者發送 '0'。
T1T_1: 發送者發送 '1'。
R0R_0: 接收到 '0'。
R1R_1: 接收到 '1'。

根據題目給定的資訊:
發送 '0' 的機率:P(T0)=0.6P(T_0) = 0.6
發送 '1' 的機率:P(T1)=0.4P(T_1) = 0.4
(注意:P(T0)+P(T1)=0.6+0.4=1P(T_0) + P(T_1) = 0.6 + 0.4 = 1,這表示發送者只會發送 '0' 或 '1'。)

通信通道的雜訊特性:
傳送 '0' 但接收到 '1' 的機率(錯誤接收):P(R1∣T0)=0.1P(R_1 | T_0) = 0.1
傳送 '1' 但接收到 '0' 的機率(錯誤接收):P(R0∣T1)=0.2P(R_0 | T_1) = 0.2

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 2.(B) 題8 分

  1. Consider a binary communication channel. Due to noise, a transmitted '0' is received as a '1' with probability 0.1, and a transmitted '1' is received as a '0' with probability 0.2. Suppose the transmitter sends '0' with probability 0.6 and '1' with probability 0.4.
    (B) If a '1' is received, what is the probability that a '1' was transmitted? (8%)

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查貝氏定理(Bayes' Theorem)的應用。

我們沿用上一小題定義的事件:
T0T_0: 發送者發送 '0'。
T1T_1: 發送者發送 '1'。
R0R_0: 接收到 '0'。
R1R_1: 接收到 '1'。

已知資訊:
P(T0)=0.6P(T_0) = 0.6
P(T1)=0.4P(T_1) = 0.4
P(R1∣T0)=0.1P(R_1 | T_0) = 0.1 (傳送 0 收到 1 的機率)
P(R0∣T1)=0.2P(R_0 | T_1) = 0.2 (傳送 1 收到 0 的機率)
P(R0∣T0)=0.9P(R_0 | T_0) = 0.9
P(R1∣T1)=0.8P(R_1 | T_1) = 0.8

題目要求計算:如果 '1' 被接收到,那麼 '1' 被傳送的機率。這表示我們要求後驗機率 P(T1∣R1)P(T_1 | R_1)。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 3.(A) 題5 分

  1. A continuous random variable X has the probability density function (PDF) given by:
    f(x)={kx20≤x≤30otherwisef(x) = \begin{cases} kx^2 & 0 \le x \le 3 \\ 0 & \text{otherwise} \end{cases}
    (A) Determine the value of the constant kk that makes this a valid PDF. (5%)

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查連續隨機變數機率密度函數(PDF)的性質。

一個函數 f(x)f(x) 是有效的機率密度函數(PDF)必須滿足兩個條件:

  1. f(x)≥0f(x) \ge 0 對於所有 xx。
  2. ∫−∞∞f(x)dx=1\int_{-\infty}^{\infty} f(x) dx = 1。

給定的 PDF 是 f(x)=kx2f(x) = kx^2 對於 0≤x≤30 \le x \le 3,其他地方為 0。
首先,為了滿足條件 1 (f(x)≥0f(x) \ge 0),對於 0≤x≤30 \le x \le 3,x2≥0x^2 \ge 0。因此,常數 kk 必須大於或等於 0。如果 k<0k < 0,則 f(x)f(x) 在此區間內將為負,不符合 PDF 的定義。所以,k≥0k \ge 0。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 3.(B) 題5 分

  1. A continuous random variable X has the probability density function (PDF) given by:
    f(x)={kx20≤x≤30otherwisef(x) = \begin{cases} kx^2 & 0 \le x \le 3 \\ 0 & \text{otherwise} \end{cases}
    (B) Find the cumulative distribution function (CDF), F(x)F(x). (5%)

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查連續隨機變數累積分布函數(CDF)的計算。

累積分布函數 F(x)F(x) 定義為 F(x)=P(X≤x)F(x) = P(X \le x),對於連續隨機變數,這可以通過對機率密度函數(PDF) f(t)f(t) 從負無窮大積分到 xx 來計算:
F(x)=∫−∞xf(t)dtF(x) = \int_{-\infty}^{x} f(t) dt

我們已經在上小題中求出,使 f(x)f(x) 成為有效 PDF 的常數 k=1/9k = 1/9。
所以,PDF 為 f(x)=19x2f(x) = \frac{1}{9}x^2 對於 0≤x≤30 \le x \le 3,其他地方為 0。

我們需要分段計算 F(x)F(x),考慮 xx 的不同取值範圍:

情況 1:x<0x < 0
此時,f(t)=0f(t) = 0 對於所有 t≤xt \le x。
F(x)=∫−∞x0dt=0F(x) = \int_{-\infty}^{x} 0 dt = 0。

情況 2:0≤x≤30 \le x \le 3
此時,積分範圍從 −∞-\infty 到 xx 包含 f(t)=0f(t)=0 的部分和 f(t)=19t2f(t) = \frac{1}{9}t^2 的部分。
F(x)=∫−∞xf(t)dt=∫−∞00dt+∫0x19t2dtF(x) = \int_{-\infty}^{x} f(t) dt = \int_{-\infty}^{0} 0 dt + \int_{0}^{x} \frac{1}{9}t^2 dt
F(x)=0+19∫0xt2dtF(x) = 0 + \frac{1}{9} \int_{0}^{x} t^2 dt
F(x)=19[t33]0xF(x) = \frac{1}{9} \left[ \frac{t^3}{3} \right]_{0}^{x}

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 3.(C) 題5 分

  1. A continuous random variable X has the probability density function (PDF) given by:
    f(x)={kx20≤x≤30otherwisef(x) = \begin{cases} kx^2 & 0 \le x \le 3 \\ 0 & \text{otherwise} \end{cases}
    (C) Calculate the expected value E[X]E[X]. (5%)

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查連續隨機變數期望值(Expected Value)的計算。

對於一個連續隨機變數 XX 具有機率密度函數(PDF)f(x)f(x),其期望值 E[X]E[X] 的計算公式為:
E[X]=∫−∞∞xf(x)dxE[X] = \int_{-\infty}^{\infty} x f(x) dx

我們已經在上小題中確定了 PDF 為 f(x)=19x2f(x) = \frac{1}{9}x^2 對於 0≤x≤30 \le x \le 3,其他地方為 0。
將此 PDF 代入期望值公式:
E[X]=∫−∞∞xf(x)dx=∫03x(19x2)dxE[X] = \int_{-\infty}^{\infty} x f(x) dx = \int_{0}^{3} x \left( \frac{1}{9}x^2 \right) dx
E[X]=∫0319x3dxE[X] = \int_{0}^{3} \frac{1}{9}x^3 dx

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 4.(A) 題5 分

  1. NCKU researchers are studying the movement of users between two social media platforms, A and B. Each month, 30% of users on A switch to B, while 20% of users on B switch to A.
    (A) Construct the transition matrix P for this system. (5%)

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查馬可夫鏈(Markov Chain)的轉移矩陣(Transition Matrix)的建構。

我們有兩個狀態(平台):A 和 B。
一個月內,用戶在 A 和 B 之間移動。
30% 的用戶從 A 轉移到 B。
20% 的用戶從 B 轉移到 A。

這意味著:
從 A 轉移到 A 的機率:P(A→A)=1−P(A→B)=1−0.30=0.70P(A \rightarrow A) = 1 - P(A \rightarrow B) = 1 - 0.30 = 0.70。
從 A 轉移到 B 的機率:P(A→B)=0.30P(A \rightarrow B) = 0.30。

從 B 轉移到 B 的機率:P(B→B)=1−P(B→A)=1−0.20=0.80P(B \rightarrow B) = 1 - P(B \rightarrow A) = 1 - 0.20 = 0.80。
從 B 轉移到 A 的機率:P(B→A)=0.20P(B \rightarrow A) = 0.20。

轉移矩陣 PP 的維度是 2×22 \times 2,其中列代表起始狀態,行代表結束狀態(或者反之,這裡我們按照常見的約定:行代表起始狀態,列代表結束狀態,使得狀態向量是行向量;或者列代表起始狀態,行代表結束狀態,使得狀態向量是列向量。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 4.(B) 題5 分

  1. NCKU researchers are studying the movement of users between two social media platforms, A and B. Each month, 30% of users on A switch to B, while 20% of users on B switch to A.
    (B) If the initial distribution is 100% of users on platform A, what will the distribution be after two months? (5%)

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查馬可夫鏈的狀態分佈計算。

我們已經建構了轉移矩陣 P=(0.70.30.20.8)P = \begin{pmatrix} 0.7 & 0.3 \\ 0.2 & 0.8 \end{pmatrix}。
其中 A 是狀態 1,B 是狀態 2。

初始分佈是 100% 的用戶在平台 A。
我們可以用一個列向量來表示初始狀態分佈,假設用戶總數為 1。
初始狀態向量 v0=(10)v_0 = \begin{pmatrix} 1 \\ 0 \end{pmatrix} (100% 在 A,0% 在 B)。

經過一個月的狀態分佈 v1v_1 可以通過 v1=Pv0v_1 = P v_0 計算。
v1=(0.70.30.20.8)(10)=(0.7×1+0.3×00.2×1+0.8×0)=(0.70.2)v_1 = \begin{pmatrix} 0.7 & 0.3 \\ 0.2 & 0.8 \end{pmatrix} \begin{pmatrix} 1 \\ 0 \end{pmatrix} = \begin{pmatrix} 0.7 \times 1 + 0.3 \times 0 \\ 0.2 \times 1 + 0.8 \times 0 \end{pmatrix} = \begin{pmatrix} 0.7 \\ 0.2 \end{pmatrix}
所以,一個月後,70% 的用戶在 A,20% 的用戶在 B。
(注意:這裡的計算結果 0.7+0.2=0.90.7+0.2=0.9 似乎少了一部分用戶。這是因為我們假設的初始分佈是一個嚴格的列向量。如果我們考慮的是用戶的總數,那麼 P(A→A)=0.7P(A \rightarrow A) = 0.7 和 P(A→B)=0.3P(A \rightarrow B) = 0.3。如果初始是 100% 在 A,那麼 70% 留在 A,30% 轉到 B。所以一個月後,A 的用戶比例是 1×0.7=0.71 \times 0.7 = 0.7,B 的用戶比例是 1×0.3=0.31 \times 0.3 = 0.3。所以初始狀態向量的表示方法需要更精確。

我們採用行向量表示狀態分佈,使得 vn+1=vnPv_{n+1} = v_n P。
初始狀態向量 v0=(10)v_0 = \begin{pmatrix} 1 & 0 \end{pmatrix} (100% 在 A,0% 在 B)。

經過一個月的狀態分佈 v1v_1:

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 4.(C) 題5 分

  1. NCKU researchers are studying the movement of users between two social media platforms, A and B. Each month, 30% of users on A switch to B, while 20% of users on B switch to A.
    (C) Find the steady-state distribution of users between the two platforms. (5%)

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查馬可夫鏈的穩態分佈(Steady-State Distribution)。

穩態分佈 π=(πAπB)\pi = \begin{pmatrix} \pi_A & \pi_B \end{pmatrix} 是一個行向量,滿足以下兩個條件:

  1. πP=π\pi P = \pi (其中 P 是轉移矩陣)。
  2. πA+πB=1\pi_A + \pi_B = 1 (所有狀態的機率和為 1)。

我們已經建構了轉移矩陣 P=(0.70.30.20.8)P = \begin{pmatrix} 0.7 & 0.3 \\ 0.2 & 0.8 \end{pmatrix}。
令穩態分佈為 π=(πAπB)\pi = \begin{pmatrix} \pi_A & \pi_B \end{pmatrix}。

根據條件 1:πP=π\pi P = \pi
(πAπB)(0.70.30.20.8)=(πAπB)\begin{pmatrix} \pi_A & \pi_B \end{pmatrix} \begin{pmatrix} 0.7 & 0.3 \\ 0.2 & 0.8 \end{pmatrix} = \begin{pmatrix} \pi_A & \pi_B \end{pmatrix}

展開矩陣乘法:
第一列:πA×0.7+πB×0.2=πA\pi_A \times 0.7 + \pi_B \times 0.2 = \pi_A

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

第 5 題15 分

  1. Solve the following non-homogeneous linear recurrence relation:
    an−3an−1+2an−2=3na_n - 3a_{n-1} + 2a_{n-2} = 3^n
    with initial conditions a0=1a_0 = 1 and a1=3a_1 = 3. (15%)

登入後即可作答並保存紀錄。

這一題的完整詳解

此題考查非齊次線性遞迴關係式(Non-homogeneous Linear Recurrence Relation)的求解,包含求齊次解和特解。

給定的遞迴關係式為:an−3an−1+2an−2=3na_n - 3a_{n-1} + 2a_{n-2} = 3^n
初始條件為:a0=1a_0 = 1, a1=3a_1 = 3。

遞迴關係式的通解 ana_n 由齊次解 an(h)a_n^{(h)} 和特解 an(p)a_n^{(p)} 相加得到:an=an(h)+an(p)a_n = a_n^{(h)} + a_n^{(p)}。

第一步:求解齊次遞迴關係式的解 an(h)a_n^{(h)}。
齊次遞迴關係式為:an−3an−1+2an−2=0a_n - 3a_{n-1} + 2a_{n-2} = 0
其特徵方程式(Characteristic Equation)為:
r2−3r+2=0r^2 - 3r + 2 = 0

因式分解特徵方程式:
(r−1)(r−2)=0(r-1)(r-2) = 0
所以,特徵根為 r1=1r_1 = 1 和 r2=2r_2 = 2。

由於特徵根是兩個不同的實根,齊次解的形式為:
an(h)=c1(1)n+c2(2)n=c1+c22na_n^{(h)} = c_1 (1)^n + c_2 (2)^n = c_1 + c_2 2^n
其中 c1c_1 和 c2c_2 是待定常數。

第二步:求解非齊次遞迴關係式的特解 an(p)a_n^{(p)}。
非齊次項是 3n3^n。
由於 r=1r=1 是特徵根之一,且非齊次項是 3n3^n (其中 3 不是特徵根),我們假設特解的形式為:
an(p)=A⋅3na_n^{(p)} = A \cdot 3^n
其中 AA 是待定常數。

將此特解形式代入原遞迴關係式:
A⋅3n−3(A⋅3n−1)+2(A⋅3n−2)=3nA \cdot 3^n - 3(A \cdot 3^{n-1}) + 2(A \cdot 3^{n-2}) = 3^n
A⋅3n−3A⋅3n3+2A⋅3n9=3nA \cdot 3^n - 3A \cdot \frac{3^n}{3} + 2A \cdot \frac{3^n}{9} = 3^n
A⋅3n−A⋅3n+2A9⋅3n=3nA \cdot 3^n - A \cdot 3^n + \frac{2A}{9} \cdot 3^n = 3^n
0+2A9⋅3n=3n0 + \frac{2A}{9} \cdot 3^n = 3^n

為了使等式成立,我們需要:
2A9=1\frac{2A}{9} = 1
2A=92A = 9
A=92A = \frac{9}{2}

所以,特解為 an(p)=92⋅3na_n^{(p)} = \frac{9}{2} \cdot 3^n。

第三步:組合齊次解和特解得到通解。
an=an(h)+an(p)=c1+c22n+923na_n = a_n^{(h)} + a_n^{(p)} = c_1 + c_2 2^n + \frac{9}{2} 3^n

第四步:利用初始條件確定常數 c1c_1 和 c2c_2。
初始條件是 a0=1a_0 = 1 和 a1=3a_1 = 3。

🔒

後續完整解題步驟與【答案】

免費註冊,享三天全站完整詳解閱覽。

免費註冊

其他考古題