Professional Documents
Culture Documents
ACM40270 Q4 AlanFreeman
ACM40270 Q4 AlanFreeman
j
=
m
k=1
k
p
kj
(1)
and
m
k=1
j
= 1 (2)
where p
kj
is the probability of transition from state k to state j. The transition probabilities
are given by the transition matrix p. Using (1), we can nd the probabilities:
1
=
2
2
= (1 )
1
+
4
3
=
1
4
= (1 )
2
+
3
Rewriting the probabilities in terms of
2
and substituting into (2), gives us:
2
+
2
+
2
+ (1 )
2
+
2
= 1
2
=
1
2(1 +)
Solving for the remaining probabilities and expressing the steady state pdf vector
=
_
1
2
3
4
_
gives:
=
_
2(1+)
1
2(1+)
2(1+)
1+
2(1+)
_
(3)
1
Given that each
j
is the probability of each state j as t , we can write the steady state
expected value as:
lim
t
E[X(t)] =
m
k=1
k
k
(4)
where, in this question m = 4. Using (4) and our results for the steady state vector found
in (3) we nd
lim
t
E[X(t)] =
1
+ 2
2
+ 3
3
+ 4
4
=
2(1 +)
+
2
2(1 +)
+
3
2(1 +)
+
4(1 +)
2(1 +)
=
6 3 + 7
2(1 +)
(b) In general, using matrix notation for the Chapman-Kolomogorov Equation (as given on
page 491 in the text book
1
), our pdf vector will be f
t+1
= f
t
p. We are given that the for
the initial state at t = 0 we have P[X(0) = 2] = 1, hence our initial pdf is
f
0
=
_
0 1 0 0
_
.
t = 1
Our pdf will be
f
1
=
_
0 1 0 0
_
p
=
_
0 0 1
_
This gives us
E[X(1)] = (1) + (2)(0) + (3)(0) + (4)(1 )
= 4 3
1
Lemmis L and Park S (2004). Discrete Event Simulation: A First Course
2
t = 2
Firstly, the pdf will be
f
2
=
_
0 0 1
_
p
=
_
0 1 0
_
This gives us
E[X(2)] = (1)0 + (2)(1 ) + (3)(0) + (4)()
= 1 + 3
t = 3
Firstly, the pdf will be
f
2
=
_
0 1 0
_
p
=
_
(1 ) 0 (1 )(1 )
_
This gives us
E[X(3)] = (1)((1 )) + (2)() + (3)(0) + (4)(1 )(1 )
= 4 3 2 + 3
2
Question 2
Process can be modelled as a Birth-Death Markov Process, where arrivals to the ATM as
Births, and customers leaving the as Deaths. Here we have 5 possible states, with each state
being the number of customers in system ie. X = 0, 1, 2, 3, 4.
Arrivals give a Birth Rate
j
= 1. Death rates are based on exp( = 1) service times and
impatient customers leaving the queue after exp( = 1) time. Hence, death rates are:
0
= 0
1
= = 1
2
= + = 2
3
= + 2 = 3
4
= + 3 = 4
3
Let
i
be steady state probability of leaving the state i. By rearranging the balance equa-
tion:
i
=
n
k=1
k
p
ki
we can show
i
p
i,i+1
=
i+1
p
i+1,i
(5)
Using our birth and death rates,
i
and
i
, we can show from (5) that
i
i
=
i+1
i+1
, and
hence:
0
=
1
1
0
=
1
1
=
2
2
1
= 2
2
2
=
3
3
2
= 3
3
3
=
4
4
3
= 4
4
In addition, we have from (2):
0
+
1
+
2
+
3
+
4
= 1
. Expressing the equations for
i
in terms of
2
and substituting into (2) gives us:
0
=
24
65
1
=
24
65
2
=
12
65
3
=
4
65
4
=
1
65
(a) Time average number of customers waiting in the queue
There will only be customers waiting in the queue for for states 2, 3 and 4 (ie when theres
2 or more customers in the system). Hence, average number of customers waiting will
be
2
+ 2
3
+ 3
4
=
12
65
+
8
65
+
3
65
=
23
65
(b) Proportion of customers lost?
Customer will only leave when a queue has formed, hence, we only need to consider the
states where when theres 2 or more customers in the system). Proportion of customers lost
4
will be (assuming arrival rate of 1):
2
+ 2
3
+ 3
4
=
2
+ 2
3
+ 3
4
=
12
65
+
8
65
+
3
65
=
23
65
(c) Proportion of customers served?
Customers will be served once theres 1 or more customers in the system. Proportion of
customers served will be (assuming arrival rate of 1):
1
+
2
+
3
+
4
=
24
65
+
12
65
+
4
65
+
1
65
=
41
65
Question 3
Modifying the balance equation from the notes, we have equilibrium probability:
k
=
0
k1
i=0
i1
i
=
0
_
_
k
where k K. For k K + 1, we have:
k
=
0
K
i=0
k1
i=K+1
2
k
=
0
1
2
K+1
_
_
k
In order to nd an expression for
0
to substitute into the above equation, we note that the
sum of all the probabilities will be equal to 1, hence:
1 =
K
k=0
0
_
_
k
+
K+1
0
1
2
K+1
_
_
k
5
and:
0
=
1
K
k=0
_
_
k
+
K+1
1
2
K+1
_
_
k
Question 4
(a) Modifying the balance equation as in the previous question, we have equilibrium prob-
ability:
p
k
= p
0
k1
i=0
= p
0
_
_
k
k1
i=0
i
= p
0
_
_
k
k(k1)/2
This gives us:
p
k
= p
0
_
(k1)/2
_k
(6)
(b) From equation (6) and the fact that
k=0
p
k
= 1 we have:
p
0
k=0
_
(k1)/2
_k
= 1
Therefore:
p
0
=
1
k=0
_
(k1)/2
_
k
6