Assignment
Assignment
Assignment
-----------------------------------------------------------------------------
Course: Modeling and Simulation (1105481)
Student Name : Munifa Qaid Alotaibi
ID: 202101239
A: Today is sunny
B: Tomorrow is sunny
C: The day after tomorrow is cloudy
P(B|A) = 0.8 (the probability that tomorrow is sunny given that today is
sunny)
P(C|B) = 0.6 (the probability that the day after tomorrow is cloudy given that
tomorrow is sunny)
For find P(C|A), the probability that the day after tomorrow is cloudy, given today is
sunny.
Therefore, the probability that it will be cloudy the day after tomorrow, given that
today is sunny, is:
So, the probability it will be cloudy the day after tomorrow, given that today is sunny,
is 0.48 or 48%.
Specify the classes of the Markov chain and determine whether they are
recurrent or transient (5 marks)
Class 1: {1, 2, 4}
Class 2: {3}
Class 3: {5}
[0 0 0]
The diagonal elements of this submatrix are 1/5 and 4/9. Neither of them is equal to 1,
which means that Class 1 is transient.
[0]
Since there is only one state in Class 2, the diagonal element is 1. Therefore, Class 2
is recurrent.
[1/5]
The diagonal element of this submatrix is 1/5, which is not equal to 1. Thus, Class 3 is
also transient.
The Result :
What is the Mean Duration of state E3? Assume time spent in each
state 50 ms.(3 mark )
P(E3 -> Exit) represents the probability of transitioning from state E3 to an exit state
(a state outside of {E1, E2, E3}).
M_E3 = 50 * 1 + 0 * 0 + 50 * 1
M_E3 = 100 ms
What is the probability that people in middle class at the first stage is
stay in middle class by the 5th stage? (4 marks)
To calculate the probability that people in the middle class at the first stage stay in the
middle class by the 5th stage, we need to compute the 5th power of the transition
matrix P and look at the corresponding entry.
P^5 = P * P * P * P * P
The entry in the second row and second column of P^5 represents the probability of
transitioning from the middle class at the first stage to the middle class at the fifth
stage.
Therefore, the probability that people in the middle class at the first stage stay in the
middle class by the 5th stage is 0.281 or 28.1%.
Q5 / What is the service rate in an M/M/1 queue with ρ = 0.17 and λ
= 0.03? (2 marks)
In an M/M/1 queue, ρ represents the traffic intensity or utilization, and λ represents
the arrival rate.
μ=λ/ρ
μ = 0.03 / 0.17
μ ≈ 0.1765
Therefore, the service rate in the M/M/1 queue with ρ = 0.17 and λ = 0.03 is
approximately 0.1765.