Skip to main content
3 of 3
added 913 characters in body
Evan Jenkins
  • 7.2k
  • 1
  • 36
  • 56

The position of the dog relative to the human is a Markov chain, which is symmetric by inspection (there are three cases to consider: interior squares, "edge squares," and "corner squares"). This Markov chain splits up into two irreducible ergodic components corresponding to even and odd squares. Finally, any symmetric, irreducible, ergodic Markov chain has uniform stationary distribution. Since the number of squares at distance $d$ is $4d$ (except for $d = 0$), it follows that the distribution of the distances will be linear (again except for $d = 0$).

Here's how to show symmetry. If you're in an interior square, you move in each cardinal direction with probability $\frac{1}{16}$ and each diagonal direction with probability $\frac{2}{16}$. If you're in an edge square, you move diagonally off the edge with probability $\frac{2}{16}$, cardinally off the edge in each of two directions with probability $\frac{1}{16}$, and along the edge in each direction with probability $\frac{3}{16}$. If you're in a corner square, you move diagonally to an edge in each of two directions with probability $\frac{3}{16}$, and into the interior in one cardinal direction with probability $\frac{1}{16}$. We then observe that the probabilities of moving to each square from each other square are equal to the probabilities of moving the other way. (e.g., if we're on an edge next to a corner, we move into the corner with probability $\frac{3}{16}$ and then move out to that same edge square with the same probability.)

Evan Jenkins
  • 7.2k
  • 1
  • 36
  • 56