OPERATIONS RESEARCH
Chapter 6
Queueing Theory
Prof. Bibhas C. Giri
Department of Mathematics Jadavpur University
Kolkata, India
Email: [email protected]
MODULE - 2: Probability Distribution of Departures and Model I
(M |M|1) : (∞|FCFS)
2.1 Distribution of Departures (Pure Death Process)
The process which allows only departures (deaths) but no arrivals (births) is called pure death process. Suppose that a queueing system starts with N customers at time t = 0, where N ≥ 1. Departures occur at the rate of µ customers per unit time. Let Pn(t) be the probability thatn customers remain in the system after time t. We derive the distribution of departures from the system on the basis of the followingthree axioms:
1. Prob.[one departure during ∆t ] = µ∆t + o(∆t).
2. Prob.[more that one departure during ∆t] is negligible.
3. Departures in non-overlapping intervals are statistically independent and iden- tically distributed random variables.
We defineµ∆t = probability that a customer in service at time t will complete service during time ∆t.
Therefore, for small time interval ∆t > 0, µ∆t gives probability of one departure dur- ing ∆t. Using the same arguments as in the case of pure birth process, the differential difference equations can be derived as
Pn(t + ∆t) = Pn(t)[1− µ∆t + o(∆t)] + Pn+1(t)[µ∆t + o(∆t)], 0 < n < N P0(t + ∆t) = P0(t) + P1(t)[µ∆t + o(∆t)], n = 0
PN(t + ∆t) = PN(t)[1− µ∆t + o(∆t)], n = N 2
Re-arranging and dividing both sides by ∆t, and then taking limit as ∆t→ 0, we get dPn(t)
dt = −µPn(t) + µPn+1(t), 0 < n < N , t > 0 dP0(t)
dt = µP1(t), n = 0, t≥ 0 dPN(t)
dt = −µPN(t), n = N , t≥ 0 The solution of these equations with initial conditions
Pn(0) =
1, n = N , 0 0, n, N
can be obtained as earlier. The general solution to the above differential equations is given by
Pn(t) = (µt)N−ne−µt
(N− n)! , 1≤ n ≤ N and P0(t) = 1−
∑N n=1
Pn(t)
which is known astruncated Poisson law.
2.1.1 Distribution of Service Times
Making similar assumptions as done for arrivals, one can describe the service pattern.
Let the three axioms be changed by using the word ‘service’ instead of ‘arrival’ and condition of the probability statement by requiring the system to be non-empty. Then we can easily show that, the timet to complete the service on a customer follows the exponential distribution:
s(t) =
µeµt, t > 0 0, t < 0
whereµ is the mean service rate for a particular service channel. This shows that ser- vice time follows exponential distribution with mean 1/µ. The number, n, of potential services in timeT will follow the Poisson distribution given by
ϕ(n) = P [n service in time T , if servicing is going on throughout T ] = (µT )N n! e−µT Consequently, we can also show thatP [no service in ∆t] = 1− µ∆t + o(∆t) and P [one service in ∆t] = µ∆t + o(∆t).
2.1.2 Erlang Service Time Distribution
We have seen that the inter-arrival time and service time both follow exponential dis- tribution given bya(T ) = λe−λt ands(t) = µe−µt, respectively.
A two-parameter (µ and k) generalisation of the exponential family is called Erlang family of service time, and is defined by the pdf
s(t; µ, k) = (k−1)!e−kµt (kµ)ktk−1, 0≤ t < ∞, k ≥ 1.
Fork = 1, it gives exponential distribution.
2.2 Kendall-Lee Notations for Queueing Systems
Generally queueing model may be completely specified in the following symbolic form: (a|b|c) : (d|e), where
a = probability law for the arrival (or inter-arrival) time,
b = probability law according which customers are being served, c = number of servers (service channel),
d = capacity of the system (queue plus service), e = queue or service discipline.
First three characteristics (a|b|c) in the above notation were introduced by D. Kendall (1953). Later, A. Lee (1966) added the fourth (d) and the fifth (e) characteristics to the notation.
We also specify the following letters:
M ≡ Poisson arrival or departure distribution,
Ek ≡ Erlangian or Gamma inter-arrival for service time distribution.
2.3 Queueing Models
The following queueing models will be discussed:
Model I (M|M|1) : (∞|FCFS). It considers Poisson arrival (exponential inter-arrival), Poisson departure (exponential service time), single server, infinite capacity and “First Come, First Served” service discipline.
Model I (General) (M|M|1) : (∞|FCFS). This is a general queueing model in which the rate of arrival and rate of service depend on the length of the line.
Model II (M|M|1) : (N|FCFS). In this model, capacity of the system is limited to N.
Obviously, the number of arrivals will not exceed the numberN in any case.
Model III(M|M|s) : (∞|FCFS). In this model, the number of servers (service stations) iss in parallel.
Model IV(M|Ek|1) : (∞|FCFS). This model considers Poisson arrival but Erlang ser- vice time fork phases and a single server.
2.4 Model I. (M |M|1) : (∞|FCFS) : Birth and Death Model
This model deals with a queueing system having single service channel. Poisson input, Exponential service and there is no limit in the system capacity while the customers are served on “First Come First Serve” basis. The solution procedure of this queueing model can be summarized in the following three steps:
Step 1. Construction of differential-difference equations - Let Pn(t) be the probabil- ity that there aren customers in the system at time t. The probability that the system hasn customers at time (t +∆t) can be expressed as the sum of the joint probabilities of the four mutually exclusive and collectively exhaustive events as follows:
Pn(t + ∆t) = Pn(t)· [ no arrival in ∆t] · P [ no service completion in ∆t]
+Pn(t)· [ one arrival in ∆t] · P [ one service completion in ∆t]
+Pn+1(t)· [ no arrival in ∆t] · P [ one service completion in ∆t]
+Pn−1(t)· [ one arrival in ∆t] · P [ no service completion in ∆t]
The above can be re-written as
Pn(t + ∆t) = Pn(t)[1− λ∆t + o(∆t)][1 − µ∆t + o(∆t)] + Pn(t)[λ∆t][µ∆t]
+Pn+1(t)[1− λ∆t + o(∆t)][µ∆t + o(∆t)]
+Pn−1(t)[λ∆t + o(∆t)][1− µ∆t + o(∆t)]
or, Pn(t + ∆t)− Pn(t) = −(λ − µ)∆tPn(t) + µ∆tPn+1(t) + λ∆tPn−1(t) + o(∆t)
Dividing both sides of the above equation by ∆t and then taking limit as ∆t→ 0, we get
dPn(t)
dt =−(λ + µ)Pn(t) + µPn+1(n) + λPn−1(t), n≥ 1.
Similarly, if there is no customer in the system at time (t + ∆t), there will be no service completion during ∆t. Thus, for n = 0 and t≥ 0, we have only two probabilities instead of four. The resulting equation is
P0(t + ∆t) = P0(t){1 − λ∆t + o(∆t)} + P1(t){µ∆t + o(∆t)}{1 − λ∆t + o(∆t)}
P0(t + ∆t)− P0(t) = λ∆tP0(t) + µ∆tP1(t) + o(∆t).
Dividing both sides by ∆t and then taking limit as ∆t→ 0, we get dP0(t)
dt =−λP0(t) + µP1(t), n = 0.
Step 2. Deriving the steady-state difference equations - In the steady-state, Pn(t) is independent of time t and λ < µ when t→ ∞. Thus Pn(t)→ Pn and dPdtn(t) → 0 ast→ ∞. Consequently the differential-difference equations obtained in Step 1 reduce to
0 = −(λ + µ)Pn+µPn+1+λPn−1; n≥ 1 and 0 = λPn+µP1; n = 0.
These equations constitute the steady-state difference equations.
Step 3. Solution of steady-state difference equations - Using iteratively, the difference- equations yield
P1 = λ µP0
P2 = λ + µ µ P1−λ
µP0= (λ
µ )2
P0
P3 = λ + µ µ P2−λ
µP1= (λ
µ )3
P0,
and in general, Pn = (λ
µ )n
P0.
Now, Pn+1 = λ + µ µ Pn−λ
µPn−1, n≥ 0.
Substituting the values ofPnandPn−1, we get Pn+1= λ + µ
µ (λ
µ )n
P0−λ µ
(λ µ
)n−1 P0=
(λ µ
)n+1
P0
Thus, by the principle of mathematical induction, the general formulae forPn is valid for n ≥ 0. To obtain the value of P0, we use the boundary condition
∑∞
n=0Pn= 1. Therefore, 1 =
∑∞ n=0
(λ µ
)n
P0 =P0 1
1− λ/µ, since (λ
µ )
< 1.
This gives
P0= 1− (λ/µ). (2.1)
Hence the steady-state solution is Pn=
(λ µ
)n( 1−λ
µ )
=ρn(1− ρ); where ρ = (λ
µ )
< 1 and n≥ 0. (2.2)
• Waiting time distribution for Model I - In the steady state, each customer has the same waiting time distribution. This is a continuous distribution with probability density function Ψ (w). Therefore, Ψ (w)dw is the probability that a customer begins to be served in the interval (w, w + dw), where w is measured from the time of his arrival. We suppose that a customer arrives at time w = 0 and service begins in the interval (w, w + dw).
The server’s mean rate of service is µ in unit time, or µw in time w and the proba- bility of (n−1) departures in time w, during which the server is busy, is the appropriate term of the Poisson distribution (µw)n−1e−µw/(n− 1)!
Let there be n units in the system. Then Ψn(w)dw = Prob.[(n− 1) units are served at timew ]× Prob. [one unit is served in time dw].
Ψn(w) dw = (µw)n−1e−µw
(n− 1)! × µ dw. (2.3)
LetW be the waiting time of a customer who has to wait such that w ≤ W ≤ w + dw.
Then
Ψ(w) dw = Prob.(w≤ W ≤ w + dw)
= Prob.[n customers in the system when a customer arrives]
× Prob.[ exactly (n − 1) customers leave in (0,w)]
× Prob.[nth customer leaves in (w,w + dw)],
=
∑∞ n=1
PnΨn(w)dw =
∑∞ n=1
(λ µ
)(
1−λ µ
)(µw)n−1e−µw
(n− 1)! µ dw. [from (2.2) and (2.3)]
= λ (
1−λ µ )
e−µw
∑∞ n=1
(λw)n−1
(n− 1)!dw = λ (
1−λ µ )
e−µweλwdw
This gives
Ψ(w) = λ (
1−λ µ )
e−(µ−λ)w, w > 0 (2.4)
Obviously,∫∞
0 Ψ(w)dw, 1, because it has the value λ/µ. It is also true that when w = 0 the equation (2.4) gives that Prob.[W = 0]= Prob.[no unit in the system]=P0= 1− λ/µ.
The probability that waiting time exceedsw is given by
∫ ∞
w
Ψ(w)dw =
∫ ∞
w
λ (
1−λ µ )
e−(µ−λ)wdw = [
−λ
µe−(µ−λ)w ]∞
w
=λ
µe−(µ−λ)w=ρe−(µ−λ)w which does not include the service time.
• Characteristics of Model I
(i) To find probability of queue size≥ N.
Prob.[queue size≥ N] =
∑∞ n=N
Pn=
∑∞ n=0
Pn−
N∑−1 n=0
Pn= 1− (P0+P1+P2+... + PN−1)
= 1−
P0+λ µP0+
(λ µ
)2
P0+... + (λ
µ )N−1
P0
= 1− P0
[1− (λ/µ)N 1− λ/µ
]
= 1− (
1−λ µ
)[1− (λ/µ)N 1− λ/µ
]
= (λ
µ )N
=ρN
(ii) To find the expected (average) number of units in the system, Ls. Average number of customers in the system is given by
Ls=E(n) =
∑∞ n=0
nPn= (1− ρ)
∑∞ n=0
nρn=ρ(1− ρ)
∑∞ n=1
nρn−1
= ρ(1− ρ)
∑∞ n=0
d
dρρn=ρ(1− ρ) d dρ
∑∞ n=0
ρn, since ρ < 1
= ρ(1− ρ) 1
(1− ρ)2 = ρ
1− ρ = λ µ− λ (iii) To find the expected queue length, Lq.
Average queue length is given by
Lq=E(m) =
∑∞ m=0
mPn,
wherem = n−1 being the number of customers in the queue, excluding one being serviced. Therefore,
Lq =
∑∞ n=1
(n− 1)Pn=
∑∞ n=1
nPn−
∑∞ n=1
Pn=
∑∞ n=0
nPn−
∑∞ n=0
Pn− P0
= ρ
1− ρ− [1 − (1 − ρ)] = ρ
1− ρ− ρ = ρ2
1− ρ = λ2 µ(µ− λ)
(iv) To find probability distribution of time spent in the system (busy period dis- tribution) In order to find the probability density function for the distribution of total time (waiting + service) an arrival spends in the system, let Ψ (w|w > 0) = probability density function for waiting time such that a person has to wait. The statement “person has to wait” is meant that the server remains busy in the busy period.
Applying the rule of conditional probability, Ψ(w|w > 0) = Ψ(w)
P (w > 0) [
λ (
1−λ µ )
e−(µ−λ)w ]
/ (λ
µ )
= (µ− λ)e−(µ−λ)w
(v) To find the expected waiting time in the queue (excluding service time), Wq. Average waiting time of a customer (in the queue) is given by
Wq=E(w) =
∫ ∞
0
wΨ (w)dw =
∫ ∞
0
wρµ(1− ρ)e−µ(1−ρ)wdw
= ρ
∫ ∞
0
xe−x
µ(1− ρ)dx, putting x = µ(1− ρ)w
= ρ
µ(1− ρ) = λ µ(µ− λ)
(vi) To find the expected waiting time in the system (including service time), Ws. The expected waiting time in the system = expected waiting time in the queue + expected service time, i.e.
Ws =Wq+ 1/µ = µ(µ−λ)λ +1µ =µ−λ1
(vii) To find the expected waiting time of a customer who has to wait, W|W > 0.
The expected length of the busy period is given by E(w|w > 0) =
∫ ∞
0
wΨ (w > 0)dw =
∫ ∞
0
w(µ− λ)e−(µ−λ)wdw
= 1
µ− λ = 1 µ(1− ρ)
(viii) To find the expected length of non-empty queue, L|L > 0.
Average length of non-empty queue is given by
E(L|L > 0) = Ls/ Prob.(an arrival has to wait, L > 0)
= Ls/(1− P0) (since probability of an arrival not to wait isP0)
= (λ/µ)/(1− λ/µ)
λ/µ = µ
µ− λ = 1 1− ρ
• Inter-relationship between Ls,Lq,Ws,Wq
It can be proved under general conditions of arrival, departure, and service discipline that the formulae
Ls = λWs and Lq = λWq
hold. These formulae act as key points in establishing the strong relationships be- tweenWs,Wq,Ls andLqwhich can be found as follows.
By definition, we haveWq=Ws− 1/µ
Then multiplying both sides byλ, we get Lq=Ls− λ/µ.
Example 2.1: Telephone users arrive at a booth following a Poisson distribution with an average time of 5 minutes between one arrival and the next. The time taken for a telephone call is on an average 3 minutes and it follows an exponential distribution.
What is the probability that the booth is busy? How much service rate should be increased in order to reduce the waiting time to less than or equal to half of the present waiting time?
Solution: Given that arrival rate,λ = 12 per hour. Service rate µ = 20 per hour.
Probability that the booth is busy = 1− P0= λµ = 1220= 0.60.
Average waiting time in queueWq=µ(µ−λ)λ = 20(20−1212 = 403 hour.
Average waiting time in the systemWs =µ−λ1 = 20−121 = 18 hour.
In case, the waiting time is required to be reduced to half, we have Ws′= µ′1−λ ⇒ 161 = µ′−121 or µ′= 28 per hour.
Hence the increase in service rate should be 8 users per hour.