Let $S_n$ denote the sum of the outcomes of the $n$ tosses of a fair dice. Let $T=\inf\{n>0: S_n$ is a multiple of $5\}$. Compute $E(T)$ (by means of markov chains).
Attempt. Instead of working with $S_n$,we shal work with $S_n$ mod $5$. So $T$ becomes $T=\inf\{n\geq 1: S_n =0\}$. The chain $\{S_n\}_{n \geq 1}$ is markov, with state space $\mathbb{X}=\{0,1,2,3,4\}$ and transition probabilities $p(k,m)=1/6$ for $m \in \mathbb{X}\setminus \{k+1\}$ and $p(k,k+1)=2/6$. I wonder which of the following is the right path to the solution.
Option one. According to one step analysis, the function $g(x)=E(T~|~S_1=x),~x\in \mathbb{X}$ satisfies: $$g(x)=\sum_{y\in \mathbb{X}}p(x,y)g(y)$$ and we solve somehow for $g(0),\ldots,g(4).$ So $$E(T)=E(E(T|S_1))=\sum_{x\in \mathbb{X}}P(S_1=x)E(T|S_1=x)=\frac{1}{6}g(0)+\frac{2}{6}g(1)+\ldots+\frac{1}{6}g(4).$$
Option two. $T$ is indeed a time of first return to a state $x_0\in \mathbb{X}$ (that I don't know..). In that case we work with limit distributions $\pi=\pi P$ (it exists since the chain is aperiodic, irreducible and has finite state space), so $E(T)=1/\pi(x_0).$
Thanks a lot in advance for the help!