Sankhy¯ a : The Indian Journal of Statistics 2000, Volume 62, Series A, Pt. 2, pp. 273–281
A SIMPLE TRANSIENT ANALYSIS OF AN M/M/1/N QUEUE By O.P. SHARMA Indian Institute of Technology, New Delhi and A.M.K. TARABIA Damietta Faculty of Science, New Damietta, Egypt SUMMARY. A simple series form is obtained for the transient state probabilities of a single server Markovian queue with finite waiting space whence all particular cases concerning infinite waiting space and steady-state situations can be derived straight away. Also the coefficients in the series satisfy iterative recurrence relations which enable fast and accurate numerical computations.
1.
Introduction
During the last over a decade the renewed interest in the investigation of Markovian queues, particularly the single server queue has resulted in some innovative techniques and simple forms of transient state probabilities of this model compared to the classical Bessel functions form ∞ X p ρn 1 λ pn (t) = e−(λ+µ)t ρ−k/2 klk (2 λµt), ρ = 6= 1 (1.1) µt µ k=n+1
where, as usual λ and µ are the arrival and service rates and pn (t) is the probability that the system has n units in the M/M/1/∞ queue. Out of the various results, mention may be made of the two-dimensional state model of Pegden and Rosenshine (1982) and Sharma and Shobha’s (1984) series formula pn (t) = (1 − ρ)ρn + e−(λ+µ)t ρn
∞ k+n X (λt)k X k=0
k!
m=0
(k − m)
(µt)m−1 , ρ 6= 1. m!
(1.2)
The others to be quoted should include the results obtained by Boxma (1984), Parathasarthy and Sharafali (1989), Towsley (1987), Syski (1988), Abate and Whitt (1988), Baccelli and Massey (1989), Bohm and Mohanty (1990), Conolly and Langaris (1993) and finally the simple formula obtained by Sharma and Bunday (1997) given by Paper received. February 1999. AMS (1991) subject classification. Primary 60K25; secondary 90B22, 90C40 Key words and phrases. Transient, recurrence relations, integral value, Maclaurin’s expansion.
274
o.p. sharma and a.m.k. tarabia
[ m−n ¶ µ ¶¾ ∞ 2 ] ½µ X X m m (µt)m − ρr pn (t) = e−(λ+µ)t ρn , ρ 6= 1 r r−1 m! m=0
(1.3)
r=0
Simultaneously attempts have been made to obtain a tractable and conceptually easy format for the transient state probabilities for the finite waiting space single server queue namely M/M/1/N queue. We have come a long way from the Takac’s result (1962) √ n N (1 − ρ)pn 2e−(λ+µ)t ρ 2 X βn sin αj eγ,t λµ pn (t) = − , ρ 6= 1 (1.4) 1 1 1 − ρN +1 N +1 ρ 2 + ρ− 2 + γj j=1 which was improved by Sharma and Gupta (1982), Sharma and Gass (1989) and has been concisely documented in Sharma’s book (1990) and is given by
pn (t) =
1 N X (1 − ρ)pn gN −n (γj ) + ρ 2 gN −n−1 (γj ) N −n −(λ+µ)t n 2 − (−1) e ρ N ³ 1 ´ Y 1 − ρN +1 1 j=1 ρ 2 + ρ− 2 − γ j (γk − γj ) k=1 k 6= j
×e−γj t
√
λµ
, ρ 6= 1
(1.5)
1 2
with αj = Njπ +1 , βn = sin nαn − ρ sin(n + 1)αj , γj = 2 cos αj , and gk (x) is the Chebychev’s polynomial of the second kind of degree k. In this paper the motivation has been to find a simpler closed form formula for the transient state probabilities for this model also working along similar lines as pursued by Sharma and Bunday (1997) for the M/M/1/∞ queue and perhaps, for the single server queue the result obtained here may be the first of its kind in the literature whence all the particular cases can be easily worked out. 2.
Simple Formula
Let pn (t) be the probability that there are n units in the system at time t; λ, µ be the arrival and service rates respectively and the system is taken initially empty with FIFO discipline, then governing equations the system under consideration are given by p00 (t) = −ρp0 (t) + p1 (t) p0n (t) = ρpn−1 (t) − (1 + ρ)pn (t) + pn+1 (t), 0 ≤ n ≤ N − 1 p0N (t) = ρpN −1 (t) − pN (t)
(2.1)
simple transient analysis of an m/m/1/n queue
275
with pn (0) = −δn,0 , p0n (t) =
d pn (t) dt
where time has been scaled such that mean service time 1/µ is taken as the time unit and ρ = µλ is traffic intensity. Guided by the result (1.3) and the need to have the steady state part we assume that the solution of the system (2.1) is of the form
pn (t) = e−(1+ρ)t ρn
∞ X m=0
a(m, n)
tm , m!
0≤n≤N
(2.2)
and a(m, n) are constants to be determined. Substituting (2.2) in (2.1), we get the simple recurrence relations a(m + 1, 0) = a(m + 1, n) = a(m + 1, N ) = a(0, n) =
a(m, 0) + ρa(m, 1) a(m, n − 1) + ρa(m, n + 1), 0 ≤ n ≤ N − 1 a(m, N − 1) + ρa(m, N ) δ0,n
(2.3)
After a little algebra it can be seen that a(m, n) is a polynomial in ρ and can be expressed as a(m, n) =
0, m < n 1, m = n r [ m−n 2 ] [ N +1 ] X X
A[m, r − (N + 1)i]ρr
r=0 i=0 −r [ m−N m−N N +1 ] X X − A[m, r + (N + 1)(i + 1)]ρr , m > n, p 6= 1 m−n i=0 r=[ 2 ]+1 (2.4) µ ¶ µ ¶ µ ¶ b X b m m . . . or is taken zero whenever where (i) A[m, s] = − (ii) a s s−1 a b < a, or a < 0 or b < 0 and [x] stands for the integral value of x when it exists. We shall prove this result by induction.
Proof. It is easy to see that (2.4) gives a(m, n) = 0 for m < n a(m, n) = 1 for m = n. Also for small values of N, m, n = 0, 1, 2(say), (2.4) satisfies (2.3). Now for
276
o.p. sharma and a.m.k. tarabia
m > 0, 1 ≤ n ≤ N we have from (2.4) a(m, n − 1) + ρa(m, n + 1)
=
r [ m−n+1 ] [N 2 +1 ] X X
r=0
A[m, r − (N + 1)i]ρr
i=0
−r [ m−N N +1 ] X
m−N X
−
i=0
r=[ m−n+1 ]+1 2
[ X ] [X] m−n−1 2
+
r N +1
r=0
i=0
A[m, r − (N + 1)i]ρr+1
m−N X
−r [ m−N N +1 ] X
r=[ m−n−1 ]+1 2
i=0
−
A[m, r + (N + 1)(i + 1)]ρr
A[m, r + (N + 1)(i + 1)]ρr+1
(2.6) Now replacing r by r − 1 in the last two terms in (2.6) and using (2.5) (ii) and simplifying we get from (2.6) RHS
=
r [ m+1−n ] [N 2 +1 ] X X
r=0
−
i=0
m+1−N X r=[
−
A[m, r − (N + 1)i]ρr +
m−n+1 2
r=[
r=0
A[m, r − (N + 1)i − 1]ρr
i=0
A[m, r + (N + 1)(i + 1)]ρr
i=0
]+1
m+1−N X m−n+1 2
−r+1 [ m−N N +1 X ]
r [ m+1−n ] [N 2 +1 ] X X
−r [ m−+1−N N +1 X ]
A[m, r + (N + 1)i + N ]ρr
i=0
]+1
(2.7) But
µ
A[m, s] + A[m, s − 1]
¶ µ ¶ µ ¶ µ ¶ m m m m = − + − s−2 µs ¶ s− µ1 ¶s − 1 m+1 m+1 = − = A[m + 1, s]. s s−1
(2.8)
And using (2.8) in (2.7), we finally obtain a(m, n − 1) + ρa(m, n + 1)
=
r ] [N [ m+1−n 2 +1 ] X X
r=0
−
i=0
m+1−N X
r=[ ]+1 a(m + 1, n) m+1−n 2
=
A[m + 1, r − (N + 1)i]ρr −r [ m+1−N N +1 X ]
A[m + 1, r + (N + 1)(i + 1)]ρr
i=0
(2.9)
simple transient analysis of an m/m/1/n queue
277
and for n = N , after some algebra, we have from (2.4)
a(m, n − 1) + ρa(m, N ) =
+1 r [ m−N ] [N 2 +1 ] X X
r=0
A[m, r − (N + 1)i]ρr
i=0
−r [ m−N N +1 ] X
m−N X
−
i=0
+1 r=[ m−N ]+1 2
[ X ] [X] m+2−N 2
+
A[m, r + (N + 1)(i + 1)]ρr
r−1 N +1
r=1
i=0
A[m, r − 1 − (N + 1)i]ρr
m−N X
−r [ m+1−N N +1 X ]
r=[ m+2−N ]+1 2
i=0
−
A[m, r + (N + 1)i + N )]ρr
(2.10) Now there are two possibilities viz either m−N is even or m−N is odd. Suppose m − N = 2k (say) and using (2.5) (ii) and some algebra we get from (2.10) k [N +1 ] X X r
RHS
=
r=0 i=0
−
{A[m, r − (N + 1)i] + A[m, r − 1 − (N + 1)i]} ρr
m+1−N X
−r [ m+1−N N +1 X ]
r=k+2
i=0
−ρk+1
k [N +1 ] X
{A[m, r + (N + 1)(i + 1)] + A[m, r + (N + 1)i + N ]} ρr
{A[m, k + 1 + (N + 1)(i + 1)] − A[m, k − (N + 1)i]} .
i=0
(2.11) ¶ m Remembering that m − N = 2k, = and using (2.5) (ii) the last m−k k [N +1 ] X k+1 A[m + 1, k + 1 + (N + 1)(i + 1)] so term in (2.10) easily works out to −ρ µ
m k
¶
µ
i=0
that we finally obtain
a(m, N − 1) + ρa(m, N ) =
r [ m+2−N ] [N 2 +1 ] X X
r=0
−
i=0
m+1−N X
r=[ ]+1 a(m + 1, N ) m+2−N 2
=
A[m + 1, r − (N + 1)i]ρr −r [ m+1−N N +1 X ]
A[m + 1, r + (N + 1)(i + 1)]ρr
i=0
(2.12)
278
o.p. sharma and a.m.k. tarabia
working likewise one can easily establish the result for m − N = 2k + 1 and for n = 0 for all m. Hence the result (2.4) gets fully established and thus with a(m, n) as given by (2.4), we have
pn (t) =
e−(1+ρ)t ρn
=
−(1+ρ)t n
e
=
∞ X
a(m, n)
m=0 · ∞ X
tm , 0≤n≤N m!
¸ m (1 − ρ)(1 + ρ)m (ρ − 1)(1 + ρ)m t , + + a(m, n) N +1 N +1 1 − ρ 1 − ρ m! m=0 ρ 6= 1, 0 ≤ n ≤ N ¸ m ∞ · X t (ρ − 1)(1 + ρ)m (1−ρ)ρn −(1+ρ)t n +e ρ + a(m, n) , 1−ρN +1 N +1 1 − ρ m! m=0 ρ 6= 1, 0 ≤ n ≤ N ¸ m ∞ · m X 2 t 1 −2t a(m, n) − , ρ = 1, 0 ≤ n ≤ N N +1 + e N + 1 m! m=0 (2.13) ρ
with µ
0
a (m, n)
¶ µ ¶ m ¤ m £ £ ¤ = + m−n m−n +N +1 2µ 2 ¶X ¶ s s2 µ 1 X m £ m−n ¤ m £ m−n ¤ + − (N + 1)i + (N + 1)(i + 1) 2 2 i=1
i=1
"£ s1 =
m−n 2
¤#
N +1
"¡ , s2 =
(2.14)
£ ¤ ¢# m − N − m−n −1 2 . N +1
As an example consider the case N = 1. Taking N = 1 in (2.4) and using it we get r [ m−n ∞ 2 ] [2] X X X pn (t) = e−(1+ρ)t ρn A(m, r − 2i)ρr m=0
−
r=0
m−1 X
[ X ]
r=[ m−n 2 ]+1
i=0
m−1−r 2
i=0
A[m, r + 2(i + 1)]ρr tm!
After a little algebra one can easily obtain [ r2 ] X i=0
and
µ A[m, r − 2i] =
(2.15) m
m−1 r
¶
simple transient analysis of an m/m/1/n queue
] [ m−1−r 2 X
µ A[m, r + 2(i + 1)] = −
i=0
m−1 r
279
¶
so that we get ) (m−1 µ # X m − 1 ¶ tm pn (t) = e ρ δ0,n + , n = 0, 1 r m! m=1 r=0 £ ¤ = e−(1+ρ)t ρn δ0,n + (1 + ρ)−1 (e(1+ρ)t − 1) , n = 0, 1 "
∞ X
−(1+ρ)t n
(2.16)
which gives p0 (t) = p1 (t) =
(1 + ρ)−1 + ρ(1 + ρ)−1 e−(1+ρ)t ρ(1 + ρ)−1 − ρ(1 + ρ)e−(1+ρ)t
(2.17)
and this agrees with the result reported in Gross and Harris (1974) and Sharma (1990). 3.
Other Results
From (2.2) using Leibnitz result for the derivatives one can easily see that if Maclaurin’s expansion of pn (t) can be expressed as pn (t) = ρn
∞ X m=0
b(m, n)
tm m!
then b(m, n) is given by m µ ¶ X m l (−1) (1 + ρ)l a(m − l, n), . . . m > n l i=0 b(m, n) = 1, m ≡ n 0, m < n
(3.1)
(3.2)
Again using induction and (2.3) we can establish that N X
ρn a(m, n) = (1 + ρ)m
(3.3)
n=0
This result can also be obtained directly using (2.4) but the algebra gets slightly involved and is, therefore, being omitted here for brevity. Now using (3.3) one finds
280
o.p. sharma and a.m.k. tarabia
that
N X
pn (t) =
n=0
=
N X
∞ X tm e−(1+ρ)t ρn a(m, n) m! N =0 Ã m=0 ! ∞ N X X tm e−(1+ρ)t ρn a(m, n) =1 m! m=0 n=0
(3.4)
Alternatively from (3.2), we obtain N X
pn (t) =
n=0
= = =
µ ¶ ∞ X N X m X m (−1)l (1 + ρ)l ρn a(m − l, n) l m=1 n=0 l=0 µ ¶ ∞ X m X m l 1+ (−1) (1 + ρ)m , (because of (3.3)) l m=1 l=0 µ ¶ ∞ m X X m 1+ (1 + ρ)m (−1)l l b(0, 0) +
m=1
(3.5)
l=0
1+0=1
Again letting N → ∞ in (2.4), one can easily get 0, m < n 1, m = n ¶ µ ¶¾ [ m−n 2 ] ½µ X m m a(m, n) = − ρr , m > n, ρ 6= 1 r r − 1 µr=0 ¶ m ¤ £ , m > n, ρ = 1 m−n
(3.6)
2
which then gives pn (t) as obtained by Sharma and Bunday (1997). In fact the solution as given in (2.13) is perhaps the first such result in the literature concerning M/M/1/N queue hence all particulars cases such as when N → ∞ or t → ∞ or both N → ∞, t → ∞ and ρ < 1, can be easily worked out. References
Abate, J. and Whitt, W. (1988) Transient behaviour of the M/M/1 queque via Laplace transformations. Adv. Appl. Prob. 20, 145-178. Baccelli, F and Massey, W.A. (1989) A sample path analysis of the M/M/1 queue, J. Appl. Prob., 26, 418-422. Bohm, W. and Mohanty, S.G. (1990) The transient solution of M/M/1 queues under (M,N) policy-A combinatorial approach, J. Statist. Planning Inf. Boxma, O.J. (1984) The joint arrival and departure process for the M/M/1 queue. Statist. Neerlandica, 38, 199-208. Conolly, B.W. and Langaris, C. (1993). On a new formula for the transient state probabilities for M/M/1 queues and computational implications J. Appl. Prob., 30, 237-246. Gross, D. and Harris, C.M. (1974). Fundamentals of Queuing Theory. John Wiley and Sons, New York.
simple transient analysis of an m/m/1/n queue
281
Parthasarathy, P.R. and Sharafali, M. (1989). Transient solution to the many server Poisson queues. J. Appl. Prob., 26, 584-594. Pegden, C.C. and Rosenshine, M. (1982). Some new results for the M/M/1 queue, Management Sci. 28, 821-828. Sharma, O.P. (1990). Markovian Queues. Ellis Horwood Ltd., England. Sharma O.P. and Bunday, B. (1997). A simple formula for the transient state probabilities for an M/M/1/∞ queue. Optimization, 40, 79-84. Sharma O.P. Gupta, U.C. (1982). Transient behaviour of an M/M/1/N queue. Stoch. Process and their Applications, 13 327-331. Sharma, O.P. and Dass, J. (1989). Multiserver Markovian queue with finite waiting space. Sankhy¯ a, B-50, 328-331. Sharma, O.P. and Shobha, B. (1984). A new approach to the M/M/1 queue J. Eng. Prod. 7, 70-79. Syski, R. (1988). Further comments on the solution of the M/M/1 queue. Adv. Appl. Prob. 20, 693. Taka’cs, L. (1962), Introduction to the Theory of Queues. Oxford University Press. Towsiley, D. (1987). An application of the reflection principle to the transient analysis of the M/M/1 queue. Naval. Res. Logist, 34 451-456.
O.P. Sharma Department of Mathematics Indian Institute of Technology New Delhi 110 016 India e-mail:
[email protected]
A.M.K. Tarabia Department of Mathematics Damietta Faculty of Science New Damietta Egypt e-mail: a
[email protected]