Problem 501. Let's do Markov Chains!
Solution Stats
Problem Comments
-
5 Comments
test case 2 is underconstrained (either of the two zeros could be changed) and test case 3 doesn't account for increased precision.
hmm, sorry man. This was just for fun so people might get interested in markov chains, so I didn't think too hard about the test cases :)
perhaps it's been changed already, test 2 does not look underconstrained (one additional constrain of mc is that its columns should add up to 1)
In fact tests 2 and 3 are 'overconstrained' (you do not need the 'states' information to solve these)
Please, do not use isequal with floats, check them against some tolerance: abs(a-b) < tol. Currently rounding numbers to 2 decimal places seems to fix the issue if the test suite is not updated. Good problem.
Solution Comments
Show commentsProblem Recent Solvers15
Suggested Problems
-
3336 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1697 Solvers
-
Back to basics 8 - Matrix Diagonals
910 Solvers
-
Convert from Base 10 to base 5
254 Solvers
-
Test if two numbers have the same digits
239 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!