Markov Chains
Markov Chains
Markov Chains
a l
ep
itn
1
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
1
Markov Chains
l
transition probability, it is a conditional
a
ep
probability for the system to go to a particular
itn
new state, given the current state of the system
(C) Pramod Parajuli, 2004
2
cs
Source: www.csitnepal.com
2
Markov Chains
a l
state are measurable and remain constant over a time (i.e.
ep
throughout the system’s operation)
itn
3
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
3
Markov Chains
a l
ep
itn
4
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
4
Matrix of Transition Probabilities
al
.. .. .. . . ..
ep
sm pm1 pm 2 . . pmm
itn
5
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
5
Matrix of Transition Probabilities
∑p
j =1
ij = 1 for all i
and 0 ≤ pij ≤ 1
a l
ep
itn
6
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
6
Diagrams
Two types;
1. Transition Diagram
2. Probability Tree Diagram
p12
S1 Succeeding state
p22
S2 S1 S2 S3
S1 0 P12 0
P31
p23 S2 0 P22 P23
S3
a l
S3 P31 0 P33
ep
Transition Diagram
itn
p33 7
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
7
Diagrams
S1
S1
S2
S1
S1
S2
S2
S1
S1
S1
S2
l
S2
a
S1
ep
S2
Probability Tree Diagram
itn
S2 8
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
8
Diagrams
Ex;
P(state 1, shift 3 | state 1, shift 1)
a l
ep
= 0.7 (0.7) + 0.8 ( 0.3) = 0.73
itn
9
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
9
Diagrams
a l
ep
itn
10
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
10
n-Step Transition Probabilities
a l
. .
ep
Rn = Rn-1 x P = R0 X Pn
itn
11
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
11
n-Step Transition Probabilities
Rn = Rn-1 x P = R0 X Pn
Here, Pn denotes the n-steps transition matrix
a l
ep
itn
12
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
12
Steady-state (equilibrium conditions)
a l
Note: All regular Markov chains must be ergodic Markov chains but
ep
the converse is not true.
itn
13
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
13
Steady-state behavior of Markovian Systems
Inifinite – Population
- Are assumed to follow Poisson process with λ
arrivals per unit time and inter-arrival time is
exponentially distributed with mean 1/ λ
- The queue discipline is FIFO
- Mathematically, a system is said to be in steady
state, provided the probability that the system is in
a given state is not time dependent;
P(L(t) = n) = Pn(t) = Pn
a l
ep
itn
14
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
14
Steady-state behavior of Markovian Systems
a l
ep
itn
15
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
15
M/G/1
λ
ρ=
µ
ρ 2 (1 + σ 2 µ 2 )
L=ρ+
2(1 − ρ )
a l
ρ 2 (1 + σ 2 µ 2 )
ep
LQ =
2(1 − ρ )
itn
16
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
16
M/G/1
al
Note as ρ Æ 0 (low server utilization) LQ Æ 0
ep
Note as ρ Æ 1 (high server utilization) LQ Æ ∞
itn
17
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
17
M/G/1
Example;
Supplements from Banks and Nicol, Page 226, 227
a l
ep
itn
18
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
18
M/M/1
a l
ep
itn
19
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
19
M/M/1
∑P
l
=1
a
k
ep
k =0
itn
20
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
20
M/M/1
a l
k =1 µ
ep
itn
21
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
21
M/M/1
M/G/1 (service times are exponential)
1 1
P0 = =
λ / µ 1 − (λ / µ ) λ/µ
1 + +
1 − ( λ / µ ) 1 − (λ / µ ) 1 − (λ / µ )
1 λ
P0 = = 1−
1 µ
1 − (λ / µ )
• Which is the solution for P0 from the M/G/1 Queue in
Table 6.3
4 Utilizing these, we can substitute back to get
k k
λ λ λ
Pk = P0 = 1 − = (1 − ρ ) ρ k
µ µ µ
a l
ep
• Which is the formula indicated in Table 6.4
• The other values can also be derived in a similar
itn
22
manner (C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
22
Homework
a l
ep
itn
23
(C) Pramod Parajuli, 2004
cs
Source: www.csitnepal.com
23