You are on page 1of 10

Markov Chain

1)
2)

(a) The R code is:

mat1 <- matrix(c(0.4,0.6), ncol = 2, nrow = 1)


mat1 <- as.matrix(mat1)
mat2 <- as.matrix(matrix(c(0.8, 0.9, 0.2, 0.1), ncol = 2, nrow = 2))
mat2 <- as.matrix(mat2)
i=0
while(i < 2)
{
mat3 = mat1%*%mat2
mat1 = mat3
i=i+1
}
mat3

The percentage of market for store 1 after 2 periods = 81.4%

The percentage of market for store 2 after 2 periods = 18.6%

(b) The R code is:

mat1 <- matrix(c(0.4,0.6), ncol = 2, nrow = 1)


mat1 <- as.matrix(mat1)
mat2 <- as.matrix(matrix(c(0.8, 0.9, 0.2, 0.1), ncol = 2, nrow = 2))
mat2 <- as.matrix(mat2)
mat3 = mat1%*%mat2
while(abs(mat1 - mat3) > 0.0001)
{
mat3 = mat1%*%mat2
mat3=mat1+mat3
mat1=mat3-mat1
mat3=mat3-mat1
}
mat3

The limiting probability of market for store 1 = 81.814%

The limiting probability of market for store 2 = 18.186%

It means that market for store 1 and store 2 will be respectively 81.814% and 18.816% after long
period of time
3)
Queuing Theory

1)

 The results shows that efficiency can be improved with the current system in use. This
model can beconsidered as a case of a generalized model.

The average server utilization is 0.8125.-

The average number of customers in queue is 3.5208.-

The average number of customers in the system is 4.3333.-

The average waiting time in queue is 1.0833.-

The average time spent in the system is 1.3333.-


Probability that the system is empty is 0.1875.-

Probability that three or more trucks waiting is 0.1006.-

The results shows that efficiency can be improved with the current system in use. This model can
be considered as a case of a generalized model.Juhn believes that adding a second fruit loader
will substantially improve the firm’s efficiency. He estimates that a two-person crew, still acting
like a single-server system, at the loading gate will double the loading rate from 4 trucks per hour
to 8 trucks per hour.
2)
Reliability

You might also like