Markovian Mouse and Absorbing Chains

Remember the cat-and-mouse game? We calculated the expected time for the mouse on door # 4 to reach the cat. As we know the Markovian technique, we will solve the problem using absorbing chains. Here is the situation with arrows representing the mouse’s stage-by-stage movement.

We follow the steps described in the previous post.
Step 1: Construct the transition probability matrix
Step 2: Isolate I and make Q
Step 3: Subtract Q from the Identity matrix
Step 4: Calculate the inverse of (I – Q)

In step 1, we re-arrange the columns and get the identity matrix cornered.

Q matrix is

And the rest of the calculations,

AA <- matrix(c(0, 0.5, 0, 0, 0,
               0.5, 0, 0.5, 0, 0,
               0, 0.5, 0, 0.5, 0,
               0, 0, 0.5, 0, 0.5,
               0, 0, 0, 0.5, 0), nrow = 5)

II <- matrix(c(1, 0, 0, 0, 0,
               0, 1, 0, 0, 0,
               0, 0, 1, 0, 0,
               0, 0, 0, 1, 0,
               0, 0, 0, 0, 1), nrow = 5)
BB <- II - AA

CC <- solve(BB)

\begin{bmatrix} 1.67  & 1.33 & 1.0  & 0.67 & 0.33\\ 1.33 & 2.67 & 2.0  & 1.33 & 0.67\\ 1.0  & 2.0 & 3.0 & 2.0 & 1.0\\ 0.67 & 1.33 & 2.0  & 2.67 & 1.33\\ 0.33  & 0.67 & 1.0 & 1.33 & 1.67\end{bmatrix}

Add the elements of column 3, which represents door 4. It takes an average of 9 days for the mouse to be caught.

The Cats And Random Mouse Riddle: MindYourDecisions