跳到主要内容

東京大学 情報理工学系研究科 創造情報学専攻 2026年2月実施 筆記試験 第2問

Author

itsuitsuki

Description

Memorized version (English)

Consider a server that can only handle one request at a time.

  • Requests arrive continuously at an arrival rate of λ\lambda.
  • The service rate for processing a request is μ\mu.
  • We define the probabilities for a very small time interval Δt\Delta t as follows:
    • The probability of a new arrival is λΔt\lambda \Delta t.
    • The probability of completing the current task (service completion) is μΔt\mu \Delta t.
    • The probability of more than one event occurring (e.g., two arrivals, or one arrival and one departure) in this interval is negligible (o(Δt)o(\Delta t)).

Let Pn(t)P_n(t) be the probability that there are nn requests in the system (waiting + being served) at time tt. The boundary condition for an empty system is given by:

P0(t+Δt)=P0(t)(1λΔt)+P1(t)μΔtP_0(t+\Delta t) = P_0(t)(1 - \lambda \Delta t) + P_1(t) \mu \Delta t

Answer the following questions.

(1) For n1n \ge 1, derive the expression for Pn(t+Δt)P_n(t+\Delta t) in terms of Pn1(t)P_{n-1}(t), Pn(t)P_n(t), and Pn+1(t)P_{n+1}(t).

(2) Assuming the system reaches a Steady State (where Pn(t)P_n(t) does not change with time as tt \to \infty), find the recurrence relation for PnP_n.

(3) Let the utilization rate be ρ=λ/μ\rho = \lambda / \mu. Using the normalization condition n=0Pn=1\sum_{n=0}^{\infty} P_n = 1, find the explicit expression for PnP_n.

(4) Find the expected number of requests in the system, denoted as LL. You can use the fact that n=0nxn=x(1x)2\sum_{n=0}^{\infty} n x^n = \frac{x}{(1-x)^2} for 0<x<10 < x < 1.

(5) Using Little's Law (L=λWL = \lambda W, where WW is the average time a request spends in the system), find the expression for WW.

(6) Analyze what happens to WW as ρ\rho approaches 1.

Suppose the total cost is given by Cost=Cs+L×CdCost = C_s + L \times C_d, where CsC_s is the fixed cost of the server and CdC_d is the delay cost per request per unit of time.

(7) Given: μ=10\mu=10, λ=8\lambda=8, Cs=10C_s=10, Cd=5C_d=5. Calculate the total cost.

(8) An enhancement is proposed: μ\mu can be increased to 12, but the fixed cost CsC_s will increase to 15. Calculate the new total cost and determine if this change is economically rational.

题目描述

考虑一次只能处理一个请求的服务器:请求以到达率 λ\lambda 连续到来,服务率为 μ\mu。在很小时间 Δt\Delta t 内,新到达概率为 λΔt\lambda\Delta t,当前服务完成概率为 μΔt\mu\Delta t,两个以上事件(如两次到达,或到达与离开同时发生)的概率可忽略,记为 o(Δt)o(\Delta t)。令 Pn(t)P_n(t) 为时刻 tt 系统中(等待加服务中)共有 nn 个请求的概率。空系统边界式为

P0(t+Δt)=P0(t)(1λΔt)+P1(t)μΔt.P_0(t+\Delta t)=P_0(t)(1-\lambda\Delta t)+P_1(t)\mu\Delta t.
  1. n1n\ge1,用 Pn1(t),Pn(t),Pn+1(t)P_{n-1}(t),P_n(t),P_{n+1}(t) 写出 Pn(t+Δt)P_n(t+\Delta t)

  2. 假设 tt\to\infty 达到稳态,即 Pn(t)P_n(t) 不再随时间变化,求 PnP_n 的递推关系。

  3. 定义利用率 ρ=λ/μ\rho=\lambda/\mu。利用归一化 n=0Pn=1\sum_{n=0}^\infty P_n=1,求 PnP_n 的显式表达式。

  4. 求系统内请求数期望 LL。可使用

    n=0nxn=x(1x)2,0<x<1.\sum_{n=0}^\infty nx^n=\frac{x}{(1-x)^2},\qquad0<x<1.
  5. 用 Little 定律 L=λWL=\lambda W 求请求在系统中平均逗留时间 WW

  6. 分析 ρ1\rho\to1WW 的变化。

总成本定义为

Cost=Cs+LCd,Cost=C_s+LC_d,

其中 CsC_s 是服务器固定成本,CdC_d 是每个请求、每单位时间的延迟成本。

  1. 给定 μ=10,λ=8,Cs=10,Cd=5\mu=10,\lambda=8,C_s=10,C_d=5,计算总成本。
  2. 若把 μ\mu 提升到 12,但固定成本 CsC_s 增至 15,计算新总成本并判断该升级在经济上是否合理。

Kai (by Gemini 3 Pro)

1. Derivation of Pn(t+Δt)P_n(t+\Delta t)

To have nn requests at time t+Δtt+\Delta t (where n1n \ge 1), one of three mutually exclusive events must have occurred during the interval Δt\Delta t:

  1. No change: There were nn requests at time tt, and no new arrivals or departures occurred. Probability: Pn(t)(1λΔtμΔt)P_n(t) \cdot (1 - \lambda \Delta t - \mu \Delta t)
  2. One Arrival: There were n1n-1 requests at time tt, and one new request arrived. Probability: Pn1(t)(λΔt)P_{n-1}(t) \cdot (\lambda \Delta t)
  3. One Departure: There were n+1n+1 requests at time tt, and one request was served. Probability: Pn+1(t)(μΔt)P_{n+1}(t) \cdot (\mu \Delta t)

Combining these gives:

Pn(t+Δt)=Pn(t)(1λΔtμΔt)+Pn1(t)λΔt+Pn+1(t)μΔt+o(Δt)P_n(t+\Delta t) = P_n(t)(1 - \lambda \Delta t - \mu \Delta t) + P_{n-1}(t)\lambda \Delta t + P_{n+1}(t)\mu \Delta t + o(\Delta t)

2. Recurrence Relation

Rearrange the equation from Q1 and divide by Δt\Delta t:

Pn(t+Δt)Pn(t)Δt=(λ+μ)Pn(t)+λPn1(t)+μPn+1(t)+o(1)\frac{P_n(t+\Delta t) - P_n(t)}{\Delta t} = -(\lambda + \mu)P_n(t) + \lambda P_{n-1}(t) + \mu P_{n+1}(t) + o(1)

Take the limit as Δt0\Delta t \to 0. The left side becomes the derivative dPn(t)dt\frac{dP_n(t)}{dt}. In the Steady State, probabilities are constant, so dPn(t)dt=0\frac{dP_n(t)}{dt} = 0. Let Pn(t)=PnP_n(t) = P_n.

0=(λ+μ)Pn+λPn1+μPn+10 = -(\lambda + \mu)P_n + \lambda P_{n-1} + \mu P_{n+1}
(λ+μ)Pn=λPn1+μPn+1(\lambda + \mu)P_n = \lambda P_{n-1} + \mu P_{n+1}

This represents the global balance equations. It implies that the rate of entering state nn equals the rate of leaving state nn. The boundary equation gives λP0=μP1\lambda P_0=\mu P_1. For n1n\ge1, the global balance equation says λPnμPn+1=λPn1μPn\lambda P_n-\mu P_{n+1}=\lambda P_{n-1}-\mu P_n. Thus this probability flux equals its boundary value zero, yielding local balance:

λPn=μPn+1\lambda P_n = \mu P_{n+1}
Pn+1=λμPn=ρPnP_{n+1} = \frac{\lambda}{\mu} P_n = \rho P_n

3. Explicit Expression for PnP_n

From the recurrence relation Pn+1=ρPnP_{n+1} = \rho P_n, we can see this is a geometric sequence:

Pn=ρnP0P_n = \rho^n P_0

Using the normalization condition that the sum of all probabilities is 1:

n=0Pn=n=0ρnP0=P0n=0ρn=1\sum_{n=0}^{\infty} P_n = \sum_{n=0}^{\infty} \rho^n P_0 = P_0 \sum_{n=0}^{\infty} \rho^n = 1

Using the geometric series sum formula (assuming ρ<1\rho < 1 for stability):

P011ρ=1    P0=1ρP_0 \cdot \frac{1}{1-\rho} = 1 \implies P_0 = 1 - \rho

Substituting back:

Pn=(1ρ)ρn,0ρ<1.P_n = (1 - \rho)\rho^n,\qquad 0\le\rho<1.

For ρ1\rho\ge1, the sequence cannot be normalized, so no stationary probability distribution exists.

4. Average Number of Requests (LL)

L=E[n]=n=0nPn=n=0n(1ρ)ρnL = E[n] = \sum_{n=0}^{\infty} n P_n = \sum_{n=0}^{\infty} n (1-\rho)\rho^n
L=(1ρ)n=0nρnL = (1-\rho) \sum_{n=0}^{\infty} n \rho^n

Using the given hint n=0nxn=x(1x)2\sum_{n=0}^{\infty} n x^n = \frac{x}{(1-x)^2} with x=ρx = \rho:

L=(1ρ)ρ(1ρ)2L = (1-\rho) \cdot \frac{\rho}{(1-\rho)^2}
L=ρ1ρL = \frac{\rho}{1 - \rho}

5. Average Time in the System (WW)

Using Little's Law: L=λWL = \lambda W.

W=Lλ=1λρ1ρW = \frac{L}{\lambda} = \frac{1}{\lambda} \cdot \frac{\rho}{1-\rho}

Since ρ=λ/μ\rho = \lambda / \mu:

W=1λλ/μ1λ/μ=1λλμλW = \frac{1}{\lambda} \cdot \frac{\lambda/\mu}{1 - \lambda/\mu} = \frac{1}{\lambda} \cdot \frac{\lambda}{\mu - \lambda}
W=1μλW = \frac{1}{\mu - \lambda}

6. Behavior when ρ1\rho \to 1

Hold μ>0\mu>0 fixed and let ρ1\rho\to1^-, equivalently λμ\lambda\to\mu^-:

W=1μ(1ρ)W = \frac{1}{\mu(1-\rho)}

The denominator approaches 0. Therefore, WW \to \infty. This implies that as the arrival rate approaches the service capacity, the average time a request spends in the system grows asymptotically to infinity (the system becomes unstable).

7. Cost Calculation (Current State)

Parameters:

  • μ=10\mu = 10
  • λ=8\lambda = 8
  • Cs=10C_s = 10
  • Cd=5C_d = 5

Calculate ρ\rho and LL:

ρ=810=0.8\rho = \frac{8}{10} = 0.8
L=0.810.8=0.80.2=4L = \frac{0.8}{1 - 0.8} = \frac{0.8}{0.2} = 4

Calculate Total Cost:

Costcurrent=Cs+L×Cd=10+4×5=10+20=30Cost_{current} = C_s + L \times C_d = 10 + 4 \times 5 = 10 + 20 = 30

The current total cost is 30.

8. Enhancement Evaluation

New Parameters:

  • μ=12\mu' = 12
  • λ=8\lambda = 8 (unchanged)
  • Cs=15C_s' = 15
  • Cd=5C_d = 5 (unchanged)

Calculate new ρ\rho' and LL':

ρ=812=23\rho' = \frac{8}{12} = \frac{2}{3}
L=2/312/3=2/31/3=2L' = \frac{2/3}{1 - 2/3} = \frac{2/3}{1/3} = 2

Calculate New Total Cost:

Costnew=Cs+L×Cd=15+2×5=15+10=25Cost_{new} = C_s' + L' \times C_d = 15 + 2 \times 5 = 15 + 10 = 25

Comparison:

  • Original Cost: 30
  • New Cost: 25

Conclusion: Since 25<3025 < 30, the total cost is reduced.

Therefore, the enhancement is economically rational.