2G1318 Queuing theory and teletraffic systems - KTH
2G1318 Queuing theory and teletraffic systems - KTH
2G1318 Queuing theory and teletraffic systems - KTH
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
3rd lecture<br />
Markov chains<br />
Birth-death process<br />
- Poisson process<br />
Discrete time Markov chains<br />
Viktoria Fodor<br />
<strong>KTH</strong> EES<br />
1
Outline for today<br />
• Markov processes<br />
– Continuous-time Markov-chains<br />
– Graph <strong>and</strong> matrix representation<br />
• Transient <strong>and</strong> steady state solutions<br />
• Balance equations – local <strong>and</strong> global<br />
• Pure Birth process – Poisson process as special case<br />
• Birth-death process as special case<br />
• Outlook: Discrete time Markov-chains<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
2
• Stochastic process<br />
– p i(t)=P(X(t)=i)<br />
Markov processes<br />
• The process is a Markov process if the future of the process depends on the<br />
current state only - Markov property<br />
– P(X(t n+1)=j | X(t n)=i, X(t n-1)=l, …, X(t 0)=m) = P(X(t n+1)=j | X(t n)=i)<br />
– Homogeneous Markov process: the probability of state change is unchanged<br />
by time shift, depends only on the time interval<br />
P(X(t n+1)=j | X(t n)=i) = p ij(t n+1-t n)<br />
• Markov chain: if the state space is discrete<br />
– A homogeneous Markov chain can be represented by a graph:<br />
• States: nodes<br />
• State changes: edges<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
0 1<br />
M<br />
3
Continuous-time Markov chains<br />
(homogeneous case)<br />
• Continuous time, discrete space stochastic process, with Markov<br />
property, that is:<br />
P(<br />
X ( t<br />
P(<br />
X ( t<br />
n�1<br />
n�1<br />
) �<br />
) �<br />
j | X ( t ) � i,<br />
X ( t<br />
n<br />
j | X ( t ) � i),<br />
n<br />
t<br />
n�1<br />
0<br />
) � l,<br />
�X<br />
( t<br />
• State transition can happen in any point of time<br />
• Example:<br />
– number of packets waiting at the output buffer of a router<br />
– number of customers waiting in a bank<br />
� t<br />
1<br />
��<br />
� t<br />
• The time spent in a state has to be exponential to ensure Markov<br />
property:<br />
– the probability of moving from state i to state j sometime between<br />
t n <strong>and</strong> t n+1 does not depend on the time the process already spent<br />
in state i before t n.<br />
n�1<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
n<br />
0<br />
) � m)<br />
�<br />
� t<br />
states<br />
t 0 t 1 t 2 t 3 t 4 t 5<br />
4
Continuous-time Markov chains<br />
(homogeneous case)<br />
• State change probability depends on the time interval:<br />
P(X(t n+1)=j | X(t n)=i) = p ij(t n+1-t n)<br />
• Characterize the Markov chain with the state transition rates instead:<br />
q<br />
ij<br />
q<br />
ii<br />
P(X(t � Δt) � j|X(t) � i)<br />
� lim<br />
, i � j - rate (intensity) of state change<br />
Δt � 0 Δt<br />
� � � q - defined to easy calculation later on<br />
ij<br />
j � i<br />
Transition rate matrix Q:<br />
� q<br />
�<br />
�<br />
�<br />
Q �<br />
�<br />
�<br />
��<br />
qM<br />
00<br />
0<br />
q<br />
01<br />
�<br />
�<br />
q<br />
�<br />
M ( M �1)<br />
q<br />
q<br />
0M<br />
( M �1)<br />
M<br />
q<br />
MM<br />
�<br />
�<br />
�<br />
�<br />
�<br />
��<br />
0<br />
q 01=4<br />
q 10=6<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
1<br />
��<br />
4<br />
Q<br />
� �<br />
� 6<br />
4 �<br />
� 6<br />
�<br />
�<br />
5
Outline for today<br />
• Markov processes<br />
– Continuous-time Markov-chains<br />
– Graph <strong>and</strong> matrix representation<br />
• Transient <strong>and</strong> steady state solutions<br />
• Balance equations – local <strong>and</strong> global<br />
• Pure Birth process – Poisson process as special case<br />
• Birth-death process as special case<br />
• Outlook: Discrete time Markov-chains<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
6
q<br />
ij<br />
i<br />
i<br />
�<br />
�t�0<br />
p ( t � �t)<br />
�<br />
p ( t)<br />
� p ( t)<br />
pi<br />
( t � �t)<br />
� pi<br />
( t)<br />
�<br />
�t<br />
i<br />
i<br />
i<br />
i<br />
j<br />
p<br />
j�i<br />
p ( t � �t)<br />
� p ( t)<br />
� p ( t)<br />
q �t<br />
�<br />
dp(<br />
t)<br />
�<br />
dt<br />
P(<br />
X ( t � �t)<br />
� j | X ( t)<br />
� i)<br />
lim<br />
�t<br />
�<br />
�<br />
p(<br />
t)<br />
Q, p(<br />
t)<br />
� p(<br />
0)<br />
�e<br />
j<br />
ii<br />
q<br />
ij<br />
( t)<br />
q<br />
�t<br />
�<br />
ji<br />
�<br />
j�i<br />
Qt<br />
Transient solution<br />
• The transient - time dependent – state probability distribution<br />
• p(t)={p 0(t), p 1(t), p 2(t),...} – probability of being in state i at time t,<br />
given p(0).<br />
�<br />
j�i<br />
p<br />
j<br />
p<br />
�(<br />
�t)<br />
�<br />
�t<br />
j<br />
�<br />
( t)<br />
q<br />
( t)<br />
q<br />
ji<br />
�<br />
P(<br />
X ( t � �t)<br />
�<br />
ji<br />
�t<br />
��<br />
( �t),<br />
leaves the state arrives to the state<br />
�t<br />
��<br />
( �t)<br />
�<br />
dpi<br />
( t)<br />
�<br />
dt<br />
�<br />
j<br />
�<br />
j<br />
�t�0<br />
p<br />
p<br />
j | X ( t)<br />
� i)<br />
� q<br />
�(<br />
�t)<br />
lim � 0<br />
�t<br />
j<br />
j<br />
( t)<br />
q<br />
( t)<br />
q<br />
Transient solution<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
ji<br />
ji<br />
ij<br />
�t<br />
��<br />
( �t)<br />
�t<br />
��<br />
( �t)<br />
( �<br />
�<br />
j�i<br />
q<br />
ij<br />
�<br />
q<br />
ii<br />
)<br />
7
0.8<br />
0.6<br />
0.4<br />
0.2<br />
0<br />
1<br />
q 01=4<br />
q 10=6<br />
1<br />
p 0(t)<br />
p 1(t)<br />
Example – transient solution<br />
��<br />
4<br />
� �<br />
� 6<br />
4 �<br />
� 6<br />
�<br />
�<br />
0.2 0.4 0.6 0.8 1<br />
dp(<br />
t)<br />
p(<br />
t)<br />
Q<br />
�<br />
dt<br />
p(<br />
t)<br />
� p(<br />
0)<br />
�e<br />
Q Qt<br />
0.8<br />
0.6<br />
0.4<br />
0.2<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
1<br />
Transient<br />
state<br />
p 0(t)<br />
p 1(t)<br />
Stationary / steady<br />
state<br />
0.2 0.4 0.6 0.8 1<br />
A: p 0(0)=0, p 1(0)=1 B: p 0(0)=1, p 1(0)=0<br />
8
• Matrix exponential<br />
• Matrix exponentials are defined as:
• Def: stationary state probability distribution (stationary solution)<br />
– p � lim p(<br />
t)<br />
exists<br />
t�� Stationary solution (steady state)<br />
– p is independent from p(0)<br />
• The stationary solution p has to satisfy:<br />
dp(<br />
t)<br />
( t)<br />
Q � � 0,<br />
� p ( t)<br />
�1<br />
dt<br />
p i<br />
Note: the rank of Q MM is M-1!<br />
0<br />
q 01=4<br />
q 10=6<br />
1<br />
�p , p � � �0, 0�<br />
p<br />
0<br />
0<br />
�<br />
1<br />
0.<br />
6,<br />
��<br />
4<br />
�<br />
� 6<br />
� q<br />
�<br />
�<br />
�<br />
Q<br />
�<br />
�<br />
�<br />
��<br />
qM<br />
p<br />
4 �<br />
� 6<br />
�<br />
�<br />
0.<br />
4<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
1<br />
�<br />
00<br />
0<br />
q<br />
01<br />
�<br />
�<br />
q<br />
,<br />
�<br />
M ( M �1)<br />
p<br />
0<br />
�<br />
q<br />
q<br />
( M �1)<br />
M<br />
q<br />
p<br />
0M<br />
MM<br />
1<br />
�<br />
�<br />
�<br />
�<br />
�<br />
��<br />
�1<br />
10
Important theorems – without the proof<br />
• Stationary solution exists, if<br />
– The Markov chain is irreducible (there is a path between any two states) <strong>and</strong><br />
pQ<br />
� 0, p�1<br />
�1<br />
Stationary solution (steady state)<br />
– has positive solution<br />
• Equivalently, stationary solution exists, if<br />
– The Markov chain is irreducible<br />
– For all states: the mean time to return to the state is finite<br />
• Finite state, irreducible Markov chains always have stationary solution.<br />
• Markov chains with stationary solution are also ergodic:<br />
– p i gives the portion of time a single realization spends in state i, <strong>and</strong><br />
– the probability that one out of many realizations are in state i at arbitrary<br />
point of time<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
11
Outline for today<br />
• Markov processes<br />
– Continuous-time Markov-chains<br />
– Graph <strong>and</strong> matrix representation<br />
• Transient <strong>and</strong> steady state solutions<br />
• Balance equations – local <strong>and</strong> global<br />
• Pure Birth process – Poisson process as special case<br />
• Birth-death process as special case<br />
• Outlook: Discrete time Markov-chains<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
12
Balance equations<br />
• How can we find the stationary solution? pQ=0<br />
0 � pQ<br />
�<br />
State<br />
0 � �(<br />
q<br />
q<br />
21<br />
12<br />
2<br />
State<br />
0 � q<br />
q<br />
p<br />
p<br />
1<br />
1:<br />
12<br />
12<br />
� ( q<br />
2 :<br />
p<br />
1<br />
� q<br />
� q<br />
32<br />
12<br />
� q<br />
p<br />
3<br />
14<br />
21<br />
) p<br />
� q<br />
p<br />
14<br />
2<br />
� q<br />
1<br />
) p<br />
21<br />
� q<br />
1<br />
� q<br />
p<br />
32<br />
2<br />
21<br />
flow in flow out<br />
p<br />
p<br />
3<br />
2<br />
q 14<br />
q12 P1 P2 P3 q 21<br />
• Global balance conditions<br />
– In equilibrium (for the stationary solution)<br />
– the transition rate out of a state – or a group of states - must equal<br />
the transition rate into the state (or states)<br />
• flow in = flow out<br />
– defines a global balance equation<br />
P 4<br />
q 43<br />
q 32<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
��<br />
( q12<br />
� q<br />
�<br />
� �<br />
q21<br />
Q<br />
� 0<br />
�<br />
� 0<br />
14<br />
)<br />
q<br />
12<br />
� q<br />
q<br />
32<br />
0<br />
21<br />
0<br />
0<br />
� q<br />
q<br />
43<br />
32<br />
q<br />
14<br />
0<br />
0<br />
� q<br />
43<br />
�<br />
�<br />
�<br />
�<br />
�<br />
�<br />
13
Group work<br />
• Global balance equation for state 1 <strong>and</strong> 2:<br />
0 � pQ<br />
State<br />
0 � �(<br />
q<br />
q<br />
21<br />
12<br />
2<br />
State<br />
0 � q<br />
q<br />
p<br />
p<br />
1<br />
1:<br />
12<br />
12<br />
� ( q<br />
2 :<br />
p<br />
1<br />
� q<br />
32<br />
�<br />
� q<br />
12<br />
� q<br />
p<br />
3<br />
14<br />
21<br />
) p<br />
� q<br />
p<br />
14<br />
2<br />
� q<br />
1<br />
) p<br />
21<br />
� q<br />
1<br />
� q<br />
p<br />
32<br />
2<br />
21<br />
p<br />
p<br />
3<br />
2<br />
q 12<br />
q 14<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
P 4<br />
q 43<br />
P 1 p 2 P 3<br />
q 21<br />
• Is there a global balance equation for the circle around<br />
states 1 <strong>and</strong> 2?<br />
q 32<br />
14
Balance equations<br />
• Local balance conditions in equilibrium<br />
– the local balance means that the total flow from one part of the chain<br />
must be equal to the flow back from the other part<br />
– for all possible cuts<br />
– defines a local balance equation<br />
– The local balance equation is the same as a global balance equation<br />
around a set of states!<br />
q 14<br />
P 4<br />
q12 P1 p2 P3 q 21<br />
q 43<br />
q 32<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
15
Balance equations<br />
• Set of linear equations instead of a matrix equation<br />
0<br />
0<br />
q<br />
�<br />
�<br />
12<br />
p<br />
pQ<br />
q<br />
1<br />
12<br />
p<br />
1<br />
� q<br />
32<br />
�<br />
� q<br />
p<br />
• Global balance :<br />
– flow in = flow out around a state<br />
– or around many states<br />
• Local balance equation:<br />
– flow in = flow out across a cut<br />
q43p4 �<br />
q32p3<br />
• M states<br />
– M-1 independent equations<br />
– �pi=1 3<br />
21<br />
�<br />
p<br />
2<br />
q<br />
� q<br />
21<br />
p<br />
32<br />
2<br />
p<br />
flow in flow out<br />
3<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
q 12<br />
q 14<br />
P 4<br />
q 43<br />
P 1 p 2 P 3<br />
q 21<br />
q 12<br />
q 14<br />
P 4<br />
q 43<br />
q 32<br />
P 1 p 2 P 3<br />
q 21<br />
q 32<br />
16
Outline for today<br />
• Markov processes<br />
– Continuous-time Markov-chains<br />
– Graph <strong>and</strong> matrix representation<br />
• Transient <strong>and</strong> steady state solutions<br />
• Balance equations – local <strong>and</strong> global<br />
• Pure Birth process – Poisson process as special case<br />
• Birth-death process as special case<br />
• Outlook: Discrete time Markov-chains<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
17
Pure birth process<br />
• Continuous time Markov-chain, infinite state space<br />
• Transitions occur only between neighboring states<br />
– State independent birth intensity: � � �,<br />
�i<br />
k-1 k k+1<br />
• No stationary solution<br />
• Transient solution:<br />
� k-1=� � k=�<br />
− p k(t)=P(system in state k at time t)<br />
− number of events (births) in an interval t<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
i<br />
Q<br />
�<br />
��<br />
�<br />
�<br />
�<br />
0<br />
� 0<br />
�<br />
� 0<br />
�<br />
� �<br />
0<br />
0<br />
0<br />
�<br />
� �<br />
0<br />
��<br />
0<br />
�<br />
�<br />
� �<br />
�<br />
��<br />
18
Pure birth process<br />
• Transient solution – number of events (births) in an interval (0,t]<br />
p'(<br />
t)<br />
� p(<br />
t)<br />
Q,<br />
p'<br />
p'<br />
�<br />
p'<br />
0<br />
1<br />
k<br />
( t)<br />
� ��p<br />
( t)<br />
� �p<br />
0<br />
( t)<br />
� �p<br />
0<br />
k �1<br />
�k-1=� �k=� k-1 k k+1<br />
( t)<br />
p<br />
0<br />
( 0)<br />
( t)<br />
� �p<br />
( t)<br />
1<br />
( t)<br />
� �p<br />
k<br />
�1,<br />
( t)<br />
�<br />
p<br />
�<br />
k<br />
p<br />
( 0)<br />
0<br />
p<br />
( t)<br />
� e<br />
k<br />
� 0<br />
��t<br />
� p'<br />
( t)<br />
� �e<br />
1<br />
��t<br />
( �t)<br />
( t)<br />
�<br />
k!<br />
� �p<br />
( t)<br />
• Pure birth process gives Poisson process! – time between state<br />
transitions is Exp(λ)<br />
for<br />
k<br />
��t<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
e<br />
k<br />
1<br />
� 0<br />
� p ( t)<br />
� �te<br />
1<br />
��t<br />
Q<br />
�<br />
��<br />
�<br />
�<br />
�<br />
0<br />
� 0<br />
�<br />
� 0<br />
�<br />
� �<br />
0<br />
0<br />
0<br />
�<br />
� �<br />
0<br />
��<br />
0<br />
�<br />
�<br />
� �<br />
�<br />
��<br />
19
Equivalent definitions of Poisson process<br />
1. Pure birth process with intensity �<br />
2. The number of events in period (0,t] has Poisson distribution with<br />
parameter �<br />
3. The time between events is exponentially distributed with parameter �<br />
P(<br />
X � t)<br />
�1�<br />
e<br />
��t<br />
previous slide<br />
number of events<br />
Poisson distribution<br />
pure birth process<br />
time between events<br />
exponential<br />
previous lecture<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
check in the binder<br />
20
Pure death process<br />
• Continuous time Markov-chain, infinite state space<br />
• Transitions occur only between neighboring states<br />
– State independent death intensity: � � �,<br />
�i<br />
� 0<br />
• No stationary solution<br />
k-1 k k+1<br />
�<br />
�<br />
• Pure death process gives Poisson process until reaching state 0<br />
• Time between state transitions is Exp(µ)<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
i<br />
21
Outline for today<br />
• Markov processes<br />
– Continuous-time Markov-chains<br />
– Graph <strong>and</strong> matrix representation<br />
• Transient <strong>and</strong> steady state solutions<br />
• Balance equations – local <strong>and</strong> global<br />
• Pure Birth process – Poisson process as special case<br />
• Birth-death process as special case<br />
• Outlook: Discrete time Markov-chains<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
22
Birth-death process<br />
• Continuous time Markov-chain<br />
• Transitions occur only between neighboring states<br />
i�i+1 birth with intensity λ i<br />
i�i-1 death with intensity μ i (for i>0)<br />
�<br />
��<br />
q<br />
�<br />
� q10<br />
Q �<br />
� q20<br />
�<br />
� �<br />
0 j<br />
�<br />
q<br />
�<br />
q<br />
01<br />
21<br />
1 j<br />
�<br />
�<br />
02<br />
12<br />
2 j<br />
��<br />
��<br />
�0<br />
� �<br />
��<br />
� �<br />
�1<br />
��<br />
� 0<br />
� �<br />
��<br />
�<br />
modells population<br />
�k-1 �k k-1 k k+1<br />
q<br />
q<br />
q<br />
q<br />
� k<br />
� ( � � � )<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
�<br />
1<br />
�<br />
0<br />
2<br />
1<br />
� ( � � � )<br />
• State holding time – length of time spent in a state k<br />
– Until transition to states k-1 or k+1<br />
– Minimum of the times to the first birth or first deaths � minimum of two<br />
Exponentially distributed r<strong>and</strong>om variables: Exp(� k+� k)<br />
� k+1<br />
2<br />
0<br />
�<br />
1<br />
2<br />
��<br />
0<br />
�<br />
�<br />
� � 2<br />
�<br />
��<br />
23
B-D process - stationary solution<br />
• Local balance equations, like for general Markov-chains<br />
• Stability: positive solution for p (since the MC is irreducible)<br />
Cut 1:<br />
�k<br />
�1<br />
pk<br />
�1<br />
� �k<br />
pk<br />
�<br />
�k<br />
�1<br />
pk<br />
� pk<br />
�1<br />
�<br />
Cut 2 : � p<br />
�<br />
�<br />
�<br />
p<br />
0<br />
p<br />
p<br />
k<br />
k<br />
�<br />
� 1<br />
�<br />
1�<br />
k<br />
�<br />
1<br />
�<br />
k<br />
�<br />
1<br />
k �1<br />
�<br />
� �<br />
�0<br />
��<br />
� ��<br />
k �1<br />
k<br />
�i<br />
�<br />
k �1<br />
i�0<br />
k �1 i�1<br />
p<br />
,<br />
p<br />
0<br />
k �1<br />
�<br />
k �1<br />
�<br />
i�0<br />
�<br />
�i<br />
�<br />
i�1<br />
p<br />
k �1<br />
p<br />
0<br />
,<br />
�<br />
k<br />
�k<br />
�<br />
k �1<br />
k-1<br />
k �1<br />
� k-1<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
p<br />
k<br />
�<br />
�k�k<br />
�1<br />
� �<br />
k<br />
p<br />
� k<br />
k �1<br />
k<br />
Cut 1 Cut 2<br />
� k<br />
� k+1<br />
k+1<br />
Group work: stationary solution for<br />
state independent transition rates:<br />
�i � �,<br />
�i<br />
� �.<br />
24
Markov-chains <strong>and</strong> queuing <strong>systems</strong><br />
• Why do we like Poisson <strong>and</strong> B-D processes?<br />
How are they related to queuing <strong>systems</strong>?<br />
– If arrivals in a queuing system can be modeled as Poisson<br />
process � also as a pure birth process<br />
– If services in a queuing <strong>systems</strong> can be modeled with<br />
exponential service times � also as a (pure) death process<br />
– Then the queuing system can be modeled as a birth-death<br />
process<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
λ<br />
λ<br />
μ μ<br />
25
Summary – Continuous time Markov-chains<br />
• Markovian property: next state depends on the present state<br />
only<br />
• State lifetime: exponential<br />
• State transition intensity matrix Q<br />
• Stationary solution: pQ=0, or balance equations<br />
• Poisson process<br />
– pure birth process (�)<br />
– number of events has Poisson distribution, E[X]=�t<br />
– interarrival times are exponential E(�)=1/�<br />
• Birth-death process: transition between neighboring states<br />
• B-D process may model queuing <strong>systems</strong>!<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
26
Discrete-time Markov-chains<br />
(detour)<br />
• Discrete-time Markov-chain: the time is discrete as well<br />
– X(0), X(1), … X(n), …<br />
– Single step state transition probability for homogeneous MC:<br />
P(X(n+1)=j | X(n)=i) = p ij, �n<br />
• Example<br />
– Packet size from packet to packet<br />
– Number of correctly received bits in a packet<br />
– Queue length at packet departure instants …<br />
(get back to it at non-Markovian queues)<br />
p 01<br />
p1m pm1 0 1<br />
M<br />
p 10<br />
p 0m<br />
p m0<br />
<strong>2G1318</strong> <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
27
• Transition probability matrix:<br />
– The transitions probabilities can be represented in a matrix<br />
– Row i contains the probabilities to go from i to state j=0, 1, …M<br />
p 01<br />
Discrete-Time Markov-chains<br />
• P ii is the probability of staying in the same state<br />
0 1<br />
M<br />
p 10<br />
p 0m<br />
p m0<br />
p1m pm1 � p00<br />
p01<br />
� p0M<br />
�<br />
�<br />
p p<br />
�<br />
� 10 11 �<br />
P � �,<br />
� pij<br />
�1<br />
� � � � � j<br />
�<br />
�<br />
� pM<br />
0 � pMM<br />
�<br />
<strong>2G1318</strong> <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
�i<br />
28
• The probability of finding the process in state j at time n is denoted by:<br />
– p j (n) = P(X(n) = j)<br />
– for all states <strong>and</strong> time points, we have:<br />
� � ) (<br />
) ( ( n)<br />
n<br />
p p p<br />
p �<br />
�<br />
( n)<br />
n<br />
0 1<br />
M<br />
• The time-dependent (transient) solution is given by:<br />
p<br />
p<br />
( n�1)<br />
i<br />
( n�1)<br />
�<br />
p<br />
Discrete-Time Markov-chains<br />
� pi<br />
pii<br />
��<br />
p<br />
j�i<br />
( n)<br />
j<br />
p<br />
( n)<br />
( n�1)<br />
P � p PP � �<br />
ji<br />
�<br />
p<br />
( 0)<br />
P<br />
n�1<br />
<strong>2G1318</strong> <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
p 01<br />
p1m pm1 0 1<br />
M<br />
p 10<br />
p 0m<br />
p m0<br />
29
• Steady (or stationary) state exists if<br />
– The limiting probability vector exists<br />
– And is independent from the initial probability vector<br />
lim �<br />
n��<br />
• Stationary state probability distribution is give by:<br />
• Note also:<br />
�p p p �<br />
( n)<br />
p � p 0 1 �<br />
M<br />
p � p P,<br />
�<br />
j�<br />
0<br />
p<br />
j<br />
�1<br />
M<br />
– The probability to remain in a state j for m time units has geometric<br />
distribution<br />
�1 p 1�<br />
m<br />
jj<br />
Discrete-Time Markov-chains<br />
� p �<br />
jj<br />
� ( n�1)<br />
( n)<br />
p � p P�<br />
– The geometric distribution is a memoryless discrete probability<br />
distribution (the only one)<br />
<strong>2G1318</strong> <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong> <strong>systems</strong><br />
30
Summary<br />
• Continuous-time Markov chains<br />
• Balance equations (global, local)<br />
• Pure birth process <strong>and</strong> Poisson process<br />
• Birth-death process<br />
• Discrete time Markov chains<br />
EP2200 <strong>Queuing</strong> <strong>theory</strong> <strong>and</strong> <strong>teletraffic</strong><br />
<strong>systems</strong><br />
31