113 年 國立臺灣大學工業工程學研究所碩士班產業與服務系統工程組《作業研究》
第 1 題35 分
Consider the following linear programming problem.
Maximize
subject to
(a) What are the values of and if and are the basic variables?
(b) The choice of to be the nonbasic variables eliminates the work required to solve for the basic variables and . Suppose that we choose to increase from zero. How far can we increase the entering variable before stopping without leaving the feasible region?
(c) Increasing to its maximum obtained in (b) moves us from the initial basic feasible solution to the new basic feasible solution. What are the values of the new basic variables?
(d) What is the improvement in the objective function when we perform the iteration in (c)?
(e) Please complete the rest of the simplex method procedures after the initial choice of increasing the entering variable in (b) and indicate the optimal solutions of , and .
登入後即可作答並保存紀錄。
這是一道標準的單體法 (Simplex Method) 問題,考驗考生對線性規劃的初始解、迭代過程、以及判斷最佳解的能力。
首先,我們將線性規劃問題轉換成標準形式,並引入鬆弛變數 (slack variables):
Maximize
subject to
並將目標函數寫成 。
初始單體表(Initial Simplex Tableau):
| Basis | RHS | ||||||
|---|---|---|---|---|---|---|---|
| 1 | -4 | -3 | -6 | 0 | 0 | 0 | |
| 0 | 3 | 1 | 3 | 1 | 0 | 30 | |
| 0 | 2 | 2 | 3 | 0 | 1 | 40 |
(a) 若 和 是基本變數 (basic variables),則非基本變數 (nonbasic variables) 必須為 0。
此時,我們將 代入限制式:
解這個聯立方程式:
由第一個式子 代入第二個式子:
將 代回 :
所以,若 和 是基本變數,則 且 。
【答案】
(b) 題目要求我們選擇 作為進入變數 (entering variable),並判斷其最大可行增量。
從初始單體表中,我們看到 和 為非基本變數(即 )。
若 進入,則 或 必須離開 (leaving variable)。
我們需要計算比率檢定 (ratio test):
對於 :
對於 :
最小的比率是 20,對應到 。因此, 是離開變數。
當 增加時,它受到 限制,最大可以增加到 。
此時,原始變數 可以從 0 增加到 20,而不會離開可行區域。
【答案】 最多可以增加到 20。
(c) 當 從 0 增加到 20 時,我們從初始基本可行解 () 變為新的基本可行解。
在這個過程中, 進入,成為基本變數,而 離開,成為非基本變數(值為 0)。
新的基本變數是 和 。
我們需要計算這些新基本變數的值。
在進行單體法的迭代前,我們需要將 的行 (pivot row) 轉換成單位向量。
從初始單體表,我們知道 是離開變數,其對應的限制式為 。
當 進入,我們將此行除以 pivot element 2:
這是新的 的限制式。
現在,我們需要用新的 限制式來更新其他變數(包括 和目標函數 )。
新的 限制式:
將 代入:
所以,新的基本變數 的值是 10。
新的基本可行解為:。
(由 得到,因為 )
(由 得到,因為 )
新的基本變數是 和 。
【答案】新的基本變數為 。
(d) 我們需要計算目標函數 的改進量。
在 (c) 中,我們從初始基本可行解 () 變為新的基本可行解 ()。
初始目標函數值 。
新的目標函數值 。
改進量是 。
或者,我們也可以從單體表的更新來計算:
更新 的行:
原始 行:
新的 行:
將新的 行乘以 3 (因為原始 行中 的係數是 -3):
從原始 行減去這個式子:
當 時,新的 值是 -60。
這表示在我們更新完 行後,目標函數的 RHS 值是 -60。
這代表了新的 的基礎解。
然而,題目問的是「改進量」。
在 (c) 中,我們從初始解 () 得到的 。
到新的解 () 得到的 。
所以改進量是 60。
【答案】60
(e) 我們需要完成單體法的迭代過程,直到找到最佳解。
我們從 (c) 和 (d) 的結果開始。
新的單體表,其中 是進入變數, 是離開變數。
初始單體表:
| Basis | RHS | ||||||
|---|---|---|---|---|---|---|---|
| 1 | -4 | -3 | -6 | 0 | 0 | 0 | |
| 0 | 3 | 1 | 3 | 1 | 0 | 30 |
第 2 題15 分
Imagine you have $10,000 earmarked for investment in the stock market over the next 4 years. The strategy is to purchase the stock at the beginning of each year. The level of risk in the investment is depicted by a probability distribution governing the stock's returns. In each year, there are 3 different market conditions: a triple return with probability 0.4, maintaining the same invested money with probability 0.2, and losing the invested money with probability 0.4. The objective is to formulate an investment policy that maximizes the cumulative money at the end of year 4. Please use dynamic programming to find the investment policy that maximizes the expected amount of money you will have after 4 years.
登入後即可作答並保存紀錄。
核心觀念
本題考查**隨機動態規劃(Stochastic Dynamic Programming, SDP)**在多階段投資決策中的應用,主要核心概念包括:
- 貝爾曼最佳化原理(Bellman's Principle of Optimality):利用逆向歸納法(Backward Induction),由最後一個階段往回推導各階段的最佳決策。
- 期望值極大化(Expected Value Maximization):在風險中立(Risk-neutral)的假設下,目標為最大化最終期末資產的數學期望值。
- 線性規劃之角隅解特性(Linearity and Corner Solutions):各期期望報酬率固定且大於 0 時,目標函數相對於投資決策變數為嚴格遞增線性函數,最佳決策必為邊界解(全額投資)。
解題方法
1. 定義動態規劃要素
- 階段(Stage):代表第 年的開始()。
- 狀態變數(State Variable):在第 年年初時擁有的總資金(),初始狀態為 $10,000。
- 決策變數(Decision Variable):在第 年年初投入股票市場的金額,決策空間為 。未投資的金額為 。
- 隨機報酬倍數(Random Return Multiplier):第 年投資金額的期末倍數,其機率分配為: 每投入 $1 的期望期末價值為:
- 狀態轉移方程式(State Transition Equation):
- 值函數(Value Function):在第 年年初持有資金 的條件下,持續執行最佳投資策略至第 4 年年末所能獲得的最大期望總金額。
2. 建立動態規劃遞迴關係式(DP Recurrence Relation)
邊界條件(第 4 年年末/第 5 年年初):
遞迴關係式():
3. 逆向歸納推導(Backward Induction)
- 階段 4(): 因為係數 ,此目標式為 的嚴格遞增函數,極大值發生在上限 :
第 3 題15 分
At the NTU post office, a pair of clerks work at distinct levels of efficiency: clerk 1's service time follows an exponential distribution characterized by the rate , whereas clerk 2's service time conforms to an alternative exponential distribution with rate . On a particular day, John arrived at the postal office and started receiving service from clerk 1 at precisely 8:00.
(a) Mary enters at 8:10, what is the probability she sees John is still being served by clerk 1?
(b) Since John is still in service, Mary goes to clerk 2 to be served. What is the probability that Mary finishes her service before John does?
登入後即可作答並保存紀錄。
這是一道關於隨機過程和機率的題目,特別是關於指數分佈的性質。
核心觀念:
- 指數分佈的記憶性 (Memoryless Property):對於任何時間 和 ,若隨機變數 ,則 。這意味著過去的等待時間對未來的剩餘時間沒有影響。
- 指數分佈的最小值的性質:兩個獨立的指數分佈隨機變數的最小值,其分佈仍然是指數分佈,其速率為兩個速率之和。若 且 獨立,則 。
已知:
John 由 clerk 1 服務,服務時間 。
Mary 由 clerk 2 服務,服務時間 。
John 開始服務時間:8:00。
Mary 開始服務時間:8:10。
(a) Mary 在 8:10 到達,約翰在 8:00 開始由 clerk 1 服務。約翰的服務時間是 。
我們想知道 Mary 看見 John 仍然在接受 clerk 1 服務的機率。這意味著 John 的服務時間 必須大於 John 在 8:10 時已經服務的時間。
John 從 8:00 開始服務,到 8:10,他已經服務了 10 分鐘。
所以,我們需要計算 。
由於服務時間是指數分佈,我們需要確定速率 的單位。題目中未明確給出 和 的單位,但通常情況下,速率會與時間單位相關聯(例如,每小時幾位顧客)。假設 和 的單位是 "每分鐘服務人數"。
則 的單位是分鐘。
。
如果 的單位是 "每小時服務人數",則 10 分鐘是 小時。
。
假設 的單位是 "每分鐘" (即每分鐘完成服務的平均數)。
那麼,John 服務時間超過 10 分鐘的機率是:
。
【答案】 (假設 的單位是每分鐘)。
第 4 題10 分
In the given Markov Chain, assume that the initial state is at state 2 with a probability of 0.2 and at state 4 with a probability of 0.8. What is the probability that, after starting (disregarding the initial state), the process never visits state 2 again?
登入後即可作答並保存紀錄。
核心觀念
本題考查馬可夫鏈的「首次再訪」與「永不再訪」機率。由於題目說明「不計初始狀態」,因此即使初始狀態為 2,也只禁止時間 再次進入狀態 2。
先指出:題目所列矩陣第 4 列總和為
不符合轉移機率矩陣每列總和必須為 的條件。以下採用合理修正:第 4 列第一個元素應為 ,即
解題方法
令
由於狀態 1 與狀態 3 都是吸收狀態,且不是狀態 2,因此
由初始狀態 2 出發
雖然一開始位於狀態 2,但不計初始狀態。從狀態 2 出發,下一步:
- 以機率 留在狀態 2,立即違反條件;
- 以機率 轉移至狀態 3,之後永遠不會再到狀態 2。
因此
由初始狀態 4 出發
依修正後的第 4 列:
第 5 題25 分
"The NTU fast-food shop serves two types of customers: ice cream lovers and burger cravers. Both types of customers arrive according to independent Poisson processes with respective rates and . There are two counters in the shop: a general counter and an ice cream counter. The service times at these counters are exponentially distributed with respective rates and . An ice cream lover can be served at both counters but prefers the ice cream counter, whereas burger cravers can only order their meals from the general counter. Due to limited space, queuing inside the shop is not possible. Consequently, both types of customers will leave if they cannot order their desired items immediately upon arrival.
(a) Define the necessary states.
(b) Formulate the balance equations (no need to solve them).
Assuming that you have solved the balance equations and get the long-run probabilities expressed in algebraic form,
(c) what is the average number of customers in the shop?
(d) what is the average time a customer spends in the shop?
(e) what is the fraction of the general counter's customers that are ice cream lovers?"
登入後即可作答並保存紀錄。
核心觀念
本題是「無等待空間、兩服務台」的連續時間馬可夫鏈(Continuous-Time Markov Chain, CTMC)。
- 一般櫃檯服務率為 。
- 冰淇淋櫃檯服務率為 。
- 冰淇淋客偏好冰淇淋櫃檯;冰淇淋櫃檯忙碌且一般櫃檯空閒時,才改至一般櫃檯。
- 漢堡客只能使用一般櫃檯。
- 沒有排隊,因此每個櫃檯只有「忙碌」或「空閒」兩種狀態。
令長期穩態機率為 ,其中:
- 表示一般櫃檯空閒、忙碌;
- 表示冰淇淋櫃檯空閒、忙碌。
因此共有四個狀態:
解題方法:狀態轉移
各狀態的轉移如下:
當處於 時,冰淇淋櫃檯忙碌、一般櫃檯空閒:
- 漢堡客以速率 使用一般櫃檯;
- 冰淇淋客也以速率 改至一般櫃檯。
所以:
最後,在 中兩個櫃檯皆忙碌,新客無法進入,只會離開:
(a) 必要狀態
四個必要狀態為:
分別代表:
| 狀態 | 一般櫃檯 | 冰淇淋櫃檯 |
|---|---|---|
| 空閒 | 空閒 | |
| 忙碌 | 空閒 | |
| 空閒 | 忙碌 | |
| 忙碌 | 忙碌 |
(b) 平衡方程式
對每一個狀態列出「流出率 × 該狀態機率 = 流入率」:
對 :
對 :
對 :
對 :
再加上正規化條件:
其中四條平衡方程式中有一條可由其他方程式與正規化條件推出,因此實際求解時使用其中三條搭配正規化條件即可。
(c) 店內平均顧客數
狀態 有 位顧客, 與 各有 位, 有 位。因此:
這裡的 是長期平均店內顧客數。
(d) 顧客平均停留時間
由於沒有排隊,進入店內的顧客會立即接受服務。必須先計算實際成功進入店內的有效到達率。