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 .
登入後即可作答並保存紀錄。
核心觀念
本題考查線性規劃(Linear Programming)單體法(Simplex Method)之幾何代數意涵、基本可行解(BFS)轉換與樞紐運算:
- 標準型與鬆弛變數:
引入鬆弛變數 ,將不等式化為等式約束: - 基本解與基本可行解(BFS):
變數個數 ,方程式個數 。令 個變數為非基本變數(令為 0),解出其餘 個基本變數。若基本變數皆非負,則為基本可行解。 - 進入變數與最小比值檢定(Minimum Ratio Test):
當選擇某非基本變數增加時,其增加上限由保證現有基本變數維持非負的最小比值決定,達到該上限時必有一基本變數降為零而離開基底(離開變數)。
解題方法
逐小題推導計算:
(a) 當 與 為基本變數時之數值
此時非基本變數為 。約束條件化為:
由式 (2) 減去式 (1):
將 代回式 (1):
故基本變數之值為 。
(b) 初始狀態下 最多可增加之幅度
初始非基本變數為 ,初始基本變數為 。
當僅增加進入變數 (保持 )時,約束方程式變為:
依最小比值檢定,為維持可行解非負性,在離開可行區前, 最大可增加至:
(c) 新基本變數之數值
當 增加至極限 時:
- ,故 變為非基本變數(離開基底)。
- 成為新基本變數,其值為 。
- 原基本變數 之新值為:。
新基本變數為 。
(d) 執行此迭代時目標函數之改進量
初始目標函數值 。
迭代後之目標函數值:
目標函數之改進量(增加量)為:
(e) 完成後續單體法步驟求最佳解
以新基底變數 建立單體表方程式:
由 列(原式 2 除以 2):
代入 列:
代入目標函數列:
即 列方程式為:
第 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():
同理,:
-
階段 2():
最佳決策為 :
第 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 分鐘的機率是:
。
【答案】 (假設 的單位是每分鐘)。
(b) 題目說「Since John is still in service, Mary goes to clerk 2 to be served.」。這意味著 Mary 在 8:10 到達時,John 確實還在服務。
Mary 由 clerk 2 服務,服務時間 。
John 仍然由 clerk 1 服務,剩餘服務時間 。
由於指數分佈的記憶性,John 剩餘的服務時間 的分佈與原始的 相同,即 。
Mary 在 8:10 開始由 clerk 2 服務。
第 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 列:
- 以機率 轉移至狀態 2,失敗;
- 以機率 轉移至狀態 3,成功;
- 以機率 留在狀態 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) 顧客平均停留時間
由於沒有排隊,進入店內的顧客會立即接受服務。必須先計算實際成功進入店內的有效到達率。
冰淇淋客只有在兩個櫃檯皆忙碌,即狀態 時才會流失,因此有效到達率為:
漢堡客只要一般櫃檯空閒即可接受服務,因此有效到達率為:
所以所有實際進入店內顧客的有效到達率為:
依 Little 定律 ,顧客進入店內後的平均停留時間為:
若題目將「所有外部到達顧客」也納入平均,並把無法進入者的停留時間視為 ,則平均時間為: