You are on page 1of 27

20.

Extinction Probability for Queues


and Martingales
(Refer to section 15.6 in text (Branching processes) for
discussion on the extinction probability).

20.1 Extinction Probability for Queues:

• A customer arrives at an empty server and immediately goes

for service initiating a busy period. During that service period,


other customers may arrive and if so they wait for service.
The server continues to be busy till the last waiting customer
completes service which indicates the end of a busy
1
period. An interesting question is whether the busy periodsPILLAI
Do busy periods continue forever? Or do such
queues come to an end sooner or later? If so, how ?

•Slow Traffic (   1 )
Steady state solutions exist and the probability of extinction
equals 1. (Busy periods are bound to terminate with
probability 1. Follows from sec 15.6, theorem 15-9.)

•Heavy Traffic (   1 )
Steady state solutions do not exist, and such queues can be
characterized by their probability of extinction.
•Steady state solutions exist if the traffic rate   1. Thus
pk  lim P  X ( nT )  k  exists if   1.
n 

•What if too many customers rush in, and/or the service


rate is slow (   1) ? How to characterize such queues ? 2
PILLAI
Extinction Probability ( 0 ) for Population Models

X0  1 X0  1

X1  3  2
Y1 Y2 2  Y3 2 
X2  9

X 3  26
Y1 3 Y2 3 Y3 3 Y4 3 Y5 3 Y6 3 Y7 3 Y8 3 Y9 3

Fig 20.1 3
PILLAI
Queues and Population Models
• Population models
X n : Size of the nth generation
Yi ( n ) : Number of offspring for the ith member of
the nth generation. From Eq.(15-287), Text
Xn
X n 1   Yk( n )
k 1
Let

ak = P{Yi ( n )  k }
• Offspring moment generating function:
P (z )
1

P ( z )   ak z k (20-1)
a0
z
k 0 1
4
Fig 20.2 PILLAI

Pn 1 ( z )   P{ X n 1  k } z k  E{z X n1 }
k 0





X n  j 
j
Y
 E ( E{ z X n 1
X n  j})  E  E z i 1 i

 
 E{[ P ( z )] }   {P( z )} P{ X n  j}  Pn ( P ( z ))
j j
(20-2)
j

Pn 1 ( z )  Pn ( P ( z ))  P ( Pn ( z )) (20-3)
P{ X n  k }  ?
Extinction probability  lim P{ X n  0}   o  ?
n 

Extinction probability  0 satisfies the equation P( z )  z


which can be solved iteratively as follows:

z0  P (0)  a0 (20-4)
and
zk  P( zk 1 ) , k  1, 2,  (20-5) 5
PILLAI
• Review Theorem 15-9 (Text)
 
Let   E (Yi )  P (1)   k P{Yi  k }   kak  0 (20-6)
k 0 k 0

P z  P z 
1
a0
a0
Fig 20.3 0 1
1
(a) 1 (b)  1
  1  0  1 

  1   0 is the unique solution of P( z )  z ,  (20-7)
a0   0  1 

• Left to themselves, in the long run, populations either
die out completely with probability  0 , or explode with
probability 1-  0 . (Both unpleasant conclusions). 6
PILLAI
Queues : Customers that arrive

First
during the first service time
X2 X3
customer X1
X0 Y1 Y2 Y3

s1 s2 s3 s4 sk
Service time of Service time of
first customer second customer

Xn
Fig 20.4
X n 1   Yi
i 1

Busy period
t
 0

 k arrivals between two 


ak  P (Yi  k )  P    0.
 successive departures 
Note that the statistics  ak  depends both on the arrival as well
as the service phenomena. 7
PILLAI

• P ( z )   k : Inter-departure statistics generated by arrivals


a z k

k 0

•   P(1)   kak : Traffic Intensity  1
k 1 } Steady state
 1  Heavy traffic
• Termination of busy periods corresponds to extinction of
queues. From the analogy with population models the
extinction probability  0 is the unique root of the equation
P( z )  z
• Slow Traffic :   1   0  1
Heavy Traffic :   1  0   0  1
i.e., unstable queues (   1) either terminate their busy periods
with probability  0  1 , or they will continue to be busy with
probability 1-  0 . Interestingly, there is a finite probability of
busy period termination even for unstable queues.
 0 : Measure of stability for unstable queues. 8
PILLAI
Example 20.1 : M/M/ 1 queue
From (15-221), text,we have
k k
    1   
ak       , k  0, 1, 2,  (20-8)
        1   1   
P ( )

t
P(  )
Number of arrivals between any two departures follows
a geometric random variable.
1 
P( z )  ,  (20-9)
[1   (1  z )] 
P ( z )  z   z 2  (   1) z  1  ( z  1) (  z - 1)  0
0 1
1,  1 

0  1 (20-10) Fig 20.5
  ,   1 
9

1 PILLAI
[x]
Example 20.2 : Bulk Arrivals M /M/ 1 queue
Compound Poisson Arrivals : Departures are exponential
random variables as in a Poisson process with parameter  .
Similarly arrivals are Poisson with parameter . However each
arrival can contain multiple jobs.
A1 P ( ) A2

t Fig 20.6
t1 t2
P(  )

Ai : Number of items arriving at instant ti


Let P{ Ai  k}  c k , k  0, 1, 2, 

and C ( z )  E{z }   ck z k represents the bulk arrival statistics.
Ai

k 0 10
PILLAI
Inter-departure Statistics of Arrivals

P ( z )   P{Y  k} z k  E{z Y }
k 0
 
   0 E{z ( A1  A2  An ) n arrivals in (0,t )} P{n arrivals in (0,t )} f s (t) dt
n 0
  ( t )n 
   0 [ E{z }] e Ai n  t
 e  t dt , 
n 0 n! 
  [ t C ( z )]n 1
   0 e      t
 (20-11)
n 0 n! 1  {1  C ( z )}

P( z )  [1   {1  C ( z )}]1 , Let ck  (1   )  k , k  0, 1, 2, 
1 1 z
C( z)  , P( z )  (20-12)
1 z 1     (1   ) z

Traffic Rate  P(1)  1
1
11
P ( z )  z  (z - 1) [ (1   )z - 1]  0  0  1 /( (1   )) PILLAI
Bulk Arrivals (contd)
• Compound Poisson arrivals with geometric rate
M/M/1
0
1 1
0  ,  . (20-13)
 (1   ) 

2
For   , we obatain 1

1 (a)
3 0
1
3 1
0  ,  (20-14)
2 (1   ) 2

1
2 (b)
Fig 20.7
• Doubly Poisson arrivals  C ( z )  e   (1 z ) gives
1
P( z )  z (20-15)
1   [1  C ( z )] 12
PILLAI
Example 20.3 : M/En / 1 queue (n-phase exponential service)

From (16-213)
n

P ( z )  1  (1  z )  (20-16)
 n 
1
 n
P ( z )  z   x n  x n  1    x    0, xz n

 
2
 1  1  8    2
n  2    ,  1
0  2  M / M /1 n 1  0  0 .5
 0  (1   / n )  n , n  1 (20-17) M / E2 / 1  n  2  0  0.38

Example 20.4 : M/D/1 queue


Letting m   in (16.213),text, we obtain P( z )  e   (1 z ) ,
so that   (1 e   )
0  e ,   1. (20-18)
13
PILLAI
20.2 Martingales

Martingales refer to a specific class of stochastic processes


that maintain a form of “stability” in an overall sense. Let
{ X i , i  0} refer to a discrete time stochastic process. If n refers
to the present instant, then in any realization the random
variables X 0 , X 1 ,, X n are known, and the future values
X n 1 , X n  2 , are unknown. The process is “stable” in the sense
that conditioned on the available information (past and
present), no change is expected on the average for the future
values, and hence the conditional expectation of the
immediate future value is the same as that of the present
value. Thus, if
E{ X n 1 | X n , X n 1 , , X 1 , X 0 }  X n (20-19)
14
PILLAI
for all n, then the sequence {Xn} represents a Martingale.

Historically martingales refer to the “doubling the stake”


strategy in gambling where the gambler doubles the bet on
every loss till the almost sure win occurs eventually at which
point the entire loss is recovered by the wager together with
a modest profit. Problems 15-6 and 15-7, chapter 15, Text
refer to examples of martingales. [Also refer to section 15-5,
Text].
If {Xn} refers to a Markov chain, then as we have
seen, with
pij  P{ X n 1  j | X n  i},
Eq. (20-19) reduces to the simpler expression [Eq. (15-224),
Text]
 j pij  i. (20-20) 15
j
PILLAI
For finite chains of size N, interestingly, Eq. (20-20) reads
P x2  x2 , x2  [1, 2, 3, , N ]T (20-21)
implying that x2 is a right-eigenvector of the N  N transition
probability matrix P  ( pij ) associated with the eigenvalue 1.
However, the “all one” vector x1  [1, 1, 1, , 1] is always
T

an eigenvector for any P corresponding to the unit eigenvalue


[see Eq. (15-179), Text], and from Perron’s theorem and the
discussion there [Theorem 15-8, Text] it follows that, for
finite Markov chains that are also martingales, P cannot be
a primitive matrix, and the corresponding chains are in fact
not irreducible. Hence every finite state martingale has
at least two closed sets embedded in it. (The closed sets in the
two martingales in Example 15-13, Text correspond to two
absorbing states. Same is true for the Branching Processes
discussed in the next example also. Refer to remarks 16
following Eq. (20-7)). PILLAI
Example 20.5: As another example, let {Xn} represent the
branching process discussed in section 15-6, Eq. (15-287),
Text. Then Zn given by
X n 1
Z n   0X n , Xn   Yi (20-22)
i 1

is a martingale, where Yi s are independent, identically


distributed random variables, and  0 refers to the extinction
probability for that process [see Theorem 15.9, Text].
To see this, note that
E{Z n 1 | Z n ,, Z 0 }  E{ 0X n1 | X n ,, X 0 }
k
 Yi X n k
 E{ 0 i 0
| X n  k }   [ E{ 0Yi }]  [ P( 0 )] X n   0X n  Z n , (20-23)
   i 1
since {X n } is
a Markov chain since Yi s are use (15-2)
independent of Xn
where we have used the Markov property of the chain, 17
PILLAI
the common moment generating function P(z) of Yi s, and
Theorem 15-9, Text.
Example 20.6 (DeMoivre’s Martingale): The gambler’s ruin
problem (see Example 3-15, Text) also gives rise to various
martingales. (see problem 15-7 for an example).
From there, if Sn refers to player A’s cumulative capital
at stage n, (note that S0 = $ Sa ), then as DeMoivre has observed
Yn  p  
q n
(20-24)
generates a martingale. This follows since
S n 1  S n  Z n 1 (20-25)
where the instantaneous gain or loss given by Zn+1 obeys
P{Z n 1  1}  p, P{Z n 1  1}  q, (20-26)
and hence
 
q Sn 1
E{Yn 1 | Yn , Yn 1 ,, Y0 }  E{ p | Sn , Sn 1 ,, S0 }

 E{ p 
q Sn  Z n 1
| Sn }, 18
PILLAI
since {Sn} generates a Markov chain.
Thus
E{Yn 1  q
| Yn , Yn 1 ,, Y0 }  p
Sn
 q
 
q
pp p
1
  
q
q  p
Sn
 Yn (20-27)

i.e., Yn in (20-24) defines a martingale!


Martingales have excellent convergence properties
in the long run. To start with, from (20-19) for any given
n, taking expectations on both sides we get
E{ X n 1}  E{ X n }  E{ X 0 }. (20-28)
Observe that, as stated, (20-28) is true only when n is known
or n is a given number.

As the following result shows, martingales do not fluctuate


wildly. There is in fact only a small probability that a large
deviation for a martingale from its initial value will occur.
19
PILLAI
oeffding’s inequality: Let {Xn} represent a martingale and
 1 ,  2 ,
be, a sequence of real numbers such that the random
ariables
 X i  X i 1
Yi   1 with probability one. (20-29)
i
hen
 ( x 2 / 2  in1 i2 )
P{| X n  X 0 | x}  2e (20-30)
roof: Eqs. (20-29)-(20-30) state that so long as the
artingale increments remain bounded almost surely, then
ere is only a very small chance that a large deviation occurs
etween Xn and X0. We shall prove (20-30) in three steps.
) For any convex function f (x), and 0   we
1, have
(Fig 20.8)
 f ( x1 )  (1   ) f ( x2 )  f ( x1  (1   ) x2 ), (20-31) 20
PILLAI
f ( x)
which for   12a , 1    12a , f ( x2 )
| a | 1, x1  1, x2  1 and  f ( x1 )  (1   ) f ( x 2 ) 
f ( x1  (1 ) x2 )
f ( x)  e x ,   0 gives f ( x1 )
x
x2
1 1 x1
(1  a)e  (1  a)e  ea ,

| a | 1. x
1
 (1   ) x
2

2 2 (20-32) Fig 20.8


Replacing a in (20-32) with any zero mean random variable
Y that is bounded by unity almost everywhere, and taking
expected values on both sides we get
E{e Y 1  
}  2 (e  e )  e2 /2
(20-33)

Note that the right side is independent of Y in (20-33).


On the other hand, from (20-29)
E{Yi | X i ,, X 1 , X 0 }  E ( X i | X i 1 )  X i 1  X i 1  X i 1  0 (20-34)
and since Yi s are bounded by unity, from (20-32) we get
(as in (20-33)) 21
PILLAI
Yi 2 / 2
E{e | X i 1 , , X 1 , X 0 }  e (20-35)

(ii) To make use of (20-35), referring back to the Markov


inequality in (5-89), Text, it can be rewritten as
P{ X   }  e  E{e X },   0 (20-36)
and with X  X n  X 0 and   x, we get
P{ X n  X 0  x}  e  x E{e ( X n  X 0 ) } (20-37)
But
E{e ( X n  X 0 ) }  E{e ( X n  X n1 )  ( X n1  X 0 ) } use (20-29)

 E [ E{e ( X n1  X 0 ) e nYn | X n 1 , , X 1 , X 0 }]


 E [e ( X n1  X 0 ) E{e nYn | X n 1 ,, X 1 , X 0 }]
         
2 2
 e n /2
using (20-35)

 ( X n 1  X 0 )  2 n2 / 2  2  in1 i2 / 2 (20-38)
 E{e }e e . 22
PILLAI
Substituting (20-38) into (20-37) we get
 ( x  2  in1 i2 / 2)
P{ X n  X 0  x}  e (20-39)
(iii) Observe that the exponent on the right side of (20-39) is
minimized for   x /  in1 i2 and hence it reduces to
 x 2 / 2  in1 i2
P{ X n  X 0  x}  e , x  0. (20-40)
The same result holds when Xn – X0 is replaced by X0 – Xn,
and adding the two bounds we get (20-30), the Hoeffding’s
inequality.

From (20-28), for any fixed n, the mean value


E{Xn} equals E{X0}. Under what conditions is this result
true if we replace n by a random time T ? i.e., if T is a
random variable, then when is 23
PILLAI
E{ X T } ? E{ X 0 }. (20-41)

The answer turns out to be that T has to be a stopping time.


What is a stopping time?
A stochastic process may be known to assume a
particular value, but the time at which it happens is in general
unpredictable or random. In other words, the nature of the
outcome is fixed but the timing is random. When that outcome
actually occurs, the time instant corresponds to a stopping
time. Consider a gambler starting with $a and let T refer to the
time instant at which his capital becomes $1. The random
variable T represents a stopping time. When the capital
becomes zero, it corresponds to the gambler’s ruin and that
instant represents another stopping time (Time to go home for
the gambler!) 24
PILLAI
Recall that in a Poisson process the occurrences of the first,
second,  arrivals correspond to stopping times T1 , T2 ,.
Stopping times refer to those random instants at which there
is sufficient information to decide whether or not a specific
condition is satisfied.
Stopping Time: The random variable T is a stopping time
for the process X(t), if for all t  0, the event {T  t} is a
function of the values { X ( ) |   0,  t} of the process up to
t, i.e., it should be possible to decide whether T has occurred
or not by the time t, knowing only the value of the process
X(t) up to that time t. Thus the Poisson arrival times T1 and T2
referred above are stopping times; however T2 – T1 is not
a stopping time.
A key result in martingales states that so long as
25
PILLAI
T is a stopping time (under some additional mild restrictions)
E{ X T }  E{ X 0 }. (20-42)
Notice that (20-42) generalizes (20-28) to certain random
time instants (stopping times) as well.

Eq. (20-42) is an extremely useful tool in analyzing


martingales. We shall illustrate its usefulness by rederiving the
gambler’s ruin probability in Example 3-15, Eq. (3-47), Text.

From Example 20.6, Yn in (20-24) refer to a martingale in the


gambler’s ruin problem. Let T refer to the random instant at
which the game ends; i.e., the instant at which either player A
loses all his wealth and Pa is the associated probability of ruin
for player A, or player A gains all wealth $(a + b) with
probability (1 – Pa). In that case, T is a stopping time 26
and hence from (20-42), we get PILLAI
 
q a
E{YT }  E{Y0 }  p (20-43)
since player A starts with $a in Example 3.15. But
   
q 0 q a b
E{YT }  p Pa  p (1  Pa )

 
q a b
 Pa  p (1  Pa ). (20-44)
Equating (20-43)-(20-44) and simplifying we get
 
p b
1 q
Pa  (20-45)
1  q 
p a b

that agrees with (3-47), Text. Eq. (20-45) can be used to derive
other useful probabilities and advantageous plays as well. [see
Examples 3-16 and 3-17, Text].
Whatever the advantage, it is worth quoting the master
Gerolamo Cardano (1501-1576) on this: “The greatest
advantage in gambling comes from not playing at all.” 27
PILLAI

You might also like