111 年 國立成功大學工業與資訊管理學系研究所甲組《作業研究》

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

第 1 題15 分

  1. (15%) Given the following small project, please answer the following questions:
    Activity | Immediate Predecessor(s) | Duration
    ------- | -------- | --------
    A | | 12
    B | | 9
    C | A | 10
    D | B | 10
    E | B | 24
    F | A | 10
    G | C | 35
    H | D | 40
    I | A | 15
    J | E, G, H | 4
    K | F, I, J | 6

a. (5%) Please draw the network.
b. (10%) What is the critical path? Why?

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

這一題的完整詳解

本題為典型的專案管理中的關鍵路徑法 (Critical Path Method, CPM) 問題,主要考驗學生繪製專案網路圖以及找出關鍵路徑的能力。

a. 繪製專案網路圖:
專案網路圖(Activity-on-Node, AON)是以節點代表活動,箭頭代表活動之間的先後順序。

  1. 從起始節點(Start)出發,代表專案開始。
  2. 活動 A、B 為起始活動,無前置活動,分別連接至 Start。
  3. 活動 C、F、I 的前置活動為 A,分別從 A 連接出去。
  4. 活動 D、E 的前置活動為 B,分別從 B 連接出去。
  5. 活動 G 的前置活動為 C,從 C 連接出去。
  6. 活動 H 的前置活動為 D,從 D 連接出去。
  7. 活動 J 的前置活動為 E、G、H,從 E、G、H 三個節點匯集至 J。
  8. 活動 K 的前置活動為 F、I、J,從 F、I、J 三個節點匯集至 K。
  9. 專案結束節點(End)連接至 K。

網路圖如下(文字示意,實際作答需繪製圖形):
Start -> A (12) -> C (10) -> G (35) -> J (4) -> K (6) -> End
Start -> A (12) -> F (10) -> K (6) -> End
Start -> A (12) -> I (15) -> K (6) -> End
Start -> B (9) -> D (10) -> H (40) -> J (4) -> K (6) -> End
Start -> B (9) -> E (24) -> J (4) -> K (6) -> End

b. 找出關鍵路徑:
關鍵路徑是指專案中最長的一條路徑,決定了專案的總持續時間。關鍵路徑上的活動如果延遲,則整個專案的結束時間也會延遲。我們需要計算各活動的 Early Start (ES)、Early Finish (EF)、Late Start (LS)、Late Finish (LF) 以及 Total Float (TF)。

向前計算 (Forward Pass) - 計算 ES 與 EF:
ES(Start) = 0
EF(Start) = 0

ES(A) = EF(Start) = 0; EF(A) = ES(A) + Dur(A) = 0 + 12 = 12
ES(B) = EF(Start) = 0; EF(B) = ES(B) + Dur(B) = 0 + 9 = 9

ES(C) = EF(A) = 12; EF(C) = ES(C) + Dur(C) = 12 + 10 = 22
ES(F) = EF(A) = 12; EF(F) = ES(F) + Dur(F) = 12 + 10 = 22
ES(I) = EF(A) = 12; EF(I) = ES(I) + Dur(I) = 12 + 15 = 27

ES(D) = EF(B) = 9; EF(D) = ES(D) + Dur(D) = 9 + 10 = 19
ES(E) = EF(B) = 9; EF(E) = ES(E) + Dur(E) = 9 + 24 = 33

ES(G) = EF(C) = 22; EF(G) = ES(G) + Dur(G) = 22 + 35 = 57
ES(H) = EF(D) = 19; EF(H) = ES(H) + Dur(H) = 19 + 40 = 59

ES(J) = max(EF(E), EF(G), EF(H)) = max(33, 57, 59) = 59
EF(J) = ES(J) + Dur(J) = 59 + 4 = 63

ES(K) = max(EF(F), EF(I), EF(J)) = max(22, 27, 63) = 63

🔒

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

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

免費註冊

第 2 題20 分

  1. (20%) An automobile manufacturer that produces sedans and SUVs (Sports Utility Vehicles).
    Manufacturing is organized into four departments: sheet metal stamping, engine assembly, sedan
    assembly, and SUV assembly. The capacity of each department is limited. The following table provides
    the percentages of each department's monthly capacity that would be consumed by constructing a
    thousand sedans or a thousand SUVs.
    Department | sedan | SUV
    ------- | -------- | --------
    sheet metal stamping | 5% | 3%
    engine assembly | 4% | 5%
    sedan assembly | 3% | 0%
    SUV assembly | 0% | 6%
    The marketing department estimates a profit of 3,000persedanproducedand3,000 per sedan produced and 2,500 per SUV
    produced.
    a. Please formulate a linear programming problem that would maximize the profit (in thousand
    dollars).
    b. Please solve the formulated problem from a.
    c. The manager has found that the costs of increasing 1% capacity of metal stamping and increasing
    1% capacity of engine assembly would cost the same. Which department the manager should invest
    on?
    d. Please formulate the dual problem from a.

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

這一題的完整詳解

本題為典型的線性規劃 (Linear Programming, LP) 問題,考驗學生建立模型、求解、對偶問題以及敏感度分析(透過利潤與成本的比較)的能力。

首先,定義決策變數:
令 x1x_1 為每月生產的汽車數量(以千輛為單位)的轎車 (sedan)。
令 x2x_2 為每月生產的汽車數量(以千輛為單位)的休旅車 (SUV)。

a. 線性規劃問題的建立:
目標是最大化總利潤。
每生產一千輛轎車的利潤為 3,000美元,即3,000 美元,即 3 (千美元)。
每生產一千輛休旅車的利潤為 2,500美元,即2,500 美元,即 2.5 (千美元)。
總利潤 ZZ (千美元) = 3x1+2.5x23x_1 + 2.5x_2。

製造過程受到四個部門的產能限制:

  1. 金屬沖壓 (Sheet Metal Stamping):
    生產一千輛轎車消耗 5% 產能,生產一千輛休旅車消耗 3% 產能。
    總產能限制為 100% (即 1)。
    所以,0.05x1+0.03x2≤10.05x_1 + 0.03x_2 \le 1。

  2. 引擎組裝 (Engine Assembly):
    生產一千輛轎車消耗 4% 產能,生產一千輛休旅車消耗 5% 產能。
    所以,0.04x1+0.05x2≤10.04x_1 + 0.05x_2 \le 1。

  3. 轎車組裝 (Sedan Assembly):
    生產一千輛轎車消耗 3% 產能,生產一千輛休旅車消耗 0% 產能。
    所以,0.03x1+0x2≤10.03x_1 + 0x_2 \le 1,即 0.03x1≤10.03x_1 \le 1。

  4. 休旅車組裝 (SUV Assembly):
    生產一千輛轎車消耗 0% 產能,生產一千輛休旅車消耗 6% 產能。
    所以,0x1+0.06x2≤10x_1 + 0.06x_2 \le 1,即 0.06x2≤10.06x_2 \le 1。

此外,生產數量不能為負:
x1≥0,x2≥0x_1 \ge 0, x_2 \ge 0。

線性規劃模型:
Maximize Z=3x1+2.5x2Z = 3x_1 + 2.5x_2
Subject to:
0.05x1+0.03x2≤10.05x_1 + 0.03x_2 \le 1 (Sheet Metal Stamping)
0.04x1+0.05x2≤10.04x_1 + 0.05x_2 \le 1 (Engine Assembly)
0.03x1≤10.03x_1 \le 1 (Sedan Assembly)
0.06x2≤10.06x_2 \le 1 (SUV Assembly)
x1,x2≥0x_1, x_2 \ge 0

b. 求解線性規劃問題:
我們可以利用圖解法或單形法 (Simplex Method) 來求解。由於只有兩個決策變數,圖解法較為直觀。

首先,將限制式轉換為等式,找出邊界線:

  1. 0.05x1+0.03x2=1  ⟹  5x1+3x2=1000.05x_1 + 0.03x_2 = 1 \implies 5x_1 + 3x_2 = 100
    若 x1=0x_1=0, x2=100/3≈33.33x_2 = 100/3 \approx 33.33
    若 x2=0x_2=0, x1=100/5=20x_1 = 100/5 = 20
    兩點為 (0, 33.33) 和 (20, 0)

  2. 0.04x1+0.05x2=1  ⟹  4x1+5x2=1000.04x_1 + 0.05x_2 = 1 \implies 4x_1 + 5x_2 = 100
    若 x1=0x_1=0, x2=100/5=20x_2 = 100/5 = 20
    若 x2=0x_2=0, x1=100/4=25x_1 = 100/4 = 25
    兩點為 (0, 20) 和 (25, 0)

  3. 0.03x1=1  ⟹  x1=1/0.03=100/3≈33.330.03x_1 = 1 \implies x_1 = 1/0.03 = 100/3 \approx 33.33
    垂直線 x1=33.33x_1 = 33.33

  4. 0.06x2=1  ⟹  x2=1/0.06=100/6=50/3≈16.670.06x_2 = 1 \implies x_2 = 1/0.06 = 100/6 = 50/3 \approx 16.67
    水平線 x2=16.67x_2 = 16.67

可行區域由這些限制式定義,並且 x1≥0,x2≥0x_1 \ge 0, x_2 \ge 0。

找出可行區域的頂點 (corner points):

  • 原點 (0, 0)。

  • x1x_1 軸上的點:由 0.05x1≤10.05x_1 \le 1 和 0.04x1≤10.04x_1 \le 1 限制,且 x2=0x_2=0。
    x1≤20x_1 \le 20 (來自限制式1)
    x1≤25x_1 \le 25 (來自限制式2)
    x1≤33.33x_1 \le 33.33 (來自限制式3)
    所以,在 x2=0x_2=0 時,x1x_1 的最大值為 20。頂點為 (20, 0)。

  • x2x_2 軸上的點:由 0.03x2≤10.03x_2 \le 1 和 0.05x2≤10.05x_2 \le 1 限制,且 x1=0x_1=0。
    x2≤33.33x_2 \le 33.33 (來自限制式1)
    x2≤20x_2 \le 20 (來自限制式2)
    x2≤16.67x_2 \le 16.67 (來自限制式4)
    所以,在 x1=0x_1=0 時,x2x_2 的最大值為 16.67。頂點為 (0, 16.67)。

  • 限制式 1 和 2 的交點:
    5x1+3x2=1005x_1 + 3x_2 = 100
    4x1+5x2=1004x_1 + 5x_2 = 100
    乘以 5 和 3:
    25x1+15x2=50025x_1 + 15x_2 = 500
    12x1+15x2=30012x_1 + 15x_2 = 300
    相減:13x1=200  ⟹  x1=200/13≈15.3813x_1 = 200 \implies x_1 = 200/13 \approx 15.38
    代入 4x1+5x2=1004x_1 + 5x_2 = 100:
    4(200/13)+5x2=1004(200/13) + 5x_2 = 100
    800/13+5x2=100800/13 + 5x_2 = 100
    5x2=100−800/13=(1300−800)/13=500/135x_2 = 100 - 800/13 = (1300 - 800)/13 = 500/13
    x2=100/13≈7.69x_2 = 100/13 \approx 7.69
    交點為 (200/13, 100/13)。
    檢查此點是否滿足其他限制:
    x1=15.38≤33.33x_1 = 15.38 \le 33.33 (OK)
    x2=7.69≤16.67x_2 = 7.69 \le 16.67 (OK)
    所以 (200/13, 100/13) 是可行區域的頂點。

  • 限制式 1 和 4 的交點:
    0.05x1+0.03x2=10.05x_1 + 0.03x_2 = 1
    0.06x2=1  ⟹  x2=50/3≈16.670.06x_2 = 1 \implies x_2 = 50/3 \approx 16.67
    0.05x1+0.03(50/3)=10.05x_1 + 0.03(50/3) = 1
    0.05x1+0.5=10.05x_1 + 0.5 = 1
    0.05x1=0.5  ⟹  x1=100.05x_1 = 0.5 \implies x_1 = 10
    交點為 (10, 50/3)。
    檢查此點是否滿足其他限制:
    x1=10≤33.33x_1 = 10 \le 33.33 (OK)
    0.04(10)+0.05(50/3)=0.4+2.5/3=0.4+0.833=1.233>10.04(10) + 0.05(50/3) = 0.4 + 2.5/3 = 0.4 + 0.833 = 1.233 > 1 (不滿足限制式 2)。
    所以此點不在可行區域內。

  • 限制式 2 和 3 的交點:
    0.04x1+0.05x2=10.04x_1 + 0.05x_2 = 1
    0.03x1=1  ⟹  x1=100/3≈33.330.03x_1 = 1 \implies x_1 = 100/3 \approx 33.33
    0.04(100/3)+0.05x2=10.04(100/3) + 0.05x_2 = 1
    4/3+0.05x2=14/3 + 0.05x_2 = 1
    1.333+0.05x2=11.333 + 0.05x_2 = 1
    0.05x2=1−1.333=−0.3330.05x_2 = 1 - 1.333 = -0.333 (不可能,因為 x2≥0x_2 \ge 0)
    或者從 0.03x1≤10.03x_1 \le 1 來看,x1x_1 最大只能到 33.33。而 0.04x1+0.05x2≤10.04x_1 + 0.05x_2 \le 1 在 x1=33.33x_1=33.33 時,
    0.04(100/3)+0.05x2≤1  ⟹  4/3+0.05x2≤1  ⟹  1.333+0.05x2≤10.04(100/3) + 0.05x_2 \le 1 \implies 4/3 + 0.05x_2 \le 1 \implies 1.333 + 0.05x_2 \le 1,這是不可能的。
    所以限制式 3 (x1≤33.33x_1 \le 33.33) 並沒有與限制式 2 (4x1+5x2=1004x_1 + 5x_2 = 100) 在可行區域內構成新的頂點,因為 x1x_1 在限制式 2 下的極值是 25。

  • 限制式 2 和 4 的交點:
    0.04x1+0.05x2=10.04x_1 + 0.05x_2 = 1
    0.06x2=1  ⟹  x2=50/3≈16.670.06x_2 = 1 \implies x_2 = 50/3 \approx 16.67
    0.04x1+0.05(50/3)=10.04x_1 + 0.05(50/3) = 1
    0.04x1+2.5/3=10.04x_1 + 2.5/3 = 1
    0.04x1=1−2.5/3=(3−2.5)/3=0.5/30.04x_1 = 1 - 2.5/3 = (3 - 2.5)/3 = 0.5/3
    x1=(0.5/3)/0.04=0.5/(3∗0.04)=0.5/0.12=50/12=25/6≈4.17x_1 = (0.5/3) / 0.04 = 0.5 / (3 * 0.04) = 0.5 / 0.12 = 50/12 = 25/6 \approx 4.17
    交點為 (25/6, 50/3)。
    檢查此點是否滿足其他限制:
    x1=4.17≤33.33x_1 = 4.17 \le 33.33 (OK)
    0.05(25/6)+0.03(50/3)=1.25/6+1.5/3=0.208+0.5=0.708≤10.05(25/6) + 0.03(50/3) = 1.25/6 + 1.5/3 = 0.208 + 0.5 = 0.708 \le 1 (OK)
    所以 (25/6, 50/3) 是可行區域的頂點。

🔒

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

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

免費註冊

第 3 題15 分

  1. (15%) Consider the following mathematical programming problem:
    Maximize Z=3x12+2x22+11x3Z = 3x_1^2 + 2x_2^2 + 11x_3
    Subject to
    x1x2x3=8x_1x_2x_3 = 8
    x1,x2,x3≥0x_1, x_2, x_3 \ge 0 and are integer.
    Please solve the problem by dynamic programming method.

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

這一題的完整詳解

核心觀念

  1. 動態規劃(Dynamic Programming, DP)之乘積限制式模型:
    本題為典型的非線性整數規劃問題(Nonlinear Integer Programming)。雖然目標函數為可加分離(Additively Separable),但限制式為乘積形式(Multiplicative Constraint)x1x2x3=8x_1 x_2 x_3 = 8。在 DP 建模時,狀態轉移並非傳統的「加減法消耗資源」,而是「除法分配因子」。
  2. 變數可行域分析:
    限制條件包含 x1,x2,x3≥0x_1, x_2, x_3 \ge 0 且為整數,由於 x1x2x3=8≠0x_1 x_2 x_3 = 8 \neq 0,任何變數皆不可為 00。因此 x1,x2,x3x_1, x_2, x_3 必為正整數,且皆為 88 的正因數,即 xi∈{1,2,4,8}x_i \in \{1, 2, 4, 8\}。
  3. 貝爾曼最適性原理(Bellman's Principle of Optimality)與倒推遞迴關係式(Backward Recursion):
    將三元變數的同時決策分解為 3 個階段(Stage)的循序決策,利用各階段的狀態值記錄剩餘乘積需求,由後向前逐階求解。

解題方法

採用**倒推動態規劃法(Backward Dynamic Programming)**求解:

1. DP 元素定義

  • 階段(Stage nn):n=1,2,3n = 1, 2, 3,分別對應決定決策變數 x1,x2,x3x_1, x_2, x_3。
  • 狀態(State sns_n):進入階段 nn 時,自階段 nn 至階段 3 尚需達成的乘積目標值。
    • 初始狀態:s1=8s_1 = 8
    • 狀態集合:sn∈{1,2,4,8}s_n \in \{1, 2, 4, 8\}
  • 決策變數(Decision Variable xnx_n):階段 nn 所選取的數值,其可行集合為 sns_n 的正整數因數,即 xn∈D(sn)={x∈{1,2,4,8}∣sn mod x=0}x_n \in D(s_n) = \{x \in \{1, 2, 4, 8\} \mid s_n \bmod x = 0\}。
  • 狀態轉移方程式(State Transition Equation): sn+1=snxns_{n+1} = \frac{s_n}{x_n}
  • 各階段收益函數(Stage Return rn(xn)r_n(x_n)):
    • r1(x1)=3x12r_1(x_1) = 3x_1^2
    • r2(x2)=2x22r_2(x_2) = 2x_2^2
    • r3(x3)=11x3r_3(x_3) = 11x_3
  • 遞迴關係式(Recursive Relation):
    令 fn(sn)f_n(s_n) 為在狀態 sns_n 下,從階段 nn 進行至階段 3 所能獲得的最大總收益: fn(sn)=max⁡xn∈D(sn){rn(xn)+fn+1(snxn)},n=1,2f_n(s_n) = \max_{x_n \in D(s_n)} \left\{ r_n(x_n) + f_{n+1}\left(\frac{s_n}{x_n}\right) \right\}, \quad n = 1, 2 邊界條件(Stage 3): f3(s3)=r3(s3)=11s3(因最後階段必須滿足 x3=s3)f_3(s_3) = r_3(s_3) = 11s_3 \quad (\text{因最後階段必須滿足 } x_3 = s_3)

2. 逐階段遞迴計算

【Stage 3】(決定 x3x_3)

在最後階段,為滿足乘積條件,必須使 x3=s3x_3 = s_3:

s3s_3x3∗x_3^*f3(s3)=11x3f_3(s_3) = 11x_3
111111(1)=1111(1) = 11
222211(2)=2211(2) = 22
444411(4)=4411(4) = 44
888811(8)=8811(8) = 88

【Stage 2】(決定 x2x_2)

遞迴公式為:

f2(s2)=max⁡x2∈D(s2){2x22+f3(s2x2)}f_2(s_2) = \max_{x_2 \in D(s_2)} \left\{ 2x_2^2 + f_3\left(\frac{s_2}{x_2}\right) \right\}
  • 當 s2=1s_2 = 1 時,x2∈{1}x_2 \in \{1\}: x2=1  ⟹  2(1)2+f3(1)=2+11=13x_2 = 1 \implies 2(1)^2 + f_3(1) = 2 + 11 = 13
  • 當 s2=2s_2 = 2 時,x2∈{1,2}x_2 \in \{1, 2\}: x2=1  ⟹  2(1)2+f3(2)=2+22=24x_2 = 1 \implies 2(1)^2 + f_3(2) = 2 + 22 = 24 x2=2  ⟹  2(2)2+f3(1)=8+11=19x_2 = 2 \implies 2(2)^2 + f_3(1) = 8 + 11 = 19
  • 當 s2=4s_2 = 4 時,x2∈{1,2,4}x_2 \in \{1, 2, 4\}: x2=1  ⟹  2(1)2+f3(4)=2+44=46x_2 = 1 \implies 2(1)^2 + f_3(4) = 2 + 44 = 46
🔒

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

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

免費註冊

第 4 題20 分

  1. The rule of a game is that one can bet any amount of money and then either wins or loses this amount of
    money. The probability of winning (or losing) each game is 0.5. A smart gambler proposes a strategy to
    guarantee winning one dollar for each series of games. The strategy is to bet one dollar for the first game. If he
    wins, then he will bet one dollar again. If he loses, then he will bet two dollars for the next game. At this time,
    if he wins, then he will start over by betting one dollar again. If he loses, then he will bet four dollars for the
    third game. The process of doubling the bet continues until he wins a game. Once he wins a game, this process
    starts over by betting one dollar again. Is this strategy going to work as the gambler expected? Answer the
    question by calculating (1) the expected number of games needed in each series of games to win one dollar
    and (2) the expected amount of money needed to win one dollar. (20%)

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

這一題的完整詳解

本題考驗對機率與期望值的理解,特別是如何分析一個有規則的隨機過程。這是一個關於賭博策略的期望值問題,需要仔細分析賭客的策略和獲利情況。

首先,我們需要理解賭客的策略:

  • 如果贏,下一場下注 $1。
  • 如果輸,下一場下注加倍(1 -> 2, 2 -> 4, 4 -> 8, ...)。
  • 當贏一場後,下一場重新下注 $1。
  • 目標是贏得 1 美元。

我們需要計算:

  1. 贏得 1 美元所需的平均遊戲次數。
  2. 贏得 1 美元所需的平均總下注金額(成本)。

分析一個「遊戲系列」:
一個遊戲系列是指從開始下注 1開始,直到贏得一場為止。設1 開始,直到贏得一場為止。 設 B_k為第為第k場遊戲的下注金額。設場遊戲的下注金額。 設W代表贏, 代表贏,L代表輸。機率代表輸。 機率P(W) = P(L) = 0.5$。

情況 1:第一場就贏。

  • 下注 B1=1B_1 = 1。
  • 贏得 $1。
  • 遊戲系列結束。
  • 總遊戲次數 = 1。
  • 總下注金額 = 1。

情況 2:第一場輸,第二場贏。

  • 第一場下注 B1=1B_1 = 1,輸。
  • 第二場下注 B2=2×B1=2B_2 = 2 \times B_1 = 2。
  • 贏得 $2。
  • 由於贏了,下一場重新下注 $1。
  • 遊戲系列結束。
  • 總遊戲次數 = 2。
  • 總下注金額 = 1+2=31 + 2 = 3。
  • 淨利潤 = 2−1=12 - 1 = 1。

情況 3:第一場輸,第二場輸,第三場贏。

  • 第一場下注 B1=1B_1 = 1,輸。
  • 第二場下注 B2=2B_2 = 2,輸。
  • 第三場下注 B3=2×B2=4B_3 = 2 \times B_2 = 4。
  • 贏得 $4。
  • 由於贏了,下一場重新下注 $1。
  • 遊戲系列結束。
  • 總遊戲次數 = 3。
  • 總下注金額 = 1+2+4=71 + 2 + 4 = 7。
  • 淨利潤 = 4−1−2=14 - 1 - 2 = 1。

一般情況:
假設在第 kk 場遊戲獲勝。
則前 k−1k-1 場都輸了,第 kk 場贏了。
下注金額為 B1=1,B2=2,B3=4,…,Bk=2k−1B_1=1, B_2=2, B_3=4, \dots, B_k=2^{k-1}。
第 kk 場贏得 Bk=2k−1B_k = 2^{k-1}。
此時,賭客的淨利潤為 Bk−(B1+B2+⋯+Bk−1)=2k−1−(1+2+⋯+2k−2)=2k−1−(2k−1−1)=1B_k - (B_1 + B_2 + \dots + B_{k-1}) = 2^{k-1} - (1 + 2 + \dots + 2^{k-2}) = 2^{k-1} - (2^{k-1} - 1) = 1。
這個策略確實保證了在每次系列結束時,淨利潤是 $1 美元。

1. 計算期望的遊戲次數 (Expected number of games needed in each series):
設 E[N]E[N] 為一個遊戲系列所需的平均遊戲次數。

  • 贏的機率是 0.5,所需次數是 1。
  • 輸然後贏的機率是 0.5×0.5=0.250.5 \times 0.5 = 0.25,所需次數是 2。
  • 輸、輸、然後贏的機率是 0.5×0.5×0.5=0.1250.5 \times 0.5 \times 0.5 = 0.125,所需次數是 3。
  • 一般來說,在第 kk 場獲勝的機率是 (0.5)k−1×0.5=(0.5)k(0.5)^{k-1} \times 0.5 = (0.5)^k。

E[N]=∑k=1∞k⋅P(win at game k)E[N] = \sum_{k=1}^{\infty} k \cdot P(\text{win at game } k)
E[N]=∑k=1∞k⋅(0.5)kE[N] = \sum_{k=1}^{\infty} k \cdot (0.5)^k

這是一個標準的幾何分佈期望值的變形。
對於一個機率為 pp 的幾何分佈,其期望值為 1/p1/p。
如果我們將「成功」定義為「在某場遊戲獲勝」,則獲勝的機率是 p=0.5p=0.5。
然而,這裡的「遊戲系列」是定義為「直到第一次獲勝為止」。
所以,在每次遊戲中,獲勝的機率是 p=0.5p=0.5。
因此,贏得一場比賽所需的平均遊戲次數是 1/p=1/0.5=21/p = 1/0.5 = 2。

讓我們驗證一下:
E[N]=1⋅(0.5)1+2⋅(0.5)2+3⋅(0.5)3+4⋅(0.5)4+…E[N] = 1 \cdot (0.5)^1 + 2 \cdot (0.5)^2 + 3 \cdot (0.5)^3 + 4 \cdot (0.5)^4 + \dots
E[N]=0.5+2(0.25)+3(0.125)+4(0.0625)+…E[N] = 0.5 + 2(0.25) + 3(0.125) + 4(0.0625) + \dots
E[N]=0.5+0.5+0.375+0.25+…E[N] = 0.5 + 0.5 + 0.375 + 0.25 + \dots

使用公式 ∑k=1∞kxk=x(1−x)2\sum_{k=1}^{\infty} kx^k = \frac{x}{(1-x)^2},其中 x=0.5x=0.5。
$E[N] = \frac{0.5}{(1-0.5)^2} = \frac{0.5}{(0.5)^2} = \frac{0.5}{0.25} = 2

🔒

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

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

免費註冊

第 5 題30 分

  1. People arrive at a service station according to a Poisson process with the arrival rate of six persons per hour.
    The station has two servers with the same service rate of serving four customers per hour, and the service time
    follows an exponential distribution. The manager of this station is considering two strategies: one queue for
    the two servers and two independent queues for the two servers. For the latter case, switching lines is allowed
    for customers in either line. Which strategy do you think is better? Answer the question by comparing the
    expected waiting time in the system for each customer under the two strategies. You need to use the balance
    equation to derive Pn, the probability of having n persons in the system, first. Then calculate the expected
    number of persons in the system and the expected waiting time in the system for each person. (30%)

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

這一題的完整詳解

本題為一個典型的排隊論 (Queuing Theory) 問題,考驗學生對多伺服器系統的理解,並比較兩種不同排隊策略的優劣。題目要求計算在兩種策略下,顧客在系統中的平均等待時間,並進行比較。

系統參數:

  • 顧客到達過程:卜瓦松過程 (Poisson process),到達率 λ=6\lambda = 6 人/小時。
  • 伺服器數量:c=2c = 2。
  • 單一伺服器服務率:μ=4\mu = 4 人/小時。
  • 服務時間分佈:指數分佈 (exponential distribution)。

系統負載強度 (Traffic Intensity):
ρ=λ/(cμ)=6/(2×4)=6/8=0.75\rho = \lambda / (c \mu) = 6 / (2 \times 4) = 6 / 8 = 0.75。
由於 ρ<1\rho < 1,系統是穩定的。

兩種排隊策略:

策略一:單一隊伍 (Single Queue, First-Come-First-Served, FCFS) 給兩個伺服器。
這是一個 M/M/c 排隊模型,其中 c=2c=2。
我們需要計算 PnP_n (系統中有 nn 個顧客的機率),然後計算 LL (系統中平均顧客數) 和 WW (系統中平均等待時間)。

對於 M/M/c 模型,當 n<cn < c 時,Pn=(λ/μ)nn!P0P_n = \frac{(\lambda/\mu)^n}{n!} P_0。
當 n≥cn \ge c 時,Pn=(λ/μ)nc!cn−cP0P_n = \frac{(\lambda/\mu)^n}{c! c^{n-c}} P_0。
其中 P0P_0 是系統中沒有顧客的機率,由以下公式計算:
P0=[∑n=0c−1(λ/μ)nn!+(λ/μ)cc!11−(λ/cμ)]−1P_0 = \left[ \sum_{n=0}^{c-1} \frac{(\lambda/\mu)^n}{n!} + \frac{(\lambda/\mu)^c}{c!} \frac{1}{1 - (\lambda/c\mu)} \right]^{-1}
λ/μ=6/4=1.5\lambda/\mu = 6/4 = 1.5。
c=2c=2。
λ/cμ=ρ=0.75\lambda/c\mu = \rho = 0.75。

計算 P0P_0:
P0=[(1.5)00!+(1.5)11!+(1.5)22!11−0.75]−1P_0 = \left[ \frac{(1.5)^0}{0!} + \frac{(1.5)^1}{1!} + \frac{(1.5)^2}{2!} \frac{1}{1 - 0.75} \right]^{-1}
P0=[1+1.5+2.25210.25]−1P_0 = \left[ 1 + 1.5 + \frac{2.25}{2} \frac{1}{0.25} \right]^{-1}
P0=[1+1.5+1.125×4]−1P_0 = \left[ 1 + 1.5 + 1.125 \times 4 \right]^{-1}
P0=[2.5+4.5]−1P_0 = \left[ 2.5 + 4.5 \right]^{-1}
P0=[7]−1=1/7P_0 = [7]^{-1} = 1/7。

計算 PnP_n (首先需要 P0P_0):
P0=1/7P_0 = 1/7
P1=(1.5)11!P0=1.5×(1/7)=1.5/7=3/14P_1 = \frac{(1.5)^1}{1!} P_0 = 1.5 \times (1/7) = 1.5/7 = 3/14
P2=(1.5)22!P0=2.252×(1/7)=1.125/7=9/56P_2 = \frac{(1.5)^2}{2!} P_0 = \frac{2.25}{2} \times (1/7) = 1.125/7 = 9/56

對於 n≥c=2n \ge c=2 的情況:
Pn=(1.5)n2!⋅2n−2P0=(1.5)n2⋅2n−217=(1.5)n2n−117P_n = \frac{(1.5)^n}{2! \cdot 2^{n-2}} P_0 = \frac{(1.5)^n}{2 \cdot 2^{n-2}} \frac{1}{7} = \frac{(1.5)^n}{2^{n-1}} \frac{1}{7}

計算系統中平均顧客數 LL (Little's Law: L=λWL = \lambda W):
對於 M/M/c 模型,系統中平均顧客數 LL 可由以下公式計算:
L=λμ+P0(λ/μ)c+1c!c(1−ρ)2L = \frac{\lambda}{\mu} + P_0 \frac{(\lambda/\mu)^{c+1}}{c! c (1-\rho)^2} (錯誤公式)

正確的 M/M/c 模型中,系統中平均顧客數 LL 的計算公式為:
L=∑n=0∞nPnL = \sum_{n=0}^{\infty} n P_n
或者,更常用的公式為:
L=Lq+λ/μL = L_q + \lambda/\mu
其中 LqL_q 是隊伍中平均顧客數。
Lq=P0(λ/μ)cρc!(1−ρ)2L_q = P_0 \frac{(\lambda/\mu)^c \rho}{c! (1-\rho)^2}

計算 LqL_q:
Lq=17(1.5)2×0.752!(1−0.75)2=172.25×0.752×(0.25)2=171.68752×0.0625=171.68750.125=17×13.5=13.5/7L_q = \frac{1}{7} \frac{(1.5)^2 \times 0.75}{2! (1-0.75)^2} = \frac{1}{7} \frac{2.25 \times 0.75}{2 \times (0.25)^2} = \frac{1}{7} \frac{1.6875}{2 \times 0.0625} = \frac{1}{7} \frac{1.6875}{0.125} = \frac{1}{7} \times 13.5 = 13.5/7

計算 LL:
L=Lq+λ/μ=13.5/7+1.5=13.5/7+10.5/7=24/7≈3.43L = L_q + \lambda/\mu = 13.5/7 + 1.5 = 13.5/7 + 10.5/7 = 24/7 \approx 3.43 人。

計算系統中平均等待時間 WW:
根據 Little's Law: L=λWL = \lambda W
W=L/λ=(24/7)/6=24/(7×6)=4/7W = L / \lambda = (24/7) / 6 = 24 / (7 \times 6) = 4/7 小時。
W=(4/7)×60 分鐘≈34.29W = (4/7) \times 60 \text{ 分鐘} \approx 34.29 分鐘。

策略二:兩個獨立隊伍,且允許換線 (Two Independent Queues with Switching)。
這相當於兩個獨立的 M/M/1 排隊系統。
每個伺服器的到達率是 λ′=λ/2=6/2=3\lambda' = \lambda / 2 = 6 / 2 = 3 人/小時。
每個伺服器的服務率是 μ=4\mu = 4 人/小時。
系統負載強度 ρ′=λ′/μ=3/4=0.75\rho' = \lambda' / \mu = 3 / 4 = 0.75。

對於 M/M/1 模型:
P0′=1−ρ′=1−0.75=0.25P_0' = 1 - \rho' = 1 - 0.75 = 0.25。
Pn′=(1−ρ′)(ρ′)n=0.25×(0.75)nP_n' = (1-\rho') (\rho')^n = 0.25 \times (0.75)^n。

🔒

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

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

免費註冊

其他考古題