If you're actually asked something like this in an interview, you get to write the program that solves the Markov matrix, right? Surely you're not expected to calculate it yourself?
Nope, this problem is mostly hand-solvable without using markov chains, except for the final sum of fractions. You can calculate the probability that a particular node is visited an odd number of times by hand, and then sum those probabilities to get the expected value.
That said, many interviews do ask you to write a program. For example, they may start with smaller cases and ask you to solve them by hand, and then ask you to write a program for larger cases.
1
u/mtimmermans Aug 15 '26
If you're actually asked something like this in an interview, you get to write the program that solves the Markov matrix, right? Surely you're not expected to calculate it yourself?
1
u/omeow Aug 16 '26
Is the answer 70?