Queueing Theory Notes
Queueing Theory Notes
1/12 1
𝐸 (𝑁𝑠 ) = =
1/4 − 1/12 2
(b) What is the probability that a person arriving at the booth will have to wait in
the queue?
𝑃(𝑊 > 0) = 1 − 𝑃(𝑊 = 0)
𝑃(𝑊 > 0) = 1 - P (no customer in the system)
𝑃(𝑊 > 0) = 1 − 𝑃0
𝜆 𝜆 1/12
𝑃(𝑊 > 0) = 1 − (1 − ) = =
𝜇 𝜇 1/4
1
𝑃(𝑊 > 0) =
3
(c) What is the probability that it will take him more than 10 minutes altogether to
wait for the phone and complete his call?
𝑃(𝑊𝑠 > 𝑡) = 𝑒 −(𝜇−𝜆)𝑡
−( −
1 1 )10
𝑃(𝑊𝑠 > 10) = 𝑒 4 12
1
−( )10
𝑃(𝑊𝑠 > 10) = 𝑒 = 𝑒 −5/3
6
2
𝜆 1
𝐸(𝑁𝑞 ) = =
𝜇 ( 𝜇 − 𝜆) 5
1
𝜆 1 2
𝑃0 = 1 − = 1 − 12 = 1 − =
𝜇 1 3 3
4
1 1
𝜆 𝜆 1 1 2
𝑃1 = (1 − ) = 12 (1 − 12 ) = (1 − ) =
𝜇 𝜇 1 1 3 3 9
4 4
From equation (1)
1
𝐸(𝑁𝑞 /𝑡he queue is always available) 5 = 1.5 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟
2 2
1− −
3 9
Example 2
Customers arrive at a one-man barber shop according to a Poisson process with a
mean interarrival time of 12 min. Customers spend an average of 10 min in the
barber's chair.
Solution:
1 1 1 1
= 12 ⇒ 𝜆 = per minute = 10 ⇒ 𝜇 = per minute
𝜆 12 𝜇 10
(a) What is the expected number of customers in the barber shop and in the queue?
𝜆 1/12
𝐸 (𝑁𝑠 ) = = = 5 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
𝜇−𝜆 1/10 − 1/12
2
𝜆(1/12)2
𝐸(𝑁𝑞 ) = = = 4.17 𝑐𝑢𝑠𝑡𝑜𝑚𝑒𝑟𝑠
𝜇(𝜇 − 𝜆) (1/10)(1/10 − 1/12)
(b) Calculate the percentage of time an arrival can walk straight into the barber's
chair without having to wait.
P(a customer straight goes to the barber's chair) = P (No customer in the system)
𝜆
= 𝑃0 = 1 −
𝜇
1
10 5 1
= 1 − 12 = 1 − = 1 − = = 0.167
1 12 6 6
10
Therefore, the percentage of time an arrival need not wait - 16.7
(c) How much time can a customer expect to spend in the barber's shop?
1 1
𝐸 (𝑊𝑠 ) = = = 60 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
𝜇−𝜆 1 1
−
10 12
(d) Management will provide another chair and hire another barber, when a
customer's waiting time in the shop exceeds 1.25 h. How much must the average
rate of arrivals increase to warrant a second barber?
1.25 hrs=1.25x60 minutes=75 minutes
1
𝐸 (𝑊𝑠 ) > 75 ⇒ > 75 ⇒ 1 > 75(𝜇 − 𝜆𝑅 )
𝜇 − 𝜆𝑅
75𝜆𝑅 > 75𝜇 − 1 ⇒ 75𝜆𝑅 > 75/10 − 1
75𝜆𝑅 > 13/2 ⇒ 𝜆𝑅 > 13/150
Hence, to warrant a second barber, the average arrival rate must increase by
13 1 1
− = per minute.
150 12 300
(e) What is the average time customers spend in the queue?
𝜆 1/12
𝐸(𝑊𝑞 ) = = = 50 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
𝜇(𝜇 − 𝜆) (1/10)(1/10 − 1/12)
(f) What is the probability that the waiting time in the system is greater than 30
minutes?
𝑃(𝑊𝑠 > 𝑡) = 𝑒 −(𝜇−𝜆)𝑡
1 1
𝑃(𝑊𝑠 > 30) = 𝑒
−(
10−12)30
(h) What is the probability that more than 3 customers are in the system?
1
𝜆 5 1
𝑃0 = 1 − = 1 − 12 = 1 − =
𝜇 1 6 6
𝑛
10
𝜆 𝜆
𝑃𝑛 = ( ) (1 − )
𝜇 𝜇
1 1
𝜆 𝜆 5 5 1
𝑃1 = (1 − ) = 12 (1 − 12 ) = (1 − ) =
𝜇 𝜇 1 1 6 6 36
10 10
2 1 2 1 2
𝜆 𝜆 5 5 25
𝑃2 = ( ) (1 − ) = ( 12 ) (1 − 12 ) = ( ) (1 − ) =
𝜇 𝜇 1 1 6 6 216
10 10
3
3 1 1 3
𝜆 𝜆 12 12 5 5 125
𝑃3 = ( ) (1 − ) = ( ) (1 − ) = ( ) (1 − ) =
𝜇 𝜇 1 1 6 6 1296
10 10
𝑃(𝑁 > 3) = 1 − 𝑃(𝑁 ≤ 3)
𝑃(𝑁 > 3) = 1 − (𝑃0 + 𝑃1 + 𝑃2 + 𝑃3 )
𝑃(𝑁 > 3) = 1 − (1/6 + 1/36 + 25/216 + 125/1296)
𝑃(𝑁 > 3) = 0.4823
Example 3
At what average rate must a clerk in a supermarket work in order to ensure a
probability of 0.90 that the customer will not wait longer than 12 minutes? It is
assumed that there is only one counter at which customers arrive in a Poisson fashion
at an average rate of 15 per hour and that the length of the service by the clerk has
an exponential distribution.
∫
∞
𝜆 (𝜇 − 𝜆)𝑒−(𝜇−𝜆)𝑤𝑑𝑤 = 0.10
0.2 𝜇
∫
∞
15 (𝜇 − 15)𝑒−(𝜇−15)𝑤𝑑𝑤 = 0.10
0.2 𝜇
Integrate w. r. t w and apply the limit 0.2 and ∞
15
𝑒−(𝜇𝑅−15)0.2 = 0.10
𝜇𝑅
0.10𝜇𝑅
𝑒 −(𝜇𝑅−15)0.2 =
15
0.10𝜇𝑅
−(𝜇𝑅 − 15)0.2 = 𝑙𝑛 ( )
15
15𝑋0.2 − 0.2𝜇𝑅 = ln(0.1) + ln(𝜇𝑅 ) − ln (15)
0.2𝜇𝑅 + ln(𝜇𝑅 ) = 15𝑋0.2 − ln(0.1) + ln (15)
0.2𝜇𝑅 + ln(𝜇𝑅 ) = 8 approximately
On solving we get 𝜇𝑅 = 24 approximately
Example 4
If people arrive to purchase cinema tickets at the average rate of 6 per minute, it
takes an average of 7.5 seconds to purchase a ticket. If a person arrives 2 minutes
before the picture starts and if it takes exactly 1.5 minutes to reach the correct seat
after purchasing the ticket
Solution: 𝜆 = 6/𝑚𝑖𝑛𝑢𝑡𝑒 𝜇 = (60/7.5)/𝑚𝑖𝑛𝑢𝑡𝑒 = 8/𝑚𝑖𝑛𝑢𝑡𝑒
(a) Can he expect to be seated for the start of the picture?
1 1 1
𝐸(𝑊𝑠 ) = = = 𝑚𝑖𝑛𝑢𝑡𝑒
( 𝜇 − 𝜆) 8 − 6 2
1 1
E(total time required to purchase the ticket and to reach the seat) = + 1 = 2𝑚𝑖𝑛𝑢𝑡𝑒𝑠
2 2
Hence he can just be seated for the start of the picture.
(b) What is the probability that he will be seated for the start of the picture?
1 1
P(total time < 2 minutes) = 𝑃 (𝑊 < ) = 1 – 𝑃 (𝑊 > )
2 2
𝜆 1
−𝜇(1− )
= 1 −𝑒 = 1 − 𝑒 −1 = 0.63
𝜇 2
(c) How early must he arrive in order to be 99% sure of being seated for the
start of the picture?
𝑃(𝑊𝑠 > 𝑡) = 𝑒 −(𝜇−𝜆)𝑡
𝑃(𝑊𝑠 < 𝑡) = 0.99
𝑃(𝑊𝑠 > 𝑡) = 0.01
𝑒 −(8−6)𝑡 = 0.01
𝑒 −2𝑡 = 0.01
−2𝑡 = ln (0.01)
1
𝑡 = − 2 ln (0.01)
𝑡 = 2.3 minutes
P(total time to get the ticket and to go to the seat < (2.3 + 1.5) ]=0.99
Therefore, the person must arrive at least 3.8 min early so as to be 99% sure of
seeing the start of the picture.
Example 5
A duplicating machine maintained for office use is operated by an office assistant
who earns Rs 5 per hour. The time to complete each job varies according to an
exponential distribution with mean 6 min. Assume a Poisson input with an average
arrival rate of 5 jobs per hour. If an 8-hours day is used as a base, determine
Solution: 𝜆 = 5/ℎ𝑜𝑢𝑟 𝜇 = (60/6)/ℎ𝑜𝑢𝑟 = 10/ℎ𝑜𝑢𝑟
(a) the percentage idle time of the machine.
𝜆
P(the machine is idle) = 𝑃(𝑁 = 0) = 𝑃0 = 1 −
𝜇
5 1
𝑃0 = 1 − =
10 2
Percentage of the machine is idle = 50
(b) the average time a job is in the system.
1 1 1
𝐸(𝑊𝑠 ) = = = ℎ𝑜𝑢𝑟 = 12𝑚𝑖𝑛𝑢𝑡𝑒𝑠
(𝜇 − 𝜆) 10 − 5 5
(c) the average earnings per day of the assistant.
E(earning per day) = E(number of jobs done/day) x
E(time in hour/job) x earning per job
= (8 𝑋 5) 𝑋 1/5 𝑋 5 = 𝑅𝑠 40
Example 6
The mean rate of arrival of planes at an airport during the peak period is 20 per hour,
but the actual number of arrivals in any hour follows a Poisson distribution. The
airport can land 60 planes per hour on an average in good weather or 30 planes per
hour in bad weather, but the actual number landed in any hour follows a Poisson
distribution with respective averages. When there is congestion, the planes are
forced to fly over the field in the stack awaiting the landing of other planes that
arrived earlier.
60 per hour in good weather
Solution: 𝜆 = 20/ℎ𝑜𝑢𝑟 𝜇 ={
30 per hour in bad weather
Note: Landing time is service time; the planes flying over the field in the stack are
assumed to form the queue.
(a) How many planes would be flying over the field in the stack on an average in
good weather and in bad weathers?
𝐸(𝑁𝑞 ) = Average number of planes flying over the field
2 2
𝐸(𝑁𝑞) =
𝜆 =
(20)
=
1
in good weather
𝜇 (𝜇 − 𝜆) (60)(60 − 20) 6
2
𝜆 (20)2 1
𝐸(𝑁𝑞 ) = = = in bad weather
𝜇(𝜇 − 𝜆) (30)(30 − 20) 6
(b) How long a plane would be in the stack and in the process of landing in good and
bad weathers?
𝐸(𝑊𝑠 ) = Average for flying in the stack and for landing
1 1
𝐸(𝑊𝑠 ) = = ℎ𝑜𝑢𝑟 = 1.5 𝑚𝑖𝑛𝑢𝑡𝑒 in good weather
60 − 20 40
1 1
𝐸(𝑊𝑠 ) = = ℎ𝑜𝑢𝑟 = 6 𝑚𝑖𝑛𝑢𝑡𝑒𝑠 in bad weather
30 − 20 10
Example 7
There are three typists in an office. Each typist can type an average of 6 letters per
hour. If letters arrive for being typed at the rate of 15 letters per hour,
Solution: 𝜆 = 15/ℎ𝑜𝑢𝑟 𝜇 = 6/ℎ𝑜𝑢𝑟 𝑠 = 3(This is a problem in multiple server)
(a) What fraction of the time all the typists will be busy?
The probability that there is no customer in the queue is
−1 −1
𝑠−1 𝑛 𝑠 2
1 𝜆 1 𝜆 1 15 𝑛 1 15 3
𝑃0 = [∑ ( ) + ( ) ] = [∑ ( ) + ( ) ]
𝑛! 𝜇 𝜆 15 6
𝑛=0 𝑠! (1 − 𝜇𝑠) 𝜇 𝑛=0
𝑛! 6 3! (1 − )
18
−1 −1
2 𝑛 3 2
1 5 1 5 1 5 𝑛 1 125
𝑃0 = [∑ ( ) + ( ) ] = [∑ ( ) + ( )]
𝑛! 2 5
𝑛=0 6 (1 − 6) 2 𝑛! 2
𝑛=0
1 8
−1
1 5 0 1 5 1 1 5 2 1 125 5 25 125 −1
𝑃0 = [ ( ) + ( ) + ( ) + ( )] = [1 + + + ]
0! 2 1! 2 2! 2 1 8 2 8 8
5 25 125 −1 89 −1 4
𝑃0 = [1 + + + ] =[ ] = = 0.0449
2 8 8 4 89
𝜆 𝑠
( ) 𝑃0
𝜇
( )
𝑃 𝑁≥𝑠 =
𝜆
𝑠! (1 − )
𝜇𝑠
P(all the typists are busy) = 𝑃(𝑁 ≥ 3)
15 3 4 5 3 4 5 3 4
( ) ( ) ( ) 5 3 4
𝑃 (𝑁 ≥ 3) = 6 89 = 2 89 = 2 89 =( ) = 0.7016
15 5 1 2 89
3! (1 − ) 6 (1 − )
18 6
Hence the fraction of the time all the typists will be busy = 0.7016.
(b) What is the average number of letters waiting to be typed?
𝜆 𝑠+1 15 4
1 ( ) 𝑃0 1 ( ) 𝑋 0.0449
𝜇 6
𝐸(𝑁𝑞 ) = ( ) =( )
𝑠𝑋𝑠! 𝜆 2 3𝑋3! 15 2
(1 − ) (1 − )
𝜇𝑠 18
5 4
1 (2) 𝑋 0.0449 1 (2.5)4 𝑋 0.0449 (2.5)4 𝑋 0.0449𝑋36
𝐸(𝑁𝑞 ) = ( ) =( ) =
3𝑋6 5 2 18 1 2 18
(1 − 6) (6)
𝐸(𝑁𝑞 ) = 3.5078
(c) What is the average time a letter has to spend for waiting and for being typed?
1 1 𝜆
𝐸 (𝑊𝑠 ) = 𝐸 (𝑁𝑠 ) = [𝐸(𝑁𝑞 ) + ]
𝜆 𝜆 𝜇
1 15
𝐸 (𝑊𝑠 ) = [3.5078 + ] = 0.4005 hours = 24 minutes approximately.
15 6
(d) What is the probability that a letter will take longer than 20 minutes waiting to
be typed and being typed?
𝜆 15 𝜆 15
20 minutes=20/60 hours=1/3 hours = = 2.5, = = 0.8333
𝜇 6 𝜇𝑠 6𝑋3
𝜆 𝑠 𝜆
−𝜇𝑡(𝑠−1− )
𝜇 )𝑃
( ) (1 − 𝑒 0
𝜇
𝑃(𝑊 ≥ 𝑡 ) = 𝑒 −𝜇𝑡 1+
𝜆 𝜆
𝑠! (1 − ) (𝑠 − 1 − )
𝜇𝑠 𝜇
[ ]
( ) 3 −6/3(3−1−2.5)
1 2.5 (1 − 𝑒 )𝑋0.0449
𝑃 (𝑊 ≥ ) = 𝑒 −6/3 [1 + ]
3 3! (1 − 0.8333)(3 − 1 − 2.5)
1 −2
(2.5)3 (1 − 𝑒 −2(0.5) )𝑋0.0449
𝑃 (𝑊 ≥ ) = 𝑒 [1 + ]
3 6(0.1667)(0.5)
1
𝑃 (𝑊 ≥ ) = 0.4616
3
Example 8
Given an average arrival rate of 20 per hour, is it better for a customer to get service
at a single channel with mean service rate of 22 customers per hour or at one of two
channels in parallel with mean service rate of 11 customers per hour for each of the
two channels. Assume both queues to be of Poisson type.
Solution: For the single channel service 𝜆 = 20/ℎ𝑜𝑢𝑟 𝜇 = 22/ℎ𝑜𝑢𝑟
1 1 1
𝐸(𝑊𝑠 ) = = = ℎ𝑜𝑢𝑟 = 30𝑚𝑖𝑛𝑢𝑡𝑒𝑠
(𝜇 − 𝜆) 22 − 20 2
For the two-channel service 𝜆 = 20/ℎ𝑜𝑢𝑟 𝜇 = 11/ℎ𝑜𝑢𝑟 𝑠 = 2
−1 −1
𝑠−1 𝑛 𝑠 1
1 𝜆 1 𝜆 1 20 𝑛 1 20 2
𝑃0 = [∑ ( ) + ( ) ] = [∑ ( ) + ( ) ]
𝑛! 𝜇 𝜆 20
𝑛=0 𝑠! (1 − 𝜇𝑠) 𝜇 𝑛=0
𝑛! 11 2! (1 − 22) 11
−1 −1
1 1
1 20 𝑛 1 400 1 20 𝑛 200
𝑃0 = [∑ ( ) + ( ) ] = [∑ ( ) + ]
𝑛! 11 1 121 𝑛! 11 11
𝑛=0 2 (11) 𝑛=0
−1
1 20 0 1 20 1 200 20 200 −1
𝑃0 = [ ( ) + ( ) + ] = [1 + + ]
0! 11 1! 11 11 11 11
1
𝑃0 = [21]−1 = = 0.0476
21
𝜆 𝑠+1 20 3
1 ( ) 𝑃0 1 ( ) 𝑋 0.0476
𝜇 11
𝐸(𝑁𝑞 ) = ( ) = ( )
𝑠𝑋𝑠! 𝜆 2 2𝑋2! 20 2
(1 − ) (1 − )
𝜇𝑠 22
20 3 20 3
1 (11) 𝑋 0.0476 1 (11) 𝑋 0.0476 8000𝑋 0.0476
𝐸(𝑁𝑞 ) = ( ) = ( ) =
4 1 2 4 1 2 4𝑋11
( ) ( )
11 11
𝐸(𝑁𝑞 ) = 8.6545
1 1 𝜆
𝐸 (𝑊𝑠 ) = 𝐸 (𝑁𝑠 ) = [𝐸(𝑁𝑞 ) + ]
𝜆 𝜆 𝜇
1 20
𝐸 (𝑊𝑠 ) = [8.6545 + ] = 0.5236 ℎ𝑜𝑢𝑟𝑠 = 31.42 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
20 11
As the average waiting time in single channel service is less than that in two channel
service, the customer has to prefer the former.
Example 9
A telephone company is planning to install telephone booths in a new airport. It has
established the policy that a person should not have to wait more than 10% of the
times he tries to use a phone. The demand for use is estimated to be Poisson with an
average of 30 per hour. The average phone call has an exponential distribution with
a mean time of 5 min. How many phone booths should be installed?
Solution: 𝜆 = 30/ℎ𝑜𝑢𝑟 𝜇 = 12/ℎ𝑜𝑢𝑟
𝜆 30
For multiple server model, 𝑠 > ⇒ 𝑠 > ⇒ 𝑠 > 2.5
𝜇 12
Therefore, the telephone company must install at least 3 booths.
Now we have to find the numbers of telephone booths (𝑠) such that
𝑃(𝑊𝑠 > 0) ≤ 0.10
𝑃(𝑁 > 𝑠) ≤ 0.10
𝜆 𝑠
( ) 𝑃0
𝜇
≤ 0.10
𝜆
𝑠! (1 − )
𝜇𝑠
𝑠
(2.5) 𝑃0
≤ 0.10 − − − − − − − − − (1)
2.5
𝑠! (1 − )
𝑠
−1 −1
𝑠−1 𝑛 𝑠 𝑠−1
1 𝜆 1 𝜆 1 30 𝑛 1 30 𝑠
𝑃0 = [∑ ( ) + ( ) ] = [∑ ( ) + ( ) ]
𝑛! 𝜇 𝜆 30
𝑛=0 𝑠! (1 − 𝜇𝑠) 𝜇 𝑛=0
𝑛! 12 𝑠! (1 − 12𝑠) 12
−1
𝑠−1
(2.5)𝑛 (2.5)𝑠
𝑃0 = [∑ + ]
𝑛! 2.5
𝑛=0 𝑠! (1 − )
𝑠
For 𝑠 = 4
−1
3
(2.5)𝑛 (2.5)4
𝑃0 = [∑ + ]
𝑛! 2.5
4! (1 −
𝑛=0
4)
−1
(2.5)0 (2.5)1 (2.5)2 (2.5)3 625
𝑃0 = [ + + + + ] = 0.07369
0! 1! 2! 3! 1024
(2.5)4 0.07369
From equation (1) 2.5 ≤ 0.10 ⇒ 0.3199 ≤ 0.10 which is not true.
4!(1− 4 )
For 𝑠 = 5
−1
3
(2.5)𝑛 (2.5)4
𝑃0 = [∑ + ]
𝑛! 2.5
4! (1 −
𝑛=0
4)
−1
4
(2.5)𝑛 (2.5)5
𝑃0 = [∑ + ]
𝑛! 2.5
𝑛=0 5! (1 − )
5
−1
(2.5)0 (2.5)1 (2.5)2 (2.5)3 (2.5)4 625
𝑃0 = [ + + + + + ] = 0.08878
0! 1! 2! 3! 4! 1536
From equation (1) 0.1399 ≤ 0.10 which is not true.
Similarly for 𝑠 = 6 we have 0.047 ≤ 0.10 which is true.
Hence the number of booths to be installed = 6.
Example 10
A bank has two tellers working on savings accounts. The first teller handles
withdrawals only. The second teller handles deposits only. It has been found that the
service time distributions for both deposits and withdrawals are exponential with
mean service time of 3 min per customer. Depositors are found to arrive in a Poisson
fashion throughout the day with mean arrival rate of 16 per hour. Withdrawers also
arrive in a Poisson fashion with mean arrival rate of 14 per hour. What would be the
effect on the average waiting time for the customers if each teller could handle both
withdrawals and deposits. What would be the effect, if this could only be
accomplished by increasing the service time to 3.5 minutes?
Solution:
When there is a separate channel for the depositors, 𝜆1 = 16/ℎ𝑜𝑢𝑟 𝜇 = 20/ℎ𝑜𝑢𝑟
1 1 1
𝐸(𝑊𝑞 for depositors) = = = ℎ𝑜𝑢𝑟 = 12 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
𝜇(𝜇 − 𝜆1 ) 20(20 − 16) 5
When there is a separate channel for a separate withdrawers,
𝜆2 = 14/ℎ𝑜𝑢𝑟 𝜇 = 20/ℎ𝑜𝑢𝑟
1 1 7
𝐸(𝑊𝑞 for withdrawers) = = = ℎ𝑜𝑢𝑟 = 7 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
𝜇(𝜇 − 𝜆2 ) 20(20 − 14) 60
If both tellers do both service
𝜆 = 𝜆1 + 𝜆2 = 30/ℎ𝑜𝑢𝑟 𝜇 = 20/ℎ𝑜𝑢𝑟 𝑠=2
𝜆 𝑠
1 1 ( ) 𝑃0
𝜇
𝐸(𝑊𝑞 for any customer) = ( ) − − − − − − − −(1)
𝜇 𝑠𝑋𝑠! 𝜆 2
(1 − )
𝜇𝑠
𝜆 30 3 𝜆 30 3
= = = 1.5 = = = 0.75
𝜇 20 2 𝜇𝑠 40 4
−1
𝑠−1 1 −1
𝑛 𝑠
1 𝜆 1 𝜆 1 1
𝑃0 = [∑ ( ) + ( ) ] = [∑ (1.5)𝑛 + (1.5)2 ]
𝑛! 𝜇 𝜆 (1
𝑛=0 𝑠! (1 − 𝜇𝑠) 𝜇 𝑛!
𝑛=0
2! − 0.75)
−1
1 1 1
𝑃0 == [ (1.5) + (1.5) + 4.5] = [7]−1 = = 0.1429
0 1
0! 1! 7
From equation (1)
1 1 (1.5)𝑠 0.1429
𝐸(𝑊𝑞 for any customer) = ( ) = 0.06431ℎ𝑜𝑢𝑟 = 3.86 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
20 2𝑋2! (1 − 0.75)2
Hence if both tellers do both types of service, the customers get benefited as their
waiting time is considerably reduced.
Now if both tellers do both types of service but with increased service time
60 120
𝜆 = 30/ℎ𝑜𝑢𝑟 𝜇 = 3.5 =
7
/ℎ𝑜𝑢𝑟 𝑠=2
𝜆 30 7 𝜆 30 7
= = = 1.75 = = = 0.875
𝜇 120/7 4 𝜇𝑠 2(120/7) 8
−1
𝑠−1 1 −1
𝑛 𝑠
1 𝜆 1 𝜆 1 1
𝑃0 = [∑ ( ) + ( ) ] = [∑ (1.75)𝑛 + (1.75)2 ]
𝑛! 𝜇 𝜆 2! (1 − 0.875)
𝑛=0 𝑠! (1 − 𝜇𝑠) 𝜇 𝑛!
𝑛=0
−1
1 1 1
𝑃0 = [ (1.75)0 + (1.75)1 + 49/4] = [15]−1 = = 0.0667
0! 1! 15
7 1 (1.75)2 0.0667
𝐸(𝑊𝑞 for any customer) = ( ) = 0.1907 ℎ𝑜𝑢𝑟𝑠 = 11.44𝑚𝑖𝑛𝑢𝑡𝑒𝑠
120 2𝑋2! (1 − 0.875)2
If this arrangement is adopted, withdrawers stand to lose as their waiting time is
increased considerably and depositors get slightly benefited.
Example 11
A supermarket has two girls attending to sales at the counters. If the service time for
each customer is exponential with mean 4 minutes and if people arrive in Poisson
fashion at the rate of 10 per hour,
10 1 1
Solution: 𝜆 = = 𝑝𝑒𝑟 𝑚𝑖𝑛𝑢𝑡𝑒 𝜇 = 𝑚𝑖𝑛𝑢𝑡𝑒 𝑠=2
60 6 4
or
60
𝜆 = 10/ℎ𝑜𝑢𝑟 𝜇 = 4
/ℎ𝑜𝑢𝑟 = 15/ℎ𝑜𝑢𝑟 𝑠=2
(a) what is the probability that a customer has to wait for service?
−1 −1
𝑠−1 𝑛 𝑠 1 𝑛 2
1 𝜆 1 𝜆 1 10 1 10
𝑃0 = [∑ ( ) + ( ) ] = [∑ ( ) + ( ) ]
𝑛! 𝜇 𝜆 10
𝑛=0 𝑠! (1 − 𝜇𝑠) 𝜇 𝑛=0
𝑛! 15 2! (1 − 30) 15
1 −1 −1
1 2 𝑛 1 1 2 0 1 2 1 1
𝑃0 = [∑ ( ) + ] =[ ( ) + ( ) + ] = [2]−1 = 0.5
𝑛! 3 3 0! 3 1! 3 3
𝑛=0
𝜆 𝑠
( ) 𝑃0 𝜆 2 1
𝜇
𝑃𝑛 = 𝑛−𝑠
= 𝑃0 = ( ) 𝑋0.5 =
𝑠! 𝑋(𝑠) 𝜇 3 3
P(a customer has to wait for service)=
𝑃(𝑁 ≥ 2) = 1 − (𝑁 < 2) = 1 − 𝑃0 − 𝑃1
1 1
𝑃(𝑁 ≥ 2) = 1 − − = 0.1667
2 3
(b) what is the expected percentage of idle time for each girl?
𝜆 10 1
Fraction of time when the girls are busy = 𝜇𝑠 = 30 = 3
1 2
Fraction of time when the girls are idle = 1 − =
3 3
2
Expected percentage of idle time for each girl = × 100 = 67
3
(c) if the customer has to wait in the queue, what is the expected length of his waiting
time?
1 1 1
𝐸(𝑊𝑞 /𝑊𝑠 > 0) = = = ℎ𝑜𝑢𝑟 = 3 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
𝜇𝑠 − 𝜆 2𝑋15 − 10 20
Example 12
A petrol pump station has 4 pumps. The service times follow the exponential
distribution with a mean of 6 min and cars arrive for service in a Poisson process at
the rate of 30 cars per hour.
Solution: 𝜆 = 30/ℎ𝑜𝑢𝑟 𝜇 = 10/ℎ𝑜𝑢𝑟 𝑠 = 4
𝜆 30 𝜆 30 3
= =3 = = = 0.75
𝜇 10 𝜇𝑠 40 4
(a) What is the probability that an arrival would have to wait in line?
−1
𝑠−1 3 −1
𝑛 𝑠
1 𝜆 1 𝜆 1 1
𝑃0 = [∑ ( ) + ( ) ] = [∑ (3)𝑛 + (3)4 ]
𝑛! 𝜇 𝜆 4! (1 − 0.75)
𝑛=0 𝑠! (1 − 𝜇𝑠) 𝜇 𝑛!
𝑛=0
1 1 1 1 27 −1
𝑃0 = [ (3)0 + (3)1 + (3)2 + (3)3 + ]
0! 1! 2! 3! 2
−1 −1
9 9 27 53 2
𝑃0 = [1 + 3 + + + ] = [ ] = = 0.0377
2 2 2 2 53
P(an arrival has to wait) = 𝑃(𝑊 > 0)
𝜆 𝑠
(𝜇) 𝑃0 (3)4 𝑋0.0377
𝑃(𝑊 > 0) = = = 0.5090
𝜆 4! ( 1 − 0.75 )
𝑠! (1 − )
𝜇𝑠
(b) Find the average waiting time, average time spent in the system and the
average number of cars in the system.
𝑠
𝜆
1 1 ( ) 𝑃0 1 (3)4 𝑋0.0377
𝜇
𝑃(𝑊𝑞 ) = ( ) = = 0.0509ℎ𝑜𝑢𝑟 = 3.05𝑚𝑖𝑛𝑢𝑡𝑒𝑠
𝜇 𝑠𝑋𝑠! 𝜆 2 10 4𝑋4! (1 − 0.75)2
(1 − )
𝜇𝑠
1 1
𝑃(𝑊𝑠 ) = + 𝑃(𝑊𝑞 ) = + 3.05 = 4.53 𝑚𝑖𝑛𝑢𝑡𝑒𝑠
𝜇 6
(c) For what percentage of time would a pump be idle on an average?
The fraction of time when the pumps are busy =traffic intensity
𝜆 30 3
= = =
𝜇𝑠 4𝑥10 4
3 1
The fraction of time when the pumps are idle = 1 − =
4 4
Therefore, required percentage = 25%