A7 Linear algebra · Practice
Markov chains and reliability
Problems dealt one at a time, with new numbers every time. The kinds you miss come back more often, and you can keep going as long as you like.
0 solved
0 in a row
0 of 8 kinds solid
Check
A two-state channel goes from good to bad with probability 0.05 per step and from bad to good with 0.2. In the long run, what fraction of the steps is it bad?
Check
The same kind of channel, with = 0.05 and = 0.15.
(a)
What is the second eigenvalue of its transition matrix?
(b)
How many steps does a bad spell last on average?
Check
A unit fails with probability 0.001 per hour and is never repaired.
(a)
What is one unit's mean time to failure, in hours?
(b)
Two such units run in parallel, and the system fails when both have. What is its mean time to failure?
Check
The starter gives a 3-state transition matrix P (columns add to 1). Set pi to its steady state from np.linalg.eig (the eigenvector for the eigenvalue nearest 1, scaled to add to 1), lam2 to the size of the next-largest eigenvalue, and x50 to the state probabilities after 50 steps from state 0, found by repeated multiplication.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Two supplies each fail with probability lam = 0.001 per hour; a failed one is repaired with probability mu = 0.02 per hour, and the system is down if both fail. Build for the transient states (both up, one up) as in the second example, set N to the fundamental matrix, mttf to the expected hours to system failure from both up, and gain to mttf divided by the value with no repair.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Simulate the two-state channel ( = 0.05 good to bad, = 0.3 back) for 200 000 steps with rng = np.random.default_rng(s), starting good, drawing one uniform number per step: leave the current state if the number is below that state's switching probability. Set frac_bad to the fraction of steps spent bad and mean_burst to the average length of the bad spells, then compare with and .
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
A two-state chain switches with probabilities 0.2 and 0.15. What is its second eigenvalue?
Check
Two units with failure probability 0.001 per hour and repair probability 0.05: what is the mean time to failure from both up, in hours?
A kind of problem counts as solid once you've got it right on the first try twice in a row. Back to the lesson · Practice every topic in A7