<s>[INST] Sum of hitting probabilities not equal to 1? I have a Markov Chain with transition matrix
\begin{equation}
P=
\begin{pmatrix}
0 & \frac{1}{4} & \frac{1}{4} & \frac{1}{4} & \frac{1}{4}\\
\frac{1}{5} & 0 & 0 & 0 & \frac{4}{5} \\
0 & 0 & 1 & 0 & 0\\
\frac{5}{6} & 0 & \frac{1}{6} & 0 & 0\\
0 & 0 & 0 & 0 & 1
\end{pmatrix}
\end{equation}
The states are labelled $0,1,2,3,4$. States $2$ and $4$ are absorbing. I am interested in calculating the probabilities that I reach state $2$ and $4$ respectively. Initially, I did the following.
$$$$
Define
\begin{equation}
f=\sum_{i=0}^{\infty}\sum_{j=0}^{\infty}\left(\frac{1}{4}\frac{1}{5}\right)^{i}\left(\frac{1}{4}\frac{5}{6}\right)^{j}=\frac{1}{1-\frac{1}{20}}\frac{1}{1-\frac{5}{24}}=\frac{480}{360}
\end{equation}
$f$ is the sum of probabilities that the chain loops between states $0$ and $1$ $i$ times and $0$ and $3$ $j$ times for all possible values of $i$ and $j$. Then
\begin{equation}
P(2)=\frac{1}{4}f+\frac{1}{4}\frac{1}{6}f=\frac{140}{361}
\end{equation}
Where the first term is the probability of accessing state $2$ from state $0$ and the second term is the probability of accessing state $2$ from state $3$.
\begin{equation}
P(4)=\frac{1}{4}f+\frac{1}{4}\frac{4}{5}f=\frac{216}{361}
\end{equation}
Where the first term is the probability of accessing state $4$ from state $0$ and the second term is the probability of accessing state $4$ from state $1$.
The problem with this is that these 2 probabilities do not sum to 1. Does anyone know why?
 [/INST] Nvm, I found the answer. I was not taking into account the ordering of the loops. eg looping between states $0$ and $1$ followed by $0$ and $3$ results in a different chain as compared to looping between $0$ and $3$ first then $0$ and $1$. $f$ should be changed as following
\begin{equation}
f=\sum_{i=0}^{\infty}\sum_{j=0}^{\infty}\left(\frac{1}{20}\right)^{i}\left(\frac{5}{24}\right)^{j}\frac{(i+j)!}{i!j!}
\end{equation}
Which is a binomial expansion and can be simplified to
\begin{equation}
f=\sum_{n=0}^{\infty}\left(\frac{1}{20}+\frac{5}{24}\right)^{n}
\end{equation}
which can be evaluated as an infinite geometric sum.
</s>