112 年 國立成功大學工業與資訊管理學系研究所甲組《作業研究》
第 1 題15 分
The Cost-Less Corp. supplies its four retail outlets from its four plants. The shipping cost per shipment from each plant to each retail outlet is given below.
🖼️【此處有附圖,請對照原卷】
| Plant | Retail Outlet 1 | Retail Outlet 2 | Retail Outlet 3 | Retail Outlet 4 |
|---|---|---|---|---|
| 1 | $500 | $600 | $400 | $200 |
| 2 | $200 | $900 | $100 | $300 |
| 3 | $300 | $400 | $200 | $100 |
| 4 | $200 | $100 | $300 | $200 |
Plants 1, 2, 3, and 4 make 10, 20, 20, and 10 shipments per month, respectively. Retail outlets 1, 2, 3, and 4 need to receive 20, 10, 10, and 20 shipments per month, respectively. The distribution manager, Randy Smith, now wants to determine the best plan for how many shipments to send from each plant to the respective retail outlets each month. Randy's objective is to minimize the total shipping cost.
Starting with the initial basic solution from the northwest corner rule, interactively apply the transportation simplex method to obtain an optimal solution and the optimal value for the distribution manager.
登入後即可作答並保存紀錄。
核心觀念
本題是平衡型運輸問題:
- 供給量總和:
- 需求量總和:
令 表示每月由工廠 運送至零售店 的批數,目標函數為
供給限制:
需求限制:
運輸單純形法使用位勢法。對每個基底格滿足
非基底格的相對成本為
對最小化問題:
- 若所有 ,目前解為最適解。
- 若存在 ,選取負值格子進入基底,沿封閉迴路交替加減,改善總成本。
解題方法:西北角法求初始基本解
依西北角法配置:
由於在 同時耗盡供給與需求,產生退化基本解,補入一個 基底格 。
初始配置如下:
| 零售店 1 | 零售店 2 | 零售店 3 | 零售店 4 | 供給 | |
|---|---|---|---|---|---|
| 工廠 1 | 10 | 0 | 0 | 0 | 10 |
| 工廠 2 | 10 | 10 | 0 | 0 | 20 |
| 工廠 3 | 0 | 0 | 10 | 10 | 20 |
| 工廠 4 | 0 | 0 | 0 | 10 | 10 |
| 需求 | 20 | 10 | 10 | 20 |
初始成本:
第一次改善
取 ,由基底格求得:
主要負相對成本為:
因此 進入基底。
封閉迴路為:
可調整量:
調整後:
成本改善:
因此:
第二次改善
重新計算位勢,得到主要負相對成本:
因此 進入基底。
封閉迴路為:
第 2 題15 分
Consider the problem
(a) [10%] Write down and solve its dual problem.
(b) [5%] Use the optimality of its dual problem to describe that the original problem is infeasible.
登入後即可作答並保存紀錄。
核心觀念
- 原始問題的標準型:最小化問題 (min‑LP) 以「」的形式呈現。
- 對偶問題:若原始問題為
則其對偶為
其中 為自由變數(可正可負)。
- 對偶可行解的可行性證明 (Farkas Lemma):若存在一個對偶可行解 使得 ,則原始問題 不可行。
- 強對偶定理:若原始問題與對偶問題同時有可行解,且至少一者有界,則兩者的最適值相等。若對偶取得有限最適值,則原始必然可行;若對偶無界或不可行,則原始必然不可行。
(a) 寫下並求解對偶問題
1. 轉寫原始問題的標準型
原始題目
把第二條約束寫成不等式形式
於是可寫成標準形式
說明:第一列是等式 ,第二列是「」寫成等式 ;此處直接以不等式加入對偶式會更簡潔,故在對偶推導時直接使用 。
2. 對偶問題的構建
對於最小化問題的標準型,對偶為
把 與 代入:
設對偶變數 (兩個自由變數),對偶問題寫成
簡化得到
第 3 題20 分
Using simplex method to check the optimality of the following linear programming
登入後即可作答並保存紀錄。
核心觀念
- 線性規劃(LP)標準型:最大化目標式,約束式全部以「≤」形式加入鬆弛變數成等式,變數皆非負。
- 單形法(Simplex Method):在相鄰的基本可行解(Basic Feasible Solutions, BFS)之間移動,透過「進基變數」與「出基變數」使目標函數值持續改善,直至所有非基變數的簡化成本(Reduced Cost) ≤ 0(對最大化問題)即為最適。
- 簡化成本:在單形表(Simplex Tableau)中,目標列的係數 ,若全部 ≤ 0,則當前基解已達最適。
解題方法
- 建立標準型
引入鬆弛變數 ,將三個不等式寫成等式:
目標式仍為
-
初始基底
取鬆弛變數 為基變數,原始變數 為非基變數。
初始單形表():基本變數 RHS 1 -2 4 3 20 -4 6 5 4 40 2 -3 3 8 50 Z -5 -1 -3 -4 0 目標列係數皆為負,表示仍可提升 (因為我們使用「」的形式,負值=正向進步的指標)。
-
選擇進基變數
取最負的係數 ()作為進基變數。 -
計算比值測試(Ratio Test)
只考慮 RHS 正且對應係數為正的列:
最小正比值為 ,故第 1 列()為出基變數。
-
第一輪樞紐(Pivot)
以第 1 列第 1 欄的元素 為樞紐,將 換成 。
進行高斯消去:- 第 1 列除以 1(已是 1),得到新基 行。
- 第 2 列: →
- 第 3 列: →
- 目標列: →
更新後的單形表:
| 基本變數 | RHS | ||||
|---|---|---|---|---|---|
| 1 | -2 | 4 | 3 | 20 | |
| 0 | 2 | 21 | 16 | 120 | |
| 0 | 1 | -5 | 2 | 10 | |
| Z | 0 | -11 | 17 | 11 | 100 |
-
檢查是否仍有正向改進的非基變數
目標列中仍有負係數 (對應 ),故需再迭代。 -
第二輪進基變數
選 (係數 -11)為進基變數。 -
第二輪比值測試
只看係數正的列:
最小正比值為 ,故 為出基變數。
-
第二輪樞紐
樞紐元素為第 3 列第 2 欄的 。- 第 3 列除以 1 → 行成 行。
- 第 1 列: →
- 第 2 列: →
- 目標列: →
更新後的單形表:
| 基本變數 | RHS | ||||
|---|---|---|---|---|---|
| 1 | 0 | -6 | 7 | 40 | |
| 0 | 0 | 31 | 12 | 100 |
第 4 題25 分
We model the movement of the taxi as a Markov chain , where the time index represents the number of riders the taxi has transported (groups of riders count as one), and represents the region of the city that is the destination of the th rider. When the taxi delivers a rider, it stays in the destination region until it picks up another rider. The city has three regions, so the state space is . Based on data collected on the movement of several taxis, the following one-step transition matrix has been estimated:
The other matrices are provided as follows:
At the beginning of the day, 40% of the taxis are assigned to start in region 1, 30% in region 2, and the remainder in region 3. Please calculate the following quantities:
a) (5 points) For a taxi that its second rider takes it to region 2, what is the probability that its fourth rider takes it to region 3? (i.e., )
b) (5 points) For a taxi that starts in region 1 and the second rider takes it to region 3, what is the probability that its fourth rider takes it to region 1? (i.e., )
c) (5 points) For any taxi, what is the probability that its fourth rider takes it to region 3?
d) (5 points) The probability that the taxi is in region 3 after the third ride and in region 1 after the fourth ride given that it starts in region 2. (i.e., )
e) (5 points) Given the taxi starts in state 1, the probability of the next five rides going (in order) to regions 2, 3, 1, 3, 2.
登入後即可作答並保存紀錄。
此題為馬可夫鏈(Markov Chain)的應用題,主要考驗對轉移矩陣、多步轉移機率以及初始分佈的理解與計算。
核心觀念:
馬可夫鏈的性質,特別是 步轉移機率由 給出,以及條件機率的計算。
已知資訊:
- 狀態空間
- 一步轉移矩陣
- 多步轉移矩陣: (已提供)
- 初始分佈:, ,
Part (a):
觀念: 馬可夫鏈具有無條件性(Memoryless Property)。過去的狀態不影響未來的轉移機率,只取決於當前狀態。因此,從狀態 到 的機率,只取決於從 開始的後續轉移。
計算:
我們需要計算從狀態 2 到狀態 3 的 2 步轉移機率。這由 矩陣的第 2 行第 3 列元素給出。
觀察提供的 矩陣:
就是 中第 2 行第 3 列的元素。
。
【答案】 0.29
Part (b):
觀念: 同樣利用馬可夫鏈的無條件性。給定 和 的資訊,我們關心的是從 開始,經過 2 步轉移後到達 的機率。過去的資訊 在已知 後,對 的預測沒有額外幫助。
計算:
我們需要計算從狀態 3 到狀態 1 的 2 步轉移機率。這由 矩陣的第 3 行第 1 列元素給出。
觀察提供的 矩陣:
就是 中第 3 行第 1 列的元素。
。
由於馬可夫鏈的無條件性, 。
答案: 0.39
Part (c): For any taxi, what is the probability that its fourth rider takes it to region 3? ()
觀念: 這個機率取決於出租車的初始位置分佈。我們需要計算邊緣機率 。
其中 是初始分佈, 是從狀態 出發,經過 4 步轉移到達狀態 3 的機率。
計算:
初始分佈向量 (對應於狀態 1, 2, 3)。
我們需要計算 矩陣。觀察提供的 矩陣:
答案: 0.2866
Part (d):
觀念: 這是聯合條件機率。給定初始狀態 ,我們需要計算在第 3 步到達狀態 3 且在第 4 步到達狀態 1 的機率。
利用無條件性,。
第 5 題25 分
A retail store manages the inventory of washing machines using a (q, Q)-policy, which works as follows: When the number of machines in stock decreases to a fixed value q, an order is placed with the manufacturer for Q new washing machines. It takes a random amount of time for the order to be delivered; the mean delivery time is 2 days (also exponential). If the inventory is at most q when an order is delivered (including the newly delivered order), another order for Q items is placed immediately. Demands for washing machines occur according at a rate of 2 per day (time between demands is exponential). Demands that are not immediately satisfied are lost. Assuming that q = 2 and Q = 1, answer the following questions:
CTMC (Continuous Time Markov Chain)
a) (5 points) Construct an appropriate CTMC to describe this system. Assume that all inter-event times are independent and exponentially distributed. That is, describe the state variable, state space, and the transition rate diagram.
b) (10 points) If there are currently two washing machines in the store, what is the probability that the store runs out of washing machines before it has the maximum number of washing machines in stock?
c) (10 points) Compute the long-run average inventory in the store.
登入後即可作答並保存紀錄。
核心觀念
- (q,Q) 庫存政策可用 持續時間馬可夫鏈 (CTMC) 來描述:狀態為「手頭機器數 + 是否有未到貨的訂單」;所有事件(需求、交貨)皆為指數分布且相互獨立。
- 先到達 0(缺貨)或 3(最大庫存)之間的先後次序,可用 嵌入離散鏈的先到達概率 來計算。
- 長期平均庫存 由 平衡分佈(stationary distribution)求得:πQ = π 其中 Q 為速率矩陣。
a) CTMC 建模
| 變數 | 說明 |
|---|---|
| 店內即時在手洗衣機數(不含已下單尚未到貨之機器) | |
| 訂單狀態 | 因 Q=1,若 必有 一筆未到貨的訂單。因此只要 時即表示「有訂單在途」; 時表示「目前無未到貨訂單」。 |
狀態空間
- 0、1、2:手頭機器分別為 0、1、2,且 已下單(尚未到貨)。
- 3:手頭機器為 3,沒有待交付訂單。
速率 (Rate)
- 需求到達率 件/天(指數分布)。
- 訂單送達率 件/天(平均 2 天)。
| 從 → 到 | 速率 |
|---|---|
| 3 → 2 | (需求) |
| 2 → 1 | |
| 2 → 3 | (交貨) |
| 1 → 0 | |
| 1 → 2 | |
| 0 → 1 | |
| 0 → 0 | (需求失效) |
轉移率圖(文字說明)
- 3 用唯一的向左弧(需求)以速率 2 轉至 2。
- 2 有兩條出弧:向左(需求)速率 2 到 1;向右(交貨)速率 0.5 到 3。
- 1 同理:向左速率 2 到 0;向右速率 0.5 到 2。
- 0 只有向右弧(交貨)速率 0.5 到 1,需求時因無庫存直接遺失,狀態保持不變。
b) 「從兩台開始」先缺貨再達到最高庫存的機率
設
.
則邊界條件
利用 嵌入離散鏈,在每一次跳躍時的轉移機率為速率比:
- 從 2:,
。 - 從 1:,。
寫出一次步驟的期望方程式
代入 :
解得
答案