Menu Close

Queueing theory: UPSC Statistics Optional PYQ Solutions (1995–2026)

All 37 questions UPSC has asked on queueing theory in the Statistics Optional (Paper II, Optimization Techniques) from 1995 to 2026, solved step by step – latest first.

Try them yourself first: the same questions, without solutions, are on our Optimization Techniques topic-wise PYQs page.

How we check these solutions

These are our own solutions, prepared with AI help. UPSC does not publish official answers. Every solution is checked a second way before it goes up, and says how:

  • ✓ Checked by computer the numbers were worked out again independently in code (Python with NumPy/SciPy) and matched.
  • ✓ Proof checked step by step for “prove that” and “examine whether” questions, every step was checked against the definitions and the standard theorems.
  • ✓ Derivation checked step by step for derivations and approximations, every step was checked, and the result was also tested numerically.
  • ✓ Answer checked step by step for descriptive questions, every point was checked against the standard theory.

Spotted a mistake or a neater method? Tell us in the comments below or through Report an error.

Jump to a question (year · question number):

2026 · 4c(ii) 2025 · 1e 2024 · 4a 2023 · 4c 2022 · 3b 2022 · 8b 2021 · 3a 2020 · 4b 2019 · 4b 2017 · 2b 2015 · 1d 2015 · 3c 2014 · 1d 2014 · 3a 2013 · 3a 2012 · 2c 2011 · 1b 2011 · 2b 2011 · 3b 2010 · 1b 2010 · 3b 2007 · 1e 2006 · 1e 2006 · 4c 2005 · 1e 2004 · 1e 2003 · 3c 2002 · 3c 2001 · 1f 1999 · 8a 1999 · 8b 1999 · 8c 1998 · 10a 1997 · 9c 1996 · 9b 1996 · 9c 1995 · 9a

Cover of the UPSC Prelims Topic-wise PYQ book with detailed explanations

From the Optional Province team

Preparing for Prelims too?

Our UPSC Prelims Topic-wise PYQ Book covers every Prelims question with detailed explanations, so you can see exactly where UPSC asks from. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

In a local post office, a particular service is operated by one person. The arrival pattern of customers on a particular day follows a Poisson distribution with a mean arrival rate of 10 people per hour. Customers are served on a First-Come, First-Served (FCFS) basis and the service time is estimated to be exponentially distributed with an average time of 4 minutes. Determine: (I) Probability (there is no queue) (II) The average size of the queue (III) The expected waiting time in the queue (IV) Probability (a customer will spend less than 12 minutes in the queue)

2026 · Paper II · Q4c(ii) · 10 marks

Solution

Model. M/M/1 with λ=10\lambda=10 per hour and mean service 4 minutes, so μ=15\mu=15 per hour; ρ=λ/μ=23\rho=\lambda/\mu=\frac23. In steady state pn=(1−ρ)ρnp_n=(1-\rho)\rho^n.

(I) Probability that there is no queue. There is no queue when at most one customer is present (the one being served): P(n≤1)=p0+p1=(1−ρ)(1+ρ)=1−ρ2=1−49=59≈0.556.P(n\le1)=p_0+p_1=(1-\rho)(1+\rho)=1-\rho^2=1-\tfrac49=\tfrac59\approx0.556 . (The probability that the system is completely empty is p0=1−ρ=13p_0=1-\rho=\frac13.)

(II) Average size of the queue. Lq=ρ21−ρ=4/91/3=43≈1.33 customers.L_q=\frac{\rho^2}{1-\rho}=\frac{4/9}{1/3}=\frac43\approx1.33\text{ customers}. (The average length of the queues that actually form, E(queue∣queue>0)=11−ρ=3E(\text{queue}\mid\text{queue}>0)=\frac1{1-\rho}=3.)

(III) Expected waiting time in the queue. Wq=λμ(μ−λ)=1015×5=215 hour=8 minutes.W_q=\frac{\lambda}{\mu(\mu-\lambda)}=\frac{10}{15\times5}=\frac2{15}\text{ hour}=8\text{ minutes}.

(IV) Probability of waiting less than 12 minutes in the queue. For M/M/1 (FCFS), P(Wq>t)=ρe−(μ−λ)tP(W_q>t)=\rho\,e^{-(\mu-\lambda)t}. With t=12t=12 min =0.2=0.2 hour, (μ−λ)t=5×0.2=1(\mu-\lambda)t=5\times0.2=1: P(Wq<0.2)=1−23e−1=1−0.2453=0.755.P(W_q<0.2)=1-\tfrac23e^{-1}=1-0.2453=\boxed{0.755}.

✓ Checked by computer We checked in Python: with λ = 10 and μ = 15 per hour, P(n ≤ 1) = 5/9, Lq = 4/3, Wq = 8 minutes and P(Wq < 12 min) = 1 − (2/3)e⁻¹ = 0.7547.

↑ Back to the question list

On the average, 96 patients per 24-hour day require the service of an emergency clinic. Also, on the average, a patient requires 10 minutes of active attention. Assume that the facility can handle only one emergency at a time. Suppose that it costs the clinic ₹ 1,000 per patient treated to obtain an average serving time of 10 minutes, and that each minute of decrease in this average time would cost the clinic ₹ 100 per patient treated. How much would have to be budgeted by the clinic to decrease the average size of the queue from 113 patients to 12 patient?

2025 · Paper II · Q1e · 10 marks

Solution

Present situation. λ=96/24=4\lambda=96/24=4 patients per hour; service 10 minutes, so μ=6\mu=6 per hour; ρ=23\rho=\frac23. Lq=ρ21−ρ=4/91/3=43=113 patients✓L_q=\frac{\rho^2}{1-\rho}=\frac{4/9}{1/3}=\frac43=1\tfrac13\text{ patients}\quad\checkmark

Required service rate. We want Lq=12L_q=\frac12: ρ21−ρ=12\frac{\rho^2}{1-\rho}=\frac12 ⇒2ρ2+ρ−1=0\Rightarrow\ 2\rho^2+\rho-1=0 ⇒(2ρ−1)(ρ+1)=0\Rightarrow\ (2\rho-1)(\rho+1)=0 ⇒ρ=12.\Rightarrow\ \rho=\frac12 . So μ=λ/ρ=8\mu=\lambda/\rho=8 per hour: the average service time must fall to 60/8=7.560/8=7.5 minutes, a decrease of 2.52.5 minutes.

Cost. Each minute of decrease costs ₹100 per patient, so the cost per patient becomes ₹1,000+2.5×₹100=₹1,250.₹1{,}000+2.5\times₹100=₹1{,}250 . With 96 patients a day, the budget is 96×1,250=₹1,20,000 per day,96\times1{,}250=₹1{,}20{,}000\text{ per day}, compared with 96×1,000=₹96,00096\times1{,}000=₹96{,}000 now. The clinic must budget ₹1,250 per patient (₹1,20,000 a day), an extra ₹24,000 a day.

✓ Checked by computer We checked in Python: λ = 4 and μ = 6 per hour give Lq = 4/3; Lq = 1/2 needs ρ = 1/2 (root of 2ρ² + ρ − 1 = 0), i.e. μ = 8 per hour, a 7.5-minute service.

↑ Back to the question list

A manually handled toll-booth has two tellers, who are each capable of handling an average of 60 vehicles per hour, with the actual service times exponentially distributed. Vehicles arrive at the booth according to a Poisson process, at an average rate of 100 per hour. Determine the following: (i) The probability that there are more than three vehicles in the booth at the same time (ii) The probability that a given teller is idle (iii) The probability that a vehicle spends more than 3 minutes in the booth.

2024 · Paper II · Q4a · 15 marks

Solution

Model. M/M/2: λ=100\lambda=100 per hour, μ=60\mu=60 per hour per teller, c=2c=2. r=λ/μ=53r=\lambda/\mu=\frac53, ρ=rc=56<1\rho=\frac{r}{c}=\frac56<1.

Steady-state probabilities. P0=[1+r+r22!(1−ρ)]−1=[1+53+25/91/3]−1=[333]−1=111.P_0=\left[1+r+\frac{r^2}{2!(1-\rho)}\right]^{-1}=\left[1+\frac53+\frac{25/9}{1/3}\right]^{-1}=\left[\frac{33}{3}\right]^{-1}=\frac1{11}. P1=rP0=533P_1=rP_0=\frac5{33}, and for n≥2n\ge2, Pn=rn2⋅2n−2P0P_n=\frac{r^n}{2\cdot2^{n-2}}P_0: P2=25198P_2=\frac{25}{198}, P3=1251188P_3=\frac{125}{1188}.

(i) More than three vehicles in the booth. P(n>3)=1−(P0+P1+P2+P3)=1−108+180+150+1251188=6251188≈0.526.P(n>3)=1-(P_0+P_1+P_2+P_3)=1-\frac{108+180+150+125}{1188}=\frac{625}{1188}\approx\boxed{0.526}.

(ii) A given teller is idle. The expected number of busy tellers is r=53r=\frac53, so each teller is busy a fraction ρ=56\rho=\frac56 of the time and idle with probability 1−ρ=16≈0.167.1-\rho=\frac16\approx0.167 . (Check: both idle when n=0n=0; one of the two idle when n=1n=1: P0+12P1=111+566=16P_0+\frac12P_1=\frac1{11}+\frac5{66}=\frac16.)

(iii) A vehicle spends more than 3 minutes in the booth. The probability of having to wait (Erlang C) is C=r22!(1−ρ)P0=253⋅111=2533.C=\frac{r^2}{2!(1-\rho)}P_0=\frac{25}{3}\cdot\frac1{11}=\frac{25}{33}. For M/M/c, the time in the system WW = waiting + service satisfies P(W>t)=e−μt[1+C1−e−μt(c−1−r)c−1−r].P(W>t)=e^{-\mu t}\left[1+C\,\frac{1-e^{-\mu t(c-1-r)}}{c-1-r}\right]. In minutes μ=1\mu=1, t=3t=3, c−1−r=−23c-1-r=-\frac23: P(W>3)=e−3[1+2533⋅1−e2−2/3]=0.0498[1+0.7576×9.584]=0.0498×8.261≈0.411.P(W>3)=e^{-3}\left[1+\frac{25}{33}\cdot\frac{1-e^{2}}{-2/3}\right]=0.0498\,[1+0.7576\times9.584]=0.0498\times8.261\approx\boxed{0.411}. About 41% of vehicles spend more than 3 minutes at the booth (the average time in the booth is W=L/λ=5.45/100W=L/\lambda=5.45/100 hour ≈3.3\approx3.3 minutes).

✓ Checked by computer We checked in Python and by simulation (400,000 vehicles): P₀ = 1/11, P(n > 3) = 625/1188 = 0.526, idle probability per teller 1/6, and P(W > 3 min) = 0.411 (simulation 0.416).

↑ Back to the question list

A departmental store operates with three checkout counters. To determine the number of counters in operation based on the number of customers, the manager uses the following schedule:

Number of customers in store Number of customers in operation
1 to 3 1
4 to 6 2
More than 6 3

Customers arrive in the counter(s) according to a Poisson distribution with a mean rate of 10 customers/hour. The average checkout time per customer is exponential with mean 12 minutes. Determine the steady state probability pn of n customers in the checkout area.

2023 · Paper II · Q4c · 15 marks

Solution

Model. A birth–death queue with arrival rate λ=10\lambda=10 per hour and, since checkout takes 12 minutes on average, a service rate of 55 per hour per counter. The number of counters open depends on the number nn in the checkout area, so the total service rate is μn={5,n=1,2,3(1 counter)10,n=4,5,6(2 counters)15,n≥7(3 counters)\mu_n=\begin{cases}5,&n=1,2,3\ (1\text{ counter})\\10,&n=4,5,6\ (2\text{ counters})\\15,&n\ge7\ (3\text{ counters})\end{cases}

Balance equations. In steady state λpn−1=μnpn\lambda p_{n-1}=\mu_np_n, so pn=λμnpn−1p_n=\dfrac{\lambda}{\mu_n}p_{n-1}:

  • n=1,2,3n=1,2,3: ratio 105=2\frac{10}5=2: p1=2p0p_1=2p_0, p2=4p0p_2=4p_0, p3=8p0p_3=8p_0.
  • n=4,5,6n=4,5,6: ratio 1010=1\frac{10}{10}=1: p4=p5=p6=8p0p_4=p_5=p_6=8p_0.
  • n≥7n\ge7: ratio 1015=23\frac{10}{15}=\frac23: pn=8(23)n−6p0p_n=8\left(\frac23\right)^{n-6}p_0.

Normalise. p0[1+2+4+8+8+8+8+8∑k=1∞(23)k]=p0[39+8×2]=55p0=1.p_0\left[1+2+4+8+8+8+8+8\sum_{k=1}^\infty\left(\tfrac23\right)^k\right]=p_0\,[39+8\times2]=55\,p_0=1 . So p0=155p_0=\frac1{55} and pn={2n55,n=0,1,2,3855,n=4,5,6855(23)n−6,n≥7p_n=\begin{cases}\dfrac{2^n}{55},&n=0,1,2,3\\[2mm]\dfrac8{55},&n=4,5,6\\[2mm]\dfrac8{55}\left(\dfrac23\right)^{n-6},&n\ge7\end{cases}

Uses. P(one counter open)=p1+p2+p3=1455=0.255P(\text{one counter open})=p_1+p_2+p_3=\frac{14}{55}=0.255; two counters: 2455=0.436\frac{24}{55}=0.436; three counters: P(n≥7)=1655=0.291P(n\ge7)=\frac{16}{55}=0.291; all idle: 155=0.018\frac1{55}=0.018.

✓ Checked by computer We checked in Python (exact fractions): the birth–death ratios 2, 2, 2, 1, 1, 1, then 2/3, give a normalising sum of 55, so p₀ = 1/55.

↑ Back to the question list

Explain the structure of a queuing system. Explain M/M/1 queuing system and obtain steady-state solution. Also calculate busy period distribution.

2022 · Paper II · Q3b · 15 marks

Solution

Structure of a queueing system.

  1. Input (arrival) process — the calling population (finite or infinite), the pattern of arrivals (inter-arrival time distribution: Poisson/exponential, constant, general), single or bulk arrivals, and customer behaviour (balking, reneging, jockeying).
  2. Queue discipline — the order of service: FCFS/FIFO, LCFS, service in random order, priority.
  3. Service mechanism — number of servers (channels), service time distribution, single or batch service, servers in series or parallel.
  4. Capacity — maximum number allowed in the system (finite or infinite).

These are summarised in Kendall’s notation (a/b/c):(d/e/f)(a/b/c):(d/e/f).

M/M/1 system. Poisson arrivals at rate λ\lambda, exponential service at rate μ\mu, one server, FCFS, unlimited capacity. Let pn(t)=P(n in system at t)p_n(t)=P(n\text{ in system at }t). In (t,t+h)(t,t+h) an arrival occurs with probability λh+o(h)\lambda h+o(h) and a service completion (if n≥1n\ge1) with probability μh+o(h)\mu h+o(h). So pn′(t)=−(λ+μ)pn(t)p_n'(t)=-(\lambda+\mu)p_n(t) +λpn−1(t)+μpn+1(t),n≥1,\qquad+\lambda p_{n-1}(t)+\mu p_{n+1}(t),\quad n\ge1, p0′(t)=−λp0(t)+μp1(t).p_0'(t)=-\lambda p_0(t)+\mu p_1(t).

Steady state (pn′=0p_n'=0, ρ=λ/μ<1\rho=\lambda/\mu<1): λp0=μp1,\lambda p_0=\mu p_1, (λ+μ)pn=λpn−1+μpn+1.(\lambda+\mu)p_n=\lambda p_{n-1}+\mu p_{n+1}. These give μpn+1−λpn=μpn−λpn−1\mu p_{n+1}-\lambda p_n=\mu p_n-\lambda p_{n-1}, and repeating down to n=0n=0 this equals μp1−λp0=0\mu p_1-\lambda p_0=0; so pn+1=ρpnp_{n+1}=\rho p_n and pn=ρnp0p_n=\rho^np_0. From ∑pn=1\sum p_n=1, p0=1−ρp_0=1-\rho: pn=(1−ρ)ρn,n=0,1,2,…\boxed{p_n=(1-\rho)\rho^n,\quad n=0,1,2,\dots} Hence L=ρ1−ρL=\frac\rho{1-\rho}, Lq=ρ21−ρL_q=\frac{\rho^2}{1-\rho}, W=1μ−λW=\frac1{\mu-\lambda}, Wq=ρμ−λW_q=\frac\rho{\mu-\lambda}.

Busy period. A busy period starts when a customer arrives to an empty system and ends when the server next becomes idle. Let BB be its length and B*(s)=Ee−sBB^*(s)=E\,e^{-sB}.

Functional equation. Condition on the first service time SS (exponential, S*(s)=μμ+sS^*(s)=\frac\mu{\mu+s}). During SS, a Poisson(λS\lambda S) number AA of customers arrive; each of them generates, in turn, a sub-busy period with the same distribution as BB (independent). So B=S+B1+…+BAB=S+B_1+\dots+B_A and B*(s)=E[e−sS(B*(s))A]B^*(s)=E\left[e^{-sS}\big(B^*(s)\big)^A\right] =E[e−sSe−λS(1−B*(s))]=E\left[e^{-sS}e^{-\lambda S(1-B^*(s))}\right] =S*(s+λ−λB*(s)).=S^*\big(s+\lambda-\lambda B^*(s)\big). With exponential service, B*(s)=μμ+s+λ−λB*(s)B^*(s)=\frac{\mu}{\mu+s+\lambda-\lambda B^*(s)} ⇒λB*2−(λ+μ+s)B*+μ=0,\Rightarrow\ \lambda B^{*2}-(\lambda+\mu+s)B^*+\mu=0, and the root with B*(0)=1B^*(0)=1 (for ρ<1\rho<1) is B*(s)=a(s)−a(s)2−4λμ2λ,B^*(s)=\frac{a(s)-\sqrt{a(s)^2-4\lambda\mu}}{2\lambda}, where a(s)=λ+μ+sa(s)=\lambda+\mu+s.

Distribution. Inverting the transform, the busy period has density fB(t)=1tμλe−(λ+μ)tI1(2tλμ),t>0,f_B(t)=\frac1t\sqrt{\frac\mu\lambda}\;e^{-(\lambda+\mu)t}\,I_1\!\left(2t\sqrt{\lambda\mu}\right),\quad t>0, where I1I_1 is the modified Bessel function of the first kind.

Moments. E(B)=−B*′(0)=1μ−λE(B)=-B^{*\prime}(0)=\dfrac1{\mu-\lambda} and Var(B)=λ+μ(μ−λ)3\operatorname{Var}(B)=\dfrac{\lambda+\mu}{(\mu-\lambda)^3}.

Check: the fraction of time busy is E(B)E(B)+1/λ=1/(μ−λ)1/(μ−λ)+1/λ=ρ\dfrac{E(B)}{E(B)+1/\lambda}=\dfrac{1/(\mu-\lambda)}{1/(\mu-\lambda)+1/\lambda}=\rho ✓.

✓ Derivation checked step by step Every step was checked: the M/M/1 balance equations and their geometric solution, and the busy-period transform B(s) = μ/(μ + s + λ − λB(s)), its root, mean 1/(μ − λ) and density.

↑ Back to the question list

Explain G/M/1 model and show that the steady-state arrival point system has a geometric distribution.

2022 · Paper II · Q8b · 20 marks

Solution

The G/M/1 model. Customers arrive at times t1<t2<…t_1<t_2<\dots with i.i.d. inter-arrival times TT having a general distribution A(t)A(t) (mean 1/λ1/\lambda, Laplace–Stieltjes transform A*(s)=Ee−sTA^*(s)=E\,e^{-sT}). There is one server, service is exponential with rate μ\mu, FCFS, unlimited waiting room; ρ=λ/μ<1\rho=\lambda/\mu<1.

The number in the system N(t)N(t) is not Markov (the time since the last arrival matters), but at arrival instants it is. Let XnX_n = number in the system just before the nnth arrival.

Embedded Markov chain. Between two arrivals, the Xn+1X_n+1 customers present are served at rate μ\mu (exponential, so completions form a Poisson process while the server is busy). Let βk=∫0∞e−μt(μt)kk!dA(t)\beta_k=\int_0^\infty e^{-\mu t}\frac{(\mu t)^k}{k!}\,dA(t) = probability of exactly kk potential service completions during an inter-arrival time. Then Xn+1=Xn+1−Dn+1,X_{n+1}=X_n+1-D_{n+1}, pij=βi+1−j(1≤j≤i+1),p_{ij}=\beta_{i+1-j}\quad(1\le j\le i+1), and pi0=1−∑k=0iβkp_{i0}=1-\sum_{k=0}^{i}\beta_k (everyone is served).

Stationary distribution. We look for πj=∑iπipij\pi_j=\sum_i\pi_ip_{ij}. For j≥1j\ge1: πj=∑i≥j−1πiβi+1−j.\pi_j=\sum_{i\ge j-1}\pi_i\,\beta_{i+1-j}. Try πj=Cσj\pi_j=C\sigma^j: σj=∑i≥j−1σiβi+1−j=σj−1∑k≥0σkβk.\sigma^j=\sum_{i\ge j-1}\sigma^i\beta_{i+1-j}=\sigma^{j-1}\sum_{k\ge0}\sigma^k\beta_k . So σ\sigma must satisfy σ=∑k≥0βkσk=∫0∞e−μteμtσdA(t)=A*(μ(1−σ)).\sigma=\sum_{k\ge0}\beta_k\sigma^k=\int_0^\infty e^{-\mu t}e^{\mu t\sigma}\,dA(t)=A^*\big(\mu(1-\sigma)\big).

A root in (0,1)(0,1). Let g(σ)=A*(μ(1−σ))g(\sigma)=A^*(\mu(1-\sigma)). It is increasing and convex on [0,1][0,1], with g(0)=A*(μ)>0g(0)=A^*(\mu)>0 and g(1)=1g(1)=1, and g′(1)=μE(T)=μλ=1ρ>1.g'(1)=\mu\,E(T)=\frac\mu\lambda=\frac1\rho>1 . So g(σ)<σg(\sigma)<\sigma just below 1, while g(0)>0g(0)>0: the curve crosses the line y=σy=\sigma at a unique σ0∈(0,1)\sigma_0\in(0,1).

Boundary equation. With πj=Cσ0j\pi_j=C\sigma_0^j, the j=0j=0 equation holds automatically because the rows of the transition matrix sum to 1 and the other equations hold. Normalising, C=1−σ0C=1-\sigma_0: πj=(1−σ0)σ0j,j=0,1,2,…\boxed{\pi_j=(1-\sigma_0)\sigma_0^j,\quad j=0,1,2,\dots} So the number of customers found by an arrival has a geometric distribution.

Consequences. An arrival waits with probability σ0\sigma_0; given that it waits, the wait is exponential with rate μ(1−σ0)\mu(1-\sigma_0); Wq=σ0μ(1−σ0)W_q=\dfrac{\sigma_0}{\mu(1-\sigma_0)}, W=1μ(1−σ0)W=\dfrac{1}{\mu(1-\sigma_0)}. For Poisson arrivals, A*(s)=λλ+sA^*(s)=\frac\lambda{\lambda+s} and σ0=ρ\sigma_0=\rho, recovering M/M/1. (Note: the arrival-point distribution differs from the time-average distribution for non-Poisson arrivals.)

✓ Derivation checked step by step Every step was checked: the embedded chain at arrival epochs, its transition probabilities via β_k, the trial solution π_j = (1 − σ)σʲ, the root σ = A*(μ(1 − σ)) in (0, 1) when ρ < 1, and the boundary equation.

↑ Back to the question list

Explain M|G|1 queuing system. Obtain Pollaczek-kinchine formula.

2021 · Paper II · Q3a · 15 marks

Solution

The M/G/1 system. Arrivals are Poisson with rate λ\lambda; service times SS are i.i.d. with a general distribution (mean E(S)=1/μE(S)=1/\mu, variance σ2\sigma^2); one server; FCFS; infinite capacity; ρ=λ/μ<1\rho=\lambda/\mu<1. The number in the system is not Markov in continuous time, but it is at departure instants.

Embedded Markov chain. Let XnX_n be the number left behind by the nnth departing customer and An+1A_{n+1} the number of arrivals during the (n+1)(n+1)th service. Then Xn+1=Xn−U(Xn)+An+1,X_{n+1}=X_n-U(X_n)+A_{n+1}, U(x)={1,x>00,x=0U(x)=\begin{cases}1,&x>0\\0,&x=0\end{cases} The AA’s are i.i.d., independent of XnX_n, with E(A)=λE(S)=ρ,E(A)=\lambda E(S)=\rho, E(A2)=λ2E(S2)+ρE(A^2)=\lambda^2E(S^2)+\rho (given SS, AA is Poisson(λS\lambda S), so E(A2∣S)=λS+λ2S2E(A^2\mid S)=\lambda S+\lambda^2S^2).

Steady state. Let XX have the stationary distribution, so Xn+1X_{n+1} and XnX_n have the same distribution.

  • Taking expectations: E(X)=E(X)−E(U)+ρE(X)=E(X)-E(U)+\rho, so E(U)=P(X>0)=ρE(U)=P(X>0)=\rho. Note U2=UU^2=U and XU=XXU=X.
  • Squaring: Xn+12=Xn2+U2+A2−2XnU+2XnA−2UAX_{n+1}^2=X_n^2+U^2+A^2-2X_nU+2X_nA-2UA. Taking expectations (with AA independent of XX): 0=ρ+E(A2)−2E(X)+2ρE(X)−2ρ2.0=\rho+E(A^2)-2E(X)+2\rho E(X)-2\rho^2 . So 2(1−ρ)E(X)=ρ−2ρ2+λ2E(S2)+ρ=2ρ−2ρ2+λ2E(S2).2(1-\rho)E(X)=\rho-2\rho^2+\lambda^2E(S^2)+\rho=2\rho-2\rho^2+\lambda^2E(S^2).

Pollaczek–Khinchine formula. Since departures see the time-average distribution (they mirror arrivals, which see time averages by PASTA), L=ρ+λ2E(S2)2(1−ρ)=ρ+ρ2+λ2σ22(1−ρ)\boxed{L=\rho+\frac{\lambda^2E(S^2)}{2(1-\rho)}=\rho+\frac{\rho^2+\lambda^2\sigma^2}{2(1-\rho)}} using E(S2)=σ2+1/μ2E(S^2)=\sigma^2+1/\mu^2. Then by Little’s law Lq=ρ2+λ2σ22(1−ρ),L_q=\frac{\rho^2+\lambda^2\sigma^2}{2(1-\rho)}, Wq=λE(S2)2(1−ρ),W_q=\frac{\lambda E(S^2)}{2(1-\rho)}, W=Wq+1μ.W=W_q+\frac1\mu .

Special cases.

  • M/M/1 (σ2=1/μ2\sigma^2=1/\mu^2): Lq=2ρ22(1−ρ)=ρ21−ρL_q=\frac{2\rho^2}{2(1-\rho)}=\frac{\rho^2}{1-\rho} ✓.
  • M/D/1 (σ2=0\sigma^2=0): Lq=ρ22(1−ρ)L_q=\frac{\rho^2}{2(1-\rho)}, half that of M/M/1.

The formula shows that, for the same mean, more variable service times cause longer queues.

(The full distribution: the p.g.f. of XX is P(z)=(1−ρ)(1−z)K(z)K(z)−zP(z)=\dfrac{(1-\rho)(1-z)K(z)}{K(z)-z} with K(z)=S*(λ(1−z))K(z)=S^*(\lambda(1-z)); see Q17.)

✓ Derivation checked step by step Every step was checked: the embedded chain at departures, E(A) = ρ and E(A²) = λ²E(S²) + ρ, the squaring argument, and the resulting formula; it reduces to ρ/(1 − ρ) for exponential service.

↑ Back to the question list

What do you understand by queuing theory? What are its advantages? Discuss the characteristics of M/M/1 model.

2020 · Paper II · Q4b · 15 marks

Solution

Queueing theory is the mathematical study of waiting lines. A queue forms when customers (people, machines, calls, jobs) arrive for service at a facility that cannot serve them all at once. Queueing theory models the arrival pattern, the service mechanism and the queue discipline, and derives measures such as the average number waiting, the average waiting time and the proportion of time the servers are idle. It was founded by A. K. Erlang (1909) for telephone traffic.

Advantages.

  1. It helps balance the cost of service against the cost of waiting — e.g. how many counters, tellers, repair crews or doctors to provide.
  2. It predicts the effect of changes (more servers, faster service, priority rules) without costly experiments.
  3. It gives simple formulas for performance measures, useful for planning and design (ports, toll plazas, hospitals, call centres, computer networks).
  4. It identifies bottlenecks and the effect of variability, improving customer satisfaction and use of resources.
  5. Where formulas fail, it guides simulation models.

Limitations: many real systems do not satisfy the assumptions (Poisson input, exponential service, steady state), and results for complex systems can be hard to obtain.

Characteristics of the M/M/1 model (M/M/1):(∞/FCFS)(M/M/1):(\infty/FCFS):

  • Arrivals: Poisson with mean rate λ\lambda (exponential inter-arrival times, mean 1/λ1/\lambda), from an infinite population; no balking or reneging.
  • Service: exponential with mean rate μ\mu (mean service time 1/μ1/\mu).
  • One server; first-come-first-served; no limit on queue length.
  • Steady state exists if the traffic intensity ρ=λ/μ<1\rho=\lambda/\mu<1.

Results.

Measure Formula
P(nP(n in system)) pn=(1−ρ)ρnp_n=(1-\rho)\rho^n
Server idle / busy p0=1−ρp_0=1-\rho / ρ\rho
Mean number in system LL ρ1−ρ=λμ−λ\dfrac{\rho}{1-\rho}=\dfrac{\lambda}{\mu-\lambda}
Mean queue length LqL_q ρ21−ρ\dfrac{\rho^2}{1-\rho}
Mean time in system WW 1μ−λ\dfrac1{\mu-\lambda}
Mean wait in queue WqW_q λμ(μ−λ)\dfrac{\lambda}{\mu(\mu-\lambda)}
Time in system distribution exponential, rate μ−λ\mu-\lambda
Probability of waiting ρ\rho

The measures are linked by Little’s law, L=λWL=\lambda W, Lq=λWqL_q=\lambda W_q. As ρ→1\rho\to1 the queue and waiting time grow without bound.

✓ Answer checked step by step Every point was checked against the standard M/M/1 results (Poisson input, exponential service, ρ < 1, p_n = (1 − ρ)ρⁿ and the measures L, L_q, W, W_q).

↑ Back to the question list

Explain M/G/1 queues and obtain Pollaczek-Khinchine formula.

2019 · Paper II · Q4b · 20 marks

Solution

(This is the same question as Q7 (2021, 3a) above. The worked solution is repeated here so that each question is complete.)

The M/G/1 system. Arrivals are Poisson with rate λ\lambda; service times SS are i.i.d. with a general distribution (mean E(S)=1/μE(S)=1/\mu, variance σ2\sigma^2); one server; FCFS; infinite capacity; ρ=λ/μ<1\rho=\lambda/\mu<1. The number in the system is not Markov in continuous time, but it is at departure instants.

Embedded Markov chain. Let XnX_n be the number left behind by the nnth departing customer and An+1A_{n+1} the number of arrivals during the (n+1)(n+1)th service. Then Xn+1=Xn−U(Xn)+An+1,X_{n+1}=X_n-U(X_n)+A_{n+1}, U(x)={1,x>00,x=0U(x)=\begin{cases}1,&x>0\\0,&x=0\end{cases} The AA’s are i.i.d., independent of XnX_n, with E(A)=λE(S)=ρ,E(A)=\lambda E(S)=\rho, E(A2)=λ2E(S2)+ρE(A^2)=\lambda^2E(S^2)+\rho (given SS, AA is Poisson(λS\lambda S), so E(A2∣S)=λS+λ2S2E(A^2\mid S)=\lambda S+\lambda^2S^2).

Steady state. Let XX have the stationary distribution, so Xn+1X_{n+1} and XnX_n have the same distribution.

  • Taking expectations: E(X)=E(X)−E(U)+ρE(X)=E(X)-E(U)+\rho, so E(U)=P(X>0)=ρE(U)=P(X>0)=\rho. Note U2=UU^2=U and XU=XXU=X.
  • Squaring: Xn+12=Xn2+U2+A2−2XnU+2XnA−2UAX_{n+1}^2=X_n^2+U^2+A^2-2X_nU+2X_nA-2UA. Taking expectations (with AA independent of XX): 0=ρ+E(A2)−2E(X)+2ρE(X)−2ρ2.0=\rho+E(A^2)-2E(X)+2\rho E(X)-2\rho^2 . So 2(1−ρ)E(X)=ρ−2ρ2+λ2E(S2)+ρ=2ρ−2ρ2+λ2E(S2).2(1-\rho)E(X)=\rho-2\rho^2+\lambda^2E(S^2)+\rho=2\rho-2\rho^2+\lambda^2E(S^2).

Pollaczek–Khinchine formula. Since departures see the time-average distribution (they mirror arrivals, which see time averages by PASTA), L=ρ+λ2E(S2)2(1−ρ)=ρ+ρ2+λ2σ22(1−ρ)\boxed{L=\rho+\frac{\lambda^2E(S^2)}{2(1-\rho)}=\rho+\frac{\rho^2+\lambda^2\sigma^2}{2(1-\rho)}} using E(S2)=σ2+1/μ2E(S^2)=\sigma^2+1/\mu^2. Then by Little’s law Lq=ρ2+λ2σ22(1−ρ),L_q=\frac{\rho^2+\lambda^2\sigma^2}{2(1-\rho)}, Wq=λE(S2)2(1−ρ),W_q=\frac{\lambda E(S^2)}{2(1-\rho)}, W=Wq+1μ.W=W_q+\frac1\mu .

Special cases.

  • M/M/1 (σ2=1/μ2\sigma^2=1/\mu^2): Lq=2ρ22(1−ρ)=ρ21−ρL_q=\frac{2\rho^2}{2(1-\rho)}=\frac{\rho^2}{1-\rho} ✓.
  • M/D/1 (σ2=0\sigma^2=0): Lq=ρ22(1−ρ)L_q=\frac{\rho^2}{2(1-\rho)}, half that of M/M/1.

The formula shows that, for the same mean, more variable service times cause longer queues.

(The full distribution: the p.g.f. of XX is P(z)=(1−ρ)(1−z)K(z)K(z)−zP(z)=\dfrac{(1-\rho)(1-z)K(z)}{K(z)-z} with K(z)=S*(λ(1−z))K(z)=S^*(\lambda(1-z)); see Q17.)

✓ Derivation checked step by step Every step was checked: the embedded chain at departures, E(A) = ρ and E(A²) = λ²E(S²) + ρ, the squaring argument, and the resulting formula; it reduces to ρ/(1 − ρ) for exponential service.

↑ Back to the question list

State how a queueing model is completely specified. In this context, explain the meanings of different symbols used in the queueing model (M/M/C):(∞/FIFO). Obtain the steady-state equations under the model (M/M/I):(∞/FIFO) and find their solutions.

2017 · Paper II · Q2b · 15 marks

Solution

How a queueing model is specified. A queueing model is completely specified by Kendall’s (extended) notation (a/b/c):(d/e/f),(a/b/c):(d/e/f), where

  • aa = arrival (inter-arrival time) distribution;
  • bb = service time distribution;
  • cc = number of parallel servers (channels);
  • dd = maximum number allowed in the system (queue + service);
  • ee = queue discipline (FIFO, LIFO, SIRO, priority);
  • ff = size of the calling population (source).

Standard symbols: MM = Markovian (Poisson arrivals or exponential service), DD = deterministic (constant), EkE_k = Erlang-kk, GG = general, GIGI = general independent.

(M/M/C):(∞/FIFO)(M/M/C):(\infty/FIFO) means: Poisson arrivals, exponential service times, CC parallel identical servers, no limit on the number in the system, first-in-first-out service (and an infinite calling population).

(M/M/1):(∞/FIFO)(M/M/1):(\infty/FIFO): steady-state equations. Arrival rate λ\lambda, service rate μ\mu. In a short time hh, for n≥1n\ge1, the system reaches nn at t+ht+h from nn (no arrival, no departure), n−1n-1 (one arrival) or n+1n+1 (one departure): pn(t+h)=pn(t)(1−λh−μh)+pn−1(t)λh+pn+1(t)μh+o(h),p_n(t+h)=p_n(t)(1-\lambda h-\mu h)+p_{n-1}(t)\lambda h+p_{n+1}(t)\mu h+o(h), p0(t+h)=p0(t)(1−λh)+p1(t)μh+o(h).p_0(t+h)=p_0(t)(1-\lambda h)+p_1(t)\mu h+o(h). Letting h→0h\to0 and setting the derivatives to 0 (steady state): 0=−(λ+μ)pn+λpn−1+μpn+1(n≥1),0=-(\lambda+\mu)p_n+\lambda p_{n-1}+\mu p_{n+1}\quad(n\ge1), 0=−λp0+μp1.0=-\lambda p_0+\mu p_1 .

Solution. From the second, p1=ρp0p_1=\rho p_0 (ρ=λ/μ\rho=\lambda/\mu). The first can be written μpn+1−λpn=μpn−λpn−1,\mu p_{n+1}-\lambda p_n=\mu p_n-\lambda p_{n-1}, so μpn+1−λpn\mu p_{n+1}-\lambda p_n is constant, equal to μp1−λp0=0\mu p_1-\lambda p_0=0. Hence pn+1=ρpnp_{n+1}=\rho p_n and pn=ρnp0p_n=\rho^np_0. Since ∑npn=p0/(1−ρ)=1\sum_np_n=p_0/(1-\rho)=1 (needs ρ<1\rho<1): pn=(1−ρ)ρn,n=0,1,2,…\boxed{p_n=(1-\rho)\rho^n,\quad n=0,1,2,\dots} From this: L=ρ1−ρL=\dfrac\rho{1-\rho}, Lq=ρ21−ρL_q=\dfrac{\rho^2}{1-\rho}, W=1μ−λW=\dfrac1{\mu-\lambda}, Wq=ρμ−λW_q=\dfrac{\rho}{\mu-\lambda}.

✓ Derivation checked step by step Every step was checked: Kendall’s notation, the steady-state difference equations of M/M/1 and their solution p_n = (1 − ρ)ρⁿ.

↑ Back to the question list

For a (M/M/1):(∞∣FCFS) queue system, compute– (i) expected number of customers in the system; (ii) expected queue length; (iii) expected (average) waiting time of a customer in the system.

2015 · Paper II · Q1d · 10 marks

Solution

With pn=(1−ρ)ρnp_n=(1-\rho)\rho^n, ρ=λ/μ<1\rho=\lambda/\mu<1 (Q10):

(i) Expected number in the system. L=∑n=0∞n(1−ρ)ρn=(1−ρ)ρ∑n≥1nρn−1=(1−ρ)ρ(1−ρ)2=ρ1−ρ=λμ−λ.L=\sum_{n=0}^\infty n(1-\rho)\rho^n=(1-\rho)\rho\sum_{n\ge1}n\rho^{n-1}=\frac{(1-\rho)\rho}{(1-\rho)^2}=\boxed{\frac{\rho}{1-\rho}=\frac{\lambda}{\mu-\lambda}}.

(ii) Expected queue length. When n≥1n\ge1 customers are present, n−1n-1 are waiting: Lq=∑n=1∞(n−1)pn=L−(1−p0)=ρ1−ρ−ρ=ρ21−ρ=λ2μ(μ−λ).L_q=\sum_{n=1}^\infty(n-1)p_n=L-(1-p_0)=\frac\rho{1-\rho}-\rho=\boxed{\frac{\rho^2}{1-\rho}=\frac{\lambda^2}{\mu(\mu-\lambda)}}.

(iii) Expected waiting time in the system. By Little’s law L=λWL=\lambda W: W=Lλ=1μ−λ.W=\frac L\lambda=\boxed{\frac1{\mu-\lambda}}. (Directly: an arrival finding nn present waits for n+1n+1 exponential services, mean (n+1)/μ(n+1)/\mu; W=∑(n+1)pn/μ=(L+1)/μ=1μ(1−ρ)=1μ−λW=\sum(n+1)p_n/\mu=(L+1)/\mu=\frac1{\mu(1-\rho)}=\frac1{\mu-\lambda}.) Also Wq=W−1μ=λμ(μ−λ)W_q=W-\frac1\mu=\dfrac{\lambda}{\mu(\mu-\lambda)}.

✓ Derivation checked step by step Every step was checked: L = Σ n(1 − ρ)ρⁿ = ρ/(1 − ρ), L_q = Σ (n − 1)p_n = ρ²/(1 − ρ), and W = L/λ = 1/(μ − λ).

↑ Back to the question list

Consider a single-server queue system with Poisson input and exponential service time. Suppose the mean arrival rate is 3 calling units per hour, the expected service time is 0.25 hour and the maximum permissible number of calling units in the system is two. Derive the steady-state probability distribution of the number of calling units in the system and also calculate the expected number in the system.

2015 · Paper II · Q3c · 20 marks

Solution

Model. M/M/1 with limited capacity N=2N=2: λ=3\lambda=3 per hour, μ=1/0.25=4\mu=1/0.25=4 per hour, ρ=34\rho=\frac34. Arrivals finding 2 in the system are lost.

Steady-state equations. λp0=μp1,\lambda p_0=\mu p_1, (λ+μ)p1=λp0+μp2,(\lambda+\mu)p_1=\lambda p_0+\mu p_2, μp2=λp1.\mu p_2=\lambda p_1 . So p1=ρp0p_1=\rho p_0, p2=ρ2p0p_2=\rho^2p_0, and in general pn=ρnp0p_n=\rho^np_0 for n=0,1,…,Nn=0,1,\dots,N.

Solution. p0=1−ρ1−ρN+1=1/41−27/64=1637,p_0=\frac{1-\rho}{1-\rho^{N+1}}=\frac{1/4}{1-27/64}=\frac{16}{37}, p1=1237,p_1=\frac{12}{37}, p2=937.p_2=\frac9{37}. That is, p0=0.432p_0=0.432, p1=0.324p_1=0.324, p2=0.243p_2=0.243.

Expected number in the system. L=0⋅1637+1⋅1237+2⋅937=3037≈0.81.L=0\cdot\frac{16}{37}+1\cdot\frac{12}{37}+2\cdot\frac9{37}=\frac{30}{37}\approx\boxed{0.81}.

(So 24.3% of arriving units are turned away; the effective arrival rate is λ(1−p2)=3×2837=2.27\lambda(1-p_2)=3\times\frac{28}{37}=2.27 per hour, and the mean time in the system is W=L/λeff=30/3784/37=0.357W=L/\lambda_{\text{eff}}=\frac{30/37}{84/37}=0.357 hour ≈21\approx21 minutes.)

✓ Checked by computer We checked in Python (exact fractions): with ρ = 3/4 and N = 2, p = (16/37, 12/37, 9/37) and L = 30/37 = 0.81.

↑ Back to the question list

To a single server queuing system, the arrivals of customers are according to a Poisson process at the rate of 2 customers per hour. The service time has exponential distribution with mean service time of 12 minutes per customer. The steady state probability distribution (pn) for the number of customers (n) is given below:

n 0 1 2 3 4 5 6 and above
pn 0.08 0.1 0.4 0.2 0.2 0.02 0

Compute (i) the expected number of customers in the system and in the queue. (ii) the mean waiting time in the system and in the queue.

2014 · Paper II · Q1d · 10 marks

Solution

Note on the question. The given probabilities do not match an M/M/1 queue with λ=2\lambda=2 and μ=5\mu=5 per hour (that would give p0=1−0.4=0.6p_0=1-0.4=0.6), and with this table the server would complete μ(1−p0)=4.6\mu(1-p_0)=4.6 services an hour although only 2 arrive. We use the table as given, and Little’s law with the stated arrival rate λ=2\lambda=2 per hour, as intended.

(i) Expected numbers. L=∑npn=0(0.08)+1(0.1)+2(0.4)+3(0.2)+4(0.2)+5(0.02)L=\sum np_n=0(0.08)+1(0.1)+2(0.4)+3(0.2)+4(0.2)+5(0.02) =0.1+0.8+0.6+0.8+0.1=2.4 customers.=0.1+0.8+0.6+0.8+0.1=\boxed{2.4\text{ customers}}. In the queue (one customer is in service whenever n≥1n\ge1): Lq=∑n≥1(n−1)pn=L−(1−p0)=2.4−0.92=1.48 customers.L_q=\sum_{n\ge1}(n-1)p_n=L-(1-p_0)=2.4-0.92=\boxed{1.48\text{ customers}}.

(ii) Mean waiting times (Little’s law, L=λWL=\lambda W): W=Lλ=2.42=1.2 hours=72 minutes,W=\frac L\lambda=\frac{2.4}2=1.2\text{ hours}=72\text{ minutes}, Wq=Lqλ=1.482=0.74 hour=44.4 minutes.W_q=\frac{L_q}\lambda=\frac{1.48}2=0.74\text{ hour}=44.4\text{ minutes}.

✓ Checked by computer We checked in Python: Σ n p_n = 2.4, L_q = L − (1 − p₀) = 1.48, and W = 1.2 h, W_q = 0.74 h by Little’s law with λ = 2.

↑ Back to the question list

For an (M/M/1):(∞/FIFO) queuing system, derive the set of steady-state difference equations and hence find the solution of the system. In a supermarket, the average arrival rate of customers is 5 every 30 minutes. The average time it takes to list and calculate the customers purchases at the cash desk is 4.5 minutes and this time is exponentially distributed. (i) How long will the customers expect to wait for service at the cash desk? (ii) What is the probability that the cashier is working?

2014 · Paper II · Q3a · 15 marks

Solution

Steady-state equations of (M/M/1):(∞/FIFO)(M/M/1):(\infty/FIFO). With arrival rate λ\lambda and service rate μ\mu, considering the changes in (t,t+h)(t,t+h): pn(t+h)=pn(t)[1−(λ+μ)h]+pn−1(t)λh+pn+1(t)μh+o(h)(n≥1),p_n(t+h)=p_n(t)[1-(\lambda+\mu)h]+p_{n-1}(t)\lambda h+p_{n+1}(t)\mu h+o(h)\quad(n\ge1), p0(t+h)=p0(t)(1−λh)+p1(t)μh+o(h).p_0(t+h)=p_0(t)(1-\lambda h)+p_1(t)\mu h+o(h). In steady state (h→0h\to0, pn′=0p_n'=0): (λ+μ)pn=λpn−1+μpn+1(n≥1),(\lambda+\mu)p_n=\lambda p_{n-1}+\mu p_{n+1}\ (n\ge1), λp0=μp1.\lambda p_0=\mu p_1 . Solution. p1=ρp0p_1=\rho p_0; then μpn+1−λpn=μpn−λpn−1=…=0\mu p_{n+1}-\lambda p_n=\mu p_n-\lambda p_{n-1}=\dots=0, so pn=ρnp0p_n=\rho^np_0, and normalising (ρ<1\rho<1): pn=(1−ρ)ρn,p_n=(1-\rho)\rho^n, L=ρ1−ρ,L=\frac{\rho}{1-\rho}, Wq=ρμ−λ.W_q=\frac{\rho}{\mu-\lambda}.

The supermarket. λ=5\lambda=5 per 30 minutes =10=10 per hour; mean service 4.5 minutes, so μ=604.5=13.33\mu=\frac{60}{4.5}=13.33 per hour; ρ=1013.33=0.75\rho=\frac{10}{13.33}=0.75.

(i) Expected wait for service. Wq=ρμ−λ=0.753.33=0.225 hour=13.5 minutes.W_q=\frac{\rho}{\mu-\lambda}=\frac{0.75}{3.33}=0.225\text{ hour}=\boxed{13.5\text{ minutes}}. (Time at the cash desk in all: W=1μ−λ=0.3W=\frac1{\mu-\lambda}=0.3 hour =18=18 minutes.)

(ii) Probability that the cashier is working. P(n≥1)=1−p0=ρ=0.75.P(n\ge1)=1-p_0=\rho=\boxed{0.75}.

✓ Checked by computer We checked in Python: λ = 10 and μ = 40/3 per hour give ρ = 0.75 and W_q = ρ/(μ − λ) = 0.225 h = 13.5 minutes.

↑ Back to the question list

Four counters are being opened on the frontier of a country to check the passports and necessary papers of the tourists. The tourists choose the counter at random. If the arrivals at the frontier are Poisson at the rate λ and the service time is exponential with parameters λ/2, what is the steady state average queue at each counter?

2013 · Paper II · Q3a · 10 marks

Solution

Each counter is an M/M/1 queue. If a Poisson stream of rate λ\lambda is split at random among 4 counters (each tourist choosing a counter with probability 14\frac14, independently), each counter receives a Poisson stream of rate λ/4\lambda/4. Each counter serves at rate μ=λ/2\mu=\lambda/2. So each counter is M/M/1 with ρ=λ/4λ/2=12.\rho=\frac{\lambda/4}{\lambda/2}=\frac12 .

Average queue at each counter. Lq=ρ21−ρ=1/41/2=12 tourist.L_q=\frac{\rho^2}{1-\rho}=\frac{1/4}{1/2}=\boxed{\frac12\text{ tourist}}. The average number at each counter including the one being served is L=ρ1−ρ=1L=\frac{\rho}{1-\rho}=1.

(Comment: if instead the 4 counters formed a single queue (M/M/4 with r=2r=2), the average queue would be only about 0.170.17 — random choice of counters is inefficient, because one counter may have a queue while another is idle.)

✓ Checked by computer Every step was checked: random splitting of a Poisson stream gives Poisson(λ/4) at each counter, so each is M/M/1 with ρ = 1/2, L_q = 1/2 and L = 1.

↑ Back to the question list

Arrivals at a telephone booth are considered to be according to a Poisson process with an average time of 10 minutes between two consecutive arrivals. The length of a phone call is assumed to be exponentially distributed with a mean of 3 minutes. What is the probability that a person coming to the booth will have to wait? What is the average length of the queues that form from time to time?

2012 · Paper II · Q2c · 15 marks

Solution

Data. Mean time between arrivals 10 minutes, so λ=110\lambda=\frac1{10} per minute; mean call 3 minutes, so μ=13\mu=\frac13 per minute. ρ=λ/μ=0.3\rho=\lambda/\mu=0.3. (M/M/1.)

Probability that an arrival has to wait. An arriving person must wait if the booth is busy: P(n≥1)=ρ=0.3.P(n\ge1)=\rho=\boxed{0.3}.

Average length of the queues that form from time to time. This is the expected queue length given that a queue exists (at least one person waiting): E(Lq∣Lq>0)=11−ρ=10.7≈1.43 persons.E(L_q\mid L_q>0)=\frac{1}{1-\rho}=\frac1{0.7}\approx\boxed{1.43\text{ persons}}.

Derivation. P(queue>0)=P(n≥2)=ρ2P(\text{queue}>0)=P(n\ge2)=\rho^2, and Lq=ρ21−ρL_q=\frac{\rho^2}{1-\rho}, so E(Lq∣Lq>0)=ρ2/(1−ρ)ρ2=11−ρE(L_q\mid L_q>0)=\frac{\rho^2/(1-\rho)}{\rho^2}=\frac1{1-\rho}.

(The overall average queue, counting the times when there is none, is Lq=0.090.7=0.13L_q=\frac{0.09}{0.7}=0.13 person.)

✓ Checked by computer Every step was checked: λ = 0.1 and μ = 1/3 per minute give ρ = 0.3, P(wait) = 0.3 and the mean length of non-empty queues 1/(1 − ρ) = 1.43.

↑ Back to the question list

Describe briefly about the queue system (M/G/1). Obtain the expected number of persons in the system from P(z).

2011 · Paper II · Q1b · 12 marks

Solution

The M/G/1 system. Poisson arrivals (rate λ\lambda), general i.i.d. service times SS (mean 1/μ1/\mu, variance σ2\sigma^2, Laplace–Stieltjes transform S*(s)S^*(s)), one server, FCFS, ρ=λ/μ<1\rho=\lambda/\mu<1. The number left behind by departures forms an embedded Markov chain Xn+1=Xn−U(Xn)+An+1X_{n+1}=X_n-U(X_n)+A_{n+1}, where AA = arrivals during one service, with p.g.f. K(z)=EzA=E[e−λS(1−z)]=S*(λ(1−z)).K(z)=E\,z^A=E\big[e^{-\lambda S(1-z)}\big]=S^*\big(\lambda(1-z)\big). K(1)=1K(1)=1, K′(1)=λE(S)=ρK'(1)=\lambda E(S)=\rho, K″(1)=λ2E(S2)K''(1)=\lambda^2E(S^2).

P.g.f. of the number in the system. In steady state (Pollaczek–Khinchine transform formula) P(z)=(1−ρ)(1−z)K(z)K(z)−z.P(z)=\frac{(1-\rho)(1-z)K(z)}{K(z)-z}.

Expected number from P(z)P(z). Write P(z)[K(z)−z]=(1−ρ)(1−z)K(z)P(z)\,[K(z)-z]=(1-\rho)(1-z)K(z). Let D(z)=K(z)−zD(z)=K(z)-z and N(z)=(1−ρ)(1−z)K(z)N(z)=(1-\rho)(1-z)K(z):

  • D(1)=0D(1)=0, D′(1)=ρ−1D'(1)=\rho-1, D″(1)=K″(1)D''(1)=K''(1);
  • N′(1)=−(1−ρ)N'(1)=-(1-\rho), N″(1)=−2(1−ρ)K′(1)=−2ρ(1−ρ)N''(1)=-2(1-\rho)K'(1)=-2\rho(1-\rho).

Differentiating PD=NPD=N twice, P″D+2P′D′+PD″=N″P''D+2P'D'+PD''=N''. At z=1z=1 (with P(1)=1P(1)=1): 2P′(1)(ρ−1)+K″(1)=−2ρ(1−ρ).2P'(1)(\rho-1)+K''(1)=-2\rho(1-\rho). Hence L=P′(1)=ρ+K″(1)2(1−ρ)=ρ+λ2E(S2)2(1−ρ)=ρ+ρ2+λ2σ22(1−ρ).L=P'(1)=\rho+\frac{K''(1)}{2(1-\rho)}=\boxed{\rho+\frac{\lambda^2E(S^2)}{2(1-\rho)}=\rho+\frac{\rho^2+\lambda^2\sigma^2}{2(1-\rho)}}. (First differentiation: P′D+PD′=N′P'D+PD'=N' at z=1z=1 gives ρ−1=−(1−ρ)\rho-1=-(1-\rho), a consistency check.)

For exponential service, σ2=1/μ2\sigma^2=1/\mu^2 and L=ρ+ρ21−ρ=ρ1−ρL=\rho+\frac{\rho^2}{1-\rho}=\frac{\rho}{1-\rho} ✓.

✓ Derivation checked step by step Every step was checked: the p.g.f. P(z) = (1 − ρ)(1 − z)K(z)/(K(z) − z), K′(1) = ρ, K″(1) = λ²E(S²), and the twice-differentiated identity giving P′(1).

↑ Back to the question list

Explain the economic cost project models used in queueing theory.

2011 · Paper II · Q2b · 20 marks

Solution

Idea. In a queueing system there are two opposing costs:

  • the cost of providing service (servers’ wages, equipment), which rises with the service level; and
  • the cost of waiting (customers’ lost time, idle machines, lost goodwill or business), which falls as service improves.

Cost (economic) models choose the service level — the service rate μ\mu or the number of servers cc — to minimise the total expected cost per unit time TC=service cost+waiting cost.TC=\text{service cost}+\text{waiting cost}.

1. Optimal service rate (M/M/1). Let CsC_s be the cost per unit time per unit of service rate and CwC_w the cost of one customer waiting in the system per unit time. Then TC(μ)=Csμ+CwL=Csμ+Cwλμ−λ.TC(\mu)=C_s\mu+C_wL=C_s\mu+C_w\frac{\lambda}{\mu-\lambda}. dTCdμ=Cs−Cwλ(μ−λ)2=0\frac{dTC}{d\mu}=C_s-\frac{C_w\lambda}{(\mu-\lambda)^2}=0 ⇒μ*=λ+CwλCs.\Rightarrow\ \mu^*=\lambda+\sqrt{\frac{C_w\lambda}{C_s}}.

2. Optimal number of servers (M/M/c). With CsC_s = cost per server per unit time, TC(c)=cCs+CwL(c).TC(c)=cC_s+C_wL(c). Since cc is an integer, c*c^* satisfies TC(c*−1)≥TC(c*)≤TC(c*+1)TC(c^*-1)\ge TC(c^*)\le TC(c^*+1), i.e. L(c*)−L(c*+1)≤CsCw≤L(c*−1)−L(c*).L(c^*)-L(c^*+1)\le\frac{C_s}{C_w}\le L(c^*-1)-L(c^*).

3. Choosing between alternatives. Compute the total cost (service charge plus cost of waiting machines or customers) for each option — e.g. a fast expensive repairman versus a slow cheap one — and choose the cheaper (Q21).

4. Aspiration-level (non-cost) models. When the waiting cost is hard to estimate, the manager sets limits such as “average wait at most α\alpha” and “server idle at most β\beta%”, and chooses the service level that meets both.

5. Other forms. Profit models (revenue from customers served minus costs) for finite-capacity systems where arrivals are lost; models that charge for customers lost (balking).

The optimum lies where the marginal saving in waiting cost equals the marginal increase in service cost.

✓ Answer checked step by step Every step was checked: TC(μ) = C_sμ + C_wλ/(μ − λ) minimised at μ* = λ + √(C_wλ/C_s), and the marginal condition on L(c) for the optimal number of servers.

↑ Back to the question list

Cover of the UPSC Mains Topic-wise and Year-wise PYQs book (2013–2026)

From the Optional Province team

Strengthen your GS papers

Our UPSC Mains Topic-wise & Year-wise PYQ Book (2013–2026) maps every GS question to the syllabus, so you know what UPSC asks and how often. Now available as a hard copy and an eBook.

Buy Hard Copy on AmazonBuy eBook (PDF)

Download a free sample

A supermarket has 2 girls ringing up sales at the counters. If the service time for each customer is exponential with mean 4 minutes and if people arrive in a Poisson fashion at the rate of 10 per hour– (i) what is the probability of having to wait for service; (ii) what is the expected percentage of idle time for each girl?

2011 · Paper II · Q3b · 20 marks

Solution

Model. M/M/2: λ=10\lambda=10 per hour, mean service 4 minutes so μ=15\mu=15 per hour per girl, c=2c=2; r=λ/μ=23r=\lambda/\mu=\frac23, ρ=r/c=13\rho=r/c=\frac13.

P0=[1+r+r22!(1−ρ)]−1=[1+23+4/94/3]−1=[1+23+13]−1=12.P_0=\left[1+r+\frac{r^2}{2!(1-\rho)}\right]^{-1}=\left[1+\frac23+\frac{4/9}{4/3}\right]^{-1}=\left[1+\frac23+\frac13\right]^{-1}=\frac12 .

(i) Probability of having to wait. A customer waits if both girls are busy (n≥2n\ge2): P(n≥2)=r22!(1−ρ)P0=4/94/3⋅12=16≈0.167.P(n\ge2)=\frac{r^2}{2!(1-\rho)}P_0=\frac{4/9}{4/3}\cdot\frac12=\boxed{\frac16\approx0.167}.

(ii) Expected percentage of idle time for each girl. The expected number of busy girls is r=23r=\frac23, so each is busy a fraction ρ=13\rho=\frac13 of the time and idle 1−ρ=23≈66.7%1-\rho=\frac23\approx\boxed{66.7\%} of the time. (Check: P0+12P1=12+12⋅13=23P_0+\frac12P_1=\frac12+\frac12\cdot\frac13=\frac23, since P1=rP0=13P_1=rP_0=\frac13.)

✓ Checked by computer We checked in Python: M/M/2 with λ = 10, μ = 15 per hour gives P₀ = 1/2, P(wait) = 1/6 and idle fraction per server 1 − ρ = 2/3.

↑ Back to the question list

In (M/M/1):(∞/FCFS) queuing model, obtain the expression for the probability that there are n units in the system at any time.

2010 · Paper II · Q1b · 12 marks

Solution

Assumptions. Poisson arrivals with rate λ\lambda; exponential service with rate μ\mu; one server; FCFS; unlimited capacity and calling population. In a small interval hh: P(one arrival)=λh+o(h)P(\text{one arrival})=\lambda h+o(h), P(one service completion∣n≥1)=μh+o(h)P(\text{one service completion}\mid n\ge1)=\mu h+o(h); more than one event has probability o(h)o(h).

Equations. For n≥1n\ge1, the system has nn at t+ht+h if it had nn and nothing happened, n−1n-1 and an arrival, or n+1n+1 and a departure: pn(t+h)=pn(t)[1−(λ+μ)h]+λhpn−1(t)+μhpn+1(t)+o(h),p_n(t+h)=p_n(t)[1-(\lambda+\mu)h]+\lambda h\,p_{n-1}(t)+\mu h\,p_{n+1}(t)+o(h), p0(t+h)=p0(t)(1−λh)+μhp1(t)+o(h).p_0(t+h)=p_0(t)(1-\lambda h)+\mu h\,p_1(t)+o(h). So pn′(t)=−(λ+μ)pn+λpn−1+μpn+1,p_n'(t)=-(\lambda+\mu)p_n+\lambda p_{n-1}+\mu p_{n+1}, p0′(t)=−λp0+μp1.p_0'(t)=-\lambda p_0+\mu p_1 .

Steady state (pn′(t)=0p_n'(t)=0): λp0=μp1,\lambda p_0=\mu p_1, (λ+μ)pn=λpn−1+μpn+1.(\lambda+\mu)p_n=\lambda p_{n-1}+\mu p_{n+1}. With ρ=λ/μ\rho=\lambda/\mu: p1=ρp0p_1=\rho p_0. Then p2=(1+ρ)p1−ρp0=ρ2p0p_2=(1+\rho)p_1-\rho p_0=\rho^2p_0, and by induction (if pn=ρnp0p_n=\rho^np_0 and pn−1=ρn−1p0p_{n-1}=\rho^{n-1}p_0, then pn+1=(1+ρ)ρnp0−ρ⋅ρn−1p0=ρn+1p0p_{n+1}=(1+\rho)\rho^np_0-\rho\cdot\rho^{n-1}p_0=\rho^{n+1}p_0): pn=ρnp0.p_n=\rho^np_0 . Normalise (needs ρ<1\rho<1): ∑nρnp0=p01−ρ=1\sum_n\rho^np_0=\frac{p_0}{1-\rho}=1, so p0=1−ρp_0=1-\rho and pn=(1−ρ)ρn=(1−λμ)(λμ)n,n=0,1,2,…\boxed{p_n=(1-\rho)\rho^n=\left(1-\frac\lambda\mu\right)\left(\frac\lambda\mu\right)^n,\quad n=0,1,2,\dots} The number in the system is geometric. If ρ≥1\rho\ge1 there is no steady state: the queue grows without bound.

✓ Derivation checked step by step Every step was checked: the transition probabilities in (t, t + h), the differential-difference equations, the steady-state recurrence and the geometric solution with p₀ = 1 − ρ.

↑ Back to the question list

A repairman is to be hired to repair machines that breakdown following a Poisson process with an average rate of four per hour. The cost of non-productive machine is Rs. 90 per hour. The company has the option of choosing either a fast repairman who charges Rs. 60 per hour and repairs machines at the rate of 7 per hour or a slow repairman who charges Rs. 30 per hour and repairs machines at the rate of 5 per hour. Taking the cost in to the consideration find which repairman should be hired.

2010 · Paper II · Q3b · 20 marks

Solution

Model. Breakdowns arrive as a Poisson process, λ=4\lambda=4 per hour; repair times are exponential (M/M/1). The machines waiting or under repair are non-productive, on average L=λμ−λL=\dfrac{\lambda}{\mu-\lambda} machines. Hourly cost == repairman’s charge +₹90×L+\ ₹90\times L.

Fast repairman Slow repairman
Repair rate μ\mu 7 per hour 5 per hour
L=λ/(μ−λ)L=\lambda/(\mu-\lambda) 4/3=1.334/3=1.33 4/1=44/1=4
Idle-machine cost 90L90L ₹120 ₹360
Repairman’s charge ₹60 ₹30
Total cost per hour ₹180 ₹390

Decision. The fast repairman costs ₹180 an hour in all, against ₹390 for the slow one, a saving of ₹210 an hour (₹1,680 in an 8-hour day). Hire the fast repairman: his higher wage is more than repaid by the shorter downtime of the machines.

✓ Checked by computer We checked in Python: L = λ/(μ − λ) is 4/3 (fast) and 4 (slow); total hourly costs 60 + 90(4/3) = ₹180 and 30 + 90(4) = ₹390.

↑ Back to the question list

Describe M|G|1 and GI|M|1 queues. Derive the Pollaczek-Khinchin mean value formula for the average number of customers in M|G|1 queue.

2007 · Paper II · Q1e · 12 marks

Solution

M|G|1 queue. Poisson arrivals (rate λ\lambda), service times i.i.d. with a general distribution (mean 1/μ1/\mu, variance σ2\sigma^2), one server, FCFS, ρ=λ/μ<1\rho=\lambda/\mu<1. The queue length is studied through the Markov chain embedded at departure instants: if XnX_n is the number left by the nnth departure and An+1A_{n+1} the arrivals during the next service, Xn+1=Xn−U(Xn)+An+1X_{n+1}=X_n-U(X_n)+A_{n+1} (U=1U=1 if Xn>0X_n>0). Examples: a machine with constant or Erlang processing time, a checkout with variable service.

GI|M|1 queue. General i.i.d. inter-arrival times (mean 1/λ1/\lambda, transform A*(s)A^*(s)), exponential service (rate μ\mu), one server. The chain is embedded at arrival instants (XnX_n = number found by the nnth arrival). The number found by an arrival is geometric, (1−σ)σn(1-\sigma)\sigma^n, where σ∈(0,1)\sigma\in(0,1) is the root of σ=A*(μ(1−σ))\sigma=A^*(\mu(1-\sigma)); an arrival waits with probability σ\sigma, and Wq=σμ(1−σ)W_q=\frac{\sigma}{\mu(1-\sigma)}. (See Q6.)

Pollaczek–Khinchin mean value formula for M|G|1. Given SS, the number of arrivals AA during a service is Poisson(λS\lambda S), so E(A)=ρ,E(A)=\rho, E(A2)=E(λS+λ2S2)=ρ+λ2E(S2).E(A^2)=E(\lambda S+\lambda^2S^2)=\rho+\lambda^2E(S^2). In steady state Xn+1X_{n+1} and XnX_n have the same distribution as XX.

  • Means: E(X)=E(X)−E(U)+ρE(X)=E(X)-E(U)+\rho, so E(U)=ρE(U)=\rho.
  • Squares: using U2=UU^2=U, XU=XXU=X and independence of AA from XX, E(X2)=E(X2)+ρ+E(A2)−2E(X)+2ρE(X)−2ρ2.E(X^2)=E(X^2)+\rho+E(A^2)-2E(X)+2\rho E(X)-2\rho^2 . So 2(1−ρ)E(X)=2ρ−2ρ2+λ2E(S2)2(1-\rho)E(X)=2\rho-2\rho^2+\lambda^2E(S^2), and with E(S2)=σ2+1/μ2E(S^2)=\sigma^2+1/\mu^2: L=ρ+ρ2+λ2σ22(1−ρ)\boxed{L=\rho+\frac{\rho^2+\lambda^2\sigma^2}{2(1-\rho)}} (departing customers see the same distribution as the time average). Then Lq=ρ2+λ2σ22(1−ρ)L_q=\dfrac{\rho^2+\lambda^2\sigma^2}{2(1-\rho)}, Wq=Lq/λW_q=L_q/\lambda, W=Wq+1/μW=W_q+1/\mu. For exponential service (σ=1/μ\sigma=1/\mu) L=ρ/(1−ρ)L=\rho/(1-\rho); for constant service (σ=0\sigma=0) Lq=ρ2/(2(1−ρ))L_q=\rho^2/(2(1-\rho)).

✓ Derivation checked step by step Every step was checked: the embedded chains of M|G|1 (departures) and GI|M|1 (arrivals), E(A) = ρ, E(A²) = λ²E(S²) + ρ, and the squaring argument giving the P–K mean formula.

↑ Back to the question list

State the chief characteristics of a queuing process. For the queuing process (M/M/1 FCFS/∞), derive its steady state solution.

2006 · Paper II · Q1e · 12 marks

Solution

Chief characteristics of a queueing process.

  1. Arrival pattern — distribution of inter-arrival times (Poisson input is common), single or batch arrivals, size of the calling source.
  2. Service pattern — distribution of service times, single or batch service.
  3. Number of servers — one or several channels, in parallel or in series.
  4. Queue discipline — FCFS, LCFS, random, priority.
  5. System capacity — finite or infinite waiting room.
  6. Customer behaviour — balking (not joining a long queue), reneging (leaving after waiting), jockeying (switching queues).

M/M/1 (FCFS/∞): steady-state solution. Arrival rate λ\lambda, service rate μ\mu, ρ=λ/μ<1\rho=\lambda/\mu<1. Balancing the flow into and out of each state (or from the differential-difference equations with pn′=0p_n'=0): λp0=μp1,\lambda p_0=\mu p_1, (λ+μ)pn=λpn−1+μpn+1(n≥1).(\lambda+\mu)p_n=\lambda p_{n-1}+\mu p_{n+1}\quad(n\ge1). Rewrite as μpn+1−λpn=μpn−λpn−1\mu p_{n+1}-\lambda p_n=\mu p_n-\lambda p_{n-1}. The right side at n=1n=1 equals μp1−λp0=0\mu p_1-\lambda p_0=0; hence μpn+1=λpn\mu p_{n+1}=\lambda p_n for all nn, i.e. pn=ρnp0p_n=\rho^np_0. Normalising, p0=1−ρp_0=1-\rho: pn=(1−ρ)ρn,n≥0.\boxed{p_n=(1-\rho)\rho^n,\quad n\ge0.} Performance measures: L=ρ1−ρL=\frac\rho{1-\rho}, Lq=ρ21−ρL_q=\frac{\rho^2}{1-\rho}, W=1μ−λW=\frac{1}{\mu-\lambda}, Wq=λμ(μ−λ)W_q=\frac{\lambda}{\mu(\mu-\lambda)}; the server is busy a fraction ρ\rho of the time.

✓ Derivation checked step by step Every step was checked: the listed characteristics and the M/M/1 steady-state derivation leading to p_n = (1 − ρ)ρⁿ.

↑ Back to the question list

For the queuing model M/M/s: FCFS/∞ obtain (i) the mean queue length and (ii) the average number of units in the system.

2006 · Paper II · Q4c · 15 marks

Solution

Model. M/M/s: Poisson arrivals (rate λ\lambda), exponential service (rate μ\mu per server), ss parallel servers, FCFS, infinite capacity. Let r=λ/μr=\lambda/\mu and ρ=r/s<1\rho=r/s<1.

Probabilities. The service rate in state nn is μn=nμ\mu_n=n\mu for n<sn<s and sμs\mu for n≥sn\ge s. The balance equations λpn−1=μnpn\lambda p_{n-1}=\mu_np_n give pn=rnn!p0(n≤s),p_n=\frac{r^n}{n!}p_0\ (n\le s), pn=rns!sn−sp0(n≥s),p_n=\frac{r^n}{s!\,s^{n-s}}p_0\ (n\ge s), p0=[∑n=0s−1rnn!+rss!(1−ρ)]−1.p_0=\left[\sum_{n=0}^{s-1}\frac{r^n}{n!}+\frac{r^s}{s!(1-\rho)}\right]^{-1}.

(i) Mean queue length. Only customers beyond the ssth wait. Put n=s+kn=s+k: Lq=∑k=0∞kps+k=rss!p0∑k=0∞kρk=rss!p0⋅ρ(1−ρ)2.L_q=\sum_{k=0}^\infty k\,p_{s+k}=\frac{r^s}{s!}p_0\sum_{k=0}^\infty k\rho^k=\frac{r^s}{s!}p_0\cdot\frac{\rho}{(1-\rho)^2}. Lq=rsρs!(1−ρ)2p0=λμ(λ/μ)s(s−1)!(sμ−λ)2p0.\boxed{L_q=\frac{r^s\rho}{s!(1-\rho)^2}\,p_0=\frac{\lambda\mu\,(\lambda/\mu)^s}{(s-1)!\,(s\mu-\lambda)^2}\,p_0}.

(ii) Average number in the system. On average r=λ/μr=\lambda/\mu servers are busy (Q25), so L=Lq+λμ.\boxed{L=L_q+\frac\lambda\mu}. Then Wq=Lq/λW_q=L_q/\lambda and W=Wq+1/μW=W_q+1/\mu (Little’s law). For s=1s=1: p0=1−ρp_0=1-\rho, Lq=ρ21−ρL_q=\frac{\rho^2}{1-\rho}, L=ρ1−ρL=\frac{\rho}{1-\rho} ✓.

✓ Derivation checked step by step Every step was checked: the M/M/s probabilities, L_q = Σ (n − s)p_n summed as a geometric derivative, and L = L_q + λ/μ.

↑ Back to the question list

What is an M/M/c queue? Show that the expected number of busy servers in an M/M/c queue in steady state is cρ=λμ and that the expected number of idle servers is c(1−ρ)

2005 · Paper II · Q1e · 12 marks

Solution

M/M/c queue. Customers arrive in a Poisson stream (rate λ\lambda), service times are exponential (rate μ\mu for each server), there are cc identical servers in parallel sharing one queue, FCFS, and unlimited waiting room. With ρ=λcμ<1\rho=\frac{\lambda}{c\mu}<1 there is a steady state, with pnp_n given by the birth–death formulas (service rate min(n,c)μ\min(n,c)\mu in state nn).

Expected number of busy servers. When nn customers are present, min(n,c)\min(n,c) servers are busy. In steady state, the balance equations for a birth–death process are λpn−1=min(n,c)μpn,\lambda p_{n-1}=\min(n,c)\,\mu\,p_n, n=1,2,…n=1,2,\dots So E(busy servers)=∑n=1∞min(n,c)pn=∑n=1∞λμpn−1=λμ∑m=0∞pm=λμ.E(\text{busy servers})=\sum_{n=1}^\infty\min(n,c)\,p_n=\sum_{n=1}^\infty\frac{\lambda}{\mu}p_{n-1}=\frac\lambda\mu\sum_{m=0}^\infty p_m=\frac{\lambda}{\mu}. Since ρ=λcμ\rho=\frac{\lambda}{c\mu}, E(busy servers)=cρ=λμ.\boxed{E(\text{busy servers})=c\rho=\frac\lambda\mu}.

Expected number of idle servers. E(idle servers)=c−E(busy)=c−cρ=c(1−ρ).E(\text{idle servers})=c-E(\text{busy})=\boxed{c-c\rho=c(1-\rho)}. ∎

Interpretation. Work arrives at rate λ/μ\lambda/\mu (customers per unit time × mean service time), and in steady state it must be done at the same rate, so on average λ/μ\lambda/\mu servers are busy; each server is busy a fraction ρ\rho of the time. (E.g. Q19: 1015=23\frac{10}{15}=\frac23 girls busy, each idle 23\frac23 of the time.)

✓ Proof checked step by step Every step was checked: E(busy) = Σ min(n, c)p_n equals λ/μ by the balance equations λp_{n−1} = min(n, c)μp_n, and E(idle) = c − cρ.

↑ Back to the question list

What is queuing process? Obtain the probability generating function for the queue length of M/M/1 queueing model and obtain the mean queue size.

2004 · Paper II · Q1e · 12 marks

Solution

Queueing process. A queueing process consists of customers arriving at a service facility according to some pattern, waiting if the servers are busy, being served according to a discipline, and leaving. It is described by the arrival process, the service-time distribution, the number of servers, the queue discipline and the capacity. The state N(t)N(t) (number in the system) is a stochastic process; for M/M/1 it is a birth–death process.

P.g.f. from the steady-state equations. For M/M/1 (ρ=λ/μ<1\rho=\lambda/\mu<1): λp0=μp1,\lambda p_0=\mu p_1, (λ+μ)pn=λpn−1+μpn+1(n≥1).(\lambda+\mu)p_n=\lambda p_{n-1}+\mu p_{n+1}\ (n\ge1). Let P(z)=∑n≥0pnznP(z)=\sum_{n\ge0}p_nz^n. Multiply the nnth equation by znz^n and add all (n≥0n\ge0): λP(z)+μ[P(z)−p0]=λzP(z)+μz[P(z)−p0].\lambda P(z)+\mu[P(z)-p_0]=\lambda zP(z)+\frac{\mu}{z}[P(z)-p_0]. Multiply by zz and collect P(z)P(z): P(z)[λz+μz−λz2−μ]=μp0(z−1).P(z)\,[\lambda z+\mu z-\lambda z^2-\mu]=\mu p_0(z-1). The bracket factors as (1−z)(λz−μ)(1-z)(\lambda z-\mu), so P(z)=μp0(z−1)(1−z)(λz−μ)=p01−ρz.P(z)=\frac{\mu p_0(z-1)}{(1-z)(\lambda z-\mu)}=\frac{p_0}{1-\rho z}. P(1)=1P(1)=1 gives p0=1−ρp_0=1-\rho: P(z)=1−ρ1−ρz,\boxed{P(z)=\frac{1-\rho}{1-\rho z}}, the p.g.f. of the geometric law pn=(1−ρ)ρnp_n=(1-\rho)\rho^n. The mean number in the system is L=P′(1)=ρ(1−ρ)(1−ρ)2=ρ1−ρL=P'(1)=\frac{\rho(1-\rho)}{(1-\rho)^2}=\frac\rho{1-\rho}.

Queue length. The number waiting is Q=max(N−1,0)Q=\max(N-1,0), so Q(z)=p0+∑n≥1pnzn−1=p0+P(z)−p0z=(1−ρ)(1+ρ−ρz)1−ρz.Q(z)=p_0+\sum_{n\ge1}p_nz^{n-1}=p_0+\frac{P(z)-p_0}{z}=\frac{(1-\rho)(1+\rho-\rho z)}{1-\rho z}. Mean queue size. Lq=Q′(1)=ρ21−ρ.L_q=Q'(1)=\boxed{\frac{\rho^2}{1-\rho}}. (Check: Q′(z)=(1−ρ)−ρ(1−ρz)+ρ(1+ρ−ρz)(1−ρz)2=(1−ρ)ρ2(1−ρz)2Q'(z)=(1-\rho)\dfrac{-\rho(1-\rho z)+\rho(1+\rho-\rho z)}{(1-\rho z)^2}=\dfrac{(1-\rho)\rho^2}{(1-\rho z)^2}, which at z=1z=1 is ρ2/(1−ρ)\rho^2/(1-\rho).)

✓ Derivation checked step by step We checked in Python (sympy): Q(z) = (1 − ρ)(1 + ρ − ρz)/(1 − ρz) has Q(1) = 1, Q′(1) = ρ²/(1 − ρ), and the right coefficients; the generating-function steps were checked by hand.

↑ Back to the question list

Explain all the terms in the notation (M/M/1):(FCFS/∞/∞), λ, μ; in the context of queues. Let pn be the steady state probability of n customers in the above queuing system. Show that pn=(1−ρ)ρn, where ρ=λ/μ.

2003 · Paper II · Q3c · 25 marks

Solution

Notation (M/M/1):(FCFS/∞/∞)(M/M/1):(FCFS/\infty/\infty).

  • First M: arrivals are Markovian — a Poisson process, i.e. exponential inter-arrival times.
  • Second M: service times are exponential (Markovian).
  • 1: a single server.
  • FCFS: first-come-first-served queue discipline.
  • First ∞: no limit on the number in the system (infinite waiting room).
  • Second ∞: infinite calling population (source).
  • 𝛌\boldsymbol\lambda: mean arrival rate (customers per unit time); 1/λ1/\lambda is the mean time between arrivals.
  • 𝛍\boldsymbol\mu: mean service rate of the server; 1/μ1/\mu is the mean service time.
  • 𝛒=𝛌/𝛍\boldsymbol{\rho=\lambda/\mu}: traffic intensity (utilisation), the long-run fraction of time the server is busy; steady state needs ρ<1\rho<1.

Proof that pn=(1−ρ)ρnp_n=(1-\rho)\rho^n. The number in the system is a birth–death process with birth rate λ\lambda in every state and death rate μ\mu in states n≥1n\ge1. In steady state, the rate of flow out of each state equals the rate of flow in: state 0:λp0=μp1;state n≥1:(λ+μ)pn=λpn−1+μpn+1.\text{state }0:\ \lambda p_0=\mu p_1;\qquad\text{state }n\ge1:\ (\lambda+\mu)p_n=\lambda p_{n-1}+\mu p_{n+1}. Adding the equations for states 0,1,…,n−10,1,\dots,n-1 gives the “cut” equations λpn−1=μpn,\lambda p_{n-1}=\mu p_n, n≥1n\ge1 (the flow up across the boundary between n−1n-1 and nn equals the flow down). Hence pn=ρpn−1=ρnp0p_n=\rho p_{n-1}=\rho^np_0. Since ∑n≥0pn=1\sum_{n\ge0}p_n=1 and ρ<1\rho<1, p0∑n≥0ρn=p01−ρ=1p_0\sum_{n\ge0}\rho^n=\frac{p_0}{1-\rho}=1 ⇒p0=1−ρ,\Rightarrow\ p_0=1-\rho, pn=(1−ρ)ρn,n=0,1,2,…\boxed{p_n=(1-\rho)\rho^n,\quad n=0,1,2,\dots} ∎

✓ Proof checked step by step Every step was checked: the meaning of each symbol, the birth–death balance λp_{n−1} = μp_n, and the normalisation giving p_n = (1 − ρ)ρⁿ.

↑ Back to the question list

What are the elements of queueing theory? For the queueing model M/M/1 : FCFS/∞, derive the steady state solution. The arrivals at a counter in a bank occur in accordance with Poisson law at an average rate of 8 persons per hour. The duration of service of a customer has exponential distribution with a mean of 6 minutes. Find the probability that a customer (i) has to wait on arrival, (ii) finds 4 customers in the queue and (iii) has to spend less than 15 minutes in the bank. Estimate also the fraction of the total time for which the customer is busy. (It is given that e−0.5=0.6065).

2002 · Paper II · Q3c · 25 marks

Solution

Elements of queueing theory. (1) The input or arrival process (calling population, arrival distribution, customer behaviour); (2) the service mechanism (service-time distribution, number of servers); (3) the queue discipline (FCFS, LCFS, priority, random); (4) the system capacity; (5) the output and performance measures — numbers in the queue and system, waiting times, server utilisation.

M/M/1 : FCFS/∞ — steady state. With ρ=λ/μ<1\rho=\lambda/\mu<1, the balance equations λp0=μp1\lambda p_0=\mu p_1 and (λ+μ)pn=λpn−1+μpn+1(\lambda+\mu)p_n=\lambda p_{n-1}+\mu p_{n+1} give μpn+1−λpn=μpn−λpn−1=…=0\mu p_{n+1}-\lambda p_n=\mu p_n-\lambda p_{n-1}=\dots=0, so pn=ρnp0p_n=\rho^np_0 and pn=(1−ρ)ρn.p_n=(1-\rho)\rho^n . The time a customer spends in the system (FCFS) is exponential with rate μ−λ\mu-\lambda: an arrival finding nn waits for n+1n+1 exponential services, and ∑n(1−ρ)ρn⋅Gamma(n+1,μ)\sum_n(1-\rho)\rho^n\cdot\text{Gamma}(n+1,\mu) is exponential(μ(1−ρ)\mu(1-\rho)).

The bank. λ=8\lambda=8 per hour, μ=10\mu=10 per hour (mean 6 minutes), ρ=0.8\rho=0.8.

(i) Has to wait on arrival. P(n≥1)=ρ=0.8.P(n\ge1)=\rho=\boxed{0.8}.

(ii) Finds 4 customers in the queue. Then 5 are in the bank (4 waiting + 1 in service): p5=(1−ρ)ρ5=0.2×0.32768=0.0655.p_5=(1-\rho)\rho^5=0.2\times0.32768=\boxed{0.0655}.

(iii) Spends less than 15 minutes in the bank. W∼W\sim exponential with rate μ−λ=2\mu-\lambda=2 per hour; 15 minutes =0.25=0.25 hour: P(W<0.25)=1−e−2×0.25=1−e−0.5=1−0.6065=0.3935.P(W<0.25)=1-e^{-2\times0.25}=1-e^{-0.5}=1-0.6065=\boxed{0.3935}.

Fraction of time the counter (cashier) is busy. 1−p0=ρ=0.8,1-p_0=\rho=0.8, i.e. 80% of the time. (The question’s “the customer is busy” must mean the server.)

✓ Checked by computer We checked in Python: λ = 8, μ = 10 per hour, ρ = 0.8; P(wait) = 0.8, P(n = 5) = 0.2 × 0.8⁵ = 0.0655, P(W < 15 min) = 1 − e^(−0.5) = 0.3935.

↑ Back to the question list

Describe a queueing system. State the measures of performance of the single server exponential queue.

2001 · Paper II · Q1f · 12 marks

Solution

A queueing system. Customers from a source (population) arrive at a service facility according to an arrival process. If all servers are busy they join a queue, and are selected for service by a queue discipline. After service (with some service-time distribution) they leave. The system may have a limited capacity, and customers may balk or renege.

Source → arrivals → queue → server(s) → departures.

It is described by Kendall’s notation (a/b/c):(d/e/f)(a/b/c):(d/e/f) — arrival distribution / service distribution / number of servers : capacity / discipline / source size.

Measures of performance of the single-server exponential queue (M/M/1, ρ=λ/μ<1\rho=\lambda/\mu<1):

Measure Value
Traffic intensity (server utilisation) ρ=λ/μ\rho=\lambda/\mu
Probability system idle p0=1−ρp_0=1-\rho
Probability of nn in system pn=(1−ρ)ρnp_n=(1-\rho)\rho^n
Probability an arrival waits ρ\rho
Probability of more than kk in system ρk+1\rho^{k+1}
Mean number in system L=ρ1−ρL=\dfrac{\rho}{1-\rho}
Mean number in queue Lq=ρ21−ρL_q=\dfrac{\rho^2}{1-\rho}
Mean length of non-empty queues 11−ρ\dfrac{1}{1-\rho}
Mean time in system W=1μ−λW=\dfrac{1}{\mu-\lambda}
Mean waiting time in queue Wq=λμ(μ−λ)W_q=\dfrac{\lambda}{\mu(\mu-\lambda)}
Time in system distribution P(W>t)=e−(μ−λ)tP(W>t)=e^{-(\mu-\lambda)t}
Mean busy period 1μ−λ\dfrac1{\mu-\lambda}

They are linked by Little’s law L=λWL=\lambda W, Lq=λWqL_q=\lambda W_q, and W=Wq+1/μW=W_q+1/\mu.

✓ Answer checked step by step Every point was checked against the standard M/M/1 performance measures and Little’s law.

↑ Back to the question list

For an M/M/1 queue, determine in steady state (i) the probability that, at any time, there are n units in the system, and (ii) the expected number of units in the system.

1999 · Paper II · Q8a · 20 marks

Solution

Steady state of M/M/1. Arrivals Poisson (λ\lambda), service exponential (μ\mu), one server, ρ=λ/μ<1\rho=\lambda/\mu<1.

(i) Probability of nn units. In a small interval hh, at most one arrival (probability λh\lambda h) or departure (probability μh\mu h if n≥1n\ge1) occurs. This gives pn′(t)=−(λ+μ)pn+λpn−1+μpn+1(n≥1),p_n'(t)=-(\lambda+\mu)p_n+\lambda p_{n-1}+\mu p_{n+1}\ (n\ge1), p0′(t)=−λp0+μp1.p_0'(t)=-\lambda p_0+\mu p_1 . In steady state the derivatives are 0: λp0=μp1,\lambda p_0=\mu p_1, μpn+1−λpn=μpn−λpn−1.\mu p_{n+1}-\lambda p_n=\mu p_n-\lambda p_{n-1}. So μpn+1−λpn\mu p_{n+1}-\lambda p_n is the same for all nn, and equals μp1−λp0=0\mu p_1-\lambda p_0=0. Thus pn+1=ρpnp_{n+1}=\rho p_n, pn=ρnp0p_n=\rho^np_0, and from ∑pn=1\sum p_n=1: pn=(1−ρ)ρn,n=0,1,2,…\boxed{p_n=(1-\rho)\rho^n,\quad n=0,1,2,\dots}

(ii) Expected number in the system. L=∑n=0∞n(1−ρ)ρn=(1−ρ)ρddρ∑n≥0ρn=(1−ρ)ρ(1−ρ)2=ρ1−ρ=λμ−λ.L=\sum_{n=0}^\infty n(1-\rho)\rho^n=(1-\rho)\rho\frac{d}{d\rho}\sum_{n\ge0}\rho^n=(1-\rho)\frac{\rho}{(1-\rho)^2}=\boxed{\frac{\rho}{1-\rho}=\frac{\lambda}{\mu-\lambda}}. (Mean queue length Lq=L−ρ=ρ21−ρL_q=L-\rho=\frac{\rho^2}{1-\rho}; mean time in the system W=L/λ=1μ−λW=L/\lambda=\frac1{\mu-\lambda}.)

✓ Derivation checked step by step Every step was checked: the steady-state balance equations of M/M/1, p_n = (1 − ρ)ρⁿ, and L = Σ n p_n = ρ/(1 − ρ).

↑ Back to the question list

For the case of k channels, Poisson arrivals with mean arrival rate λ and exponential service time with mean service rate μ, determine in steady state: (i) the probability that all the channels are empty, and (ii) the probability that an arrival has to wait.

1999 · Paper II · Q8b · 20 marks

Solution

Model. M/M/kk: Poisson arrivals (rate λ\lambda), exponential service (rate μ\mu per channel), kk channels, one queue, FCFS. Let r=λ/μr=\lambda/\mu and ρ=r/k<1\rho=r/k<1.

Steady-state probabilities. With nn customers, min(n,k)\min(n,k) channels work, so the service rate is nμn\mu (n<kn<k) or kμk\mu (n≥kn\ge k). The balance equations λpn−1=min(n,k)μpn\lambda p_{n-1}=\min(n,k)\mu p_n give pn=rnn!p0(0≤n≤k),p_n=\frac{r^n}{n!}p_0\quad(0\le n\le k), pn=rnk!kn−kp0=rkk!ρn−kp0(n≥k).p_n=\frac{r^n}{k!\,k^{n-k}}p_0=\frac{r^k}{k!}\rho^{n-k}p_0\quad(n\ge k).

(i) Probability that all channels are empty. ∑npn=1\sum_np_n=1: p0[∑n=0k−1rnn!+rkk!∑m=0∞ρm]=1,p_0\left[\sum_{n=0}^{k-1}\frac{r^n}{n!}+\frac{r^k}{k!}\sum_{m=0}^\infty\rho^m\right]=1, p0=[∑n=0k−11n!(λμ)n+1k!(λμ)kkμkμ−λ]−1.\boxed{p_0=\left[\sum_{n=0}^{k-1}\frac{1}{n!}\left(\frac\lambda\mu\right)^n+\frac{1}{k!}\left(\frac\lambda\mu\right)^k\frac{k\mu}{k\mu-\lambda}\right]^{-1}}.

(ii) Probability that an arrival has to wait. An arrival waits if all kk channels are busy, i.e. n≥kn\ge k (Poisson arrivals see time averages): P(n≥k)=rkk!p0∑m≥0ρmP(n\ge k)=\frac{r^k}{k!}p_0\sum_{m\ge0}\rho^m P(wait)=(λ/μ)kkμk!(kμ−λ)p0\boxed{P(\text{wait})=\frac{(\lambda/\mu)^k\,k\mu}{k!\,(k\mu-\lambda)}\,p_0} (the Erlang C formula).

Example. k=2k=2, λ=10\lambda=10, μ=15\mu=15 (Q19): p0=12p_0=\frac12, P(wait)=16P(\text{wait})=\frac16.

✓ Derivation checked step by step Every step was checked: the M/M/k birth–death probabilities, the geometric tail sum giving p₀, and the Erlang C formula for P(n ≥ k).

↑ Back to the question list

Write notes on any three of the following (i) Discrete-time Markov Chains (ii) Transition Probability Matrix. (iii) G/M/1 and M/G/1 queues. (iv) Uses of SPSS.

1999 · Paper II · Q8c · 20 marks

Solution

We write notes on (i), (ii) and (iii).

(i) Discrete-time Markov chains. A sequence X0,X1,…X_0,X_1,\dots of random variables on a countable state space is a Markov chain if P(Xn+1=j∣Xn=i,Xn−1,…,X0)=P(Xn+1=j∣Xn=i)P(X_{n+1}=j\mid X_n=i,X_{n-1},\dots,X_0)=P(X_{n+1}=j\mid X_n=i) — the future depends on the past only through the present. It is homogeneous if these pijp_{ij} do not depend on nn. The chain is described by an initial distribution and the transition matrix. States are classified as communicating, closed, absorbing; recurrent (positive or null) or transient; periodic or aperiodic. For an irreducible, aperiodic, positive recurrent chain, pij(n)→πj=1/μjjp^{(n)}_{ij}\to\pi_j=1/\mu_{jj}, where π=πP\pi=\pi P is the stationary distribution. Uses: brand switching, weather, manpower planning, queues, inventories, genetics (Wright–Fisher), random walks, page-ranking.

(ii) Transition probability matrix. P=(pij)P=(p_{ij}), pij=P(Xn+1=j∣Xn=i)p_{ij}=P(X_{n+1}=j\mid X_n=i). It is a stochastic matrix: pij≥0p_{ij}\ge0, rows sum to 1. Properties:

  • nn-step probabilities: P(n)=PnP^{(n)}=P^n (Chapman–Kolmogorov, Pm+n=PmPnP^{m+n}=P^mP^n).
  • State probabilities: vn=v0Pnv_n=v_0P^n.
  • 1 is always an eigenvalue (with right eigenvector 𝟏\mathbf1); all eigenvalues satisfy |λ|≤1|\lambda|\le1.
  • Regular if some Pm>0P^m>0; then Pn→𝟏πP^n\to\mathbf1\pi (all rows equal to π\pi).
  • A doubly stochastic matrix (columns also sum to 1) has the uniform stationary distribution (finite chain).
  • An absorbing chain has the canonical form (I0RQ)\begin{pmatrix}I&0\\R&Q\end{pmatrix}, with fundamental matrix (I−Q)−1(I-Q)^{-1}.

(iii) M/G/1 and G/M/1 queues. Both are single-server queues where one of the two distributions is general, so the queue length is not itself Markov; Kendall’s embedded Markov chain method makes them tractable.

M/G/1: Poisson arrivals (rate λ\lambda), general service time SS (mean 1/μ1/\mu, variance σ2\sigma^2), ρ=λ/μ<1\rho=\lambda/\mu<1. Observe the number left behind at departure instants: Xn+1=max(Xn−1,0)+An+1X_{n+1}=\max(X_n-1,0)+A_{n+1}, where AA is the number of arrivals during a service. Results (Pollaczek–Khinchine): Lq=λ2σ2+ρ22(1−ρ),L_q=\frac{\lambda^2\sigma^2+\rho^2}{2(1-\rho)}, Wq=Lqλ,W_q=\frac{L_q}\lambda, P0=1−ρ.P_0=1-\rho . The variance of service time increases congestion; M/D/1 (σ2=0\sigma^2=0) has half the M/M/1 queue.

G/M/1: general i.i.d. inter-arrival times TT (mean 1/λ1/\lambda), exponential service (rate μ\mu). Observe the number found by an arrival. The stationary distribution is geometric, P(arrival finds n)=(1−σ)σn,P(\text{arrival finds }n)=(1-\sigma)\sigma^n, where σ∈(0,1)\sigma\in(0,1) is the root of σ=E[e−μ(1−σ)T]\sigma=E\big[e^{-\mu(1-\sigma)T}\big] (it exists when ρ=λ/μ<1\rho=\lambda/\mu<1). The waiting time of an arrival is 0 with probability 1−σ1-\sigma and otherwise exponential with rate μ(1−σ)\mu(1-\sigma), so Wq=σμ(1−σ)W_q=\dfrac{\sigma}{\mu(1-\sigma)}. For Poisson arrivals σ=ρ\sigma=\rho, recovering M/M/1.

✓ Answer checked step by step Every point was checked against the standard definitions of Markov chains, transition matrices and the M/G/1 and G/M/1 queues (embedded chains, Pollaczek–Khinchine formula, the root σ).

↑ Back to the question list

Discuss (M/M/1):(∞/FCFS) queueing model and find the expected line length in the system.

1998 · Paper II · Q10a · 20 marks

Solution

(This is the same question as Q30 (1999, 8a) above. The worked solution is repeated here so that each question is complete.)

Steady state of M/M/1. Arrivals Poisson (λ\lambda), service exponential (μ\mu), one server, ρ=λ/μ<1\rho=\lambda/\mu<1.

(i) Probability of nn units. In a small interval hh, at most one arrival (probability λh\lambda h) or departure (probability μh\mu h if n≥1n\ge1) occurs. This gives pn′(t)=−(λ+μ)pn+λpn−1+μpn+1(n≥1),p_n'(t)=-(\lambda+\mu)p_n+\lambda p_{n-1}+\mu p_{n+1}\ (n\ge1), p0′(t)=−λp0+μp1.p_0'(t)=-\lambda p_0+\mu p_1 . In steady state the derivatives are 0: λp0=μp1,\lambda p_0=\mu p_1, μpn+1−λpn=μpn−λpn−1.\mu p_{n+1}-\lambda p_n=\mu p_n-\lambda p_{n-1}. So μpn+1−λpn\mu p_{n+1}-\lambda p_n is the same for all nn, and equals μp1−λp0=0\mu p_1-\lambda p_0=0. Thus pn+1=ρpnp_{n+1}=\rho p_n, pn=ρnp0p_n=\rho^np_0, and from ∑pn=1\sum p_n=1: pn=(1−ρ)ρn,n=0,1,2,…\boxed{p_n=(1-\rho)\rho^n,\quad n=0,1,2,\dots}

(ii) Expected number in the system. L=∑n=0∞n(1−ρ)ρn=(1−ρ)ρddρ∑n≥0ρn=(1−ρ)ρ(1−ρ)2=ρ1−ρ=λμ−λ.L=\sum_{n=0}^\infty n(1-\rho)\rho^n=(1-\rho)\rho\frac{d}{d\rho}\sum_{n\ge0}\rho^n=(1-\rho)\frac{\rho}{(1-\rho)^2}=\boxed{\frac{\rho}{1-\rho}=\frac{\lambda}{\mu-\lambda}}. (Mean queue length Lq=L−ρ=ρ21−ρL_q=L-\rho=\frac{\rho^2}{1-\rho}; mean time in the system W=L/λ=1μ−λW=L/\lambda=\frac1{\mu-\lambda}.)

✓ Derivation checked step by step Every step was checked: the steady-state balance equations of M/M/1, p_n = (1 − ρ)ρⁿ, and L = Σ n p_n = ρ/(1 − ρ).

↑ Back to the question list

Explain the M∣M∣1 queueing system. For this system obtain the steady state distribution of the number of persons in the system and the average waiting time of a customer in steady state.

1997 · Paper II · Q9c · 20 marks

Solution

The M|M|1 system. Customers arrive in a Poisson stream (rate λ\lambda), service times are exponential (rate μ\mu), there is one server, FCFS, unlimited waiting room; traffic intensity ρ=λ/μ<1\rho=\lambda/\mu<1.

Steady-state distribution. The number in the system is a birth–death process (birth rate λ\lambda, death rate μ\mu when n≥1n\ge1). In steady state the flow across each cut balances: λpn−1=μpn\lambda p_{n-1}=\mu p_n for n≥1n\ge1. So pn=ρnp0p_n=\rho^np_0 and, normalising, pn=(1−ρ)ρn,n=0,1,2,…\boxed{p_n=(1-\rho)\rho^n,\quad n=0,1,2,\dots}

Average waiting time. By PASTA, an arriving customer finds nn in the system with probability pnp_n. It must wait for the nn customers ahead to be served: the one in service has a remaining time that is again exponential(μ\mu) (memoryless), and the others need full services. So its expected wait in the queue is n/μn/\mu: Wq=∑n=0∞nμ(1−ρ)ρn=1μ⋅ρ1−ρ=λμ(μ−λ).W_q=\sum_{n=0}^\infty\frac n\mu(1-\rho)\rho^n=\frac1\mu\cdot\frac{\rho}{1-\rho}=\boxed{\frac{\lambda}{\mu(\mu-\lambda)}}. The average time in the system (wait + own service) is W=Wq+1μ=1μ−λ,W=W_q+\frac1\mu=\boxed{\frac1{\mu-\lambda}}, in agreement with Little’s law W=L/λ=ρ/(1−ρ)λW=L/\lambda=\frac{\rho/(1-\rho)}{\lambda}.

(Distribution: P(Wq=0)=1−ρP(W_q=0)=1-\rho, and P(Wq>t)=ρe−(μ−λ)tP(W_q>t)=\rho e^{-(\mu-\lambda)t}; see Q37.)

✓ Derivation checked step by step Every step was checked: p_n = (1 − ρ)ρⁿ, the waiting time of an arrival finding n as a sum of n exponentials, and W_q = λ/(μ(μ − λ)).

↑ Back to the question list

Derive the steady-state results (probabilities, mean numbers and mean waiting times) for an M/M/s queue.

1996 · Paper II · Q9b · 20 marks

Solution

Model. M/M/s: arrivals Poisson (λ\lambda), service exponential (μ\mu per server), ss servers, single FCFS queue, unlimited capacity. Let r=λ/μr=\lambda/\mu and ρ=λsμ<1\rho=\frac{\lambda}{s\mu}<1.

Probabilities. In state nn the departure rate is μn=nμ\mu_n=n\mu (n<sn<s) or sμs\mu (n≥sn\ge s). Balancing flows across each cut, λpn−1=μnpn\lambda p_{n-1}=\mu_np_n: pn=rnn!p0(0≤n≤s),p_n=\frac{r^n}{n!}p_0\ \ (0\le n\le s), pn=rns!sn−sp0(n≥s).p_n=\frac{r^n}{s!\,s^{n-s}}p_0\ \ (n\ge s). Normalising: p0=[∑n=0s−1rnn!+rss!(1−ρ)]−1.p_0=\left[\sum_{n=0}^{s-1}\frac{r^n}{n!}+\frac{r^s}{s!\,(1-\rho)}\right]^{-1}. Probability that an arrival must wait (all servers busy): C=P(n≥s)=rss!(1−ρ)p0.C=P(n\ge s)=\frac{r^s}{s!\,(1-\rho)}p_0 .

Mean numbers. Lq=∑n≥s(n−s)pn=rss!p0∑k≥0kρk=rsρs!(1−ρ)2p0=ρ1−ρC.L_q=\sum_{n\ge s}(n-s)p_n=\frac{r^s}{s!}p_0\sum_{k\ge0}k\rho^k=\frac{r^s\rho}{s!\,(1-\rho)^2}p_0=\frac{\rho}{1-\rho}C . The mean number of busy servers is rr (Q25), so L=Lq+r=Lq+λμ.L=L_q+r=L_q+\frac\lambda\mu .

Mean waiting times (Little’s law): Wq=Lqλ=Csμ−λ,W_q=\frac{L_q}{\lambda}=\frac{C}{s\mu-\lambda}, W=Wq+1μ.W=W_q+\frac1\mu .

Waiting-time distribution. P(Wq>t)=Ce−(sμ−λ)tP(W_q>t)=C\,e^{-(s\mu-\lambda)t}: an arrival waits with probability CC, and then for an exponential time with rate sμ−λs\mu-\lambda.

Check (s=1s=1): p0=1−ρp_0=1-\rho, C=ρC=\rho, Lq=ρ21−ρL_q=\frac{\rho^2}{1-\rho}, Wq=ρμ−λW_q=\frac{\rho}{\mu-\lambda} — the M/M/1 results.

Example. λ=10\lambda=10, μ=15\mu=15, s=2s=2: p0=12p_0=\frac12, C=16C=\frac16, Lq=1/32/3⋅16=112L_q=\frac{1/3}{2/3}\cdot\frac16=\frac1{12}, L=34L=\frac34, Wq=1120W_q=\frac1{120} hour =0.5=0.5 minute.

✓ Derivation checked step by step Every step was checked: the M/M/s birth–death probabilities, p₀, L_q, L = L_q + λ/μ, W_q and W, and the reduction to M/M/1 when s = 1.

↑ Back to the question list

What is an imbedded Markov chain? For the M/G/1 queue identify the imbedded Markov chain.

1996 · Paper II · Q9c · 20 marks

Solution

Imbedded (embedded) Markov chain. Many queueing processes {N(t)}\{N(t)\} are not Markov in continuous time, because the future depends on how long the current service (or inter-arrival time) has already lasted. But if we observe the process only at suitably chosen instants t1<t2<…t_1<t_2<\dots (where the elapsed time is known — e.g. just after a departure, when a new service starts afresh), the sequence Xn=N(tn)X_n=N(t_n) is a Markov chain. This discrete-time chain, picked out of the continuous process, is called an imbedded Markov chain. Its analysis (Kendall, 1951–53) gives the distribution of N(t)N(t) at those instants, and often in continuous time as well.

For the M/G/1 queue. Poisson arrivals (rate λ\lambda), general service times SS (distribution BB), one server.

  • Instants: the departure epochs tnt_n (times just after the nnth customer leaves).
  • State: XnX_n = number of customers left behind by the nnth departure.
  • Recursion: if An+1A_{n+1} is the number arriving during the (n+1)(n+1)th service, Xn+1={Xn−1+An+1,Xn≥1An+1,Xn=0X_{n+1}=\begin{cases}X_n-1+A_{n+1},&X_n\ge1\\A_{n+1},&X_n=0\end{cases} (if the system is empty, the next service starts only when someone arrives).
  • Why Markov: at a departure a new service starts afresh, and by the memoryless Poisson arrivals, An+1A_{n+1} is independent of the past and identically distributed, with kj=P(A=j)=∫0∞e−λt(λt)jj!dB(t),k_j=P(A=j)=\int_0^\infty e^{-\lambda t}\frac{(\lambda t)^j}{j!}\,dB(t), j=0,1,2,…j=0,1,2,\dots
  • Transition matrix: P=(k0k1k2k3⋯k0k1k2k3⋯0k0k1k2⋯00k0k1⋯⋮⋱),P=\begin{pmatrix}k_0&k_1&k_2&k_3&\cdots\\k_0&k_1&k_2&k_3&\cdots\\0&k_0&k_1&k_2&\cdots\\0&0&k_0&k_1&\cdots\\\vdots&&&&\ddots\end{pmatrix}, i.e. p0j=kjp_{0j}=k_j and pij=kj−i+1p_{ij}=k_{j-i+1} for i≥1i\ge1, j≥i−1j\ge i-1.

The chain is irreducible and aperiodic, and positive recurrent iff ρ=λE(S)<1\rho=\lambda E(S)<1. Its stationary distribution has the p.g.f. Π(z)=(1−ρ)(1−z)K(z)K(z)−z\Pi(z)=\dfrac{(1-\rho)(1-z)K(z)}{K(z)-z}, K(z)=∑kjzjK(z)=\sum k_jz^j, which gives the Pollaczek–Khinchine formula (Q7). Because arrivals are Poisson, this departure-epoch distribution equals the time-average distribution.

(For G/M/1 the imbedded chain is taken at arrival epochs instead; see Q6.)

✓ Answer checked step by step Every step was checked: the departure-epoch recursion X_{n+1} = X_n − U(X_n) + A_{n+1}, the Markov property from Poisson arrivals, and the transition probabilities k_j.

↑ Back to the question list

State the chief characteristics of a queueing process. For a M∣M∣1:(FIFO∣∞∣∞) queueing system derive the distribution of the waiting time in steady state conditions.

1995 · Paper II · Q9a · 20 marks

Solution

Chief characteristics of a queueing process: the arrival pattern (input), the service pattern, the number of servers, the queue discipline, the system capacity, and customer behaviour (balking, reneging, jockeying).

M|M|1 : (FIFO|∞|∞). Arrivals Poisson (λ\lambda), service exponential (μ\mu), one server, ρ=λ/μ<1\rho=\lambda/\mu<1, so pn=(1−ρ)ρnp_n=(1-\rho)\rho^n.

Waiting time in the queue, WqW_q. By PASTA an arrival finds nn customers with probability pnp_n.

  • If n=0n=0 it does not wait: P(Wq=0)=p0=1−ρP(W_q=0)=p_0=1-\rho.
  • If n≥1n\ge1 it waits for nn service completions (the residual service of the customer in service is again exponential(μ\mu) by the memoryless property). The sum of nn independent exponential(μ\mu) times has the Gamma density μntn−1e−μt(n−1)!\dfrac{\mu^nt^{n-1}e^{-\mu t}}{(n-1)!}.

So for t>0t>0 the density of WqW_q is w(t)=∑n=1∞(1−ρ)ρnμntn−1e−μt(n−1)!=(1−ρ)λe−μt∑m=0∞(λt)mm!w(t)=\sum_{n=1}^\infty(1-\rho)\rho^n\frac{\mu^nt^{n-1}e^{-\mu t}}{(n-1)!}=(1-\rho)\lambda e^{-\mu t}\sum_{m=0}^\infty\frac{(\lambda t)^m}{m!} (using ρnμn=λn\rho^n\mu^n=\lambda^n and m=n−1m=n-1), that is w(t)=λ(1−ρ)e−(μ−λ)t,t>0;P(Wq=0)=1−ρ.\boxed{w(t)=\lambda(1-\rho)e^{-(\mu-\lambda)t},\quad t>0;\qquad P(W_q=0)=1-\rho}. Check: ∫0∞w(t)dt=λ(1−ρ)μ−λ=ρ\int_0^\infty w(t)\,dt=\frac{\lambda(1-\rho)}{\mu-\lambda}=\rho, and ρ+(1−ρ)=1\rho+(1-\rho)=1 ✓.

Hence P(Wq>t)=ρe−(μ−λ)t,P(W_q>t)=\rho\,e^{-(\mu-\lambda)t}, E(Wq)=∫0∞tw(t)dt=λ(1−ρ)(μ−λ)2=λμ(μ−λ).E(W_q)=\int_0^\infty t\,w(t)\,dt=\frac{\lambda(1-\rho)}{(\mu-\lambda)^2}=\frac{\lambda}{\mu(\mu-\lambda)}. The waiting time given that the customer has to wait is exponential with rate μ−λ\mu-\lambda.

Time in the system W=Wq+SW=W_q+S: a customer finding nn spends n+1n+1 exponential(μ\mu) times, so fW(t)=∑n≥0(1−ρ)ρnμn+1tne−μtn!=(μ−λ)e−(μ−λ)t,t>0:f_W(t)=\sum_{n\ge0}(1-\rho)\rho^n\frac{\mu^{n+1}t^ne^{-\mu t}}{n!}=(\mu-\lambda)e^{-(\mu-\lambda)t},\quad t>0: WW is exponential with mean 1μ−λ\dfrac{1}{\mu-\lambda}.

✓ Derivation checked step by step Every step was checked: PASTA, the Gamma(n, μ) wait given n ahead, the series summing to ρ(μ − λ)e^(−(μ−λ)t), and the resulting distribution of W_q and W.

↑ Back to the question list

More on Optimization Techniques

Questions: UPSC Civil Services (Main) Examination, Statistics Paper II, 1995–2026. Solutions: Optional Province. Found an error? Tell us.

Spotted an error? Tell us.

We classify every PYQ with care, but mistakes can slip in. If a question is in the wrong topic, has a typo, the wrong year, or is missing, let us know. We review every report and update the page.

Report an Error
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted