Probability an ant returns to its starting vertex on an octahedron after $6$ moves

markov chainsprobabilityrandom walk

I've seen several problems of the form:

An ant is on a vertex of a $n$-sided regular polyhedron. The probability that the ant returns back to their original position after $m$ moves can be expressed in the form $
\frac {p}{q}$
, find the value of $p + q$. (A move from one vertex to an adjacent vertex.)

The only way I've thought of is manually evaluated all of the cases, but I'm sure there's a more efficient method. So for example, let's take a case where we have an octahedron and $6$ moves available for the ant, how would you be able to solve that?

Best Answer

For this problem there are just three states: In state $S_1$ the ant sits at the starting position, in state $S_2$ the ant sits on one of the four adjacent positions, and in state $S_3$ the ant sits at the vertex opposite to the starting vertex. Denote by $${\bf p}(n)=\left[\matrix{p_1(n)\cr p_2(n)\cr p_3(n)\cr}\right]\qquad(n\geq0)$$ the probabilities that after $n\geq0$ steps the ant is in state $S_i$ $\>(1\leq i\leq3)$. Then ${\bf p}(0)=(1,0,0)$. The rules of the game then say that $${\bf p}(n+1)=A\>{\bf p}(n)\qquad(n\geq0)$$ with $$A:=\left[\matrix{0&{1\over4}&0\cr 1&{1\over2}&1\cr0&{1\over4}&0\cr}\right]\ .$$ This is the essential step. E.g., the second column of $A$: When the ant is in state $S_2$ then it will move to state $S_1$ with probability ${1\over4}$, remain in state $S_2$ with probability ${1\over2}$, and move to state $S_3$ with probability ${1\over4}$. We now have to compute $p_1(6)$, which is the first component of $$A^{6}\left[\matrix{1\cr0\cr0\cr}\right]=\left[\matrix{{11\over64}\cr{21\over32}\cr{11\over64}\cr}\right]\ .$$