DCN 1
DCN 1
Markov Chain
• Markov Process is an important class of
random process which has simple and
highly useful form of dependency among
random variables
• Markov Chain is a special case of Markov
Process where the system can occupy a
finite number of states
• It is a model of the random motion of an
object in a discrete set of possible
locations
• Two versions:
1. Discrete time
Position of the object (state of the
Markov Chain) recorded every unit of time
2. Continuous time
State is observed at all times, t 0
• State of the Markov chain changes
randomly
• The law of future motion of the state
depends only on the present location and
not on previous locations
- Forgets its past locations
• A discrete time Markov chain ( discrete time
discrete state Markov process) is defined as one
which has the property
0 (i) = 1
iX
• A random sequence x = x0 , x1 , x2.. is
defined that takes values in X as follows
P( x0 = i0, x1 = i1,… xn = in ) =
0 (i0). P(i0 , i1). P(i1 , i2). …. P(in-1 , in).
for all n 0 and all i0 , i1,, i2 ,… in X
P= 1–a a
b 1-b
Example 2
= 0 (j) P( j, i ) ----(1)
jX
• n (i) := P(xn = i) for i X
• Let n be the row vector with elements
n (i), i X
• 1 = [1 (0), 1 (1)]
and 0 = [0 (0), 0 (1)]
• Eqn (1) can be rewritten as
1 = 0 P
• [1 (0), 1 (1)] = [0 (0), 0 (1)] P
• 2 = 1 P
• n+1 = n P, n 0
• n = 0 Pn
P= 1–a a
b 1–b ,
pij(t) = 1
j
• The unconditional probability of the event
“x(t) is in state ej” is
pj(t) = P{ x(t) = ej }
= P{ x(t) = ej | x(0) = ei} P{x(0) = ei }
i
= pi(0) pij(t)
i
• In general, for arbitrary t and s,
= pik(t) pkj(s)
k
Poisson Process
• Serves as a mathematical model for a
wide range of phenomena including the
arrival of calls
• We consider point events occurring singly
in time
• is a constant (> 0) with dimension time-1
which we call the rate of occurrence
• If N (t, t+∆t) is the number of events in the
interval (t, t+∆t), as ∆t 0,
1. Input process
2. Service mechanism
3. Queue discipline
4. Server‟s capacity
1. Input process
• Input process specifies the probability law
governing the arrival statistics of the customers
at the server at times t1,t2,… tn
• n = tn+1 - tn is the inter arrival time between
(n+1)th and nth customers
• The input process is specified by the probability
distribution of the sequence of arrival instants
tn and the sequence of inter arrival times n
• Simplest model for the input process:
• M/G/r:
- Queue with Poisson arrival
- No assumption about service time distribution
- r number of servers
M/M/1/K
Queue with Poisson arrival
• Exponential service time distribution
• 1 server
• K packets are allowed in the system
Arrival rates and traffic load
definitions
• Let A(t) be the number of arrivals at the system
in the interval from time 0 to „t‟
Pb = lim B(t)
t A (t)
Arrival at a system
E[N] = E[ T ]
• Assume that the system does not block any
customers
• A(t) : Cumulative arrivals to the queue at time t
n()
W( ) = Wj / n() ---- (4)
j=1
L( ) = ∫0 L(t) dt / ---- (5)
• L( ) = ∫0 L(t) dt /
L = W
• Similarly
P[ 0 arrival in ∆t ]= 1- ∆t + o∆t
• Since the service times also have an
exponential distribution,
P[ 1 departure in ∆t ]= ∆t + o∆t
• Similarly
P[ 0 departure in ∆t ]= 1- ∆t + o∆t
• pn(t+∆t) = pn(t) [(1- ∆t )(1- ∆t) + o∆t]
+ pn-1(t) [ ∆t (1- ∆t) + o∆t]
+ pn+1(t) [ ∆t (1- ∆t ) + o∆t]
------ (1)
• Simplifying and dropping o∆t terms,
pn = (1 – ) n
• pn = (1 – ) n is the equilibrium state
probability solution for the M/M/1 queue
• This probability distribution is called geometric
distribution
• < 1 is the necessary condition
• Its significance is that for equilibrium to exist,
the arrival rate or load on the queue must be
less than the capacity
Example – M/M/1 state probabilities with = 0.5
• p0 = 1 –
= =
(1 – ) ( - )
Average delay in the M/M/1 system
• By Little‟s formula
L = W
E[T] = E[N]
= / = 1/
(1 – ) (1 – )
Average waiting time
• Average “waiting time” is obtained as
E[W] = E[T] – E[X]
E[T] is the average delay in the system
E[X] is the average service time (1 / )
= 1/ _ 1/
(1 – )
= (1 / )
(1 – )
M/M/m/m queue (Erlang‟s model)
• Poisson Arrival Process
• Exponential Service time distribution
• „m‟ number of servers
• „m‟ number of subscribers in the system
• No buffer space.
• Erlang had originally used this loss model to
investigate the distribution of busy channels in
telephone system
j = j. j<m
= m. j=m
State transition diagram for M/M/m/m
m n
= p0
n=0 n!
n / n! for n=0,1,2,…,m
pn =
m k
k=0 k!
… …
0 1 2 n-1 n n+1
1 2 3 n n+1 n+2
n 1
i
• And in general pn p0 i 0
n
i 1 i
• The longer the queue, the less likely a new
packet will arrive
• Assume λn = λ/(n+1) for n = 0, 1, 2, 3,…
• λ is some constant
• The service process is still a simple
Poisson process with service rate, μ
• We can calculate pn by
n 1
n n
pn p0 i 0 i
p0 n p0
n!
n
n!
i 1 i
where ρ = λ/μ
• Sum of state probabilities is 1.
n
p
n 0
n p0
n 0 n!
p0e 1
• Therefore p0=e-ρ
• Average queue length is
n
n1
E (n) npn np0 e
n 0 n 0 n! n 1 (n 1)!
• For high ρ, γ μ
• We find the average delay time from
Little‟s formula
• E(T) = E(N)/γ = ρ/(μ(1- e-ρ))
M/G/1 queue
• Poisson arrival process
• Customer service times have a general
distribution- not necessarily exponential as in the
M/M/1 system
• Single server
• Infinite queue length
μ=1/E[X]
• Examples:
1. Constant interarrival - M/D/1
2. Erlang ,, - M/Er/1
3. Exponential ,, - M/M/1
4. Hyperexponential ,, - M/H/1
• Let Xi be the service time of the ith arrival.
• We assume that random variables (X1,
X2,…) are identically distributed, mutually
independent, and independent of the inter-
arrival times.
• Let
1
X E{ X } Average service time
X 2 E{ X 2 } second moment of service time
• Pollaczek-Khinchin (P-K) formula
X2
W
2(1 )
W is the expected customer
waiting time in queue and
X
• Given the P-K formula, the total waiting
time in queue and in service is
X2
TX
2(1 )
• Applying Little‟s formula, the expected
number of customers in the system, N is
2 X 2
N
2(1 )
Generalization in M/G/1 model
1. Priority queueing systems
M/G/1 can be generalized to the case
where customers can belong to one of K
priority class.
When a customer arrives at the
system, it joins the queue of its priority class.
2. M/G/1 model with vacation
• If t 0,
d Pk(t) = Pk-1(t) k-1 + Pk+1(t) k+1 - ( k + k ) Pk(t)
dt ----- (2)
This is the differential equation governing dynamics of a B – D
process