111 年 國立成功大學工業與資訊管理學系研究所甲組《作業研究》
第 1 題15 分
- (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)是以節點代表活動,箭頭代表活動之間的先後順序。
- 從起始節點(Start)出發,代表專案開始。
- 活動 A、B 為起始活動,無前置活動,分別連接至 Start。
- 活動 C、F、I 的前置活動為 A,分別從 A 連接出去。
- 活動 D、E 的前置活動為 B,分別從 B 連接出去。
- 活動 G 的前置活動為 C,從 C 連接出去。
- 活動 H 的前置活動為 D,從 D 連接出去。
- 活動 J 的前置活動為 E、G、H,從 E、G、H 三個節點匯集至 J。
- 活動 K 的前置活動為 F、I、J,從 F、I、J 三個節點匯集至 K。
- 專案結束節點(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 分
- (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 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) 問題,考驗學生建立模型、求解、對偶問題以及敏感度分析(透過利潤與成本的比較)的能力。
首先,定義決策變數:
令 為每月生產的汽車數量(以千輛為單位)的轎車 (sedan)。
令 為每月生產的汽車數量(以千輛為單位)的休旅車 (SUV)。
a. 線性規劃問題的建立:
目標是最大化總利潤。
每生產一千輛轎車的利潤為 3 (千美元)。
每生產一千輛休旅車的利潤為 2.5 (千美元)。
總利潤 (千美元) = 。
製造過程受到四個部門的產能限制:
-
金屬沖壓 (Sheet Metal Stamping):
生產一千輛轎車消耗 5% 產能,生產一千輛休旅車消耗 3% 產能。
總產能限制為 100% (即 1)。
所以,。 -
引擎組裝 (Engine Assembly):
生產一千輛轎車消耗 4% 產能,生產一千輛休旅車消耗 5% 產能。
所以,。 -
轎車組裝 (Sedan Assembly):
生產一千輛轎車消耗 3% 產能,生產一千輛休旅車消耗 0% 產能。
所以,,即 。 -
休旅車組裝 (SUV Assembly):
生產一千輛轎車消耗 0% 產能,生產一千輛休旅車消耗 6% 產能。
所以,,即 。
此外,生產數量不能為負:
。
線性規劃模型:
Maximize
Subject to:
(Sheet Metal Stamping)
(Engine Assembly)
(Sedan Assembly)
(SUV Assembly)
b. 求解線性規劃問題:
我們可以利用圖解法或單形法 (Simplex Method) 來求解。由於只有兩個決策變數,圖解法較為直觀。
首先,將限制式轉換為等式,找出邊界線:
-
若 ,
若 ,
兩點為 (0, 33.33) 和 (20, 0) -
若 ,
若 ,
兩點為 (0, 20) 和 (25, 0) -
垂直線 -
水平線
可行區域由這些限制式定義,並且 。
找出可行區域的頂點 (corner points):
-
原點 (0, 0)。
-
軸上的點:由 和 限制,且 。
(來自限制式1)
(來自限制式2)
(來自限制式3)
所以,在 時, 的最大值為 20。頂點為 (20, 0)。 -
軸上的點:由 和 限制,且 。
(來自限制式1)
(來自限制式2)
(來自限制式4)
所以,在 時, 的最大值為 16.67。頂點為 (0, 16.67)。 -
限制式 1 和 2 的交點:
乘以 5 和 3:
相減:
代入 :
交點為 (200/13, 100/13)。
檢查此點是否滿足其他限制:
(OK)
(OK)
所以 (200/13, 100/13) 是可行區域的頂點。 -
限制式 1 和 4 的交點:
交點為 (10, 50/3)。
檢查此點是否滿足其他限制:
(OK)
(不滿足限制式 2)。
所以此點不在可行區域內。 -
限制式 2 和 3 的交點:
(不可能,因為 )
或者從 來看, 最大只能到 33.33。而 在 時,
,這是不可能的。
所以限制式 3 () 並沒有與限制式 2 () 在可行區域內構成新的頂點,因為 在限制式 2 下的極值是 25。 -
限制式 2 和 4 的交點:
交點為 (25/6, 50/3)。
檢查此點是否滿足其他限制:
(OK)
(OK)
所以 (25/6, 50/3) 是可行區域的頂點。
第 3 題15 分
- (15%) Consider the following mathematical programming problem:
Maximize
Subject to
and are integer.
Please solve the problem by dynamic programming method.
登入後即可作答並保存紀錄。
核心觀念
- 動態規劃(Dynamic Programming, DP)之乘積限制式模型:
本題為典型的非線性整數規劃問題(Nonlinear Integer Programming)。雖然目標函數為可加分離(Additively Separable),但限制式為乘積形式(Multiplicative Constraint)。在 DP 建模時,狀態轉移並非傳統的「加減法消耗資源」,而是「除法分配因子」。 - 變數可行域分析:
限制條件包含 且為整數,由於 ,任何變數皆不可為 。因此 必為正整數,且皆為 的正因數,即 。 - 貝爾曼最適性原理(Bellman's Principle of Optimality)與倒推遞迴關係式(Backward Recursion):
將三元變數的同時決策分解為 3 個階段(Stage)的循序決策,利用各階段的狀態值記錄剩餘乘積需求,由後向前逐階求解。
解題方法
採用**倒推動態規劃法(Backward Dynamic Programming)**求解:
1. DP 元素定義
- 階段(Stage ):,分別對應決定決策變數 。
- 狀態(State ):進入階段 時,自階段 至階段 3 尚需達成的乘積目標值。
- 初始狀態:
- 狀態集合:
- 決策變數(Decision Variable ):階段 所選取的數值,其可行集合為 的正整數因數,即 。
- 狀態轉移方程式(State Transition Equation):
- 各階段收益函數(Stage Return ):
- 遞迴關係式(Recursive Relation):
令 為在狀態 下,從階段 進行至階段 3 所能獲得的最大總收益: 邊界條件(Stage 3):
2. 逐階段遞迴計算
【Stage 3】(決定 )
在最後階段,為滿足乘積條件,必須使 :
【Stage 2】(決定 )
遞迴公式為:
- 當 時,:
- 當 時,:
- 當 時,:
第 4 題20 分
- 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 美元所需的平均總下注金額(成本)。
分析一個「遊戲系列」:
一個遊戲系列是指從開始下注 B_kkWLP(W) = P(L) = 0.5$。
情況 1:第一場就贏。
- 下注 。
- 贏得 $1。
- 遊戲系列結束。
- 總遊戲次數 = 1。
- 總下注金額 = 1。
情況 2:第一場輸,第二場贏。
- 第一場下注 ,輸。
- 第二場下注 。
- 贏得 $2。
- 由於贏了,下一場重新下注 $1。
- 遊戲系列結束。
- 總遊戲次數 = 2。
- 總下注金額 = 。
- 淨利潤 = 。
情況 3:第一場輸,第二場輸,第三場贏。
- 第一場下注 ,輸。
- 第二場下注 ,輸。
- 第三場下注 。
- 贏得 $4。
- 由於贏了,下一場重新下注 $1。
- 遊戲系列結束。
- 總遊戲次數 = 3。
- 總下注金額 = 。
- 淨利潤 = 。
一般情況:
假設在第 場遊戲獲勝。
則前 場都輸了,第 場贏了。
下注金額為 。
第 場贏得 。
此時,賭客的淨利潤為 。
這個策略確實保證了在每次系列結束時,淨利潤是 $1 美元。
1. 計算期望的遊戲次數 (Expected number of games needed in each series):
設 為一個遊戲系列所需的平均遊戲次數。
- 贏的機率是 0.5,所需次數是 1。
- 輸然後贏的機率是 ,所需次數是 2。
- 輸、輸、然後贏的機率是 ,所需次數是 3。
- 一般來說,在第 場獲勝的機率是 。
這是一個標準的幾何分佈期望值的變形。
對於一個機率為 的幾何分佈,其期望值為 。
如果我們將「成功」定義為「在某場遊戲獲勝」,則獲勝的機率是 。
然而,這裡的「遊戲系列」是定義為「直到第一次獲勝為止」。
所以,在每次遊戲中,獲勝的機率是 。
因此,贏得一場比賽所需的平均遊戲次數是 。
讓我們驗證一下:
使用公式 ,其中 。
$E[N] = \frac{0.5}{(1-0.5)^2} = \frac{0.5}{(0.5)^2} = \frac{0.5}{0.25} = 2
第 5 題30 分
- 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),到達率 人/小時。
- 伺服器數量:。
- 單一伺服器服務率: 人/小時。
- 服務時間分佈:指數分佈 (exponential distribution)。
系統負載強度 (Traffic Intensity):
。
由於 ,系統是穩定的。
兩種排隊策略:
策略一:單一隊伍 (Single Queue, First-Come-First-Served, FCFS) 給兩個伺服器。
這是一個 M/M/c 排隊模型,其中 。
我們需要計算 (系統中有 個顧客的機率),然後計算 (系統中平均顧客數) 和 (系統中平均等待時間)。
對於 M/M/c 模型,當 時,。
當 時,。
其中 是系統中沒有顧客的機率,由以下公式計算:
。
。
。
計算 :
。
計算 (首先需要 ):
對於 的情況:
計算系統中平均顧客數 (Little's Law: ):
對於 M/M/c 模型,系統中平均顧客數 可由以下公式計算:
(錯誤公式)
正確的 M/M/c 模型中,系統中平均顧客數 的計算公式為:
或者,更常用的公式為:
其中 是隊伍中平均顧客數。
計算 :
計算 :
人。
計算系統中平均等待時間 :
根據 Little's Law:
小時。
分鐘。
策略二:兩個獨立隊伍,且允許換線 (Two Independent Queues with Switching)。
這相當於兩個獨立的 M/M/1 排隊系統。
每個伺服器的到達率是 人/小時。
每個伺服器的服務率是 人/小時。
系統負載強度 。
對於 M/M/1 模型:
。
。