An ant starts at a specific corner of a cube and tries to reach the exact opposite corner of the cube. It walks randomly to neighboring corners with an equal probability of 1/3. Every time the ant travels to the next corner, a second passes. What is the expected number of seconds that it takes the ant to reach the exact opposite corner?
Figure 1 - Imagination of the cube.
Look at the given figure in the question. Number the corners and write out the Markov chain.
First, start with numbering all corners to get a clear overview of all states. The ant starts at $s_1$ and wants to reach $s_a$. This problem can be approached as a Markov chain problem. We can start writing out all state equations:
\begin{equation}
s_1=1+s_2
\end{equation} \begin{equation}
s_2 = 1 + \frac{2}{3}s_3 + \frac{1}{3}s_1
\end{equation} \begin{equation}
s_3 = 1 + \frac{2}{3}s_2 + \frac{1}{3}s_a
\end{equation} $s_a$ is equal to zero, because it is the absorption state. We can now substitute $s_3=1+\frac{2}{3}s_2$ in Equation 2. This gives us: \begin{equation}
s_2=1+\frac{2}{3}(1+\frac{2}{3}s_2)+\frac{1}{3}s_1=\frac{5}{3}+\frac{4}{9}s_2 + \frac{1}{3}s_1
\end{equation} \begin{equation}
\frac{5}{9}s_2 = \frac{5}{3} + \frac{1}{3}s_1
\end{equation} \begin{equation}
s_2 = 3 + \frac{3}{5}s_1
\end{equation} Now we can substitute $s_2$ in Equation 1: \begin{equation}
s_1=1+(3+\frac{3}{5}s_1)=4+\frac{3}{5}s_1
\end{equation} \begin{equation}
\frac{2}{5}s_1 = 4
\end{equation} \begin{equation}
s_1 = 10
\end{equation} In other words, the expected time it takes the ant to reach the exact opposite corner is ten seconds.