Stochastic Matrix - Example: The Cat and Mouse

Example: The Cat and Mouse

Suppose you have a timer and a row of five adjacent boxes, with a cat in the first box and a mouse in the fifth box at time zero. The cat and the mouse both jump to a random adjacent box when the timer advances. E.g. if the cat is in the second box and the mouse in the fourth one, the probability is one fourth that the cat will be in the first box and the mouse in the fifth after the timer advances. If the cat is in the first box and the mouse in the fifth one, the probability is one that the cat will be in box two and the mouse will be in box four after the timer advances. The cat eats the mouse if both end up in the same box, at which time the game ends. The random variable K gives the number of time steps the mouse stays in the game.

The Markov chain that represents this game contains the following five states:

  • State 1: cat in the first box, mouse in the third box: (1, 3)
  • State 2: cat in the first box, mouse in the fifth box: (1, 5)
  • State 3: cat in the second box, mouse in the fourth box: (2, 4)
  • State 4: cat in the third box, mouse in the fifth box: (3, 5)
  • State 5: the cat ate the mouse and the game ended: F.

We use a stochastic matrix to represent the transition probabilities of this system,

 P =
\begin{bmatrix} 0 & 0 & 1/2 & 0 & 1/2 \\ 0 & 0 & 1 & 0 & 0 \\ 1/4 & 1/4 & 0 & 1/4 & 1/4 \\ 0 & 0 & 1/2 & 0 & 1/2 \\ 0 & 0 & 0 & 0 & 1
\end{bmatrix}.

Read more about this topic:  Stochastic Matrix

Famous quotes containing the words cat and/or mouse:

    How they got a cat up there I do not know, for they are as shy as my aunt about entering a canoe. I wondered that she did not run up a tree on the way; but perhaps she was bewildered by the very crowd of opportunities.
    Henry David Thoreau (1817–1862)

    It is as when a migrating army of mice girdles a forest of pines. The chopper fells trees from the same motive that the mouse gnaws them,—to get his living. You tell me that he has a more interesting family than the mouse. That is as it happens.
    Henry David Thoreau (1817–1862)