Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Operation Research II
Spring, 2009
Jin Y. Wang
Chap16-1
Operation Research II
Spring, 2009
9 Random variables D1, D2,, Dt represent the demand for this camera during the
tth week (number of cameras that would be sold in week t if the inventory is not
depleted).
Assume that the Dt are independent and identically distributed random
variable having a Poisson distribution with a mean of 1.
9 Let X0 represent the number of cameras on hand at the outset, Xt (t = 1, 2, ) the
number of cameras on hand at the end of week t.
9 {Xt } = {X0, X1, X2, } is a stochastic process where the random variable Xt
represents the state of the system at time t.
9 Assume X0 is 3, so that week 1 begins with three cameras on hand.
9 Order is placed at the end of each week t with the following policy:
If Xt = 0, order 3 cameras.
If Xt > 0, do not order any camera.
9 Thus, Xt+1 = max{3 Dt+1, 0}, if Xt = 0;
Xt+1 = max{Xt Dt+1, 0}, if Xt 1.
9 The possible states are 0, 1, 2, and 3.
Markov Chain
9 A stochastic process {Xt} is said to have the Markovian property if
P{Xt+1 = j | X0 = k0, X1 = k1, , Xt-1 = kt-1, Xt = i} = P{Xt+1 = j | Xt = i},
for t = 0, 1, and every sequence i, j, k0, k1, , kt-1.
9 That is, the conditional probability of any future event depends only upon the
present state.
9 A stochastic process {Xt } (t = 0, 1, ) is a Markov chain if it has the
Markovian property.
9 The conditional probabilities P{Xt+1 = j | Xt = i} are called (one-step) transition
probabilities.
9 If, for each i and j, P{Xt+1 = j | Xt = i} = P{X1 = j | X0 = i} for all t = 0, 1., then
the (one-step) transition probabilities are said to be stationary and are denoted
by pij.
The stationary transition probability implies that the transition
probabilities do not change over time.
9 The stationary transition (one-step) probabilities implies that P{Xt+n = j | Xt = i}
= P{Xn = j | X0 = i} for each i, j, and n (n = 0, 1, 2, ). Usually, denote as n-step
transition probabilities pij(n).
Jin Y. Wang
Chap16-2
Operation Research II
Spring, 2009
p
j =0
(n)
ij
= 1 for all i; n = 0, 1, 2, .
P(n) =
(n)
p 00
(n)
p10
...
(n)
p M 0
P01( n )
p11( n )
...
...
...
...
p M( n1) ...
p 0( nM)
p1(Mn )
...
(n)
p MM
P=
p00
p10
...
p M 0
P01
...
p11 ...
... ...
p M 1 ...
p0 M
p1M
...
p MM
Jin Y. Wang
Chap16-3
Operation Research II
Spring, 2009
p 00
p
10
p 20
p30
p 01
p11
p 02
p12
p 21
p 22
p31
p32
p 03
p13
p 23
p33
Jin Y. Wang
Chap16-4
9 P=
0.080
0.632
0.264
0.080
Operation Research II
Spring, 2009
A Stock Example
9 If the stock has gone up, the probability that it will go up tomorrow is 0.7.
9 If the stock has gone down, the probability that it will go up tomorrow is 0.5.
9 State 0: The stock increased on this day.
State 1: The stock decreased on this day.
Jin Y. Wang
Chap16-5
Operation Research II
Spring, 2009
0 .9 0 0 .1 0
0 .6 0 0 .4 0
.
0 0 .5 0 0 .5
0 0 .3 0 0 .7
Thus, P =
A Gambling Example
9 A player has $1 and with each play wins $1 with probability p > 0 or loses $1
with probability 1 p.
9 The game ends when the player either accumulates $3 or goes broke.
0
1
1 p
0
0
1 p
0
0
P=
0
p
0
0
0
0
.
p
Chapman-Kolmogorov Equations
9 Provide a method for computing the n-step transition probabilities.
M
pij( n ) = pik( m ) p kj( n m ) , for all i, j, and any m = 1, 2, , n1, n = m+1, m+2, ..
k =0
9 These equations point out that in going from state i to state j in n steps, the
process will be in some state k after exactly m steps.
9 When m = 1 and m = n1, we have p
(n)
ij
= pik p
k =0
( n 1)
kj
and p
(n)
ij
= pik( n 1) p kj for
k =0
Jin Y. Wang
Chap16-6
Operation Research II
Spring, 2009
( 2)
9 Note that pij is the elements of matrix P(2). Also note that these elements are
obtained by multiplying the matrix of one-step transition probabilities by itself;
i.e., P(2) = P P = P2.
9 More generally, it follows that the matrix of n-step transition probabilities can
be obtained from P(n) = P P(n-1) = P(n-1)P =
PPn-1 = Pn-1P = Pn.
0.76 0.24
9 P(2) = P P =
0.752 0.248
9 P(3) = P3 = P P2 =
9 P(4) = P4 = P P3 =
9 P(5) = P5 = P P4 =
9 Note that the two rows have identical entries (in P(5)). This reflects the fact that
the probability of the weather being in a particular state is essentially
independent of the state of the weather five days before.
9 Thus, the probabilities in either row of this five-step transition matrix are
referred to as the steady-state probabilities of this Markov chain.
n-step Transition Matrices for the Inventory Example
0.249
0.283
9 P(2) = P2 =
0.351
0.249
Jin Y. Wang
Chap16-7
Operation Research II
0.289
0.282
(4)
4
(2 )
(2 )
9 P =P =P P =
0.284
0.289
0.286
0.286
(4)
P =
0.286
0.286
9 P(8) = P8 = P(4)
Spring, 2009
2 0.283
P =
0.351
0.249
In the gambling example, state 2 is not accessible from state 3, but state 3 is
accessible from state 2.
9 A sufficient condition for all states to be accessible is that there exist a value of n
for which pij(n) > 0 for all i and j.
9 If state j is accessible from state i and state i is accessible from state j, then states
i and j are said to communicate.
Any state communicates with itself (because pij(0) > 0 ).
Jin Y. Wang
Chap16-8
Operation Research II
Spring, 2009
9 The states may be partitioned into one or more separate classes such that those
states that communicate with each other are in the same class.
9 If there is only one class (i.e., all states communicate), the Markov chain is said
to be irreducible.
There is only one class in the weather and inventory examples.
There are three classes in the gambling example.
9 A state is said to be a recurrent state if, upon entering this state, the process
definitely will return to this state again.
A state is recurrent if and only if it is not transient.
Since a recurrent state definitely will be revisited, it will be visited
infinitely often if the process continues forever.
9 A state is said to be an absorbing state if, upon entering this state, the process
never will leave this state again.
State i is an absorbing state if and only if pii = 1.
9 Recurrent is a class property
All states in a class are either recurrent or transient.
9 In a finite-state Markov Chain, not all sates can be transient. Therefore, all
states in an irreducible finite-state Markov chain are recurrent.
Jin Y. Wang
Chap16-9
Operation Research II
Spring, 2009
P =
0 0 .5 0 0 .5 0 0 .5 0 0 .5
0 0 .3 0 0 .7 0 0 .3 0 0 .7
9 An Example P =
0
1 / 4 3 / 4 0
1 / 2 1 / 2 0
0
0
0
1
0
0 1/ 2 2 / 3
0
1
0
0
0
0
0
0 . (state starts from 0)
0
0
Periodicity Properties
9 The period of state i is defined to be the integer t (t > 1) such that pii(n) = 0 for all
values of n other than t, 2t, 3t, and t is the largest integer with this property.
Chap16-10
Operation Research II
Spring, 2009
9 If there are two consecutive numbers s and s+1 such that the process can be in
state i at times s and s+1, the state is said to have period 1 and is called an
aperiodic state.
9 Periodicity is also a class property.
In the gambling example, state 2 has period 2 because it is in the same class
as state 1 and we noted that state 1 has period 2.
9 In a finite-state Markov chain, recurrent states that are aperiodic are called
ergodic states.
9 A Markov chain is said to be ergodic if all its states are ergodic states.
Steady-State Probabilities
9 While calculating the n-step transition probabilities for both the weather and
inventory examples, if n is large enough, all the rows of the matrix have
identical entries.
The probability that the system is in each state j no longer depends on the
initial state.
The inventory problem has
0.286
0.286
(8)
8
4 4
P =P =P P =
0.286
0.286
0.285
0.285
0.285
0.285
0.264
0.264
0.264
0.264
0.166
0.166
.
0.166
0.166
j = i pij , for j = 0, 1, , M
i =0
j =0
=1.
Jin Y. Wang
Chap16-11
Operation Research II
Spring, 2009
9 Because it has a unique solution, at least one equation must be redundant and
M
9 Recall that P =
0.080
Jin Y. Wang
Chap16-12
Operation Research II
Spring, 2009
9 Then, we have
3 = 0.368 0 + 0.368 3
0 + 1 + 2 + 3 = 1
More about Steady-State Probabilities
9 If i and j are recurrent states belonging to different classes, then pij(n) = 0, for all
n.
j =0
C ( j ) , where C(j) is
Jin Y. Wang
Chap16-13
Operation Research II
Spring, 2009
9 We already know PD(4) = 0.015, PD(5) = 0.003, PD(6) = 0.001. Ignore PD(i) for
i larger than 6 since the value is too small. We obtain k(0) = 86.2.
9 Similar calculations yield k(1) = 50[PD(2) + 2PD(3) + 3PD(4) + ] = 18.4
k(2) =
k(3) =
9 Thus, the (long-run) expected average cost per week is
3
k ( j )
j =0
9 Let f ij denote the probability that the first passage time from state i to j is
equal to n.
f ij( n ) = p ik f kj( n 1)
k j
Jin Y. Wang
Chap16-14
Operation Research II
Spring, 2009
9 For fixed i and j, the fij(n) are nonnegative numbers such that
f
n =1
(n)
ij
1.
When the sum is less than 1, it implies that a process initially in state i may
never reach state j.
When the sum does equal 1, fij(n) can be considered as a probability
distribution for the random variable, the first passage time.
9 Denote the expected first passage time from state i to state j by ij ,
if
ij =
nf ij( n )
if
n =1
9 When
f
n =1
(n)
ij
f
n =1
(n)
ij
<1
f
n =1
(n)
ij
=1
Jin Y. Wang
Chap16-15
Operation Research II
Spring, 2009
9 For the case of ij , where i = j, ii is called the expected recurrence time for
state i.
9 After obtaining the steady-state probabilities ( 0 , 1 , 2 , , M ), these expected
recurrence times can be calculated by ii = 1 / i .
9 For the inventory example, where 0 = 0.286, 1 = 0.285, 2 = 0.263, 3 = 0.166,
the corresponding expected recurrence times are:
Absorbing States
9 If k is an absorbing state, and the process starts in state i, the probability of ever
going to state k is called the probability of absorption into state k, given that
the system started in state i. This probability is denoted by fik.
9 If the state k is an absorbing state, fik satisfies the system of equations
M
fik =
p
j =0
ij
f jk , for i = 0, 1, , M.
P=
Jin Y. Wang
0
0
0
0
1
2 / 3 0 1 / 3 0
0
0 2 / 3 0 1/ 3 0 .
0 2 / 3 0 1 / 3
0
0
0
0
0
1
Chap16-16
Operation Research II
Spring, 2009
9 Starting from state 2, the probability of absorption into state 0 can be obtained
by solving for f20.
f00 = 1 (since state 0 is an absorbing state).
f10 = (2/3) f00 + (1/3)f20
f20 = (2/3) f10 + (1/3)f30
f30 = (2/3) f20 + (1/3)f40
f10 = (2/3) f00 + (1/3)f20
f40 = 0 (since sate 4 is an absorbing state)
State 1
State 2
State 3
State 0
State 1
0.7
0.2
0.1
State 2
0.5
0.1
0.2
0.2
State 3
Jin Y. Wang
Chap16-17
Operation Research II
Spring, 2009
Jin Y. Wang
Chap16-18