You are on page 1of 18

# cc

c
  c
c     
        c

c
c

c
  cc
c
c

 c !c c
c c

c
c
c c

"# \$#%c
& &c  c'c
c
c

ccc
0 cc
c

 c

In Question 1, two players, Aylin and Barış are playing Rock, Paper, Scissors with given
strategies and their choices depend only on the last played games and have no relation to the
history of the game, therefore being a discrete time stochastic process this system can be defined
as a Markov chain.

##  : Barış¶s choice of game for time t

States can be defined as their choices from Rock(R), Paper(P) or Scissors(S) for Aylin
and Barış, respectively, for discrete times.

S =     
ƍ       ışƍ     or equivalently

## S =         

Considering given strategies transition probability matrix (P) can be given as a table as
follows:

## c c c c  c c c  c c c

c ë  ë ë  ë ë ë ë  ë ë 
c ë ë ë ë ë  ë  ë ë  ë 
c ë ë ë ë ë ë ë ë 
 c ë  ë ë ë ë ë ë  ë ë
c ë ë ë ë  ë  ë ë  ë  ë
c ë ë ë ë ë ë ë  ë ë 
 c ë  ë  ë ë ë ë ë  ë  ë
c ë ë ë ë ë  ë ë ë  ë
c ë ë ë ë ë ë ë ë  ë 
O c

In this game the rules and player strategies do not change throughout the game as
mentioned in the question. From the transition probability matrix and state transition diagram,
which is shown below as Diagram 1-b, it can be investigated whether this process is ergodic or
not. From state diagram it can be shown that all states are communicative with each other. In
addition all states are recurrent, which means not having a transient property which imposes to
being reachable from a state but not being able to reach this state. Observing diagram and
probability matrix, it can be stated that all states are aperiodic and having these three properties
this Markov chain can be classified as ergodic which implies the effect of initial state diminishes
in the long term. For an ergodic Markov chain, for the long term we can use steady state
analysis.

## Diagram 1-b: State transition diagram with related probabilities

sing steady state analysis, in order to find stationary distribution we need to find 8 =
8 8 8 8  equilibrium distribution vector. By using the theorem which states

8 = 8x P where 
 8 = 1

and using Excel Solver and given probability matrix, 8vector is found as it is:

##          

 8  8  8  8  8  8  8  8  8 
8 ë ë 
 ë ë
  ë ë  ë ë   ë   ë ëë ë  ë  ë   ë  
c

In addition, since stationary distribution vector can be found without any error by using
theorem, it also shows that there exists stationary distribution of Markov chain for this process.

In the long term situation of the game can be identified from stationary distribution. For
Aylin, according to the specifications of game; win, loss and draw situations are highlighted
below in 8 vector.

##          

 8  8  8  8  8  8  8  8  8 
8 ë ë 
 ë ë
  ë ë  ë ë   ë   ë ëë ë  ë  ë   ë  
         

Summing up the related probabilities we could find the ratio in the long turn:

## With rounding these probabilities, ratio of win:loss:ratio can be stated as 19:39:42.

0 c c

 c

In the second question we are asked to analyze a reordering system consisting of three
processors. For each processor probability of being successful is given as:

P( P1 is successful ) = 0,8

P( P2 is successful ) = 0,64

P( P3 is successful ) = 0,512

For this process states can be defined as the order of processes at a discrete time.

## S = P1P2P3, P1P3P2, P2P1P3, P2P3P1, P3P1P2, P3P2P1 

In this question ordering activity does not take the history of past orderings into account.
It only considers the last order of processes; therefore this system can be identified as a Markov
chain.

Considering properties of the system given in the question, transition probability matrix
can be calculated. For instance, transition of the system from state P1P2P3 to state P1P2P3,
which is the first element of matrix, is calculated in this manner:

## P = P( P1 is successful ) + P( P1 is failed ) * P( P2 is failed ) * P( P3 is failed )

P = 0,8 + 0,2 * 0,36 * 0,488
P = 0,835136
With this approach all transitions are calculated and transition probability matrix (P) is given as a
table below:

c   c   c   c   c   c   c
  c ë 
 ë ë

 ë   ë ë ë
  c ë ë

 ë 
 ë ë ë ë ë
  c ë   ë ë

 ë ë

 ë ë
  c ë ë ë ë ë

 ë ë   
  c ë ë ë ë ë ë  
 ë ë


  c ë ë ë ë   ë ë ë  


O c

In order to find long-run probabilities we need to use steady state analysis for this system.
Since the system¶s properties and probabilities of orderings do not change over the time, in
addition being an ergodic Markov chain this system can be analyzed for long run.

sing steady state analysis, in order to find stationary distribution we need to find 8 =
8 8 8 8  equilibrium distribution vector. By using the theorem which states

8 = 8x P where 
 8 = 1

and using Excel Solver with given probability matrix (P), 8vector is found as it is:

##             

 8  8  8  8  8  8 

8 ë
 ë   ë 
 ëëë ëë
  ëë 

In the long run, probability of having Processor 1 closer to the front than Processer 3 can
be determined from stationary distribution vector8. As highlighted in the below, these occur
when in the long run this system is in the state of P1P2P3, P1P3P2 and P2P1P3.
            

 8  8  8  8  8  8 

8 ë
 ë   ë 
 ëëë ëë
  ëë 

Summing up the related probabilities will give the total probability of having Processor 1 closer
to the front than Processor 3 in the long-run. As calculated below, this probability is 0,882318.

##    !"#8 \$8 \$8 

ë
\$ë  \$ë 

ë   
0 c c

In the third question we need to consider a periodic review inventory system with (s=1,
S=4) and a given periodic demand distribution with backlogging restriction. It is assumed that
control of the inventory is done at the end of each period and next period starts with
replenishment if necessary.

States can be defined as the level of inventory at the end of time periods:

## sing this state definition, state space can be constructed as following:

S = 0, 1, 2, 3, 4

sing the demand distribution and given periodic inventory system, transition probability
matrix for this process can be given as:

  ëc c c c c c
 ëc ë ë ë ë  ë 
 c ë ë ë ë ë 
 c ë ë  ë ë ë 
 c ë ë ë  ë ë 
 c ë ë ë ë  ë 

 c

Since this system is an ergodic Markov chain ensuring that all states in the system has the
three properties of being ergodic which are being recurrent, aperiodic and communicative, this
system can be analyzed for steady state probabilities.

sing steady state analysis, in order to find stationary distribution we need to find 8 =
8 8 8 8  equilibrium distribution vector. By using the theorem which states

8 = 8x P where 
 8 = 1
and using Excel Solver with given probability matrix, 8vector is found as following:

 ë    

 8  8  8  8  8 

8 ë

  ë   ë
 ë
 ë

 

## Long-run mean inventory level can be found by

m

 ! "
 8 

 
"ë%8 \$%8 \$%8 \$ %8 \$%8 
ë%ë

 \$%ë  \$%ë
\$ %ë
\$%ë

 

 

Considering long-run probabilities and related level of inventories, mean inventory level in the
long run can be stated as 
 

O c

In this inventory system, demand is lost whenever the inventory level is less than the
demand of related period. Considering this inventory system, since demand is never greater than
2, there is no loss when the inventory level is 4,3 and 2. In addition, when inventory level is zero,
replenishment occurs and in the next period inventory level becomes 4, where no demand can be
lost.

Therefore, for investigating lost demand only inventory level of 1 must be considered. In
addition when the inventory level is one, in order to witness a lost demand, demand of related
period must be more than 1, in this concept only 2. In the long run we could identify the fraction
of having inventory level of 1 from the steady-state distribution. As mentioned in the previous
part, probability of having inventory level of 1 in the long run is 8 = 0,163613. Besides, demand
distribution function gives the fraction of having demand level of 2 for any period, which is 0.2.
Since these events are independent of each other, probability of occurring together can be
calculated by multiplying them.

## ] # & #] # #% #

] # #%8 
ë%ë  
ë ë

As calculated above, having a lost demand for this system occurs with the probability of 4,55 %.

In order to calculate expected long-run average daily profit, we need to consider the long-
run steady state probabilities of inventory levels and demand distribution for different cases.

## Daily Profit = Daily Revenues ± Daily Costs

We need the expected level of demand for any period. As calculated below it is 0,7 items
per day.

| &&'&&|#ë  %


## |#ë%ë\$ë %\$ë%cë c c

For the first case, if there is no lost demand, only selling price and cost of keeping item in
the inventory should be considered for related periods and their probabilities:

## 8 %ë ()#\$8 %ë () #\$8 ë ()#

ë

 ë ()#\$ë
%ë () #\$ë
%ë ()#
cë ëcccccc ëccc


For the second case, if we have 1 item in the inventory we sell zero or one item with
related demand distribution or we can have lost demand.

## 8 %ë ()#)8 %ë%'

ë  %ë ()#)ë  %ë%'
cë ëcccccë ccccë ëccc

Finally, if we had zero items in the inventory at the end of the period we will have
replenishment. In addition inventory holding cost for items in replenishment are not taken into
account because it is assumed that the checking is done at the end of the period; however new
items are shipped at the beginning of the next period, explaining why there is no inventory
holding cost for these items.

)8 %
ccë ccc

Combining these three cases long-run average daily profit can be calculated as shown below:

ë
ë %() ë %)ë

 %\$ëë
%()ë  %)ëë%'

Y c  c ccë cccë ccc cccë ëcc

## In order to find the number of days between successive replenishments, we need to

consider long-run probabilities where inventory level is strictly less than 1, which is 8 in this
system.

## sing mean first passage times formula for  = 1 / 8 :

 *8 
*ë

 
c c

As calculated above, replenishments are expected to occur between nearly 6.11 days.
0 cc

 c

In the fourth question analyzing of a tennis player¶s performance with regard to his
morale is conducted.

For any discrete time, results of his two last games will be used for analyzing this system.

##  : result of the game at time t

States can be defined as the result of last two games using ³L´ for losing, ³W´ for
winning the related game.

## It is also given in the question that   = WW.

Considering given probabilities given in the question transition probability matrix (P) can
be given as a table as follows:

## c c c c c

c ë ë ë
 ë
c ë  ë  ë ë
c ë ë ë  ë 
c ë ë
 ë ë

Since the probabilities do not change over the time and they do not consider the whole
past history of the games, in other words since they only consider the last state of the system,
performance of this player can be identified as a Markov chain.

c
O c

As given in the question, Mert has won his first two games, which can also be stated as
his first state is WW according to state definition.

In order to find a future loss followed by another loss, path from WW to LL could be
investigated. For the first three paths from WW to LL are given as following with related
probability calculations:

ë %ë




## ë %ë %ë %ë



Intuitively it can be said that this path has the probability of form:
q
 +  ,  -



 ,  - Í

 + 


ë %ë
% +,"!!'
\$

cë c

As calculated above, probability of having the first loss followed by another loss is 0,6.

c
c

In order to find a probability mass function for L which is defined as the number of
games played until the first loss, we need to consider available paths from initial state, WW, to
occurring of first loss. In the calculation of L, the first two games which Mert has already won
are not considered. For the rest of the system number of the games until the first loss can be
identified from paths as following:

#ë 

#ë %ë 

##  #ë %ë %ë %ë 

Since it can be derived from these initial situations, probability mass function of L can be
given as:

P( L ) = P (  = WL |  \$ = WW ) * P (  = WW |  \$ = WW ) .\$

## `ccccc cc/\$0 ccccc cc

c
c

   ,'   !& -(   &,  ,  + "& 
&! &,) ++  sing steady state analysis, in order to find stationary
distributions we need to find 8 = 8 8 8 8  equilibrium distribution vector. By using the
theorem which states

8 = 8x P where 
 8 = 1

and using Excel Solver with given probability matrix, 8vector is found as it is:

##     

 8  8  8  8 

8 ë

 ë  ë  ë

 c

In this part of the question, it is assumed that in the 2000th game this system reaches
stability where steady-state analysis and its results can be used. In other words these two
consecutive games are assumed that they can be investigated as a state in the long-run.

P ( = W |  =  ) is need to be calculated for this reason. For 2000th and
2001st game this system could be thought in WW or in LL for the long-run. Probability of being
in states WW or LL in the long run can be gathered from steady state distribution vector.

 .#

  
1( 

1!#  
1( 

!
 
  

!#  

1!

2 # 
  ë 
2 #23   #

As calculated above, probability of Mert¶s winning 2000th game given that the 2000th and
2001st games have same results is 0,5.
[ c

In this question we are asked to calculate the expected number of games until first
occurrence of two consecutive losses. Since the initial state of this system is Win-Win, expected
number of transitions before we first reach Loss-Loss state can be found by using mean first
passage times formula.

## \$.. \$56.. 4\$5   5\$..  O   

  
 
 
\$.. \$4\$  \$.. \$4\$.  .\$.. \$4\$.  .\$..
 
\$.. \$ë %\$.. \$ë %.\$.. \$ë
ë \$.. \$ë %.\$.. 
\$.. ë* \$.\$..    u   

## .\$.. must be calculated since it is unknown in 1st equation.


.\$.. \$56.. 4.\$5  5\$.. 
.\$.. \$4.\$  \$.. \$4.\$.  .\$.. \$4.\$.   .\$..
 
.\$.. \$ë\$ë\$ë%.\$..
     

## .\$.. must be calculated since it is unknown in 3rd equation.

.\$..
 \$56.. 4.\$5  5\$..


.\$..
 \$4.\$   \$.. \$4.\$.  .\$.. \$4.\$.   .\$..
 
.\$..
 \$ë
%\$.. \$ë%.\$.. \$ë  2  

Combining 1st, 3rd and 4th equation and renaming m values for readability:

.\$..
 / \$.. 0 .\$.. 1 
.\$..
 \$ë
%\$.. \$ë%.\$..  /\$ë
0\$ë1
\$.. ë* \$%.\$..  0ë* \$1
.\$.. \$ë%.\$..   1\$ë/


## Solving these equations simultaneously:

/\$ë
ë* \$1#\$ë1
/ \$1
1\$\$ë1
ë
1
1* &Úc

As calculated above \$.. = 7, implies that starting with initial state WW, expected
number of games until the first occurrence of state LL is 7 games.

 c

In this part of the question total numbers of the games until Mert will end his career is
asked. According to his press conference he will end his career when he faces three consecutive
losses. Since three conssequitive games are considered in this question there is need for new state
definition which we can investigate mean first passage times for three games.
Defining the states for three games is given as:

##  : result of the game at time t

State space can be defined as the result of last three games using ³L´ for losing, ³W´ for
winning the related game.

## or equivalently S = &&& &&' &'& &'' ''' ''& '&' '&&

Considering given probabilities given in the question transition probability matrix (P) can
be given as a table as follows:

## c c c c c c c c c

c ë  ë  ë ë ë ë ë ë
c ë ë ë  ë
 ë ë ë ë
c ë ë ë ë ë ë ë  ë

c ë ë ë ë ë  ë  ë ë
c ë ë ë ë ë  ë  ë ë
c ë ë ë ë ë ë ë  ë

c ë ë ë  ë
 ë ë ë ë
c ë  ë  ë ë ë ë ë ë

With this transition matrix mean first passage times can be calculated for states from
WWW to LLL and from WWL to LLL. By formulation and using related probabilities expected
number of games can be found as:

## = +  \$... + ,  \$...

Since calculating mean first passage time values for this transition probability matrix takes
too long further calculations cannot be given.